gli 2.18.2 → 2.20.1
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.
- checksums.yaml +4 -4
- data/.circleci/config.yml +28 -0
- data/.gitignore +1 -3
- data/.tool-versions +1 -1
- data/Gemfile +0 -6
- data/README.rdoc +33 -23
- data/Rakefile +21 -37
- data/bin/ci +29 -0
- data/bin/gli +25 -64
- data/bin/rake +29 -0
- data/bin/setup +5 -0
- data/exe/gli +68 -0
- data/gli.gemspec +19 -22
- data/gli.rdoc +2 -2
- data/lib/gli/command_support.rb +2 -6
- data/lib/gli/commands/help_modules/arg_name_formatter.rb +2 -2
- data/lib/gli/commands/help_modules/command_help_format.rb +1 -1
- data/lib/gli/commands/help_modules/global_help_format.rb +1 -1
- data/lib/gli/commands/scaffold.rb +9 -93
- data/lib/gli/dsl.rb +1 -1
- data/lib/gli/options.rb +2 -2
- data/lib/gli/version.rb +1 -1
- data/object-model.dot +29 -0
- data/object-model.png +0 -0
- data/test/apps/todo/Gemfile +1 -1
- data/test/apps/todo/bin/todo +1 -1
- data/test/integration/gli_cli_test.rb +69 -0
- data/test/integration/gli_powered_app_test.rb +52 -0
- data/test/integration/scaffold_test.rb +30 -0
- data/test/integration/test_helper.rb +52 -0
- data/test/{tc_command_finder.rb → unit/command_finder_test.rb} +6 -6
- data/test/{tc_command.rb → unit/command_test.rb} +4 -4
- data/test/unit/compound_command_test.rb +17 -0
- data/test/{tc_doc.rb → unit/doc_test.rb} +38 -51
- data/test/{tc_flag.rb → unit/flag_test.rb} +19 -25
- data/test/{tc_gli.rb → unit/gli_test.rb} +28 -47
- data/test/{tc_help.rb → unit/help_test.rb} +48 -107
- data/test/{init_simplecov.rb → unit/init_simplecov.rb} +0 -0
- data/test/{tc_options.rb → unit/options_test.rb} +4 -4
- data/test/unit/subcommand_parsing_test.rb +263 -0
- data/test/unit/subcommands_test.rb +245 -0
- data/test/{fake_std_out.rb → unit/support/fake_std_out.rb} +0 -0
- data/test/{config.yaml → unit/support/gli_test_config.yml} +0 -0
- data/test/unit/switch_test.rb +49 -0
- data/test/{tc_terminal.rb → unit/terminal_test.rb} +4 -3
- data/test/unit/test_helper.rb +13 -0
- data/test/unit/verbatim_wrapper_test.rb +24 -0
- metadata +74 -139
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- data/.travis.yml +0 -11
- data/ObjectModel.graffle +0 -1191
- data/bin/report_on_rake_results +0 -10
- data/bin/test_all_rubies.sh +0 -6
- data/features/gli_executable.feature +0 -90
- data/features/gli_init.feature +0 -235
- data/features/step_definitions/gli_executable_steps.rb +0 -18
- data/features/step_definitions/gli_init_steps.rb +0 -11
- data/features/step_definitions/todo_steps.rb +0 -100
- data/features/support/env.rb +0 -54
- data/features/todo.feature +0 -579
- data/features/todo_legacy.feature +0 -130
- data/test/option_test_helper.rb +0 -13
- data/test/tc_compound_command.rb +0 -22
- data/test/tc_subcommand_parsing.rb +0 -280
- data/test/tc_subcommands.rb +0 -259
- data/test/tc_switch.rb +0 -55
- data/test/tc_verbatim_wrapper.rb +0 -36
- data/test/test_helper.rb +0 -21
@@ -0,0 +1,245 @@
|
|
1
|
+
require_relative "test_helper"
|
2
|
+
require_relative "support/fake_std_out"
|
3
|
+
|
4
|
+
class SubcommandsTest < MiniTest::Test
|
5
|
+
include TestHelper
|
6
|
+
|
7
|
+
def setup
|
8
|
+
@fake_stdout = FakeStdOut.new
|
9
|
+
@fake_stderr = FakeStdOut.new
|
10
|
+
|
11
|
+
@original_stdout = $stdout
|
12
|
+
$stdout = @fake_stdout
|
13
|
+
@original_stderr = $stderr
|
14
|
+
$stderr = @fake_stderr
|
15
|
+
|
16
|
+
@app = CLIApp.new
|
17
|
+
@app.reset
|
18
|
+
@app.subcommand_option_handling :legacy
|
19
|
+
@app.error_device=@fake_stderr
|
20
|
+
ENV.delete('GLI_DEBUG')
|
21
|
+
end
|
22
|
+
|
23
|
+
def teardown
|
24
|
+
$stdout = @original_stdout
|
25
|
+
$stderr = @original_stderr
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_we_run_add_command_using_add
|
29
|
+
we_have_a_command_with_two_subcommands
|
30
|
+
run_app('remote',"add",'-f','foo','bar')
|
31
|
+
assert_command_ran_with(:add, :command_options => {:f => true}, :args => %w(foo bar))
|
32
|
+
end
|
33
|
+
def test_we_run_add_command_using_new
|
34
|
+
we_have_a_command_with_two_subcommands
|
35
|
+
run_app('remote',"new",'-f','foo','bar')
|
36
|
+
assert_command_ran_with(:add, :command_options => {:f => true}, :args => %w(foo bar))
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_subcommands_not_used_on_command_line_uses_base_action
|
40
|
+
we_have_a_command_with_two_subcommands
|
41
|
+
run_app('remote','foo','bar')
|
42
|
+
assert_command_ran_with(:base, :command_options => {:f => false}, :args => %w(foo bar))
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_switches_and_flags_on_subcommand_available
|
46
|
+
we_have_a_command_with_two_subcommands(:switches => [:addswitch], :flags => [:addflag])
|
47
|
+
run_app('remote','add','--addswitch','--addflag','foo','bar')
|
48
|
+
assert_command_ran_with(:add,:command_options => { :addswitch => true, :addflag => 'foo', :f => false },
|
49
|
+
:args => ['bar'])
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_help_flag_works_in_normal_mode
|
53
|
+
@app.subcommand_option_handling :normal
|
54
|
+
we_have_a_command_with_two_subcommands
|
55
|
+
@app.run(["remote", "add", "--help"]) rescue nil
|
56
|
+
refute_match /^error/, @fake_stderr.to_s, "should not output an error message"
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_help_flag_works_in_legacy_mode
|
60
|
+
@app.subcommand_option_handling :legacy
|
61
|
+
we_have_a_command_with_two_subcommands
|
62
|
+
@app.run(["remote", "add", "--help"]) rescue nil
|
63
|
+
refute_match /^error/, @fake_stderr.to_s, "should not output an error message"
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_we_can_reopen_commands_to_add_new_subcommands
|
67
|
+
@app.command :remote do |p|
|
68
|
+
p.command :add do |c|
|
69
|
+
c.action do |global_options,command_options,args|
|
70
|
+
@ran_command = :add
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
@app.command :remote do |p|
|
75
|
+
p.command :new do |c|
|
76
|
+
c.action do |global_options,command_options,args|
|
77
|
+
@ran_command = :new
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
run_app('remote','new')
|
82
|
+
assert_equal(@ran_command, :new)
|
83
|
+
run_app('remote', 'add')
|
84
|
+
assert_equal(@ran_command, :add)
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_reopening_commands_doesnt_readd_to_output
|
88
|
+
@app.command :remote do |p|
|
89
|
+
p.command(:add) { }
|
90
|
+
end
|
91
|
+
@app.command :remote do |p|
|
92
|
+
p.command(:new) { }
|
93
|
+
end
|
94
|
+
command_names = @app.instance_variable_get("@commands_declaration_order").collect { |c| c.name }
|
95
|
+
assert_equal 1, command_names.grep(:remote).size
|
96
|
+
end
|
97
|
+
|
98
|
+
|
99
|
+
def test_we_can_reopen_commands_without_causing_conflicts
|
100
|
+
@app.command :remote do |p|
|
101
|
+
p.command :add do |c|
|
102
|
+
c.action do |global_options,command_options,args|
|
103
|
+
@ran_command = :remote_add
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
@app.command :local do |p|
|
108
|
+
p.command :add do |c|
|
109
|
+
c.action do |global_options,command_options,args|
|
110
|
+
@ran_command = :local_add
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
run_app('remote','add')
|
115
|
+
assert_equal(@ran_command, :remote_add)
|
116
|
+
run_app('local', 'add')
|
117
|
+
assert_equal(@ran_command, :local_add)
|
118
|
+
end
|
119
|
+
|
120
|
+
|
121
|
+
def test_we_can_nest_subcommands_very_deep
|
122
|
+
@run_results = { :add => nil, :rename => nil, :base => nil }
|
123
|
+
@app.command :remote do |c|
|
124
|
+
|
125
|
+
c.switch :f
|
126
|
+
c.command :add do |add|
|
127
|
+
add.command :some do |some|
|
128
|
+
some.command :cmd do |cmd|
|
129
|
+
cmd.switch :s
|
130
|
+
cmd.action do |global_options,command_options,args|
|
131
|
+
@run_results[:cmd] = [global_options,command_options,args]
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
ENV['GLI_DEBUG'] = 'true'
|
138
|
+
run_app('remote','add','some','cmd','-s','blah')
|
139
|
+
assert_command_ran_with(:cmd, :command_options => {:s => true, :f => false},:args => ['blah'])
|
140
|
+
end
|
141
|
+
|
142
|
+
def test_when_any_command_has_no_action_but_there_are_args_indicate_unknown_command
|
143
|
+
a_very_deeply_nested_command_structure
|
144
|
+
assert_raises GLI::UnknownCommand do
|
145
|
+
When run_app('remote','add','some','foo')
|
146
|
+
end
|
147
|
+
assert_match /Unknown command 'foo'/,@fake_stderr.to_s
|
148
|
+
end
|
149
|
+
|
150
|
+
def test_when_any_command_has_no_action_but_there_are_no_args_indicate_subcommand_needed
|
151
|
+
a_very_deeply_nested_command_structure
|
152
|
+
assert_raises GLI::BadCommandLine do
|
153
|
+
When run_app('remote','add','some')
|
154
|
+
end
|
155
|
+
assert_match /Command 'some' requires a subcommand/,@fake_stderr.to_s
|
156
|
+
end
|
157
|
+
|
158
|
+
private
|
159
|
+
|
160
|
+
def run_app(*args)
|
161
|
+
@exit_code = @app.run(args)
|
162
|
+
end
|
163
|
+
|
164
|
+
def a_very_deeply_nested_command_structure
|
165
|
+
@run_results = { :add => nil, :rename => nil, :base => nil }
|
166
|
+
@app.command :remote do |c|
|
167
|
+
|
168
|
+
c.switch :f
|
169
|
+
c.command :add do |add|
|
170
|
+
add.command :some do |some|
|
171
|
+
some.command :cmd do |cmd|
|
172
|
+
cmd.switch :s
|
173
|
+
cmd.action do |global_options,command_options,args|
|
174
|
+
@run_results[:cmd] = [global_options,command_options,args]
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
180
|
+
ENV['GLI_DEBUG'] = 'true'
|
181
|
+
end
|
182
|
+
|
183
|
+
# expected_command - name of command exepcted to have been run
|
184
|
+
# options:
|
185
|
+
# - global_options => hash of expected options
|
186
|
+
# - command_options => hash of expected command options
|
187
|
+
# - args => array of expected args
|
188
|
+
def assert_command_ran_with(expected_command,options)
|
189
|
+
global_options = options[:global_options] || { :help => false }
|
190
|
+
@run_results.each do |command,results|
|
191
|
+
if command == expected_command
|
192
|
+
assert_equal(indifferent_hash(global_options),results[0])
|
193
|
+
assert_equal(indifferent_hash(options[:command_options]),results[1])
|
194
|
+
assert_equal(options[:args],results[2])
|
195
|
+
else
|
196
|
+
assert_nil results
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
def indifferent_hash(possibly_nil_hash)
|
202
|
+
return {} if possibly_nil_hash.nil?
|
203
|
+
possibly_nil_hash.keys.each do |key|
|
204
|
+
if key.kind_of? Symbol
|
205
|
+
possibly_nil_hash[key.to_s] = possibly_nil_hash[key] unless possibly_nil_hash.has_key?(key.to_s)
|
206
|
+
elsif key.kind_of? String
|
207
|
+
possibly_nil_hash[key.to_sym] = possibly_nil_hash[key] unless possibly_nil_hash.has_key?(key.to_sym)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
possibly_nil_hash
|
211
|
+
end
|
212
|
+
|
213
|
+
# options -
|
214
|
+
# :flags => flags to add to :add
|
215
|
+
# :switiches => switiches to add to :add
|
216
|
+
def we_have_a_command_with_two_subcommands(options = {})
|
217
|
+
@run_results = { :add => nil, :rename => nil, :base => nil }
|
218
|
+
@app.command :remote do |c|
|
219
|
+
|
220
|
+
c.switch :f
|
221
|
+
|
222
|
+
c.desc "add a remote"
|
223
|
+
c.command [:add,:new] do |add|
|
224
|
+
|
225
|
+
Array(options[:flags]).each { |_| add.flag _ }
|
226
|
+
Array(options[:switches]).each { |_| add.switch _ }
|
227
|
+
add.action do |global_options,command_options,args|
|
228
|
+
@run_results[:add] = [global_options,command_options,args]
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
c.desc "rename a remote"
|
233
|
+
c.command :rename do |rename|
|
234
|
+
rename.action do |global_options,command_options,args|
|
235
|
+
@run_results[:rename] = [global_options,command_options,args]
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
c.action do |global_options,command_options,args|
|
240
|
+
@run_results[:base] = [global_options,command_options,args]
|
241
|
+
end
|
242
|
+
end
|
243
|
+
ENV['GLI_DEBUG'] = 'true'
|
244
|
+
end
|
245
|
+
end
|
File without changes
|
File without changes
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require_relative "test_helper"
|
2
|
+
|
3
|
+
class SwitchTest < MiniTest::Test
|
4
|
+
include TestHelper
|
5
|
+
|
6
|
+
def test_basics_simple
|
7
|
+
switch_with_names(:filename)
|
8
|
+
attributes_should_be_set
|
9
|
+
assert_equal(:filename,@cli_option.name)
|
10
|
+
assert_nil @cli_option.aliases
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_basics_kinda_complex
|
14
|
+
switch_with_names([:f])
|
15
|
+
attributes_should_be_set
|
16
|
+
assert_equal(:f,@cli_option.name)
|
17
|
+
assert_nil @cli_option.aliases
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_basics_complex
|
21
|
+
switch_with_names([:f,:file,:filename])
|
22
|
+
attributes_should_be_set
|
23
|
+
assert_equal(:f,@cli_option.name)
|
24
|
+
assert_equal([:file,:filename],@cli_option.aliases)
|
25
|
+
assert_equal ["-f","--[no-]file","--[no-]filename"],@switch.arguments_for_option_parser
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_includes_negatable
|
29
|
+
assert_equal '-a',GLI::Switch.name_as_string('a')
|
30
|
+
assert_equal '--[no-]foo',GLI::Switch.name_as_string('foo')
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def switch_with_names(names)
|
36
|
+
@options = {
|
37
|
+
:desc => 'Filename',
|
38
|
+
:long_desc => 'The Filename',
|
39
|
+
}
|
40
|
+
@switch = GLI::Switch.new(names,@options)
|
41
|
+
@cli_option = @switch
|
42
|
+
end
|
43
|
+
|
44
|
+
def attributes_should_be_set
|
45
|
+
assert_equal(@options[:desc],@switch.description)
|
46
|
+
assert_equal(@options[:long_desc],@switch.long_description)
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
@@ -1,9 +1,10 @@
|
|
1
|
-
|
1
|
+
require_relative "test_helper"
|
2
2
|
|
3
|
-
class
|
3
|
+
class TerminalTest < MiniTest::Test
|
4
4
|
include TestHelper
|
5
5
|
|
6
|
-
|
6
|
+
# TODO: Make this test not mess with the internals of the class
|
7
|
+
def xtest_command_exists
|
7
8
|
assert GLI::Terminal.instance.command_exists?('ls')
|
8
9
|
assert !GLI::Terminal.instance.command_exists?('asdfasfasdf')
|
9
10
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative "test_helper"
|
2
|
+
|
3
|
+
class TerminalTest < MiniTest::Test
|
4
|
+
include TestHelper
|
5
|
+
|
6
|
+
def test_handles_nil
|
7
|
+
@wrapper = GLI::Commands::HelpModules::VerbatimWrapper.new(rand(100),rand(100))
|
8
|
+
@result = @wrapper.wrap(nil)
|
9
|
+
assert_equal '',@result
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_does_not_touch_input
|
13
|
+
@wrapper = GLI::Commands::HelpModules::VerbatimWrapper.new(rand(100),rand(100))
|
14
|
+
@input = <<EOS
|
15
|
+
|This is|an ASCII|table|
|
16
|
+
+-------+--------+-----+
|
17
|
+
| foo | bar | baz |
|
18
|
+
+-------+--------+-----+
|
19
|
+
EOS
|
20
|
+
@result = @wrapper.wrap(@input)
|
21
|
+
assert_equal @input,@result
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.20.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Copeland
|
8
|
-
autorequire:
|
9
|
-
bindir:
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-27 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
|
-
version: 0
|
19
|
+
version: '0'
|
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
|
-
version: 0
|
26
|
+
version: '0'
|
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: '
|
33
|
+
version: '0'
|
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: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rainbow
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,90 +58,34 @@ dependencies:
|
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: 1.1.1
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: clean_test
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '1.0'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '1.0'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: cucumber
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: 3.1.2
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - "~>"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: 3.1.2
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: gherkin
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - "~>"
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: 5.1.0
|
96
|
-
type: :development
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - "~>"
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 5.1.0
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: aruba
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: 0.7.4
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - "~>"
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: 0.7.4
|
117
61
|
- !ruby/object:Gem::Dependency
|
118
62
|
name: sdoc
|
119
63
|
requirement: !ruby/object:Gem::Requirement
|
120
64
|
requirements:
|
121
|
-
- - "
|
65
|
+
- - ">="
|
122
66
|
- !ruby/object:Gem::Version
|
123
|
-
version: '0
|
67
|
+
version: '0'
|
124
68
|
type: :development
|
125
69
|
prerelease: false
|
126
70
|
version_requirements: !ruby/object:Gem::Requirement
|
127
71
|
requirements:
|
128
|
-
- - "
|
72
|
+
- - ">="
|
129
73
|
- !ruby/object:Gem::Version
|
130
|
-
version: '0
|
74
|
+
version: '0'
|
131
75
|
- !ruby/object:Gem::Dependency
|
132
|
-
name:
|
76
|
+
name: minitest
|
133
77
|
requirement: !ruby/object:Gem::Requirement
|
134
78
|
requirements:
|
135
|
-
- - "
|
79
|
+
- - ">="
|
136
80
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
81
|
+
version: '0'
|
138
82
|
type: :development
|
139
83
|
prerelease: false
|
140
84
|
version_requirements: !ruby/object:Gem::Requirement
|
141
85
|
requirements:
|
142
|
-
- - "
|
86
|
+
- - ">="
|
143
87
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
88
|
+
version: '0'
|
145
89
|
description: Build command-suite CLI apps that are awesome. Bootstrap your app, add
|
146
90
|
commands, options and documentation while maintaining a well-tested idiomatic command-line
|
147
91
|
app
|
@@ -153,28 +97,19 @@ extra_rdoc_files:
|
|
153
97
|
- README.rdoc
|
154
98
|
- gli.rdoc
|
155
99
|
files:
|
100
|
+
- ".circleci/config.yml"
|
156
101
|
- ".gitignore"
|
157
|
-
- ".ruby-gemset"
|
158
|
-
- ".ruby-version"
|
159
102
|
- ".tool-versions"
|
160
|
-
- ".travis.yml"
|
161
103
|
- CONTRIBUTING.md
|
162
104
|
- Gemfile
|
163
105
|
- LICENSE.txt
|
164
|
-
- ObjectModel.graffle
|
165
106
|
- README.rdoc
|
166
107
|
- Rakefile
|
108
|
+
- bin/ci
|
167
109
|
- bin/gli
|
168
|
-
- bin/
|
169
|
-
- bin/
|
170
|
-
-
|
171
|
-
- features/gli_init.feature
|
172
|
-
- features/step_definitions/gli_executable_steps.rb
|
173
|
-
- features/step_definitions/gli_init_steps.rb
|
174
|
-
- features/step_definitions/todo_steps.rb
|
175
|
-
- features/support/env.rb
|
176
|
-
- features/todo.feature
|
177
|
-
- features/todo_legacy.feature
|
110
|
+
- bin/rake
|
111
|
+
- bin/setup
|
112
|
+
- exe/gli
|
178
113
|
- gli.cheat
|
179
114
|
- gli.gemspec
|
180
115
|
- gli.rdoc
|
@@ -218,6 +153,8 @@ files:
|
|
218
153
|
- lib/gli/switch.rb
|
219
154
|
- lib/gli/terminal.rb
|
220
155
|
- lib/gli/version.rb
|
156
|
+
- object-model.dot
|
157
|
+
- object-model.png
|
221
158
|
- test/apps/README.md
|
222
159
|
- test/apps/todo/Gemfile
|
223
160
|
- test/apps/todo/README.rdoc
|
@@ -243,29 +180,32 @@ files:
|
|
243
180
|
- test/apps/todo_legacy/todo.gemspec
|
244
181
|
- test/apps/todo_legacy/todo.rdoc
|
245
182
|
- test/apps/todo_plugins/commands/third.rb
|
246
|
-
- test/
|
247
|
-
- test/
|
248
|
-
- test/
|
249
|
-
- test/
|
250
|
-
- test/
|
251
|
-
- test/
|
252
|
-
- test/
|
253
|
-
- test/
|
254
|
-
- test/
|
255
|
-
- test/
|
256
|
-
- test/
|
257
|
-
- test/
|
258
|
-
- test/
|
259
|
-
- test/
|
260
|
-
- test/
|
261
|
-
- test/
|
262
|
-
- test/
|
263
|
-
- test/
|
264
|
-
|
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
|
204
|
+
homepage: http://davetron5000.github.io/gli
|
265
205
|
licenses:
|
266
206
|
- Apache-2.0
|
267
207
|
metadata: {}
|
268
|
-
post_install_message:
|
208
|
+
post_install_message:
|
269
209
|
rdoc_options:
|
270
210
|
- "--title"
|
271
211
|
- Git Like Interface
|
@@ -284,19 +224,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
284
224
|
- !ruby/object:Gem::Version
|
285
225
|
version: '0'
|
286
226
|
requirements: []
|
287
|
-
rubygems_version: 3.
|
288
|
-
signing_key:
|
227
|
+
rubygems_version: 3.1.2
|
228
|
+
signing_key:
|
289
229
|
specification_version: 4
|
290
230
|
summary: Build command-suite CLI apps that are awesome.
|
291
231
|
test_files:
|
292
|
-
- features/gli_executable.feature
|
293
|
-
- features/gli_init.feature
|
294
|
-
- features/step_definitions/gli_executable_steps.rb
|
295
|
-
- features/step_definitions/gli_init_steps.rb
|
296
|
-
- features/step_definitions/todo_steps.rb
|
297
|
-
- features/support/env.rb
|
298
|
-
- features/todo.feature
|
299
|
-
- features/todo_legacy.feature
|
300
232
|
- test/apps/README.md
|
301
233
|
- test/apps/todo/Gemfile
|
302
234
|
- test/apps/todo/README.rdoc
|
@@ -322,21 +254,24 @@ test_files:
|
|
322
254
|
- test/apps/todo_legacy/todo.gemspec
|
323
255
|
- test/apps/todo_legacy/todo.rdoc
|
324
256
|
- test/apps/todo_plugins/commands/third.rb
|
325
|
-
- test/
|
326
|
-
- test/
|
327
|
-
- test/
|
328
|
-
- test/
|
329
|
-
- test/
|
330
|
-
- test/
|
331
|
-
- test/
|
332
|
-
- test/
|
333
|
-
- test/
|
334
|
-
- test/
|
335
|
-
- test/
|
336
|
-
- test/
|
337
|
-
- test/
|
338
|
-
- test/
|
339
|
-
- test/
|
340
|
-
- test/
|
341
|
-
- test/
|
342
|
-
- test/
|
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
|