gli 2.11.0 → 2.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +28 -0
  3. data/.gitignore +3 -3
  4. data/.tool-versions +1 -0
  5. data/Gemfile +0 -2
  6. data/README.rdoc +29 -19
  7. data/Rakefile +15 -37
  8. data/bin/ci +29 -0
  9. data/bin/gli +24 -54
  10. data/bin/rake +29 -0
  11. data/bin/setup +5 -0
  12. data/exe/gli +68 -0
  13. data/gli.gemspec +20 -24
  14. data/gli.rdoc +9 -9
  15. data/lib/gli/app.rb +31 -8
  16. data/lib/gli/app_support.rb +15 -3
  17. data/lib/gli/command.rb +24 -2
  18. data/lib/gli/command_finder.rb +42 -25
  19. data/lib/gli/command_support.rb +7 -6
  20. data/lib/gli/commands/doc.rb +9 -3
  21. data/lib/gli/commands/help.rb +2 -1
  22. data/lib/gli/commands/help_modules/arg_name_formatter.rb +2 -2
  23. data/lib/gli/commands/help_modules/command_help_format.rb +19 -1
  24. data/lib/gli/commands/help_modules/full_synopsis_formatter.rb +3 -2
  25. data/lib/gli/commands/help_modules/global_help_format.rb +1 -1
  26. data/lib/gli/commands/help_modules/options_formatter.rb +4 -6
  27. data/lib/gli/commands/initconfig.rb +3 -6
  28. data/lib/gli/commands/rdoc_document_listener.rb +2 -1
  29. data/lib/gli/commands/scaffold.rb +71 -142
  30. data/lib/gli/dsl.rb +2 -1
  31. data/lib/gli/flag.rb +23 -2
  32. data/lib/gli/gli_option_parser.rb +66 -15
  33. data/lib/gli/option_parser_factory.rb +9 -2
  34. data/lib/gli/options.rb +2 -2
  35. data/lib/gli/switch.rb +4 -0
  36. data/lib/gli/terminal.rb +6 -2
  37. data/lib/gli/version.rb +1 -1
  38. data/lib/gli.rb +1 -0
  39. data/object-model.dot +29 -0
  40. data/object-model.png +0 -0
  41. data/test/apps/todo/Gemfile +1 -1
  42. data/test/apps/todo/bin/todo +12 -6
  43. data/test/apps/todo/lib/todo/commands/create.rb +42 -41
  44. data/test/apps/todo/lib/todo/commands/list.rb +48 -36
  45. data/test/apps/todo/lib/todo/commands/ls.rb +25 -24
  46. data/test/apps/todo/lib/todo/commands/make.rb +42 -39
  47. data/test/apps/todo/todo.gemspec +1 -2
  48. data/test/apps/todo_legacy/todo.gemspec +1 -2
  49. data/test/apps/todo_plugins/commands/third.rb +2 -0
  50. data/test/integration/gli_cli_test.rb +69 -0
  51. data/test/integration/gli_powered_app_test.rb +52 -0
  52. data/test/integration/scaffold_test.rb +30 -0
  53. data/test/integration/test_helper.rb +52 -0
  54. data/test/unit/command_finder_test.rb +54 -0
  55. data/test/{tc_command.rb → unit/command_test.rb} +20 -7
  56. data/test/unit/compound_command_test.rb +17 -0
  57. data/test/{tc_doc.rb → unit/doc_test.rb} +38 -51
  58. data/test/{tc_flag.rb → unit/flag_test.rb} +19 -25
  59. data/test/{tc_gli.rb → unit/gli_test.rb} +78 -50
  60. data/test/{tc_help.rb → unit/help_test.rb} +54 -113
  61. data/test/{tc_options.rb → unit/options_test.rb} +4 -4
  62. data/test/unit/subcommand_parsing_test.rb +263 -0
  63. data/test/unit/subcommands_test.rb +245 -0
  64. data/test/{config.yaml → unit/support/gli_test_config.yml} +1 -0
  65. data/test/unit/switch_test.rb +49 -0
  66. data/test/{tc_terminal.rb → unit/terminal_test.rb} +28 -3
  67. data/test/unit/test_helper.rb +13 -0
  68. data/test/unit/verbatim_wrapper_test.rb +24 -0
  69. metadata +85 -141
  70. data/.ruby-gemset +0 -1
  71. data/.ruby-version +0 -1
  72. data/.travis.yml +0 -12
  73. data/ObjectModel.graffle +0 -1191
  74. data/bin/report_on_rake_results +0 -10
  75. data/bin/test_all_rubies.sh +0 -6
  76. data/features/gli_executable.feature +0 -90
  77. data/features/gli_init.feature +0 -232
  78. data/features/step_definitions/gli_executable_steps.rb +0 -18
  79. data/features/step_definitions/gli_init_steps.rb +0 -11
  80. data/features/step_definitions/todo_steps.rb +0 -100
  81. data/features/support/env.rb +0 -55
  82. data/features/todo.feature +0 -546
  83. data/features/todo_legacy.feature +0 -128
  84. data/test/option_test_helper.rb +0 -13
  85. data/test/tc_compound_command.rb +0 -22
  86. data/test/tc_subcommand_parsing.rb +0 -104
  87. data/test/tc_subcommands.rb +0 -259
  88. data/test/tc_switch.rb +0 -55
  89. data/test/tc_verbatim_wrapper.rb +0 -36
  90. data/test/test_helper.rb +0 -20
  91. /data/test/{init_simplecov.rb → unit/init_simplecov.rb} +0 -0
  92. /data/test/{fake_std_out.rb → unit/support/fake_std_out.rb} +0 -0
