cli 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -2
- data/Gemfile.lock +10 -10
- data/README.md +1 -0
- data/VERSION +1 -1
- data/cli.gemspec +14 -15
- data/lib/cli.rb +10 -2
- data/lib/cli/dsl.rb +8 -0
- data/spec/usage_spec.rb +56 -12
- metadata +77 -130
data/Gemfile
CHANGED
@@ -3,9 +3,9 @@ source "http://rubygems.org"
|
|
3
3
|
# Add dependencies to develop your gem here.
|
4
4
|
# Include everything needed to run rake, tests, features, etc.
|
5
5
|
group :development do
|
6
|
-
gem "rspec", "~> 2.
|
6
|
+
gem "rspec", "~> 2.4"
|
7
7
|
gem "cucumber", ">= 0"
|
8
|
-
gem "bundler", "~> 1.
|
8
|
+
gem "bundler", "~> 1.2"
|
9
9
|
gem "jeweler", "~> 1.6.4"
|
10
10
|
gem "rcov", ">= 0"
|
11
11
|
gem "rdoc", "~> 3.9"
|
data/Gemfile.lock
CHANGED
@@ -21,14 +21,14 @@ GEM
|
|
21
21
|
rcov (0.9.11)
|
22
22
|
rdoc (3.11)
|
23
23
|
json (~> 1.4)
|
24
|
-
rspec (2.
|
25
|
-
rspec-core (~> 2.
|
26
|
-
rspec-expectations (~> 2.
|
27
|
-
rspec-mocks (~> 2.
|
28
|
-
rspec-core (2.
|
29
|
-
rspec-expectations (2.3
|
30
|
-
diff-lcs (~> 1.1.
|
31
|
-
rspec-mocks (2.
|
24
|
+
rspec (2.11.0)
|
25
|
+
rspec-core (~> 2.11.0)
|
26
|
+
rspec-expectations (~> 2.11.0)
|
27
|
+
rspec-mocks (~> 2.11.0)
|
28
|
+
rspec-core (2.11.1)
|
29
|
+
rspec-expectations (2.11.3)
|
30
|
+
diff-lcs (~> 1.1.3)
|
31
|
+
rspec-mocks (2.11.2)
|
32
32
|
ruby-ip (0.9.0)
|
33
33
|
term-ansicolor (1.0.7)
|
34
34
|
|
@@ -36,10 +36,10 @@ PLATFORMS
|
|
36
36
|
ruby
|
37
37
|
|
38
38
|
DEPENDENCIES
|
39
|
-
bundler (~> 1.
|
39
|
+
bundler (~> 1.2)
|
40
40
|
cucumber
|
41
41
|
jeweler (~> 1.6.4)
|
42
42
|
rcov
|
43
43
|
rdoc (~> 3.9)
|
44
|
-
rspec (~> 2.
|
44
|
+
rspec (~> 2.4)
|
45
45
|
ruby-ip (~> 0.9)
|
data/README.md
CHANGED
@@ -389,6 +389,7 @@ The value after casting (if used) will be available from the `#parse` or `#parse
|
|
389
389
|
In addition to *switch*, option hash can have following pairs:
|
390
390
|
|
391
391
|
* **:default => value** - use default value of *value* if the option was not specified on the command argument list. The *value* will firstly be casted to string (with `#to_s`) and then it will be casted if casting is specified.
|
392
|
+
* **:default_label => label** - display *label* in usage rather than default value - useful to descirbe default value if default value is generated if no value is provided
|
392
393
|
* **:cast => cast specifier** - cast the provided value (or default) with given *cast specifier*.
|
393
394
|
The specifier can be a class constant (like `Integer` or `Float`); the value will be provided to `#new` method of the class and resulting object used as option value. When provided constant does not respond to `#new` (i.e. it is a module) the `#load` method will be tried. If provided specifier is a Proc (or `lambda {}`) the Proc will be called with the value and resulting value will be used. Otherwise `CLI::ParsingError::CastError` will be raised.
|
394
395
|
* **:required => true** - if used and no *default* value is specified the `#parse` method will fail with `CLI::ParsingError::MissingOptionValueError` if the option was not specified in the command argument list. If `#parse!` method was used the program will exit with appropriate message.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/cli.gemspec
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "1.
|
7
|
+
s.name = "cli"
|
8
|
+
s.version = "1.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jakub Pastuszek"]
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
12
|
+
s.date = "2012-11-11"
|
13
|
+
s.description = "Command Line Interface gem allows you to quickly specify command argument parser that will automatically generate usage, handle stdin, switches, options and arguments with default values and value casting"
|
14
|
+
s.email = "jpastuszek@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
17
|
"README.md"
|
@@ -48,37 +48,36 @@ Gem::Specification.new do |s|
|
|
48
48
|
"spec/switch_spec.rb",
|
49
49
|
"spec/usage_spec.rb"
|
50
50
|
]
|
51
|
-
s.homepage =
|
51
|
+
s.homepage = "http://github.com/jpastuszek/cli"
|
52
52
|
s.licenses = ["MIT"]
|
53
53
|
s.require_paths = ["lib"]
|
54
|
-
s.rubygems_version =
|
55
|
-
s.summary =
|
54
|
+
s.rubygems_version = "1.8.15"
|
55
|
+
s.summary = "Command line argument parser with stdin handling and usage generator"
|
56
56
|
|
57
57
|
if s.respond_to? :specification_version then
|
58
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
59
58
|
s.specification_version = 3
|
60
59
|
|
61
60
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
62
|
-
s.add_development_dependency(%q<rspec>, ["~> 2.
|
61
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.4"])
|
63
62
|
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
64
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.
|
63
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.2"])
|
65
64
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
66
65
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
67
66
|
s.add_development_dependency(%q<rdoc>, ["~> 3.9"])
|
68
67
|
s.add_development_dependency(%q<ruby-ip>, ["~> 0.9"])
|
69
68
|
else
|
70
|
-
s.add_dependency(%q<rspec>, ["~> 2.
|
69
|
+
s.add_dependency(%q<rspec>, ["~> 2.4"])
|
71
70
|
s.add_dependency(%q<cucumber>, [">= 0"])
|
72
|
-
s.add_dependency(%q<bundler>, ["~> 1.
|
71
|
+
s.add_dependency(%q<bundler>, ["~> 1.2"])
|
73
72
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
74
73
|
s.add_dependency(%q<rcov>, [">= 0"])
|
75
74
|
s.add_dependency(%q<rdoc>, ["~> 3.9"])
|
76
75
|
s.add_dependency(%q<ruby-ip>, ["~> 0.9"])
|
77
76
|
end
|
78
77
|
else
|
79
|
-
s.add_dependency(%q<rspec>, ["~> 2.
|
78
|
+
s.add_dependency(%q<rspec>, ["~> 2.4"])
|
80
79
|
s.add_dependency(%q<cucumber>, [">= 0"])
|
81
|
-
s.add_dependency(%q<bundler>, ["~> 1.
|
80
|
+
s.add_dependency(%q<bundler>, ["~> 1.2"])
|
82
81
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
83
82
|
s.add_dependency(%q<rcov>, [">= 0"])
|
84
83
|
s.add_dependency(%q<rdoc>, ["~> 3.9"])
|
data/lib/cli.rb
CHANGED
@@ -354,7 +354,11 @@ class CLI
|
|
354
354
|
end
|
355
355
|
out.print " (#{o.switch_short})" if o.has_short?
|
356
356
|
out.print ' (mandatory)' if o.mandatory?
|
357
|
-
|
357
|
+
if o.has_default_label?
|
358
|
+
out.print " [#{o.default_label}]"
|
359
|
+
elsif o.has_default?
|
360
|
+
out.print " [%s]" % o.default
|
361
|
+
end
|
358
362
|
out.print " - #{o.description}" if o.description?
|
359
363
|
out.puts
|
360
364
|
end
|
@@ -369,7 +373,11 @@ class CLI
|
|
369
373
|
out.print " #{a}*"
|
370
374
|
end
|
371
375
|
out.print ' (optional)' if not a.mandatory? and not a.has_default?
|
372
|
-
|
376
|
+
if a.has_default_label?
|
377
|
+
out.print " [#{a.default_label}]"
|
378
|
+
elsif a.has_default?
|
379
|
+
out.print " [%s]" % (a.default.is_a?(Array) ? a.default.join(' ') : a.default)
|
380
|
+
end
|
373
381
|
out.print " - #{a.description}" if a.description?
|
374
382
|
out.puts
|
375
383
|
end
|
data/lib/cli/dsl.rb
CHANGED
@@ -65,6 +65,14 @@ class CLI
|
|
65
65
|
@options.member? :default
|
66
66
|
end
|
67
67
|
|
68
|
+
def default_label
|
69
|
+
@options[:default_label].to_s
|
70
|
+
end
|
71
|
+
|
72
|
+
def has_default_label?
|
73
|
+
@options.member? :default_label
|
74
|
+
end
|
75
|
+
|
68
76
|
def mandatory?
|
69
77
|
not has_default? and @options[:required]
|
70
78
|
end
|
data/spec/usage_spec.rb
CHANGED
@@ -184,6 +184,50 @@ describe CLI do
|
|
184
184
|
ss.usage.should include("4")
|
185
185
|
end
|
186
186
|
|
187
|
+
it "should show default value for option" do
|
188
|
+
ss = CLI.new do
|
189
|
+
option :group, :default => 'red'
|
190
|
+
end
|
191
|
+
ss.usage.should include("[red]")
|
192
|
+
end
|
193
|
+
|
194
|
+
it "should show default label for option" do
|
195
|
+
ss = CLI.new do
|
196
|
+
option :group, :default_label => 'blue'
|
197
|
+
end
|
198
|
+
ss.usage.should include("[blue]")
|
199
|
+
end
|
200
|
+
|
201
|
+
it "should show default label rather than default value if available for option" do
|
202
|
+
ss = CLI.new do
|
203
|
+
option :group, :default_label => 'blue', :default => 'red'
|
204
|
+
end
|
205
|
+
ss.usage.should include("[blue]")
|
206
|
+
ss.usage.should_not include("[red]")
|
207
|
+
end
|
208
|
+
|
209
|
+
it "should show default value for argument" do
|
210
|
+
ss = CLI.new do
|
211
|
+
argument :group, :default => 'red'
|
212
|
+
end
|
213
|
+
ss.usage.should include("[red]")
|
214
|
+
end
|
215
|
+
|
216
|
+
it "should show default label for argument" do
|
217
|
+
ss = CLI.new do
|
218
|
+
argument :group, :default_label => 'blue'
|
219
|
+
end
|
220
|
+
ss.usage.should include("[blue]")
|
221
|
+
end
|
222
|
+
|
223
|
+
it "should show default label rather than default value if available for argument" do
|
224
|
+
ss = CLI.new do
|
225
|
+
argument :group, :default_label => 'blue', :default => 'red'
|
226
|
+
end
|
227
|
+
ss.usage.should include("[blue]")
|
228
|
+
ss.usage.should_not include("[red]")
|
229
|
+
end
|
230
|
+
|
187
231
|
describe "usage line" do
|
188
232
|
it "should suggest that arguments can be used in usage line" do
|
189
233
|
ss = CLI.new do
|
@@ -191,7 +235,7 @@ describe CLI do
|
|
191
235
|
end
|
192
236
|
|
193
237
|
# switches will always be there due to implicit --help switch
|
194
|
-
ss.usage.first.should == "Usage: rspec [switches] [--] location\n"
|
238
|
+
ss.usage.lines.first.should == "Usage: rspec [switches] [--] location\n"
|
195
239
|
end
|
196
240
|
|
197
241
|
it "should suggest that switches can be used in usage line" do
|
@@ -199,7 +243,7 @@ describe CLI do
|
|
199
243
|
switch :location, :short => :l
|
200
244
|
end
|
201
245
|
|
202
|
-
ss.usage.first.should == "Usage: rspec [switches]\n"
|
246
|
+
ss.usage.lines.first.should == "Usage: rspec [switches]\n"
|
203
247
|
end
|
204
248
|
|
205
249
|
it "should suggest that options can be used in usage line" do
|
@@ -208,7 +252,7 @@ describe CLI do
|
|
208
252
|
end
|
209
253
|
|
210
254
|
# switches will always be there due to implicit --help switch
|
211
|
-
ss.usage.first.should == "Usage: rspec [switches|options]\n"
|
255
|
+
ss.usage.lines.first.should == "Usage: rspec [switches|options]\n"
|
212
256
|
end
|
213
257
|
|
214
258
|
it "should suggest that switches or options can be used in usage line" do
|
@@ -217,7 +261,7 @@ describe CLI do
|
|
217
261
|
option :size, :short => :s
|
218
262
|
end
|
219
263
|
|
220
|
-
ss.usage.first.should == "Usage: rspec [switches|options]\n"
|
264
|
+
ss.usage.lines.first.should == "Usage: rspec [switches|options]\n"
|
221
265
|
end
|
222
266
|
|
223
267
|
it "should suggest that option is mandatory" do
|
@@ -227,7 +271,7 @@ describe CLI do
|
|
227
271
|
end
|
228
272
|
|
229
273
|
# switches will always be there due to implicit --help switch
|
230
|
-
ss.usage.first.should == "Usage: rspec [switches] --size <value> --group <value>\n"
|
274
|
+
ss.usage.lines.first.should == "Usage: rspec [switches] --size <value> --group <value>\n"
|
231
275
|
|
232
276
|
ss = CLI.new do
|
233
277
|
option :location, :short => :l
|
@@ -236,14 +280,14 @@ describe CLI do
|
|
236
280
|
end
|
237
281
|
|
238
282
|
# switches will always be there due to implicit --help switch
|
239
|
-
ss.usage.first.should == "Usage: rspec [switches|options] --size <value> --group <value>\n"
|
283
|
+
ss.usage.lines.first.should == "Usage: rspec [switches|options] --size <value> --group <value>\n"
|
240
284
|
|
241
285
|
ss = CLI.new do
|
242
286
|
switch :location, :short => :l
|
243
287
|
option :size, :short => :s, :required => true
|
244
288
|
end
|
245
289
|
|
246
|
-
ss.usage.first.should == "Usage: rspec [switches] --size <value>\n"
|
290
|
+
ss.usage.lines.first.should == "Usage: rspec [switches] --size <value>\n"
|
247
291
|
end
|
248
292
|
|
249
293
|
it "should suggest that argument is optional" do
|
@@ -255,7 +299,7 @@ describe CLI do
|
|
255
299
|
end
|
256
300
|
|
257
301
|
# switches will always be there due to implicit --help switch
|
258
|
-
ss.usage.first.should == "Usage: rspec [switches] [--] location [size] [colour] group\n"
|
302
|
+
ss.usage.lines.first.should == "Usage: rspec [switches] [--] location [size] [colour] group\n"
|
259
303
|
end
|
260
304
|
end
|
261
305
|
|
@@ -300,7 +344,7 @@ describe CLI do
|
|
300
344
|
switch :logging, :short => :l
|
301
345
|
switch :run
|
302
346
|
option :location, :short => :r, :description => "place where server is located"
|
303
|
-
option :group, :default => 'red'
|
347
|
+
option :group, :default => 'red', :default_label => 'colour'
|
304
348
|
options :power_up, :short => :p, :required => true
|
305
349
|
option :speed, :short => :s, :cast => Integer
|
306
350
|
option :the_number_of_the_beast, :short => :b, :cast => Integer, :default => 666, :description => "The number of the beast"
|
@@ -311,7 +355,7 @@ describe CLI do
|
|
311
355
|
argument :string
|
312
356
|
argument :limit, :cast => Integer, :required => false, :description => "limit in seconds"
|
313
357
|
argument :unlock_code, :cast => Integer, :required => false
|
314
|
-
argument :code, :cast => Integer, :default => '123', :description => "secret code"
|
358
|
+
argument :code, :cast => Integer, :default => '123', :description => "secret code", :default_label => 'generated'
|
315
359
|
argument :illegal_prime, :cast => Integer, :description => "prime number that represents information that it is forbidden to possess or distribute"
|
316
360
|
arguments :files, :cast => Pathname, :default => ['test', '1', '2'], :description => "files to process"
|
317
361
|
end.usage
|
@@ -329,7 +373,7 @@ Switches:
|
|
329
373
|
--version - display version string
|
330
374
|
Options:
|
331
375
|
--location (-r) - place where server is located
|
332
|
-
--group [
|
376
|
+
--group [colour]
|
333
377
|
--power-up* (-p) (mandatory)
|
334
378
|
--speed (-s)
|
335
379
|
--the-number-of-the-beast (-b) [666] - The number of the beast
|
@@ -340,7 +384,7 @@ Arguments:
|
|
340
384
|
string
|
341
385
|
limit (optional) - limit in seconds
|
342
386
|
unlock-code (optional)
|
343
|
-
code [
|
387
|
+
code [generated] - secret code
|
344
388
|
illegal-prime - prime number that represents information that it is forbidden to possess or distribute
|
345
389
|
files* [test 1 2] - files to process
|
346
390
|
EOS
|
metadata
CHANGED
@@ -1,147 +1,103 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: cli
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
- 1
|
10
|
-
segments_generated: true
|
11
|
-
version: 1.1.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.0
|
5
|
+
prerelease:
|
12
6
|
platform: ruby
|
13
|
-
authors:
|
7
|
+
authors:
|
14
8
|
- Jakub Pastuszek
|
15
9
|
autorequire:
|
16
10
|
bindir: bin
|
17
11
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
12
|
+
date: 2012-11-11 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: &70285351383820 !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
18
|
+
requirements:
|
26
19
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 2
|
31
|
-
- 3
|
32
|
-
- 0
|
33
|
-
segments_generated: true
|
34
|
-
version: 2.3.0
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.4'
|
35
22
|
type: :development
|
36
|
-
name: rspec
|
37
23
|
prerelease: false
|
38
|
-
version_requirements: *
|
39
|
-
- !ruby/object:Gem::Dependency
|
40
|
-
|
24
|
+
version_requirements: *70285351383820
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: cucumber
|
27
|
+
requirement: &70285351398720 !ruby/object:Gem::Requirement
|
41
28
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
segments:
|
47
|
-
- 0
|
48
|
-
segments_generated: true
|
49
|
-
version: "0"
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
50
33
|
type: :development
|
51
|
-
name: cucumber
|
52
34
|
prerelease: false
|
53
|
-
version_requirements: *
|
54
|
-
- !ruby/object:Gem::Dependency
|
55
|
-
|
35
|
+
version_requirements: *70285351398720
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: bundler
|
38
|
+
requirement: &70285351396880 !ruby/object:Gem::Requirement
|
56
39
|
none: false
|
57
|
-
requirements:
|
40
|
+
requirements:
|
58
41
|
- - ~>
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
|
61
|
-
segments:
|
62
|
-
- 1
|
63
|
-
- 0
|
64
|
-
- 0
|
65
|
-
segments_generated: true
|
66
|
-
version: 1.0.0
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.2'
|
67
44
|
type: :development
|
68
|
-
name: bundler
|
69
45
|
prerelease: false
|
70
|
-
version_requirements: *
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
|
46
|
+
version_requirements: *70285351396880
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: jeweler
|
49
|
+
requirement: &70285351395960 !ruby/object:Gem::Requirement
|
73
50
|
none: false
|
74
|
-
requirements:
|
51
|
+
requirements:
|
75
52
|
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
hash: 7
|
78
|
-
segments:
|
79
|
-
- 1
|
80
|
-
- 6
|
81
|
-
- 4
|
82
|
-
segments_generated: true
|
53
|
+
- !ruby/object:Gem::Version
|
83
54
|
version: 1.6.4
|
84
55
|
type: :development
|
85
|
-
name: jeweler
|
86
56
|
prerelease: false
|
87
|
-
version_requirements: *
|
88
|
-
- !ruby/object:Gem::Dependency
|
89
|
-
|
57
|
+
version_requirements: *70285351395960
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: rcov
|
60
|
+
requirement: &70285351395440 !ruby/object:Gem::Requirement
|
90
61
|
none: false
|
91
|
-
requirements:
|
92
|
-
- -
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
|
95
|
-
segments:
|
96
|
-
- 0
|
97
|
-
segments_generated: true
|
98
|
-
version: "0"
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
99
66
|
type: :development
|
100
|
-
name: rcov
|
101
67
|
prerelease: false
|
102
|
-
version_requirements: *
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
|
68
|
+
version_requirements: *70285351395440
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rdoc
|
71
|
+
requirement: &70285351394160 !ruby/object:Gem::Requirement
|
105
72
|
none: false
|
106
|
-
requirements:
|
73
|
+
requirements:
|
107
74
|
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
110
|
-
segments:
|
111
|
-
- 3
|
112
|
-
- 9
|
113
|
-
segments_generated: true
|
114
|
-
version: "3.9"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '3.9'
|
115
77
|
type: :development
|
116
|
-
name: rdoc
|
117
78
|
prerelease: false
|
118
|
-
version_requirements: *
|
119
|
-
- !ruby/object:Gem::Dependency
|
120
|
-
|
79
|
+
version_requirements: *70285351394160
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: ruby-ip
|
82
|
+
requirement: &70285351393060 !ruby/object:Gem::Requirement
|
121
83
|
none: false
|
122
|
-
requirements:
|
84
|
+
requirements:
|
123
85
|
- - ~>
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
|
126
|
-
segments:
|
127
|
-
- 0
|
128
|
-
- 9
|
129
|
-
segments_generated: true
|
130
|
-
version: "0.9"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0.9'
|
131
88
|
type: :development
|
132
|
-
name: ruby-ip
|
133
89
|
prerelease: false
|
134
|
-
version_requirements: *
|
135
|
-
description: Command Line Interface gem allows you to quickly specify command argument
|
90
|
+
version_requirements: *70285351393060
|
91
|
+
description: Command Line Interface gem allows you to quickly specify command argument
|
92
|
+
parser that will automatically generate usage, handle stdin, switches, options and
|
93
|
+
arguments with default values and value casting
|
136
94
|
email: jpastuszek@gmail.com
|
137
95
|
executables: []
|
138
|
-
|
139
96
|
extensions: []
|
140
|
-
|
141
|
-
extra_rdoc_files:
|
97
|
+
extra_rdoc_files:
|
142
98
|
- LICENSE.txt
|
143
99
|
- README.md
|
144
|
-
files:
|
100
|
+
files:
|
145
101
|
- .document
|
146
102
|
- .rspec
|
147
103
|
- Gemfile
|
@@ -172,41 +128,32 @@ files:
|
|
172
128
|
- spec/stdin_spec.rb
|
173
129
|
- spec/switch_spec.rb
|
174
130
|
- spec/usage_spec.rb
|
175
|
-
has_rdoc: true
|
176
131
|
homepage: http://github.com/jpastuszek/cli
|
177
|
-
licenses:
|
132
|
+
licenses:
|
178
133
|
- MIT
|
179
134
|
post_install_message:
|
180
135
|
rdoc_options: []
|
181
|
-
|
182
|
-
require_paths:
|
136
|
+
require_paths:
|
183
137
|
- lib
|
184
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
138
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
185
139
|
none: false
|
186
|
-
requirements:
|
187
|
-
- -
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
|
190
|
-
segments:
|
140
|
+
requirements:
|
141
|
+
- - ! '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
segments:
|
191
145
|
- 0
|
192
|
-
|
193
|
-
|
194
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
|
+
hash: -3157849412785804189
|
147
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
148
|
none: false
|
196
|
-
requirements:
|
197
|
-
- -
|
198
|
-
- !ruby/object:Gem::Version
|
199
|
-
|
200
|
-
segments:
|
201
|
-
- 0
|
202
|
-
segments_generated: true
|
203
|
-
version: "0"
|
149
|
+
requirements:
|
150
|
+
- - ! '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
204
153
|
requirements: []
|
205
|
-
|
206
154
|
rubyforge_project:
|
207
|
-
rubygems_version: 1.
|
155
|
+
rubygems_version: 1.8.15
|
208
156
|
signing_key:
|
209
157
|
specification_version: 3
|
210
158
|
summary: Command line argument parser with stdin handling and usage generator
|
211
159
|
test_files: []
|
212
|
-
|