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 CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- optitron (0.1.9)
4
+ optitron (0.2.0)
5
5
  callsite (~> 0.0.4)
6
6
  ruby2ruby (~> 1.2.4)
7
7
  ruby_parser (~> 2.0)
@@ -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')
@@ -1,3 +1,3 @@
1
1
  class Optitron
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
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 == "Unknown command\nHelp is unrecognized\n"
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: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
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-03 00:00:00 -07:00
18
+ date: 2010-10-08 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency