visionmedia-commander 3.2.8 → 3.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +4 -0
- data/commander.gemspec +1 -1
- data/lib/commander/runner.rb +2 -1
- data/lib/commander/version.rb +1 -1
- metadata +1 -1
data/History.rdoc
CHANGED
data/commander.gemspec
CHANGED
data/lib/commander/runner.rb
CHANGED
@@ -281,7 +281,8 @@ module Commander
|
|
281
281
|
switches = option[:switches]
|
282
282
|
past_switch, arg_removed = false, false
|
283
283
|
@args.delete_if do |arg|
|
284
|
-
|
284
|
+
# TODO: clean this up, no rescuing ;)
|
285
|
+
if switches.any? { |switch| switch.match(/^#{arg}/) rescue false }
|
285
286
|
past_switch, arg_removed = true, false
|
286
287
|
true
|
287
288
|
elsif past_switch && !arg_removed && arg !~ /^-/
|
data/lib/commander/version.rb
CHANGED