optitron 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/optitron/parser.rb +1 -0
- data/lib/optitron/version.rb +1 -1
- data/spec/cli_spec.rb +1 -1
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/lib/optitron/parser.rb
CHANGED
@@ -28,6 +28,7 @@ class Optitron
|
|
28
28
|
options += @commands.assoc(cmd_tok.lit).last.options
|
29
29
|
args = @commands.assoc(cmd_tok.lit).last.args
|
30
30
|
else
|
31
|
+
puts @help.generate
|
31
32
|
potential_cmd_toks.first ?
|
32
33
|
response.add_error('an unknown command', potential_cmd_toks.first.lit) :
|
33
34
|
response.add_error('unknown command')
|
data/lib/optitron/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
@@ -114,7 +114,7 @@ describe "Optitron::Parser defaults" do
|
|
114
114
|
end
|
115
115
|
|
116
116
|
it "should be able to suppress help" do
|
117
|
-
capture(:stdout) { NoHelpExample.dispatch(%w(--help)) }.should == "
|
117
|
+
capture(:stdout) { NoHelpExample.dispatch(%w(--help)) }.should == "Commands\n\nuse_too [one] <two=\"three\"> # Use this too\n -a/--another_opt \n\nGlobal options\n\n-v/--verbose \nUnknown command\nHelp is unrecognized\n"
|
118
118
|
end
|
119
119
|
|
120
120
|
it "should strip the type information from the names when its using the _type info" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: optitron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joshua Hull
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-08 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|