gli 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CONTRIBUTING.md +23 -0
- data/features/todo.feature +7 -0
- data/lib/gli/commands/help_modules/command_finder.rb +1 -1
- data/lib/gli/version.rb +1 -1
- data/test/tc_help.rb +1 -1
- metadata +6 -4
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Contributions are welcome as long as they are part of my vision for GLI (or can be treated as optional to the user). I am obsessive about backwards-compatibility, so you may need to default things to disable your features. Sorry, not ready to bump a major version any time soon.
|
2
|
+
|
3
|
+
1. Fork my Repository
|
4
|
+
2. Create a branch off of gli-2 (**master is no longer the canonical branch**)
|
5
|
+
3. Make your changes:
|
6
|
+
* Please include tests and watch out for reek and roodi; i.e. keep your code clean
|
7
|
+
* If you make changes to the gli executable or the scaffolding, please update the cucumber features
|
8
|
+
* Please rubydoc any new methods and update the rubydoc to methods you change in the following format:
|
9
|
+
```ruby
|
10
|
+
# Short description
|
11
|
+
#
|
12
|
+
# Longer description if needed
|
13
|
+
#
|
14
|
+
# +args+:: get documented using this syntax
|
15
|
+
# +args+:: please state the TYPE of every arg
|
16
|
+
#
|
17
|
+
# Returns goes here, please state the TYPE of what's returned, if anything
|
18
|
+
```
|
19
|
+
* Use <code># :nodoc:</code> for methods that a _user_ of GLI should not call (but still please do document all methods)
|
20
|
+
4. Make sure your branch will merge with my gli-2 branch (or just rebase your branch from my gli-2 branch)
|
21
|
+
5. Create a pull request explaining your change
|
22
|
+
|
23
|
+
|
data/features/todo.feature
CHANGED
@@ -8,6 +8,13 @@ Feature: The todo app has a nice user interface
|
|
8
8
|
And my terminal size is "80x24"
|
9
9
|
And todo's bin directory is in my path
|
10
10
|
|
11
|
+
Scenario: Error message for unknown command
|
12
|
+
When I run `todo help unknown`
|
13
|
+
Then the output should contain:
|
14
|
+
"""
|
15
|
+
error: Unknown command 'unknown'. Use 'todo help' for a list of commands.
|
16
|
+
"""
|
17
|
+
|
11
18
|
Scenario Outline: Getting Help for todo in general
|
12
19
|
When I successfully run `todo <help>`
|
13
20
|
Then the output should contain:
|
@@ -47,7 +47,7 @@ module GLI
|
|
47
47
|
if command.nil?
|
48
48
|
@last_unknown_command = name
|
49
49
|
unless @squelch_stderr
|
50
|
-
error.puts "error: Unknown command '#{name}'. Use '
|
50
|
+
error.puts "error: Unknown command '#{name}'. Use '#{File.basename($PROGRAM_NAME)} help' for a list of commands."
|
51
51
|
end
|
52
52
|
true
|
53
53
|
else
|
data/lib/gli/version.rb
CHANGED
data/test/tc_help.rb
CHANGED
@@ -58,7 +58,7 @@ class TC_testHelp < Clean::Test::TestCase
|
|
58
58
|
@command.execute({},{},[@unknown_command_name])
|
59
59
|
}
|
60
60
|
Then {
|
61
|
-
assert_error_contained(/error: Unknown command '#{@unknown_command_name}'
|
61
|
+
assert_error_contained(/error: Unknown command '#{@unknown_command_name}'./)
|
62
62
|
}
|
63
63
|
end
|
64
64
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -172,6 +172,8 @@ files:
|
|
172
172
|
LnJ2bXJj
|
173
173
|
- !binary |-
|
174
174
|
LnRyYXZpcy55bWw=
|
175
|
+
- !binary |-
|
176
|
+
Q09OVFJJQlVUSU5HLm1k
|
175
177
|
- !binary |-
|
176
178
|
R2VtZmlsZQ==
|
177
179
|
- !binary |-
|
@@ -367,7 +369,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
367
369
|
version: '0'
|
368
370
|
segments:
|
369
371
|
- 0
|
370
|
-
hash: -
|
372
|
+
hash: -3175102747663964560
|
371
373
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
372
374
|
none: false
|
373
375
|
requirements:
|
@@ -376,7 +378,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
376
378
|
version: '0'
|
377
379
|
segments:
|
378
380
|
- 0
|
379
|
-
hash: -
|
381
|
+
hash: -3175102747663964560
|
380
382
|
requirements: []
|
381
383
|
rubyforge_project: gli
|
382
384
|
rubygems_version: 1.8.24
|