cmdparse 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/cmdparse.rb +3 -3
  3. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.4
1
+ 2.0.5
@@ -23,7 +23,7 @@
23
23
  module CmdParse
24
24
 
25
25
  # The version of this cmdparse implemention
26
- VERSION = [2, 0, 4]
26
+ VERSION = [2, 0, 5]
27
27
 
28
28
 
29
29
  # Base class for all cmdparse errors.
@@ -432,18 +432,18 @@ module CmdParse
432
432
  # Parse the command line arguments.
433
433
  #
434
434
  # If a block is specified, the current hierarchy level and the name of the current command is
435
- # yielded before any option parsing is done.
435
+ # yielded after the option parsing is done but before a command is executed.
436
436
  def parse(argv = ARGV) # :yields: level, commandName
437
437
  level = 0
438
438
  command = @main_command
439
439
 
440
440
  while !command.nil?
441
- yield(level, command.name) if block_given?
442
441
  argv = if command.has_commands? || ENV.include?('POSIXLY_CORRECT')
443
442
  command.options.order(argv)
444
443
  else
445
444
  command.options.permute(argv)
446
445
  end
446
+ yield(level, command.name) if block_given?
447
447
 
448
448
  if command.has_commands?
449
449
  cmdName, argv = argv[0], argv[1..-1] || []
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmdparse
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire: cmdparse
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-07 00:00:00.000000000 Z
12
+ date: 2012-06-09 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! " cmdparse provides classes for parsing commands on the command
15
15
  line; command line options\n are parsed using optparse or any other option