kerplutz 0.1.2 → 0.1.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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kerplutz (0.1.1)
4
+ kerplutz (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,6 @@
1
+ == (0.1.3)
2
+ * Symbolize command name in the results (Mike Sassak)
3
+
1
4
  == (0.1.2)
2
5
  * Include command name in the results (Mike Sassak)
3
6
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'kerplutz'
3
- s.version = '0.1.2'
3
+ s.version = '0.1.3'
4
4
  s.authors = ["Mike Sassak"]
5
5
  s.description = "Command-line option parser with subcommands that won't leave you feeling Kerplutz"
6
6
  s.summary = "kerplutz #{s.version}"
@@ -48,7 +48,7 @@ module Kerplutz
48
48
  end
49
49
  end
50
50
 
51
- [cmd || name, arguments, remainder || []]
51
+ [(cmd and cmd.to_sym) || name.to_sym, arguments, remainder || []]
52
52
  end
53
53
 
54
54
  def banner
@@ -14,15 +14,15 @@ module Kerplutz
14
14
 
15
15
  describe "#parse" do
16
16
  it "extracts options on the base executable" do
17
- subject.parse(["--foo"]).should == ["test", { :foo => true }, []]
17
+ subject.parse(["--foo"]).should == [:test, { :foo => true }, []]
18
18
  end
19
19
 
20
20
  it "extracts arguments to options on the base executable" do
21
- subject.parse(["--foo", "bar"]).should == ["test", { :foo => "bar" }, []]
21
+ subject.parse(["--foo", "bar"]).should == [:test, { :foo => "bar" }, []]
22
22
  end
23
23
 
24
24
  it "extracts arguments to subcommands" do
25
- subject.parse(["foo", "bar", "baz"]).should == ["foo", { }, ["bar", "baz"]]
25
+ subject.parse(["foo", "bar", "baz"]).should == [:foo, { }, ["bar", "baz"]]
26
26
  end
27
27
 
28
28
  it "parses an unambiguous flag argument" do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mike Sassak
@@ -121,7 +121,7 @@ rubyforge_project:
121
121
  rubygems_version: 1.3.7
122
122
  signing_key:
123
123
  specification_version: 3
124
- summary: kerplutz 0.1.2
124
+ summary: kerplutz 0.1.3
125
125
  test_files:
126
126
  - features/kerplutz.feature
127
127
  - features/step_definitions/kerplutz_steps.rb