commander 4.2.0 → 4.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21b09d008c6a8a753877a504afd266191e9d56f1
4
- data.tar.gz: eb66a9f050995361aef5eb5abe80b957386547b1
3
+ metadata.gz: 41862606cf4f4960a8b46ae50cbf08aef24358d5
4
+ data.tar.gz: 7b1e4b14ddd3ce4df29348644219896f82f5b298
5
5
  SHA512:
6
- metadata.gz: f193eb63b1ac9b359c5087ee82db39058b11dfb479ecf562d419bdf7e0dc339ba4ffd47528054a7e6ba67891b43c3210b17d59a8b0eabb201ba4a5c7c81ac87b
7
- data.tar.gz: 166c934efdbd6469f8f67d312b1d88758b6158e2116a3179e571f31531efbbf89f9f733eaadde33a972909bc641e1a1d6182c5553b735932678ce1d322330f1c
6
+ metadata.gz: 90629f894d285139dd00327a3feb641ac5e7dd3d2e9d07f3c85056389ccc25b1b67b936693ff437dee52cd9a877654285548e77251f7f2160beedd7839c635f1
7
+ data.tar.gz: 038edb894790574b9b4b3973c511c539c746ff5bfdfed25c52247242cd0fba232479c5e07211d31e7ef440b18cdbdbcc5e3513111392323f47408dbe8e1f6888
data/.travis.yml CHANGED
@@ -7,4 +7,4 @@ rvm:
7
7
  - 2.1.0
8
8
  - jruby-18mode
9
9
  - jruby-19mode
10
- - rbx
10
+ - rbx-2
data/History.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ === 4.2.1 / 2014-09-28
2
+
3
+ * Improve `choose` compatibility with HighLine's version (#79)
4
+
1
5
  === 4.2.0 / 2014-04-29
2
6
 
3
7
  * Add ability to use commander without importing into the global namespace (#61) (@krissi)
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [<img src="https://secure.travis-ci.org/ggilder/commander.png?branch=master" alt="Build Status" />](http://travis-ci.org/ggilder/commander)
2
- [![Inline docs](http://inch-pages.github.io/github/visionmedia/commander.png)](http://inch-pages.github.io/github/visionmedia/commander)
2
+ [![Inline docs](http://inch-ci.org/github/visionmedia/commander.png)](http://inch-ci.org/github/visionmedia/commander)
3
3
 
4
4
  # Commander
5
5
 
@@ -96,7 +96,15 @@ class MyApplication
96
96
  program :version, '1.0.0'
97
97
  program :description, 'Stupid command that prints foo or bar.'
98
98
 
99
- # see classic style example for options
99
+ command :foo do |c|
100
+ c.syntax = 'foobar foo'
101
+ c.description = 'Displays foo'
102
+ c.action do |args, options|
103
+ say 'foo'
104
+ end
105
+ end
106
+
107
+ run!
100
108
  end
101
109
  end
102
110
 
@@ -40,9 +40,9 @@ module Commander
40
40
  ##
41
41
  # Choose from a set array of _choices_.
42
42
 
43
- def choose message, *choices
44
- say message
45
- super(*choices)
43
+ def choose message = nil, *choices, &block
44
+ say message if message
45
+ super(*choices, &block)
46
46
  end
47
47
 
48
48
  ##
@@ -1,3 +1,3 @@
1
1
  module Commander
2
- VERSION = '4.2.0'
2
+ VERSION = '4.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commander
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-30 00:00:00.000000000 Z
12
+ date: 2014-09-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline