gli 2.5.5 → 2.5.6

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.
@@ -12,3 +12,4 @@ branches:
12
12
  only:
13
13
  - 'master'
14
14
  - 'gli-2'
15
+ - 'quick-bugifxes'
@@ -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
@@ -70,19 +70,13 @@ module GLI
70
70
  end
71
71
 
72
72
  def desc(d)
73
- if parent.kind_of? Command
74
- parent.desc(d)
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
- parent.long_desc(d)
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=[])
@@ -49,6 +49,9 @@ module GLI
49
49
  end
50
50
  end
51
51
  end
52
+
53
+ FileUtils.mkdir_p(File.dirname(@filename)) unless File.dirname(@filename) == '.'
54
+
52
55
  File.open(@filename,'w', 0600) do |file|
53
56
  YAML.dump(config,file)
54
57
  end
@@ -1,5 +1,5 @@
1
1
  module GLI
2
2
  unless const_defined? :VERSION
3
- VERSION = '2.5.5' #:nodoc:
3
+ VERSION = '2.5.6' #:nodoc:
4
4
  end
5
5
  end
@@ -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.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-17 00:00:00.000000000 Z
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: 4280558449703188921
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: 4280558449703188921
345
+ hash: -4071846445678563052
346
346
  requirements: []
347
347
  rubyforge_project: gli
348
348
  rubygems_version: 1.8.25