commandant 0.2.2 → 0.2.3

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -68,7 +68,7 @@ module Commandant
68
68
  # @raise [UnknownCommand] command is unknown and no :main command is available
69
69
  def run(cmdline=ARGV)
70
70
  name, *args = cmdline
71
- name = name.to_sym if name
71
+ name = name.to_sym if name && COMMANDS[name.to_sym]
72
72
 
73
73
  name, *args = :main, name, *args unless COMMANDS[name]
74
74
 
@@ -63,7 +63,7 @@ describe Commandant do
63
63
  end
64
64
 
65
65
  it "defaults to the :main command, if available" do
66
- Commandant.run(%w{ some args }).should == 'main called with [:some, "args"]'
66
+ Commandant.run(%w{ some args }).should == 'main called with ["some", "args"]'
67
67
  end
68
68
 
69
69
  it "runs the main command if no arguments are passed" do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Rein Henrichs