gli 2.5.5 → 2.5.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/features/todo.feature +5 -0
- data/lib/gli/command_support.rb +4 -10
- data/lib/gli/commands/initconfig.rb +3 -0
- data/lib/gli/version.rb +1 -1
- data/test/apps/todo/lib/todo/commands/list.rb +9 -0
- metadata +4 -4
data/.travis.yml
CHANGED
data/features/todo.feature
CHANGED
@@ -252,6 +252,7 @@ Feature: The todo app has a nice user interface
|
|
252
252
|
|
253
253
|
SYNOPSIS
|
254
254
|
todo [global options] list tasks [command options]
|
255
|
+
todo [global options] list tasks [command options] open
|
255
256
|
|
256
257
|
DESCRIPTION
|
257
258
|
Lists all of your tasks that you have, in varying orders, and all that
|
@@ -260,6 +261,10 @@ Feature: The todo app has a nice user interface
|
|
260
261
|
COMMAND OPTIONS
|
261
262
|
--flag=arg - (default: none)
|
262
263
|
-x arg - blah blah crud x whatever (default: none)
|
264
|
+
|
265
|
+
COMMANDS
|
266
|
+
<default> - list all tasks
|
267
|
+
open - list open tasks
|
263
268
|
"""
|
264
269
|
|
265
270
|
Scenario: Getting Help for a sub command with no command options
|
data/lib/gli/command_support.rb
CHANGED
@@ -70,19 +70,13 @@ module GLI
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def desc(d)
|
73
|
-
if parent.kind_of? Command
|
74
|
-
|
75
|
-
else
|
76
|
-
super(d)
|
77
|
-
end
|
73
|
+
parent.desc(d) if parent.kind_of? Command
|
74
|
+
super(d)
|
78
75
|
end
|
79
76
|
|
80
77
|
def long_desc(d)
|
81
|
-
if parent.kind_of? Command
|
82
|
-
|
83
|
-
else
|
84
|
-
super(d)
|
85
|
-
end
|
78
|
+
parent.long_desc(d) if parent.kind_of? Command
|
79
|
+
super(d)
|
86
80
|
end
|
87
81
|
|
88
82
|
def arg_name(d,options=[])
|
data/lib/gli/version.rb
CHANGED
@@ -29,6 +29,15 @@ command [:list] do |c|
|
|
29
29
|
puts options[:x].inspect
|
30
30
|
puts "list tasks: #{args.join(',')}"
|
31
31
|
end
|
32
|
+
|
33
|
+
tasks.desc 'list open tasks'
|
34
|
+
tasks.command :open do |open|
|
35
|
+
open.action do |global,options,args|
|
36
|
+
puts "tasks open"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
tasks.default_desc 'list all tasks'
|
32
41
|
end
|
33
42
|
|
34
43
|
c.desc "List contexts"
|
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.5.
|
4
|
+
version: 2.5.6
|
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: 2013-03-
|
12
|
+
date: 2013-03-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -333,7 +333,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
333
333
|
version: '0'
|
334
334
|
segments:
|
335
335
|
- 0
|
336
|
-
hash:
|
336
|
+
hash: -4071846445678563052
|
337
337
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
338
338
|
none: false
|
339
339
|
requirements:
|
@@ -342,7 +342,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
342
342
|
version: '0'
|
343
343
|
segments:
|
344
344
|
- 0
|
345
|
-
hash:
|
345
|
+
hash: -4071846445678563052
|
346
346
|
requirements: []
|
347
347
|
rubyforge_project: gli
|
348
348
|
rubygems_version: 1.8.25
|