metadata CHANGED
@@ -1,141 +1,91 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gli
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.0
4
+ version: 2.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Copeland
8
- autorequire:
9
- bindir: bin
8
+ autorequire:
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2014-06-09 00:00:00.000000000 Z
11
+ date: 2021-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.9.2.2
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.9.2.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rdoc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.11'
33
+ version: '4.2'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.11'
40
+ version: '4.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rainbow
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.1.1
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ~>
47
+ version: '1.1'
48
+ - - "~>"
53
49
  - !ruby/object:Gem::Version
54
50
  version: 1.1.1
55
- - !ruby/object:Gem::Dependency
56
- name: clean_test
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - '>='
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: cucumber
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '='
74
- - !ruby/object:Gem::Version
75
- version: 1.2.3
76
51
  type: :development
77
52
  prerelease: false
78
53
  version_requirements: !ruby/object:Gem::Requirement
79
54
  requirements:
80
- - - '='
55
+ - - "~>"
81
56
  - !ruby/object:Gem::Version
82
- version: 1.2.3
83
- - !ruby/object:Gem::Dependency
84
- name: gherkin
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - <=
88
- - !ruby/object:Gem::Version
89
- version: 2.11.6
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - <=
57
+ version: '1.1'
58
+ - - "~>"
95
59
  - !ruby/object:Gem::Version
96
- version: 2.11.6
60
+ version: 1.1.1
97
61
  - !ruby/object:Gem::Dependency
98
- name: aruba
62
+ name: sdoc
99
63
  requirement: !ruby/object:Gem::Requirement
100
64
  requirements:
101
- - - '='
65
+ - - "~>"
102
66
  - !ruby/object:Gem::Version
103
- version: 0.5.1
67
+ version: '0.4'
104
68
  type: :development
105
69
  prerelease: false
106
70
  version_requirements: !ruby/object:Gem::Requirement
107
71
  requirements:
108
- - - '='
72
+ - - "~>"
109
73
  - !ruby/object:Gem::Version
110
- version: 0.5.1
74
+ version: '0.4'
111
75
  - !ruby/object:Gem::Dependency
112
- name: sdoc
76
+ name: minitest
113
77
  requirement: !ruby/object:Gem::Requirement
114
78
  requirements:
115
- - - '>='
79
+ - - ">="
116
80
  - !ruby/object:Gem::Version
117
81
  version: '0'
118
82
  type: :development
119
83
  prerelease: false
120
84
  version_requirements: !ruby/object:Gem::Requirement
121
85
  requirements:
