brake 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/brake +11 -5
  2. 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 "Global options:"
24
- opts.on("-e", "--enviroment release", String, "String: The enviroment to run the tests on eg Release" ) { |o| options.push([:env, o]) }
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("-p", "--position 0,0", Array, "Array: The x,y coords of the browser 0,0 top left" ) { |o| options.push([:position, o]) }
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( ' ' ) )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: