gli 2.12.1 → 2.12.2
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/.travis.yml +0 -1
- data/features/gli_init.feature +2 -1
- data/features/step_definitions/todo_steps.rb +17 -17
- data/features/support/env.rb +0 -1
- data/features/todo.feature +9 -5
- data/features/todo_legacy.feature +2 -0
- data/gli.gemspec +3 -3
- data/gli.rdoc +2 -40
- data/lib/gli/commands/rdoc_document_listener.rb +1 -1
- data/lib/gli/version.rb +1 -1
- data/test/test_helper.rb +1 -0
- metadata +33 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc8e090eb35818fb076ce47c289821e655c8a4b7
|
4
|
+
data.tar.gz: b9db13d34615c611aa00260d9d32137d87b647ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eedf43747800d952018ec94f6f52ec2b5768223fd30da58d61811a4a218ede75351b53ff3a7ebbc6ebe24b304f58d2b177ae3c6309dc942be93ccd528d902dad
|
7
|
+
data.tar.gz: f92d617d3e07e3f17fe9c668af1338147a82b01c3624caad924edcba26a03ea46491a859be7a8a47cc6e20b7784f1116622a399a53cbcc39b6cee5126b564793
|
data/.travis.yml
CHANGED
data/features/gli_init.feature
CHANGED
@@ -139,6 +139,7 @@ Feature: The scaffold GLI generates works
|
|
139
139
|
2 steps (2 passed)
|
140
140
|
"""
|
141
141
|
|
142
|
+
@wip
|
142
143
|
Scenario Outline: Scaffold generates and respects flags to create ext dir and avoid test dir
|
143
144
|
When I run `<command>`
|
144
145
|
Then the exit status should be 0
|
@@ -229,4 +230,4 @@ Feature: The scaffold GLI generates works
|
|
229
230
|
Then the output should contain "complete command ran"
|
230
231
|
When I run `bin/todo-app foobar`
|
231
232
|
Then the stderr should contain "error: Unknown command 'foobar'"
|
232
|
-
And the exit status should not be 0
|
233
|
+
And the exit status should not be 0
|
@@ -30,28 +30,28 @@ Then /^the config file should contain a section for each command and subcommand$
|
|
30
30
|
config = File.open(File.join(ENV['HOME'],'gli_test_todo.rc')) do |file|
|
31
31
|
YAML::load(file)
|
32
32
|
end
|
33
|
-
config.keys.
|
34
|
-
config[:flag].
|
33
|
+
expect(config.keys).to include(:flag)
|
34
|
+
expect(config[:flag]).to eq('foo')
|
35
35
|
config[:flag].tap do |flag|
|
36
36
|
if flag.respond_to?(:encoding)
|
37
|
-
flag.encoding.name.
|
37
|
+
expect(flag.encoding.name).to eq('UTF-8')
|
38
38
|
end
|
39
39
|
end
|
40
|
-
config.keys.
|
41
|
-
config[:switch].
|
42
|
-
config.keys.
|
43
|
-
config[:otherswitch].
|
44
|
-
config.keys.
|
40
|
+
expect(config.keys).to include(:switch)
|
41
|
+
expect(config[:switch]).to eq(true)
|
42
|
+
expect(config.keys).to include(:otherswitch)
|
43
|
+
expect(config[:otherswitch]).to eq(false)
|
44
|
+
expect(config.keys).to include('commands')
|
45
45
|
%w(chained chained2 create first list ls second).map(&:to_sym).each do |command_name|
|
46
|
-
config['commands'].keys.
|
46
|
+
expect(config['commands'].keys).to include(command_name)
|
47
47
|
end
|
48
|
-
config['commands'][:create].keys.
|
49
|
-
config['commands'][:create]['commands'].
|
50
|
-
config['commands'][:create]['commands'].
|
48
|
+
expect(config['commands'][:create].keys).to include('commands')
|
49
|
+
expect(config['commands'][:create]['commands']).to include(:tasks)
|
50
|
+
expect(config['commands'][:create]['commands']).to include(:contexts)
|
51
51
|
|
52
|
-
config['commands'][:list].keys.
|
53
|
-
config['commands'][:list]['commands'].
|
54
|
-
config['commands'][:list]['commands'].
|
52
|
+
expect(config['commands'][:list].keys).to include('commands')
|
53
|
+
expect(config['commands'][:list]['commands']).to include(:tasks)
|
54
|
+
expect(config['commands'][:list]['commands']).to include(:contexts)
|
55
55
|
end
|
56
56
|
|
57
57
|
Given /^a config file that specifies defaults for some commands with subcommands$/ do
|
@@ -77,10 +77,10 @@ end
|
|
77
77
|
Then /^I should see the defaults for '(.*)' from the config file in the help$/ do |command_path|
|
78
78
|
if command_path == 'list tasks'
|
79
79
|
step %{the output should match /--flag.*default: foobar/}
|
80
|
-
unescape(all_output).
|
80
|
+
expect(unescape(all_output)).not_to match(/#{unescape("--otherflag.*default: crud")}/m)
|
81
81
|
elsif command_path == 'list contexts'
|
82
82
|
step %{the output should match /--otherflag.*default: crud/}
|
83
|
-
unescape(all_output).
|
83
|
+
expect(unescape(all_output)).not_to match(/#{unescape("--flag.*default: foobar")}/m)
|
84
84
|
else
|
85
85
|
raise "Don't know how to test for command path #{command_path}"
|
86
86
|
end
|
data/features/support/env.rb
CHANGED
data/features/todo.feature
CHANGED
@@ -15,8 +15,8 @@ Feature: The todo app has a nice user interface
|
|
15
15
|
error: Unknown command 'unknown'. Use 'todo help' for a list of commands.
|
16
16
|
"""
|
17
17
|
|
18
|
-
Scenario
|
19
|
-
When I successfully run `todo
|
18
|
+
Scenario: Getting Help for todo in general
|
19
|
+
When I successfully run `todo help`
|
20
20
|
Then the exit status should be 0
|
21
21
|
Then the output should contain:
|
22
22
|
"""
|
@@ -52,9 +52,6 @@ Feature: The todo app has a nice user interface
|
|
52
52
|
second -
|
53
53
|
third -
|
54
54
|
"""
|
55
|
-
Examples:
|
56
|
-
| help |
|
57
|
-
| help |
|
58
55
|
|
59
56
|
Scenario: Version display
|
60
57
|
When I successfully run `todo --version`
|
@@ -178,6 +175,8 @@ Feature: The todo app has a nice user interface
|
|
178
175
|
"""
|
179
176
|
|
180
177
|
Scenario Outline: Getting Help for a top level command of todo
|
178
|
+
# No idea why I have to do this again.
|
179
|
+
Given todo's bin directory is in my path
|
181
180
|
When I successfully run `todo <help_invocation>`
|
182
181
|
Then the output should contain:
|
183
182
|
"""
|
@@ -544,3 +543,8 @@ Feature: The todo app has a nice user interface
|
|
544
543
|
todo [global options] second [argument]
|
545
544
|
"""
|
546
545
|
|
546
|
+
Scenario: Generate app documentation
|
547
|
+
When I run `todo _doc`
|
548
|
+
Then the exit status should be 0
|
549
|
+
And a file named "todo.rdoc" should exist
|
550
|
+
And the file "todo.rdoc" should contain "Lists all of your contexts, which are places you might be"
|
@@ -24,6 +24,8 @@ Feature: The todo app is backwards compatible with legacy subcommand parsing
|
|
24
24
|
"""
|
25
25
|
|
26
26
|
Scenario Outline: Getting Help for a top level command of todo
|
27
|
+
# No idea why I have to do this again.
|
28
|
+
Given todo_legacy's bin directory is in my path
|
27
29
|
When I successfully run `todo <help_invocation>`
|
28
30
|
Then the output should contain:
|
29
31
|
"""
|
data/gli.gemspec
CHANGED
@@ -25,9 +25,9 @@ spec = Gem::Specification.new do |s|
|
|
25
25
|
s.add_development_dependency('rdoc', '~> 3.11')
|
26
26
|
s.add_development_dependency('rainbow', '~> 1.1.1')
|
27
27
|
s.add_development_dependency('clean_test')
|
28
|
-
s.add_development_dependency('cucumber'
|
29
|
-
s.add_development_dependency('gherkin'
|
30
|
-
s.add_development_dependency('aruba'
|
28
|
+
s.add_development_dependency('cucumber')
|
29
|
+
s.add_development_dependency('gherkin')
|
30
|
+
s.add_development_dependency('aruba')
|
31
31
|
s.add_development_dependency('sdoc')
|
32
32
|
s.add_development_dependency('faker','1.0.0')
|
33
33
|
end
|
data/gli.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
== gli - create scaffolding for a GLI-powered application
|
2
2
|
|
3
|
-
v2.
|
3
|
+
v2.12.1
|
4
4
|
|
5
5
|
=== Global Options
|
6
6
|
=== -r|--root arg
|
@@ -28,46 +28,8 @@ Be verbose
|
|
28
28
|
|
29
29
|
|
30
30
|
=== --version
|
31
|
-
|
31
|
+
Display the program version
|
32
32
|
|
33
33
|
|
34
34
|
|
35
35
|
=== Commands
|
36
|
-
==== Command: <tt>help command</tt>
|
37
|
-
Shows a list of commands or help for one command
|
38
|
-
|
39
|
-
Gets help for the application or its commands. Can also list the commands in a way helpful to creating a bash-style completion function
|
40
|
-
===== Options
|
41
|
-
===== -c
|
42
|
-
List commands one per line, to assist with shell completion
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
==== Command: <tt>init|scaffold project_name [command[ command]*]</tt>
|
47
|
-
Create a new GLI-based project
|
48
|
-
|
49
|
-
This will create a scaffold command line project that uses GLI
|
50
|
-
for command line processing. Specifically, this will create
|
51
|
-
an executable ready to go, as well as a lib and test directory, all
|
52
|
-
inside the directory named for your project
|
53
|
-
===== Options
|
54
|
-
===== -e|--[no-]ext
|
55
|
-
Create an ext dir
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
===== --[no-]force
|
60
|
-
Overwrite/ignore existing files and directories
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
===== --notest
|
65
|
-
Do not create a test or features dir
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
===== --[no-]rvmrc
|
70
|
-
Create an .rvmrc based on your current RVM setup
|
71
|
-
|
72
|
-
|
73
|
-
|
@@ -81,7 +81,7 @@ module GLI
|
|
81
81
|
|
82
82
|
# Gives you a command in the current context and creates a new context of this command
|
83
83
|
def command(name,aliases,desc,long_desc,arg_name,arg_options)
|
84
|
-
@io.puts "#{@nest}=== Command: <tt>#{([name] + aliases).join('|')} #{@arg_name_formatter.format(arg_name,arg_options)}</tt>"
|
84
|
+
@io.puts "#{@nest}=== Command: <tt>#{([name] + aliases).join('|')} #{@arg_name_formatter.format(arg_name,arg_options,[])}</tt>"
|
85
85
|
@io.puts String(desc).strip
|
86
86
|
@io.puts
|
87
87
|
@io.puts String(long_desc).strip
|
data/lib/gli/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,125 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.12.
|
4
|
+
version: 2.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Copeland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-29 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
33
|
version: '3.11'
|
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
40
|
version: '3.11'
|
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
47
|
version: 1.1.1
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.1.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: clean_test
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: cucumber
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: gherkin
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: aruba
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0
|
103
|
+
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0
|
110
|
+
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: sdoc
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
@@ -147,10 +147,10 @@ extra_rdoc_files:
|
|
147
147
|
- README.rdoc
|
148
148
|
- gli.rdoc
|
149
149
|
files:
|
150
|
-
- .gitignore
|
151
|
-
- .ruby-gemset
|
152
|
-
- .ruby-version
|
153
|
-
- .travis.yml
|
150
|
+
- ".gitignore"
|
151
|
+
- ".ruby-gemset"
|
152
|
+
- ".ruby-version"
|
153
|
+
- ".travis.yml"
|
154
154
|
- CONTRIBUTING.md
|
155
155
|
- Gemfile
|
156
156
|
- LICENSE.txt
|
@@ -258,25 +258,25 @@ licenses: []
|
|
258
258
|
metadata: {}
|
259
259
|
post_install_message:
|
260
260
|
rdoc_options:
|
261
|
-
- --title
|
261
|
+
- "--title"
|
262
262
|
- Git Like Interface
|
263
|
-
- --main
|
263
|
+
- "--main"
|
264
264
|
- README.rdoc
|
265
265
|
require_paths:
|
266
266
|
- lib
|
267
267
|
required_ruby_version: !ruby/object:Gem::Requirement
|
268
268
|
requirements:
|
269
|
-
- -
|
269
|
+
- - ">="
|
270
270
|
- !ruby/object:Gem::Version
|
271
271
|
version: '0'
|
272
272
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
273
273
|
requirements:
|
274
|
-
- -
|
274
|
+
- - ">="
|
275
275
|
- !ruby/object:Gem::Version
|
276
276
|
version: '0'
|
277
277
|
requirements: []
|
278
278
|
rubyforge_project: gli
|
279
|
-
rubygems_version: 2.0.
|
279
|
+
rubygems_version: 2.2.0.rc.1
|
280
280
|
signing_key:
|
281
281
|
specification_version: 4
|
282
282
|
summary: Build command-suite CLI apps that are awesome.
|