122
- - - '>='
86
+ - - ">="
123
87
  - !ruby/object:Gem::Version
124
88
  version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: faker
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - '='
130
- - !ruby/object:Gem::Version
131
- version: 1.0.0
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - '='
137
- - !ruby/object:Gem::Version
138
- version: 1.0.0
139
89
  description: Build command-suite CLI apps that are awesome. Bootstrap your app, add
140
90
  commands, options and documentation while maintaining a well-tested idiomatic command-line
141
91
  app
@@ -147,27 +97,19 @@ extra_rdoc_files:
147
97
  - README.rdoc
148
98
  - gli.rdoc
149
99
  files:
150
- - .gitignore
151
- - .ruby-gemset
152
- - .ruby-version
153
- - .travis.yml
100
+ - ".circleci/config.yml"
101
+ - ".gitignore"
102
+ - ".tool-versions"
154
103
  - CONTRIBUTING.md
155
104
  - Gemfile
156
105
  - LICENSE.txt
157
- - ObjectModel.graffle
158
106
  - README.rdoc
159
107
  - Rakefile
108
+ - bin/ci
160
109
  - bin/gli
161
- - bin/report_on_rake_results
162
- - bin/test_all_rubies.sh
163
- - features/gli_executable.feature
164
- - features/gli_init.feature
165
- - features/step_definitions/gli_executable_steps.rb
166
- - features/step_definitions/gli_init_steps.rb
167
- - features/step_definitions/todo_steps.rb
168
- - features/support/env.rb
169
- - features/todo.feature
170
- - features/todo_legacy.feature
110
+ - bin/rake
111
+ - bin/setup
112
+ - exe/gli
171
113
  - gli.cheat
172
114
  - gli.gemspec
173
115
  - gli.rdoc
@@ -211,6 +153,8 @@ files:
211
153
  - lib/gli/switch.rb
212
154
  - lib/gli/terminal.rb
213
155
  - lib/gli/version.rb
156
+ - object-model.dot
157
+ - object-model.png
214
158
  - test/apps/README.md
215
159
  - test/apps/todo/Gemfile
216
160
  - test/apps/todo/README.rdoc
@@ -236,59 +180,55 @@ files:
236
180
  - test/apps/todo_legacy/todo.gemspec
237
181
  - test/apps/todo_legacy/todo.rdoc
238
182
  - test/apps/todo_plugins/commands/third.rb
239
- - test/config.yaml
240
- - test/fake_std_out.rb
241
- - test/init_simplecov.rb
242
- - test/option_test_helper.rb
243
- - test/tc_command.rb
244
- - test/tc_compound_command.rb
245
- - test/tc_doc.rb
246
- - test/tc_flag.rb
247
- - test/tc_gli.rb
248
- - test/tc_help.rb
249
- - test/tc_options.rb
250
- - test/tc_subcommand_parsing.rb
251
- - test/tc_subcommands.rb
252
- - test/tc_switch.rb
253
- - test/tc_terminal.rb
254
- - test/tc_verbatim_wrapper.rb
255
- - test/test_helper.rb
183
+ - test/integration/gli_cli_test.rb
184
+ - test/integration/gli_powered_app_test.rb
185
+ - test/integration/scaffold_test.rb
186
+ - test/integration/test_helper.rb
187
+ - test/unit/command_finder_test.rb
188
+ - test/unit/command_test.rb
189
+ - test/unit/compound_command_test.rb
190
+ - test/unit/doc_test.rb
191
+ - test/unit/flag_test.rb
192
+ - test/unit/gli_test.rb
193
+ - test/unit/help_test.rb
194
+ - test/unit/init_simplecov.rb
195
+ - test/unit/options_test.rb
196
+ - test/unit/subcommand_parsing_test.rb
197
+ - test/unit/subcommands_test.rb
198
+ - test/unit/support/fake_std_out.rb
199
+ - test/unit/support/gli_test_config.yml
200
+ - test/unit/switch_test.rb
201
+ - test/unit/terminal_test.rb
202
+ - test/unit/test_helper.rb
203
+ - test/unit/verbatim_wrapper_test.rb
256
204
  homepage: http://davetron5000.github.com/gli
