brake 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/brake +11 -5
- metadata +1 -1
data/bin/brake
CHANGED
@@ -20,8 +20,12 @@ OptionParser.new do |opts|
|
|
20
20
|
opts.banner = "\nBrake, The Brandwatch Rake wrapper for cucumber, And on the eighth day, god created Brake.\nUsage: brake <task> [options]"
|
21
21
|
|
22
22
|
opts.separator ""
|
23
|
-
opts.separator "
|
24
|
-
opts.on("-e", "--enviroment release", String, "String: The enviroment to run the tests
|
23
|
+
opts.separator "Defaulted options:"
|
24
|
+
opts.on("-e", "--enviroment release", String, "String: The enviroment to run the tests against eg Release" ) { |o| options.push([:env, o]) }
|
25
|
+
opts.on("-p", "--platform brandwatchWeb", String, "String: The platform to run the tests on eg brandwatchWeb" ) { |o| options.push([:platform, o]) }
|
26
|
+
|
27
|
+
opts.separator ""
|
28
|
+
opts.separator "Global options:"
|
25
29
|
opts.on("-t", "--tags @high,@login", Array, "Array: A list of all tagged test to be run" ) { |o| options.push([:tags, o]) }
|
26
30
|
opts.on("-l", "--log_level debug", String, "String: The log output level debug|info" ) { |o| options.push([:log_level, o]) }
|
27
31
|
|
@@ -32,7 +36,7 @@ OptionParser.new do |opts|
|
|
32
36
|
opts.separator "BrandwatchWeb options:"
|
33
37
|
opts.on("-b", "--browser chrome", String, "String: The type of browser to run" ) { |o| options.push([:browser, o]) }
|
34
38
|
opts.on("-s", "--screen 1280,1024", Array, "Array: The width,hight of the browser window" ) { |o| options.push([:screen, o]) }
|
35
|
-
opts.on("
|
39
|
+
opts.on("--pos", "--position 0,0", Array, "Array: The x,y coords of the browser 0,0 top left" ) { |o| options.push([:position, o]) }
|
36
40
|
|
37
41
|
opts.separator ""
|
38
42
|
opts.separator "API options:"
|
@@ -54,6 +58,8 @@ end
|
|
54
58
|
arguments = { :req => "--require features -P" }
|
55
59
|
options.each do | value |
|
56
60
|
case value[0]
|
61
|
+
when :platform
|
62
|
+
arguments[:platform] = "PLATFORM=#{value[1].downcase}"
|
57
63
|
when :env
|
58
64
|
arguments[:env] = "ENVIRONMENT=#{value[1].downcase}"
|
59
65
|
when :tags
|
@@ -83,10 +89,10 @@ else
|
|
83
89
|
puts "running task: " + task
|
84
90
|
case task.downcase
|
85
91
|
when 'brandwatchweb', 'bw'
|
86
|
-
arguments = arguments.merge({ :env => 'ENVIRONMENT=release', :browser => 'BROWSERNAME=chrome' })
|
92
|
+
arguments = arguments.merge({ :platform => "PLATFORM=brandwatchweb", :env => 'ENVIRONMENT=release', :browser => 'BROWSERNAME=chrome' })
|
87
93
|
Rake::Task[:brandwatchWeb].invoke( arguments.values.join( ' ' ) )
|
88
94
|
when 'brandwatchapi', 'api'
|
89
|
-
arguments = arguments.merge({ :version => 'VERSION=1' })
|
95
|
+
arguments = arguments.merge({ :platform => "PLATFORM=brandwatchapi", :env => 'ENVIRONMENT=int', :version => 'VERSION=1' })
|
90
96
|
Rake::Task[:brandwatchAPI].invoke( arguments.values.join( ' ' ) )
|
91
97
|
else
|
92
98
|
Rake::Task[task].invoke( arguments.values.join( ' ' ) )
|