cli 1.2.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +5 -7
- data/Gemfile.lock +29 -37
- data/README.md +43 -44
- data/Rakefile +1 -28
- data/cli.gemspec +14 -84
- data/examples/httpclient +6 -6
- data/examples/ls +4 -4
- data/examples/processor +5 -5
- data/examples/sinatra +9 -9
- data/lib/cli/dsl.rb +3 -3
- data/rdoc/CLI/Arguments.html +178 -0
- data/rdoc/CLI/DSL/Argument.html +200 -0
- data/rdoc/CLI/DSL/Arguments.html +172 -0
- data/rdoc/CLI/DSL/Base.html +154 -0
- data/rdoc/CLI/DSL/Cast.html +152 -0
- data/rdoc/CLI/DSL/Description.html +150 -0
- data/rdoc/CLI/DSL/Input.html +143 -0
- data/rdoc/CLI/DSL/MultiDefault.html +151 -0
- data/rdoc/CLI/DSL/Option.html +143 -0
- data/rdoc/CLI/DSL/Options.html +142 -0
- data/rdoc/CLI/DSL/Switch.html +267 -0
- data/rdoc/CLI/DSL/Value.html +238 -0
- data/rdoc/CLI/DSL.html +91 -0
- data/rdoc/CLI/Options.html +200 -0
- data/rdoc/CLI/ParserError/ArgumentNameSpecifiedTwice.html +138 -0
- data/rdoc/CLI/ParserError/LongNameSpecifiedTwiceError.html +138 -0
- data/rdoc/CLI/ParserError/MultipleArgumentsSpecifierError.html +138 -0
- data/rdoc/CLI/ParserError/NameArgumetNotSymbolError.html +138 -0
- data/rdoc/CLI/ParserError/OptionsArgumentNotHashError.html +138 -0
- data/rdoc/CLI/ParserError/ShortNameIsInvalidError.html +138 -0
- data/rdoc/CLI/ParserError/ShortNameNotSymbolError.html +138 -0
- data/rdoc/CLI/ParserError/ShortNameSpecifiedTwiceError.html +138 -0
- data/rdoc/CLI/ParserError.html +97 -0
- data/rdoc/CLI/ParsingError/CastError.html +138 -0
- data/rdoc/CLI/ParsingError/MandatoryArgumentNotSpecifiedError.html +138 -0
- data/rdoc/CLI/ParsingError/MandatoryOptionsNotSpecifiedError.html +138 -0
- data/rdoc/CLI/ParsingError/MissingOptionValueError.html +138 -0
- data/rdoc/CLI/ParsingError/UnknownSwitchError.html +138 -0
- data/rdoc/CLI/ParsingError/UsageError.html +97 -0
- data/rdoc/CLI/ParsingError.html +97 -0
- data/rdoc/CLI/Switches.html +306 -0
- data/rdoc/CLI/Values.html +202 -0
- data/rdoc/CLI.html +652 -0
- data/rdoc/README_md.html +553 -0
- data/rdoc/created.rid +7 -0
- data/rdoc/css/fonts.css +167 -0
- data/rdoc/css/rdoc.css +639 -0
- data/rdoc/fonts/Lato-Light.ttf +0 -0
- data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
- data/rdoc/fonts/Lato-Regular.ttf +0 -0
- data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/rdoc/images/add.png +0 -0
- data/rdoc/images/arrow_up.png +0 -0
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/delete.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_blue.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/transparent.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/index.html +120 -0
- data/rdoc/js/darkfish.js +84 -0
- data/rdoc/js/navigation.js +105 -0
- data/rdoc/js/navigation.js.gz +0 -0
- data/rdoc/js/search.js +110 -0
- data/rdoc/js/search_index.js +1 -0
- data/rdoc/js/search_index.js.gz +0 -0
- data/rdoc/js/searcher.js +229 -0
- data/rdoc/js/searcher.js.gz +0 -0
- data/rdoc/table_of_contents.html +533 -0
- data/spec/argument_spec.rb +122 -99
- data/spec/cli_spec.rb +27 -28
- data/spec/conflict_reporting_spec.rb +16 -17
- data/spec/option_spec.rb +79 -56
- data/spec/separator_spec.rb +19 -20
- data/spec/stdin_spec.rb +13 -14
- data/spec/switch_spec.rb +15 -16
- data/spec/usage_spec.rb +80 -81
- metadata +91 -104
- data/.document +0 -5
- data/.rspec +0 -1
- data/VERSION +0 -1
- data/features/cli.feature +0 -9
- data/features/step_definitions/cli_steps.rb +0 -0
- data/features/support/env.rb +0 -13
data/spec/usage_spec.rb
CHANGED
@@ -17,66 +17,66 @@ describe CLI do
|
|
17
17
|
argument :test
|
18
18
|
argument :code, :cast => Integer, :default => '123'
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
ps = ss.parse(['-l', 'singapore', '--power-up', 'yes', '-s', '24', '--size', 'XXXL', '/tmp', 'hello'])
|
22
|
-
|
23
|
-
|
22
|
+
expect(ps.help).to be_nil
|
23
|
+
expect(ps.location).to eq 'singapore'
|
24
24
|
|
25
25
|
ps = ss.parse(['-h', '-l', 'singapore', '--power-up'])
|
26
|
-
|
27
|
-
|
26
|
+
expect(ps.help).to be_a String
|
27
|
+
expect(ps.location).to be_nil
|
28
28
|
|
29
29
|
ps = ss.parse(['-l', 'singapore', '--power-up', '-h', 'yes', '-s', '24', '--size', 'XXXL', '/tmp', 'hello'])
|
30
|
-
|
31
|
-
|
30
|
+
expect(ps.help).to be_a String
|
31
|
+
expect(ps.location).to be_nil
|
32
32
|
|
33
33
|
ps = ss.parse(['-l', 'singapore', '--power-up', '--help'])
|
34
|
-
|
35
|
-
|
34
|
+
expect(ps.help).to be_a String
|
35
|
+
expect(ps.location).to be_nil
|
36
36
|
|
37
37
|
ps = ss.parse(['--help', '-l', 'singapore', '--power-up', 'yes', '-s', '24', '--size', 'XXXL', '/tmp', 'hello'])
|
38
|
-
|
39
|
-
|
38
|
+
expect(ps.help).to be_a String
|
39
|
+
expect(ps.location).to be_nil
|
40
40
|
|
41
41
|
ps = ss.parse(['-l', 'singapore', '--power-up', 'yes', '-s', '24', '--size', 'XXXL', '/tmp', 'hello'])
|
42
|
-
|
43
|
-
|
42
|
+
expect(ps.help).to be_nil
|
43
|
+
expect(ps.location).to eq 'singapore'
|
44
44
|
end
|
45
45
|
|
46
46
|
it "parse! should cause program to exit and display help message on --help or -h switch" do
|
47
|
-
stdout_read do
|
48
|
-
|
47
|
+
expect(stdout_read do
|
48
|
+
expect {
|
49
49
|
ps = CLI.new do
|
50
50
|
end.parse!(['--help'])
|
51
|
-
}.
|
52
|
-
|
51
|
+
}.to raise_error SystemExit
|
52
|
+
end).to include('Usage:')
|
53
53
|
|
54
|
-
stdout_read do
|
55
|
-
|
54
|
+
expect(stdout_read do
|
55
|
+
expect {
|
56
56
|
ps = CLI.new do
|
57
57
|
end.parse!(['-h'])
|
58
|
-
}.
|
59
|
-
|
58
|
+
}.to raise_error SystemExit
|
59
|
+
end).to include('Usage:')
|
60
60
|
end
|
61
61
|
|
62
62
|
it "should reserve --help and -h switches" do
|
63
|
-
|
63
|
+
expect {
|
64
64
|
ps = CLI.new do
|
65
65
|
switch :help
|
66
66
|
end
|
67
|
-
}.
|
67
|
+
}.to raise_error CLI::ParserError::LongNameSpecifiedTwiceError, 'switch --help specified twice'
|
68
68
|
|
69
|
-
|
69
|
+
expect {
|
70
70
|
ps = CLI.new do
|
71
71
|
switch :help2, :short => :h
|
72
72
|
end
|
73
|
-
}.
|
73
|
+
}.to raise_error CLI::ParserError::ShortNameSpecifiedTwiceError, 'short switch -h specified twice'
|
74
74
|
end
|
75
75
|
|
76
76
|
it "should display help switch in the help message as the last entry" do
|
77
|
-
CLI.new do
|
77
|
+
expect(CLI.new do
|
78
78
|
switch :test
|
79
|
-
|
79
|
+
end.usage).to include("--test\n --help (-h) - display this help message")
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
@@ -85,48 +85,48 @@ describe CLI do
|
|
85
85
|
ps = CLI.new do
|
86
86
|
version '1.0.2'
|
87
87
|
end.parse(['--version'])
|
88
|
-
|
88
|
+
expect(ps.version).to eq "rspec version \"1.0.2\"\n"
|
89
89
|
end
|
90
90
|
|
91
91
|
it "parse! should cause program to exit displyaing version on --version switch" do
|
92
|
-
stdout_read do
|
93
|
-
|
92
|
+
expect(stdout_read do
|
93
|
+
expect {
|
94
94
|
ps = CLI.new do
|
95
95
|
version "1.2.3"
|
96
96
|
end.parse!(['--version'])
|
97
|
-
}.
|
98
|
-
|
97
|
+
}.to raise_error SystemExit
|
98
|
+
end).to eq "rspec version \"1.2.3\"\n"
|
99
99
|
end
|
100
100
|
|
101
101
|
it "should display version switch in the help message as the last entry when version is specified" do
|
102
|
-
CLI.new do
|
103
|
-
|
102
|
+
expect(CLI.new do
|
103
|
+
end.usage).not_to include("--version")
|
104
104
|
|
105
|
-
CLI.new do
|
105
|
+
expect(CLI.new do
|
106
106
|
version '1.0.2'
|
107
|
-
|
107
|
+
end.usage).to include("--help (-h) - display this help message\n --version - display version string")
|
108
108
|
end
|
109
109
|
|
110
110
|
it "should reserve --version switch" do
|
111
|
-
|
111
|
+
expect {
|
112
112
|
ps = CLI.new do
|
113
113
|
switch :version
|
114
114
|
end
|
115
|
-
}.
|
115
|
+
}.not_to raise_error
|
116
116
|
|
117
|
-
|
117
|
+
expect {
|
118
118
|
ps = CLI.new do
|
119
119
|
version '1.0.2'
|
120
120
|
switch :version
|
121
121
|
end
|
122
|
-
}.
|
122
|
+
}.to raise_error CLI::ParserError::LongNameSpecifiedTwiceError, 'switch --version specified twice'
|
123
123
|
|
124
|
-
|
124
|
+
expect {
|
125
125
|
ps = CLI.new do
|
126
126
|
version '1.0.2'
|
127
127
|
option :version
|
128
128
|
end
|
129
|
-
}.
|
129
|
+
}.to raise_error CLI::ParserError::LongNameSpecifiedTwiceError, 'option and switch --version specified twice'
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
@@ -136,7 +136,7 @@ describe CLI do
|
|
136
136
|
switch :logging
|
137
137
|
end
|
138
138
|
|
139
|
-
|
139
|
+
expect(ss.usage).to include("enable debugging")
|
140
140
|
end
|
141
141
|
|
142
142
|
it "switch description should be casted to string" do
|
@@ -145,7 +145,7 @@ describe CLI do
|
|
145
145
|
switch :logging
|
146
146
|
end
|
147
147
|
|
148
|
-
|
148
|
+
expect(ss.usage).to include("4")
|
149
149
|
end
|
150
150
|
|
151
151
|
it "should allow describing options" do
|
@@ -154,7 +154,7 @@ describe CLI do
|
|
154
154
|
option :group, :default => 'red'
|
155
155
|
end
|
156
156
|
|
157
|
-
|
157
|
+
expect(ss.usage).to include("place where server is located")
|
158
158
|
end
|
159
159
|
|
160
160
|
it "option description should be casted to string" do
|
@@ -163,7 +163,7 @@ describe CLI do
|
|
163
163
|
option :group, :default => 'red'
|
164
164
|
end
|
165
165
|
|
166
|
-
|
166
|
+
expect(ss.usage).to include("4")
|
167
167
|
end
|
168
168
|
|
169
169
|
it "should allow describing arguments" do
|
@@ -172,7 +172,7 @@ describe CLI do
|
|
172
172
|
argument :log, :cast => Pathname, :description => "log file to process"
|
173
173
|
end
|
174
174
|
|
175
|
-
|
175
|
+
expect(ss.usage).to include("log file to process")
|
176
176
|
end
|
177
177
|
|
178
178
|
it "argument description should be casted to string" do
|
@@ -181,51 +181,51 @@ describe CLI do
|
|
181
181
|
argument :log, :cast => Pathname, :description => 2 + 2
|
182
182
|
end
|
183
183
|
|
184
|
-
|
184
|
+
expect(ss.usage).to include("4")
|
185
185
|
end
|
186
186
|
|
187
|
-
it "should show default value for option" do
|
187
|
+
it "should show default value for option" do
|
188
188
|
ss = CLI.new do
|
189
189
|
option :group, :default => 'red'
|
190
190
|
end
|
191
|
-
|
191
|
+
expect(ss.usage).to include("[red]")
|
192
192
|
end
|
193
193
|
|
194
|
-
it "should show default label for option" do
|
194
|
+
it "should show default label for option" do
|
195
195
|
ss = CLI.new do
|
196
196
|
option :group, :default_label => 'blue'
|
197
197
|
end
|
198
|
-
|
198
|
+
expect(ss.usage).to include("[blue]")
|
199
199
|
end
|
200
200
|
|
201
|
-
it "should show default label rather than default value if available for option" do
|
201
|
+
it "should show default label rather than default value if available for option" do
|
202
202
|
ss = CLI.new do
|
203
203
|
option :group, :default_label => 'blue', :default => 'red'
|
204
204
|
end
|
205
|
-
|
206
|
-
|
205
|
+
expect(ss.usage).to include("[blue]")
|
206
|
+
expect(ss.usage).not_to include("[red]")
|
207
207
|
end
|
208
208
|
|
209
|
-
it "should show default value for argument" do
|
209
|
+
it "should show default value for argument" do
|
210
210
|
ss = CLI.new do
|
211
211
|
argument :group, :default => 'red'
|
212
212
|
end
|
213
|
-
|
213
|
+
expect(ss.usage).to include("[red]")
|
214
214
|
end
|
215
215
|
|
216
|
-
it "should show default label for argument" do
|
216
|
+
it "should show default label for argument" do
|
217
217
|
ss = CLI.new do
|
218
218
|
argument :group, :default_label => 'blue'
|
219
219
|
end
|
220
|
-
|
220
|
+
expect(ss.usage).to include("[blue]")
|
221
221
|
end
|
222
222
|
|
223
|
-
it "should show default label rather than default value if available for argument" do
|
223
|
+
it "should show default label rather than default value if available for argument" do
|
224
224
|
ss = CLI.new do
|
225
225
|
argument :group, :default_label => 'blue', :default => 'red'
|
226
226
|
end
|
227
|
-
|
228
|
-
|
227
|
+
expect(ss.usage).to include("[blue]")
|
228
|
+
expect(ss.usage).not_to include("[red]")
|
229
229
|
end
|
230
230
|
|
231
231
|
describe "usage line" do
|
@@ -235,7 +235,7 @@ describe CLI do
|
|
235
235
|
end
|
236
236
|
|
237
237
|
# switches will always be there due to implicit --help switch
|
238
|
-
|
238
|
+
expect(ss.usage.lines.first).to eq "Usage: rspec [switches] [--] location\n"
|
239
239
|
end
|
240
240
|
|
241
241
|
it "should suggest that switches can be used in usage line" do
|
@@ -243,7 +243,7 @@ describe CLI do
|
|
243
243
|
switch :location, :short => :l
|
244
244
|
end
|
245
245
|
|
246
|
-
|
246
|
+
expect(ss.usage.lines.first).to eq "Usage: rspec [switches]\n"
|
247
247
|
end
|
248
248
|
|
249
249
|
it "should suggest that options can be used in usage line" do
|
@@ -252,7 +252,7 @@ describe CLI do
|
|
252
252
|
end
|
253
253
|
|
254
254
|
# switches will always be there due to implicit --help switch
|
255
|
-
|
255
|
+
expect(ss.usage.lines.first).to eq "Usage: rspec [switches|options]\n"
|
256
256
|
end
|
257
257
|
|
258
258
|
it "should suggest that switches or options can be used in usage line" do
|
@@ -261,7 +261,7 @@ describe CLI do
|
|
261
261
|
option :size, :short => :s
|
262
262
|
end
|
263
263
|
|
264
|
-
|
264
|
+
expect(ss.usage.lines.first).to eq "Usage: rspec [switches|options]\n"
|
265
265
|
end
|
266
266
|
|
267
267
|
it "should suggest that option is mandatory" do
|
@@ -271,7 +271,7 @@ describe CLI do
|
|
271
271
|
end
|
272
272
|
|
273
273
|
# switches will always be there due to implicit --help switch
|
274
|
-
|
274
|
+
expect(ss.usage.lines.first).to eq "Usage: rspec [switches] --size <value> --group <value>\n"
|
275
275
|
|
276
276
|
ss = CLI.new do
|
277
277
|
option :location, :short => :l
|
@@ -280,14 +280,14 @@ describe CLI do
|
|
280
280
|
end
|
281
281
|
|
282
282
|
# switches will always be there due to implicit --help switch
|
283
|
-
|
283
|
+
expect(ss.usage.lines.first).to eq "Usage: rspec [switches|options] --size <value> --group <value>\n"
|
284
284
|
|
285
285
|
ss = CLI.new do
|
286
286
|
switch :location, :short => :l
|
287
287
|
option :size, :short => :s, :required => true
|
288
288
|
end
|
289
289
|
|
290
|
-
|
290
|
+
expect(ss.usage.lines.first).to eq "Usage: rspec [switches] --size <value>\n"
|
291
291
|
end
|
292
292
|
|
293
293
|
it "should suggest that argument is optional" do
|
@@ -299,7 +299,7 @@ describe CLI do
|
|
299
299
|
end
|
300
300
|
|
301
301
|
# switches will always be there due to implicit --help switch
|
302
|
-
|
302
|
+
expect(ss.usage.lines.first).to eq "Usage: rspec [switches] [--] location [size] [colour] group\n"
|
303
303
|
end
|
304
304
|
end
|
305
305
|
|
@@ -310,29 +310,29 @@ describe CLI do
|
|
310
310
|
argument :log, :cast => Pathname
|
311
311
|
end
|
312
312
|
|
313
|
-
|
313
|
+
expect(ss.usage).to include("Log file processor")
|
314
314
|
end
|
315
315
|
|
316
316
|
it "should provide stdin usage information" do
|
317
|
-
CLI.new do
|
317
|
+
expect(CLI.new do
|
318
318
|
stdin
|
319
|
-
|
319
|
+
end.usage).to include(" < data")
|
320
320
|
|
321
|
-
CLI.new do
|
321
|
+
expect(CLI.new do
|
322
322
|
stdin :log_file
|
323
|
-
|
323
|
+
end.usage).to include(" < log-file")
|
324
324
|
|
325
325
|
u = CLI.new do
|
326
326
|
stdin :log_file, :description => 'log file to process'
|
327
327
|
end.usage
|
328
|
-
|
329
|
-
|
328
|
+
expect(u).to include(" < log-file")
|
329
|
+
expect(u).to include("log file to process")
|
330
330
|
|
331
331
|
u = CLI.new do
|
332
332
|
stdin :log_data, :cast => YAML, :description => 'log data to process'
|
333
333
|
end.usage
|
334
|
-
|
335
|
-
|
334
|
+
expect(u).to include(" < log-data")
|
335
|
+
expect(u).to include("log data to process")
|
336
336
|
end
|
337
337
|
|
338
338
|
it "should provide formated usage" do
|
@@ -360,7 +360,7 @@ describe CLI do
|
|
360
360
|
arguments :files, :cast => Pathname, :default => ['test', '1', '2'], :description => "files to process"
|
361
361
|
end.usage
|
362
362
|
|
363
|
-
|
363
|
+
expect(u).to eq <<EOS
|
364
364
|
Usage: rspec [switches|options] --power-up <value> [--] log [magick] string [limit] [unlock-code] [code] illegal-prime [files*] < log-data
|
365
365
|
Log file processor
|
366
366
|
Input:
|
@@ -391,4 +391,3 @@ EOS
|
|
391
391
|
end
|
392
392
|
end
|
393
393
|
end
|
394
|
-
|
metadata
CHANGED
@@ -1,124 +1,116 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.4.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jakub Pastuszek
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: rspec
|
16
|
-
requirement: &70285351383820 !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '2.4'
|
22
|
-
type: :development
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: *70285351383820
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: cucumber
|
27
|
-
requirement: &70285351398720 !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
|
-
requirements:
|
30
|
-
- - ! '>='
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '0'
|
33
|
-
type: :development
|
34
|
-
prerelease: false
|
35
|
-
version_requirements: *70285351398720
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: bundler
|
38
|
-
requirement: &70285351396880 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
|
-
requirements:
|
41
|
-
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: '1.2'
|
44
|
-
type: :development
|
45
|
-
prerelease: false
|
46
|
-
version_requirements: *70285351396880
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: jeweler
|
49
|
-
requirement: &70285351395960 !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
|
-
requirements:
|
52
|
-
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 1.6.4
|
55
|
-
type: :development
|
56
|
-
prerelease: false
|
57
|
-
version_requirements: *70285351395960
|
58
|
-
- !ruby/object:Gem::Dependency
|
59
|
-
name: rcov
|
60
|
-
requirement: &70285351395440 !ruby/object:Gem::Requirement
|
61
|
-
none: false
|
62
|
-
requirements:
|
63
|
-
- - ! '>='
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
version: '0'
|
66
|
-
type: :development
|
67
|
-
prerelease: false
|
68
|
-
version_requirements: *70285351395440
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rdoc
|
71
|
-
requirement: &70285351394160 !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
73
|
-
requirements:
|
74
|
-
- - ~>
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '3.9'
|
77
|
-
type: :development
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: *70285351394160
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: ruby-ip
|
82
|
-
requirement: &70285351393060 !ruby/object:Gem::Requirement
|
83
|
-
none: false
|
84
|
-
requirements:
|
85
|
-
- - ~>
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '0.9'
|
88
|
-
type: :development
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: *70285351393060
|
11
|
+
date: 2022-02-24 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
91
13
|
description: Command Line Interface gem allows you to quickly specify command argument
|
92
14
|
parser that will automatically generate usage, handle stdin, switches, options and
|
93
15
|
arguments with default values and value casting
|
94
|
-
email: jpastuszek@
|
16
|
+
email: jpastuszek@protonmail.com
|
95
17
|
executables: []
|
96
18
|
extensions: []
|
97
|
-
extra_rdoc_files:
|
98
|
-
- LICENSE.txt
|
99
|
-
- README.md
|
19
|
+
extra_rdoc_files: []
|
100
20
|
files:
|
101
|
-
- .document
|
102
|
-
- .rspec
|
103
21
|
- Gemfile
|
104
22
|
- Gemfile.lock
|
105
23
|
- LICENSE.txt
|
106
24
|
- README.md
|
107
25
|
- Rakefile
|
108
|
-
- VERSION
|
109
26
|
- cli.gemspec
|
110
27
|
- examples/httpclient
|
111
28
|
- examples/ls
|
112
29
|
- examples/processor
|
113
30
|
- examples/sinatra
|
114
|
-
- features/cli.feature
|
115
|
-
- features/step_definitions/cli_steps.rb
|
116
|
-
- features/support/env.rb
|
117
31
|
- lib/cli.rb
|
118
32
|
- lib/cli/arguments.rb
|
119
33
|
- lib/cli/dsl.rb
|
120
34
|
- lib/cli/options.rb
|
121
35
|
- lib/cli/switches.rb
|
36
|
+
- rdoc/CLI.html
|
37
|
+
- rdoc/CLI/Arguments.html
|
38
|
+
- rdoc/CLI/DSL.html
|
39
|
+
- rdoc/CLI/DSL/Argument.html
|
40
|
+
- rdoc/CLI/DSL/Arguments.html
|
41
|
+
- rdoc/CLI/DSL/Base.html
|
42
|
+
- rdoc/CLI/DSL/Cast.html
|
43
|
+
- rdoc/CLI/DSL/Description.html
|
44
|
+
- rdoc/CLI/DSL/Input.html
|
45
|
+
- rdoc/CLI/DSL/MultiDefault.html
|
46
|
+
- rdoc/CLI/DSL/Option.html
|
47
|
+
- rdoc/CLI/DSL/Options.html
|
48
|
+
- rdoc/CLI/DSL/Switch.html
|
49
|
+
- rdoc/CLI/DSL/Value.html
|
50
|
+
- rdoc/CLI/Options.html
|
51
|
+
- rdoc/CLI/ParserError.html
|
52
|
+
- rdoc/CLI/ParserError/ArgumentNameSpecifiedTwice.html
|
53
|
+
- rdoc/CLI/ParserError/LongNameSpecifiedTwiceError.html
|
54
|
+
- rdoc/CLI/ParserError/MultipleArgumentsSpecifierError.html
|
55
|
+
- rdoc/CLI/ParserError/NameArgumetNotSymbolError.html
|
56
|
+
- rdoc/CLI/ParserError/OptionsArgumentNotHashError.html
|
57
|
+
- rdoc/CLI/ParserError/ShortNameIsInvalidError.html
|
58
|
+
- rdoc/CLI/ParserError/ShortNameNotSymbolError.html
|
59
|
+
- rdoc/CLI/ParserError/ShortNameSpecifiedTwiceError.html
|
60
|
+
- rdoc/CLI/ParsingError.html
|
61
|
+
- rdoc/CLI/ParsingError/CastError.html
|
62
|
+
- rdoc/CLI/ParsingError/MandatoryArgumentNotSpecifiedError.html
|
63
|
+
- rdoc/CLI/ParsingError/MandatoryOptionsNotSpecifiedError.html
|
64
|
+
- rdoc/CLI/ParsingError/MissingOptionValueError.html
|
65
|
+
- rdoc/CLI/ParsingError/UnknownSwitchError.html
|
66
|
+
- rdoc/CLI/ParsingError/UsageError.html
|
67
|
+
- rdoc/CLI/Switches.html
|
68
|
+
- rdoc/CLI/Values.html
|
69
|
+
- rdoc/README_md.html
|
70
|
+
- rdoc/created.rid
|
71
|
+
- rdoc/css/fonts.css
|
72
|
+
- rdoc/css/rdoc.css
|
73
|
+
- rdoc/fonts/Lato-Light.ttf
|
74
|
+
- rdoc/fonts/Lato-LightItalic.ttf
|
75
|
+
- rdoc/fonts/Lato-Regular.ttf
|
76
|
+
- rdoc/fonts/Lato-RegularItalic.ttf
|
77
|
+
- rdoc/fonts/SourceCodePro-Bold.ttf
|
78
|
+
- rdoc/fonts/SourceCodePro-Regular.ttf
|
79
|
+
- rdoc/images/add.png
|
80
|
+
- rdoc/images/arrow_up.png
|
81
|
+
- rdoc/images/brick.png
|
82
|
+
- rdoc/images/brick_link.png
|
83
|
+
- rdoc/images/bug.png
|
84
|
+
- rdoc/images/bullet_black.png
|
85
|
+
- rdoc/images/bullet_toggle_minus.png
|
86
|
+
- rdoc/images/bullet_toggle_plus.png
|
87
|
+
- rdoc/images/date.png
|
88
|
+
- rdoc/images/delete.png
|
89
|
+
- rdoc/images/find.png
|
90
|
+
- rdoc/images/loadingAnimation.gif
|
91
|
+
- rdoc/images/macFFBgHack.png
|
92
|
+
- rdoc/images/package.png
|
93
|
+
- rdoc/images/page_green.png
|
94
|
+
- rdoc/images/page_white_text.png
|
95
|
+
- rdoc/images/page_white_width.png
|
96
|
+
- rdoc/images/plugin.png
|
97
|
+
- rdoc/images/ruby.png
|
98
|
+
- rdoc/images/tag_blue.png
|
99
|
+
- rdoc/images/tag_green.png
|
100
|
+
- rdoc/images/transparent.png
|
101
|
+
- rdoc/images/wrench.png
|
102
|
+
- rdoc/images/wrench_orange.png
|
103
|
+
- rdoc/images/zoom.png
|
104
|
+
- rdoc/index.html
|
105
|
+
- rdoc/js/darkfish.js
|
106
|
+
- rdoc/js/navigation.js
|
107
|
+
- rdoc/js/navigation.js.gz
|
108
|
+
- rdoc/js/search.js
|
109
|
+
- rdoc/js/search_index.js
|
110
|
+
- rdoc/js/search_index.js.gz
|
111
|
+
- rdoc/js/searcher.js
|
112
|
+
- rdoc/js/searcher.js.gz
|
113
|
+
- rdoc/table_of_contents.html
|
122
114
|
- spec/argument_spec.rb
|
123
115
|
- spec/cli_spec.rb
|
124
116
|
- spec/conflict_reporting_spec.rb
|
@@ -131,29 +123,24 @@ files:
|
|
131
123
|
homepage: http://github.com/jpastuszek/cli
|
132
124
|
licenses:
|
133
125
|
- MIT
|
134
|
-
|
126
|
+
metadata: {}
|
127
|
+
post_install_message:
|
135
128
|
rdoc_options: []
|
136
129
|
require_paths:
|
137
130
|
- lib
|
138
131
|
required_ruby_version: !ruby/object:Gem::Requirement
|
139
|
-
none: false
|
140
132
|
requirements:
|
141
|
-
- -
|
133
|
+
- - ">="
|
142
134
|
- !ruby/object:Gem::Version
|
143
135
|
version: '0'
|
144
|
-
segments:
|
145
|
-
- 0
|
146
|
-
hash: -3157849412785804189
|
147
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
|
-
none: false
|
149
137
|
requirements:
|
150
|
-
- -
|
138
|
+
- - ">="
|
151
139
|
- !ruby/object:Gem::Version
|
152
140
|
version: '0'
|
153
141
|
requirements: []
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
specification_version: 3
|
142
|
+
rubygems_version: 3.2.32
|
143
|
+
signing_key:
|
144
|
+
specification_version: 4
|
158
145
|
summary: Command line argument parser with stdin handling and usage generator
|
159
146
|
test_files: []
|
data/.document
DELETED
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--color
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.2.0
|
data/features/cli.feature
DELETED
File without changes
|
data/features/support/env.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'bundler'
|
2
|
-
begin
|
3
|
-
Bundler.setup(:default, :development)
|
4
|
-
rescue Bundler::BundlerError => e
|
5
|
-
$stderr.puts e.message
|
6
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
7
|
-
exit e.status_code
|
8
|
-
end
|
9
|
-
|
10
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
|
11
|
-
require 'cli'
|
12
|
-
|
13
|
-
require 'rspec/expectations'
|