257
- licenses: []
205
+ licenses:
206
+ - Apache-2.0
258
207
  metadata: {}
259
- post_install_message:
208
+ post_install_message:
260
209
  rdoc_options:
261
- - --title
210
+ - "--title"
262
211
  - Git Like Interface
263
- - --main
212
+ - "--main"
264
213
  - README.rdoc
265
214
  require_paths:
266
215
  - lib
267
216
  required_ruby_version: !ruby/object:Gem::Requirement
268
217
  requirements:
269
- - - '>='
218
+ - - ">="
270
219
  - !ruby/object:Gem::Version
271
220
  version: '0'
272
221
  required_rubygems_version: !ruby/object:Gem::Requirement
273
222
  requirements:
274
- - - '>='
223
+ - - ">="
275
224
  - !ruby/object:Gem::Version
276
225
  version: '0'
277
226
  requirements: []
278
- rubyforge_project: gli
279
- rubygems_version: 2.0.14
280
- signing_key:
227
+ rubygems_version: 3.1.2
228
+ signing_key:
281
229
  specification_version: 4
282
230
  summary: Build command-suite CLI apps that are awesome.
283
231
  test_files:
284
- - features/gli_executable.feature
285
- - features/gli_init.feature
286
- - features/step_definitions/gli_executable_steps.rb
287
- - features/step_definitions/gli_init_steps.rb
288
- - features/step_definitions/todo_steps.rb
289
- - features/support/env.rb
290
- - features/todo.feature
291
- - features/todo_legacy.feature
292
232
  - test/apps/README.md
293
233
  - test/apps/todo/Gemfile
294
234
  - test/apps/todo/README.rdoc
@@ -314,20 +254,24 @@ test_files:
314
254
  - test/apps/todo_legacy/todo.gemspec
315
255
  - test/apps/todo_legacy/todo.rdoc
316
256
  - test/apps/todo_plugins/commands/third.rb
317
- - test/config.yaml
318
- - test/fake_std_out.rb
319
- - test/init_simplecov.rb
320
- - test/option_test_helper.rb
321
- - test/tc_command.rb
322
- - test/tc_compound_command.rb
323
- - test/tc_doc.rb
324
- - test/tc_flag.rb
325
- - test/tc_gli.rb
326
- - test/tc_help.rb
327
- - test/tc_options.rb
328
- - test/tc_subcommand_parsing.rb
329
- - test/tc_subcommands.rb
330
- - test/tc_switch.rb
331
- - test/tc_terminal.rb
332
- - test/tc_verbatim_wrapper.rb
333
- - test/test_helper.rb
257
+ - test/integration/gli_cli_test.rb
258
+ - test/integration/gli_powered_app_test.rb
259
+ - test/integration/scaffold_test.rb
260
+ - test/integration/test_helper.rb
261
+ - test/unit/command_finder_test.rb
262
+ - test/unit/command_test.rb
263
+ - test/unit/compound_command_test.rb
264
+ - test/unit/doc_test.rb
265
+ - test/unit/flag_test.rb
266
+ - test/unit/gli_test.rb
267
+ - test/unit/help_test.rb
268
+ - test/unit/init_simplecov.rb
269
+ - test/unit/options_test.rb
270
+ - test/unit/subcommand_parsing_test.rb
271
+ - test/unit/subcommands_test.rb
272
+ - test/unit/support/fake_std_out.rb
273
+ - test/unit/support/gli_test_config.yml
274
+ - test/unit/switch_test.rb
275
+ - test/unit/terminal_test.rb
276
+ - test/unit/test_helper.rb
277
+ - test/unit/verbatim_wrapper_test.rb
data/.ruby-gemset DELETED
@@ -1 +0,0 @@
1
- gli-dev
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.0.0
data/.travis.yml DELETED
@@ -1,12 +0,0 @@
1
- notifications:
2
- email:
3
- on_success: always
4
- script: 'bundle exec rake test features'
5
- rvm:
6
- - 1.9.3
7
- - 1.8.7
8
- - 2.0.0
9
- - 2.1.0
10
- branches:
11
- only:
12
- - 'gli-2'