brake 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README +7 -0
- data/lib/brake.rb +10 -5
- metadata +1 -1
data/README
CHANGED
@@ -80,4 +80,11 @@ Ben - Cucumber options added and task iterations
|
|
80
80
|
0.3.0
|
81
81
|
Ben - Format was missing the layout definition in the options parser
|
82
82
|
|
83
|
+
0.3.2
|
84
|
+
Ben - Added cucumber options: strict, name, guess, expand
|
85
|
+
|
86
|
+
0.3.3
|
87
|
+
Ben - Added Docs and fixed a few comment typos and changes for docs
|
88
|
+
Ben - Added brake version option
|
89
|
+
|
83
90
|
END
|
data/lib/brake.rb
CHANGED
@@ -17,11 +17,8 @@ end
|
|
17
17
|
# The tool has now evolved and if used cleverly could be used by anyone
|
18
18
|
class Brake
|
19
19
|
# Starts the Brake Class
|
20
|
-
# Outputs the brake version at runtime
|
21
20
|
# If there is no information given to brake it will rin the 'default task'
|
22
21
|
def genesis
|
23
|
-
puts "Brake Version:" + Gem.loaded_specs["brake"].version.to_s
|
24
|
-
|
25
22
|
# creates the default arguments
|
26
23
|
# -P Disables profiles, we no longer need it as all data is given at command line
|
27
24
|
# -s removes the extra source code line no note displayed in the command line
|
@@ -34,6 +31,11 @@ class Brake
|
|
34
31
|
# Runs the options parser, Arguments and Untangle are now inst variables
|
35
32
|
self.parse_command_line_options
|
36
33
|
|
34
|
+
# Outputs the brake version at runtime
|
35
|
+
if @brakeVersion
|
36
|
+
puts "Brake Version:" + Gem.loaded_specs["brake"].version.to_s
|
37
|
+
end
|
38
|
+
|
37
39
|
self.debug( ARGV )
|
38
40
|
# Default is assigned to the ARGV if there is no task given
|
39
41
|
ARGV.push('default') if ARGV == []
|
@@ -86,7 +88,7 @@ class Brake
|
|
86
88
|
@arguments[:strict] = "--strict"
|
87
89
|
end
|
88
90
|
opts.on("-n", "--name featureName", String, "String: Only execute features with a partial match to the given name" ) do |opt|
|
89
|
-
@arguments[:
|
91
|
+
@arguments[:name] = "--name #{opt}"
|
90
92
|
end
|
91
93
|
opts.on("-g", "--guess", "Bool: Guess best match for ambiguous steps" ) do |opt|
|
92
94
|
@arguments[:guess] = "--guess"
|
@@ -128,7 +130,7 @@ class Brake
|
|
128
130
|
end
|
129
131
|
@arguments[:screen] = "SCREENWIDTH=#{opt[0].downcase} SCREENHEIGHT=#{opt[1].downcase}"
|
130
132
|
end
|
131
|
-
opts.on("
|
133
|
+
opts.on("-p", "--position 0,0", Array, "Array: The x,y coords of the browser 0,0 top left" ) do |opt|
|
132
134
|
if opt.length > 2
|
133
135
|
puts "Incorrect number of args for position: " + opt.to_s
|
134
136
|
exit
|
@@ -144,6 +146,9 @@ class Brake
|
|
144
146
|
|
145
147
|
opts.separator "Brake options:"
|
146
148
|
opts.separator ""
|
149
|
+
opts.on("-V", "--version", "Bool: Output the current version of brake" ) do |opt|
|
150
|
+
@brakeVersion = opt
|
151
|
+
end
|
147
152
|
opts.on("-I", "--iterate", String, "Int: Number of times to run the task" ) do |opt|
|
148
153
|
@taskIterations = opt.to_i
|
149
154
|
end
|