gli 2.5.0 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,6 +7,7 @@ rvm:
7
7
  - 1.9.3
8
8
  - 1.8.7
9
9
  - ree
10
+ - 2.0.0
10
11
  branches:
11
12
  only:
12
13
  - 'master'
@@ -10,6 +10,8 @@ of syntax, but without restricting you in any way from the power of +OptionParse
10
10
  * {Source on Github}[http://github.com/davetron5000/gli]
11
11
  * RDoc[http://davetron5000.github.com/gli/rdoc/index.html]
12
12
 
13
+ {<img src="https://secure.travis-ci.org/davetron5000/gli.png?branch=gli-2" alt="Build Status" />}[https://travis-ci.org/davetron5000/gli]
14
+
13
15
  == Use
14
16
 
15
17
  Install if you need to:
data/Rakefile CHANGED
@@ -3,23 +3,9 @@ require 'bundler'
3
3
  require 'rake/clean'
4
4
  require 'rake/testtask'
5
5
  require 'rdoc/task'
6
- require 'roodi'
7
- require 'roodi_task'
8
6
  require 'cucumber'
9
7
  require 'cucumber/rake/task'
10
8
 
11
- old_verbose = $VERBOSE
12
- $VERBOSE=0
13
- require 'reek/rake/task'
14
- Reek::Rake::Task.new do |t|
15
- t.fail_on_error = false
16
- t.config_files = ['test/gli.reek']
17
- t.ruby_opts=['-W0']
18
- t.reek_opts=['-q']
19
- t.source_files = FileList['lib/**/*.rb'] - ['lib/gli/commands/scaffold.rb','lib/gli/commands/help.rb'] - FileList['lib/gli/commands/help_modules/*.rb']
20
- end
21
- $VERBOSE=old_verbose
22
-
23
9
  include Rake::DSL
24
10
 
25
11
  CLEAN << "log"
@@ -89,11 +75,6 @@ end
89
75
 
90
76
  Bundler::GemHelper.install_tasks
91
77
 
92
- RoodiTask.new do |t|
93
- t.patterns = ['lib/**/*.rb']
94
- t.config = 'test/roodi.yaml'
95
- end
96
-
97
78
  desc 'run unit tests'
98
79
  Rake::TestTask.new do |t|
99
80
  t.libs << "test"
@@ -141,5 +122,5 @@ end
141
122
  desc 'Publish rdoc on github pages and push to github'
142
123
  task :publish_rdoc => [:rdoc,:publish]
143
124
 
144
- task :default => [:test,:features,:roodi]
125
+ task :default => [:test,:features]
145
126
 
@@ -23,8 +23,6 @@ spec = Gem::Specification.new do |s|
23
23
  s.rubyforge_project = 'gli'
24
24
  s.add_development_dependency('rake', '~> 0.9.2.2')
25
25
  s.add_development_dependency('rdoc', '~> 3.11')
26
- s.add_development_dependency('roodi', '~> 2.1.0')
27
- s.add_development_dependency('reek')
28
26
  s.add_development_dependency('rainbow', '~> 1.1.1')
29
27
  s.add_development_dependency('clean_test')
30
28
  s.add_development_dependency('aruba')
@@ -16,6 +16,8 @@ module GLI
16
16
  flags.clear
17
17
  @commands = nil
18
18
  @commands_declaration_order = []
19
+ @flags_declaration_order = []
20
+ @switches_declaration_order = []
19
21
  @version = nil
20
22
  @config_file = nil
21
23
  @use_openstruct = false
@@ -51,6 +51,8 @@ module GLI
51
51
  @skips_post = options[:skips_post]
52
52
  @skips_around = options[:skips_around]
53
53
  @commands_declaration_order = []
54
+ @flags_declaration_order = []
55
+ @switches_declaration_order = []
54
56
  clear_nexts
55
57
  end
56
58
 
@@ -15,17 +15,17 @@ module GLI
15
15
  def format
16
16
  command_wrapper = @wrapper_class.new(Terminal.instance.size[0],4 + @command.name.to_s.size + 3)
17
17
  wrapper = @wrapper_class.new(Terminal.instance.size[0],4)
18
- flags_and_switches = Hash[@command.topmost_ancestor.flags.merge(@command.topmost_ancestor.switches).select { |_,option| option.associated_command == @command }]
18
+ flags_and_switches = (@command.topmost_ancestor.flags_declaration_order + @command.topmost_ancestor.switches_declaration_order).select { |option| option.associated_command == @command }
19
19
  options_description = OptionsFormatter.new(flags_and_switches,@sorter,@wrapper_class).format
20
20
  commands_description = format_subcommands(@command)
21
21
 
22
22
  synopses = []
23
- one_line_usage = basic_usage(flags_and_switches)
23
+ one_line_usage = basic_usage
24
24
  one_line_usage << @command.arguments_description
25
25
  if @command.commands.empty?
26
26
  synopses << one_line_usage
27
27
  else
28
- synopses = sorted_synopses(flags_and_switches)
28
+ synopses = sorted_synopses
29
29
  if @command.has_action?
30
30
  synopses.unshift(one_line_usage)
31
31
  end
@@ -59,8 +59,8 @@ COMMANDS
59
59
  <%= commands_description %>
60
60
  <% end %>),nil,'<>')
61
61
 
62
- def command_with_subcommand_usage(sub,flags_and_switches,is_default_command)
63
- usage = basic_usage(flags_and_switches)
62
+ def command_with_subcommand_usage(sub,is_default_command)
63
+ usage = basic_usage
64
64
  sub_options = @command.flags.merge(@command.switches).select { |_,o| o.associated_command == sub }
65
65
  usage << sub_options.map { |option_name,option|
66
66
  all_names = [option.name,Array(option.aliases)].flatten
@@ -79,7 +79,7 @@ COMMANDS
79
79
  end
80
80
 
81
81
 
82
- def basic_usage(flags_and_switches)
82
+ def basic_usage
83
83
  usage = @basic_invocation.dup
84
84
  usage << " [global options] #{path_to_command} "
85
85
  usage << "[command options] " unless global_flags_and_switches.empty?
@@ -115,11 +115,11 @@ COMMANDS
115
115
  StringIO.new.tap { |io| formatter.output(io) }.string
116
116
  end
117
117
 
118
- def sorted_synopses(flags_and_switches)
118
+ def sorted_synopses
119
119
  synopses_command = {}
120
120
  @command.commands.each do |name,sub|
121
121
  default = @command.get_default_command == name
122
- synopsis = command_with_subcommand_usage(sub,flags_and_switches,default)
122
+ synopsis = command_with_subcommand_usage(sub,default)
123
123
  synopses_command[synopsis] = sub
124
124
  end
125
125
  synopses = synopses_command.keys.sort { |one,two|
@@ -54,7 +54,7 @@ COMMANDS
54
54
  <%= commands %>),nil,'<>')
55
55
 
56
56
  def global_flags_and_switches
57
- @app.flags.merge(@app.switches)
57
+ @app.flags_declaration_order + @app.switches_declaration_order
58
58
  end
59
59
 
60
60
  def usage_string
@@ -3,14 +3,12 @@ module GLI
3
3
  module HelpModules
4
4
  class OptionsFormatter
5
5
  def initialize(flags_and_switches,sorter,wrapper_class)
6
- @flags_and_switches = flags_and_switches
7
- @sorter = sorter
6
+ @flags_and_switches = sorter.call(flags_and_switches)
8
7
  @wrapper_class = wrapper_class
9
8
  end
10
9
 
11
10
  def format
12
- flags_and_switches = @sorter.call(@flags_and_switches.values)
13
- list_formatter = ListFormatter.new(flags_and_switches.map { |option|
11
+ list_formatter = ListFormatter.new(@flags_and_switches.map { |option|
14
12
  if option.respond_to? :argument_name
15
13
  [option_names_for_help_string(option,option.argument_name),description_with_default(option)]
16
14
  else
@@ -77,6 +77,7 @@ module GLI
77
77
  flags[flag.name] = flag
78
78
 
79
79
  clear_nexts
80
+ flags_declaration_order << flag
80
81
  flag
81
82
  end
82
83
  alias :f :flag
@@ -98,6 +99,7 @@ module GLI
98
99
  switches[switch.name] = switch
99
100
 
100
101
  clear_nexts
102
+ switches_declaration_order << switch
101
103
  switch
102
104
  end
103
105
  alias :s :switch
@@ -173,6 +175,15 @@ module GLI
173
175
  end
174
176
  alias :c :command
175
177
 
178
+ def flags_declaration_order # :nodoc:
179
+ @flags_declaration_order ||= []
180
+ end
181
+
182
+ def switches_declaration_order # :nodoc:
183
+ @switches_declaration_order ||= []
184
+ end
185
+
186
+
176
187
  private
177
188
  # Checks that the names passed in have not been used in another flag or option
178
189
  def verify_unused(names) # :nodoc:
@@ -1,5 +1,5 @@
1
1
  module GLI
2
2
  unless const_defined? :VERSION
3
- VERSION = '2.5.0' #:nodoc:
3
+ VERSION = '2.5.1' #:nodoc:
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,465 +1,293 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gli
3
- version: !ruby/object:Gem::Version
4
- version: 2.5.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 25
5
5
  prerelease:
6
+ segments:
7
+ - 2
8
+ - 5
9
+ - 1
10
+ version: 2.5.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - David Copeland
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-11-21 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: rake
16
- requirement: !ruby/object:Gem::Requirement
17
+
18
+ date: 2012-12-08 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ version_requirements: &id001 !ruby/object:Gem::Requirement
17
22
  none: false
18
- requirements:
23
+ requirements:
19
24
  - - ~>
20
- - !ruby/object:Gem::Version
25
+ - !ruby/object:Gem::Version
26
+ hash: 11
27
+ segments:
28
+ - 0
29
+ - 9
30
+ - 2
31
+ - 2
21
32
  version: 0.9.2.2
22
- type: :development
23
33
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: 0.9.2.2
30
- - !ruby/object:Gem::Dependency
31
- name: rdoc
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ~>
36
- - !ruby/object:Gem::Version
37
- version: '3.11'
38
34
  type: :development
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: '3.11'
46
- - !ruby/object:Gem::Dependency
47
- name: roodi
48
- requirement: !ruby/object:Gem::Requirement
35
+ name: rake
36
+ requirement: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ version_requirements: &id002 !ruby/object:Gem::Requirement
49
39
  none: false
50
- requirements:
40
+ requirements:
51
41
  - - ~>
52
- - !ruby/object:Gem::Version
53
- version: 2.1.0
54
- type: :development
42
+ - !ruby/object:Gem::Version
43
+ hash: 17
44
+ segments:
45
+ - 3
46
+ - 11
47
+ version: "3.11"
55
48
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: 2.1.0
62
- - !ruby/object:Gem::Dependency
63
- name: reek
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
49
  type: :development
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: rainbow
80
- requirement: !ruby/object:Gem::Requirement
50
+ name: rdoc
51
+ requirement: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ version_requirements: &id003 !ruby/object:Gem::Requirement
81
54
  none: false
82
- requirements:
55
+ requirements:
83
56
  - - ~>
84
- - !ruby/object:Gem::Version
57
+ - !ruby/object:Gem::Version
58
+ hash: 17
59
+ segments:
60
+ - 1
61
+ - 1
62
+ - 1
85
63
  version: 1.1.1
86
- type: :development
87
64
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
65
+ type: :development
66
+ name: rainbow
67
+ requirement: *id003
68
+ - !ruby/object:Gem::Dependency
69
+ version_requirements: &id004 !ruby/object:Gem::Requirement
89
70
  none: false
90
- requirements:
91
- - - ~>
92
- - !ruby/object:Gem::Version
93
- version: 1.1.1
94
- - !ruby/object:Gem::Dependency
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ prerelease: false
79
+ type: :development
95
80
  name: clean_test
96
- requirement: !ruby/object:Gem::Requirement
81
+ requirement: *id004
82
+ - !ruby/object:Gem::Dependency
83
+ version_requirements: &id005 !ruby/object:Gem::Requirement
97
84
  none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- type: :development
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ hash: 3
89
+ segments:
90
+ - 0
91
+ version: "0"
103
92
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- - !ruby/object:Gem::Dependency
93
+ type: :development
111
94
  name: aruba
112
- requirement: !ruby/object:Gem::Requirement
95
+ requirement: *id005
96
+ - !ruby/object:Gem::Dependency
97
+ version_requirements: &id006 !ruby/object:Gem::Requirement
113
98
  none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ hash: 3
103
+ segments:
104
+ - 0
105
+ version: "0"
119
106
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
- - !ruby/object:Gem::Dependency
127
- name: sdoc
128
- requirement: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: '0'
134
107
  type: :development
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
142
- - !ruby/object:Gem::Dependency
143
- name: faker
144
- requirement: !ruby/object:Gem::Requirement
108
+ name: sdoc
109
+ requirement: *id006
110
+ - !ruby/object:Gem::Dependency
111
+ version_requirements: &id007 !ruby/object:Gem::Requirement
145
112
  none: false
146
- requirements:
147
- - - '='
148
- - !ruby/object:Gem::Version
113
+ requirements:
114
+ - - "="
115
+ - !ruby/object:Gem::Version
116
+ hash: 23
117
+ segments:
118
+ - 1
119
+ - 0
120
+ - 0
149
121
  version: 1.0.0
150
- type: :development
151
122
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - '='
156
- - !ruby/object:Gem::Version
157
- version: 1.0.0
158
- description: Build command-suite CLI apps that are awesome. Bootstrap your app, add
159
- commands, options and documentation while maintaining a well-tested idiomatic command-line
160
- app
123
+ type: :development
124
+ name: faker
125
+ requirement: *id007
126
+ description: Build command-suite CLI apps that are awesome. Bootstrap your app, add commands, options and documentation while maintaining a well-tested idiomatic command-line app
161
127
  email: davidcopeland@naildrivin5.com
162
- executables:
128
+ executables:
163
129
  - gli
164
130
  extensions: []
165
- extra_rdoc_files:
131
+
132
+ extra_rdoc_files:
133
+ - README.rdoc
134
+ - gli.rdoc
135
+ files:
136
+ - .gitignore
137
+ - .rvmrc
138
+ - .travis.yml
139
+ - CONTRIBUTING.md
140
+ - Gemfile
141
+ - LICENSE.txt
142
+ - ObjectModel.graffle
166
143
  - README.rdoc
144
+ - Rakefile
145
+ - bin/gli
146
+ - bin/report_on_rake_results
147
+ - bin/test_all_rubies.sh
148
+ - features/gli_executable.feature
149
+ - features/gli_init.feature
150
+ - features/step_definitions/gli_executable_steps.rb
151
+ - features/step_definitions/gli_init_steps.rb
152
+ - features/step_definitions/todo_steps.rb
153
+ - features/support/env.rb
154
+ - features/todo.feature
155
+ - gli.cheat
156
+ - gli.gemspec
167
157
  - gli.rdoc
168
- files:
169
- - !binary |-
170
- LmdpdGlnbm9yZQ==
171
- - !binary |-
172
- LnJ2bXJj
173
- - !binary |-
174
- LnRyYXZpcy55bWw=
175
- - !binary |-
176
- Q09OVFJJQlVUSU5HLm1k
177
- - !binary |-
178
- R2VtZmlsZQ==
179
- - !binary |-
180
- TElDRU5TRS50eHQ=
181
- - !binary |-
182
- T2JqZWN0TW9kZWwuZ3JhZmZsZQ==
183
- - !binary |-
184
- UkVBRE1FLnJkb2M=
185
- - !binary |-
186
- UmFrZWZpbGU=
187
- - !binary |-
188
- YmluL2dsaQ==
189
- - !binary |-
190
- YmluL3JlcG9ydF9vbl9yYWtlX3Jlc3VsdHM=
191
- - !binary |-
192
- YmluL3Rlc3RfYWxsX3J1Ymllcy5zaA==
193
- - !binary |-
194
- ZmVhdHVyZXMvZ2xpX2V4ZWN1dGFibGUuZmVhdHVyZQ==
195
- - !binary |-
196
- ZmVhdHVyZXMvZ2xpX2luaXQuZmVhdHVyZQ==
197
- - !binary |-
198
- ZmVhdHVyZXMvc3RlcF9kZWZpbml0aW9ucy9nbGlfZXhlY3V0YWJsZV9zdGVw
199
- cy5yYg==
200
- - !binary |-
201
- ZmVhdHVyZXMvc3RlcF9kZWZpbml0aW9ucy9nbGlfaW5pdF9zdGVwcy5yYg==
202
- - !binary |-
203
- ZmVhdHVyZXMvc3RlcF9kZWZpbml0aW9ucy90b2RvX3N0ZXBzLnJi
204
- - !binary |-
205
- ZmVhdHVyZXMvc3VwcG9ydC9lbnYucmI=
206
- - !binary |-
207
- ZmVhdHVyZXMvdG9kby5mZWF0dXJl
208
- - !binary |-
209
- Z2xpLmNoZWF0
210
- - !binary |-
211
- Z2xpLmdlbXNwZWM=
212
- - !binary |-
213
- Z2xpLnJkb2M=
214
- - !binary |-
215
- bGliL2dsaS5yYg==
216
- - !binary |-
217
- bGliL2dsaS9hcHAucmI=
218
- - !binary |-
219
- bGliL2dsaS9hcHBfc3VwcG9ydC5yYg==
220
- - !binary |-
221
- bGliL2dsaS9jb21tYW5kLnJi
222
- - !binary |-
223
- bGliL2dsaS9jb21tYW5kX2xpbmVfb3B0aW9uLnJi
224
- - !binary |-
225
- bGliL2dsaS9jb21tYW5kX2xpbmVfdG9rZW4ucmI=
226
- - !binary |-
227
- bGliL2dsaS9jb21tYW5kX3N1cHBvcnQucmI=
228
- - !binary |-
229
- bGliL2dsaS9jb21tYW5kcy9jb21wb3VuZF9jb21tYW5kLnJi
230
- - !binary |-
231
- bGliL2dsaS9jb21tYW5kcy9kb2MucmI=
232
- - !binary |-
233
- bGliL2dsaS9jb21tYW5kcy9oZWxwLnJi
234
- - !binary |-
235
- bGliL2dsaS9jb21tYW5kcy9oZWxwX21vZHVsZXMvYXJnX25hbWVfZm9ybWF0
236
- dGVyLnJi
237
- - !binary |-
238
- bGliL2dsaS9jb21tYW5kcy9oZWxwX21vZHVsZXMvY29tbWFuZF9maW5kZXIu
239
- cmI=
240
- - !binary |-
241
- bGliL2dsaS9jb21tYW5kcy9oZWxwX21vZHVsZXMvY29tbWFuZF9oZWxwX2Zv
242
- cm1hdC5yYg==
243
- - !binary |-
244
- bGliL2dsaS9jb21tYW5kcy9oZWxwX21vZHVsZXMvZ2xvYmFsX2hlbHBfZm9y
245
- bWF0LnJi
246
- - !binary |-
247
- bGliL2dsaS9jb21tYW5kcy9oZWxwX21vZHVsZXMvaGVscF9jb21wbGV0aW9u
248
- X2Zvcm1hdC5yYg==
249
- - !binary |-
250
- bGliL2dsaS9jb21tYW5kcy9oZWxwX21vZHVsZXMvbGlzdF9mb3JtYXR0ZXIu
251
- cmI=
252
- - !binary |-
253
- bGliL2dsaS9jb21tYW5kcy9oZWxwX21vZHVsZXMvb25lX2xpbmVfd3JhcHBl
254
- ci5yYg==
255
- - !binary |-
256
- bGliL2dsaS9jb21tYW5kcy9oZWxwX21vZHVsZXMvb3B0aW9uc19mb3JtYXR0
257
- ZXIucmI=
258
- - !binary |-
259
- bGliL2dsaS9jb21tYW5kcy9oZWxwX21vZHVsZXMvdGV4dF93cmFwcGVyLnJi
260
- - !binary |-
261
- bGliL2dsaS9jb21tYW5kcy9oZWxwX21vZHVsZXMvdHR5X29ubHlfd3JhcHBl
262
- ci5yYg==
263
- - !binary |-
264
- bGliL2dsaS9jb21tYW5kcy9oZWxwX21vZHVsZXMvdmVyYmF0aW1fd3JhcHBl
265
- ci5yYg==
266
- - !binary |-
267
- bGliL2dsaS9jb21tYW5kcy9pbml0Y29uZmlnLnJi
268
- - !binary |-
269
- bGliL2dsaS9jb21tYW5kcy9yZG9jX2RvY3VtZW50X2xpc3RlbmVyLnJi
270
- - !binary |-
271
- bGliL2dsaS9jb21tYW5kcy9zY2FmZm9sZC5yYg==
272
- - !binary |-
273
- bGliL2dsaS9jb3B5X29wdGlvbnNfdG9fYWxpYXNlcy5yYg==
274
- - !binary |-
275
- bGliL2dsaS9kc2wucmI=
276
- - !binary |-
277
- bGliL2dsaS9leGNlcHRpb25zLnJi
278
- - !binary |-
279
- bGliL2dsaS9mbGFnLnJi
280
- - !binary |-
281
- bGliL2dsaS9nbGlfb3B0aW9uX3BhcnNlci5yYg==
282
- - !binary |-
283
- bGliL2dsaS9vcHRpb25fcGFyc2VyX2ZhY3RvcnkucmI=
284
- - !binary |-
285
- bGliL2dsaS9vcHRpb25zLnJi
286
- - !binary |-
287
- bGliL2dsaS9zd2l0Y2gucmI=
288
- - !binary |-
289
- bGliL2dsaS90ZXJtaW5hbC5yYg==
290
- - !binary |-
291
- bGliL2dsaS92ZXJzaW9uLnJi
292
- - !binary |-
293
- dGVzdC9hcHBzL1JFQURNRS5tZA==
294
- - !binary |-
295
- dGVzdC9hcHBzL3RvZG8vR2VtZmlsZQ==
296
- - !binary |-
297
- dGVzdC9hcHBzL3RvZG8vUkVBRE1FLnJkb2M=
298
- - !binary |-
299
- dGVzdC9hcHBzL3RvZG8vUmFrZWZpbGU=
300
- - !binary |-
301
- dGVzdC9hcHBzL3RvZG8vYmluL3RvZG8=
302
- - !binary |-
303
- dGVzdC9hcHBzL3RvZG8vbGliL3RvZG8vY29tbWFuZHMvY3JlYXRlLnJi
304
- - !binary |-
305
- dGVzdC9hcHBzL3RvZG8vbGliL3RvZG8vY29tbWFuZHMvbGlzdC5yYg==
306
- - !binary |-
307
- dGVzdC9hcHBzL3RvZG8vbGliL3RvZG8vY29tbWFuZHMvbHMucmI=
308
- - !binary |-
309
- dGVzdC9hcHBzL3RvZG8vbGliL3RvZG8vdmVyc2lvbi5yYg==
310
- - !binary |-
311
- dGVzdC9hcHBzL3RvZG8vdGVzdC90Y19ub3RoaW5nLnJi
312
- - !binary |-
313
- dGVzdC9hcHBzL3RvZG8vdG9kby5nZW1zcGVj
314
- - !binary |-
315
- dGVzdC9hcHBzL3RvZG8vdG9kby5yZG9j
316
- - !binary |-
317
- dGVzdC9hcHBzL3RvZG9fcGx1Z2lucy9jb21tYW5kcy90aGlyZC5yYg==
318
- - !binary |-
319
- dGVzdC9jb25maWcueWFtbA==
320
- - !binary |-
321
- dGVzdC9mYWtlX3N0ZF9vdXQucmI=
322
- - !binary |-
323
- dGVzdC9nbGkucmVlaw==
324
- - !binary |-
325
- dGVzdC9pbml0X3NpbXBsZWNvdi5yYg==
326
- - !binary |-
327
- dGVzdC9vcHRpb25fdGVzdF9oZWxwZXIucmI=
328
- - !binary |-
329
- dGVzdC9yb29kaS55YW1s
330
- - !binary |-
331
- dGVzdC90Y19jb21tYW5kLnJi
332
- - !binary |-
333
- dGVzdC90Y19jb21wb3VudF9jb21tYW5kLnJi
334
- - !binary |-
335
- dGVzdC90Y19kb2MucmI=
336
- - !binary |-
337
- dGVzdC90Y19mbGFnLnJi
338
- - !binary |-
339
- dGVzdC90Y19nbGkucmI=
340
- - !binary |-
341
- dGVzdC90Y19oZWxwLnJi
342
- - !binary |-
343
- dGVzdC90Y19vcHRpb25zLnJi
344
- - !binary |-
345
- dGVzdC90Y19zdWJjb21tYW5kcy5yYg==
346
- - !binary |-
347
- dGVzdC90Y19zd2l0Y2gucmI=
348
- - !binary |-
349
- dGVzdC90Y190ZXJtaW5hbC5yYg==
350
- - !binary |-
351
- dGVzdC90Y192ZXJiYXRpbV93cmFwcGVyLnJi
352
- - !binary |-
353
- dGVzdC90ZXN0X2hlbHBlci5yYg==
158
+ - lib/gli.rb
159
+ - lib/gli/app.rb
160
+ - lib/gli/app_support.rb
161
+ - lib/gli/command.rb
162
+ - lib/gli/command_line_option.rb
163
+ - lib/gli/command_line_token.rb
164
+ - lib/gli/command_support.rb
165
+ - lib/gli/commands/compound_command.rb
166
+ - lib/gli/commands/doc.rb
167
+ - lib/gli/commands/help.rb
168
+ - lib/gli/commands/help_modules/arg_name_formatter.rb
169
+ - lib/gli/commands/help_modules/command_finder.rb
170
+ - lib/gli/commands/help_modules/command_help_format.rb
171
+ - lib/gli/commands/help_modules/global_help_format.rb
172
+ - lib/gli/commands/help_modules/help_completion_format.rb
173
+ - lib/gli/commands/help_modules/list_formatter.rb
174
+ - lib/gli/commands/help_modules/one_line_wrapper.rb
175
+ - lib/gli/commands/help_modules/options_formatter.rb
176
+ - lib/gli/commands/help_modules/text_wrapper.rb
177
+ - lib/gli/commands/help_modules/tty_only_wrapper.rb
178
+ - lib/gli/commands/help_modules/verbatim_wrapper.rb
179
+ - lib/gli/commands/initconfig.rb
180
+ - lib/gli/commands/rdoc_document_listener.rb
181
+ - lib/gli/commands/scaffold.rb
182
+ - lib/gli/copy_options_to_aliases.rb
183
+ - lib/gli/dsl.rb
184
+ - lib/gli/exceptions.rb
185
+ - lib/gli/flag.rb
186
+ - lib/gli/gli_option_parser.rb
187
+ - lib/gli/option_parser_factory.rb
188
+ - lib/gli/options.rb
189
+ - lib/gli/switch.rb
190
+ - lib/gli/terminal.rb
191
+ - lib/gli/version.rb
192
+ - test/apps/README.md
193
+ - test/apps/todo/Gemfile
194
+ - test/apps/todo/README.rdoc
195
+ - test/apps/todo/Rakefile
196
+ - test/apps/todo/bin/todo
197
+ - test/apps/todo/lib/todo/commands/create.rb
198
+ - test/apps/todo/lib/todo/commands/list.rb
199
+ - test/apps/todo/lib/todo/commands/ls.rb
200
+ - test/apps/todo/lib/todo/version.rb
201
+ - test/apps/todo/test/tc_nothing.rb
202
+ - test/apps/todo/todo.gemspec
203
+ - test/apps/todo/todo.rdoc
204
+ - test/apps/todo_plugins/commands/third.rb
205
+ - test/config.yaml
206
+ - test/fake_std_out.rb
207
+ - test/init_simplecov.rb
208
+ - test/option_test_helper.rb
209
+ - test/tc_command.rb
210
+ - test/tc_compount_command.rb
211
+ - test/tc_doc.rb
212
+ - test/tc_flag.rb
213
+ - test/tc_gli.rb
214
+ - test/tc_help.rb
215
+ - test/tc_options.rb
216
+ - test/tc_subcommands.rb
217
+ - test/tc_switch.rb
218
+ - test/tc_terminal.rb
219
+ - test/tc_verbatim_wrapper.rb
220
+ - test/test_helper.rb
354
221
  homepage: http://davetron5000.github.com/gli
355
222
  licenses: []
223
+
356
224
  post_install_message:
357
- rdoc_options:
225
+ rdoc_options:
358
226
  - --title
359
227
  - Git Like Interface
360
228
  - --main
361
229
  - README.rdoc
362
- require_paths:
230
+ require_paths:
363
231
  - lib
364
- required_ruby_version: !ruby/object:Gem::Requirement
232
+ required_ruby_version: !ruby/object:Gem::Requirement
365
233
  none: false
366
- requirements:
367
- - - ! '>='
368
- - !ruby/object:Gem::Version
369
- version: '0'
370
- segments:
234
+ requirements:
235
+ - - ">="
236
+ - !ruby/object:Gem::Version
237
+ hash: 3
238
+ segments:
371
239
  - 0
372
- hash: 3564389066848623229
373
- required_rubygems_version: !ruby/object:Gem::Requirement
240
+ version: "0"
241
+ required_rubygems_version: !ruby/object:Gem::Requirement
374
242
  none: false
375
- requirements:
376
- - - ! '>='
377
- - !ruby/object:Gem::Version
378
- version: '0'
379
- segments:
243
+ requirements:
244
+ - - ">="
245
+ - !ruby/object:Gem::Version
246
+ hash: 3
247
+ segments:
380
248
  - 0
381
- hash: 3564389066848623229
249
+ version: "0"
382
250
  requirements: []
251
+
383
252
  rubyforge_project: gli
384
253
  rubygems_version: 1.8.24
385
254
  signing_key:
386
255
  specification_version: 3
387
256
  summary: Build command-suite CLI apps that are awesome.
388
- test_files:
389
- - !binary |-
390
- ZmVhdHVyZXMvZ2xpX2V4ZWN1dGFibGUuZmVhdHVyZQ==
391
- - !binary |-
392
- ZmVhdHVyZXMvZ2xpX2luaXQuZmVhdHVyZQ==
393
- - !binary |-
394
- ZmVhdHVyZXMvc3RlcF9kZWZpbml0aW9ucy9nbGlfZXhlY3V0YWJsZV9zdGVw
395
- cy5yYg==
396
- - !binary |-
397
- ZmVhdHVyZXMvc3RlcF9kZWZpbml0aW9ucy9nbGlfaW5pdF9zdGVwcy5yYg==
398
- - !binary |-
399
- ZmVhdHVyZXMvc3RlcF9kZWZpbml0aW9ucy90b2RvX3N0ZXBzLnJi
400
- - !binary |-
401
- ZmVhdHVyZXMvc3VwcG9ydC9lbnYucmI=
402
- - !binary |-
403
- ZmVhdHVyZXMvdG9kby5mZWF0dXJl
404
- - !binary |-
405
- dGVzdC9hcHBzL1JFQURNRS5tZA==
406
- - !binary |-
407
- dGVzdC9hcHBzL3RvZG8vR2VtZmlsZQ==
408
- - !binary |-
409
- dGVzdC9hcHBzL3RvZG8vUkVBRE1FLnJkb2M=
410
- - !binary |-
411
- dGVzdC9hcHBzL3RvZG8vUmFrZWZpbGU=
412
- - !binary |-
413
- dGVzdC9hcHBzL3RvZG8vYmluL3RvZG8=
414
- - !binary |-
415
- dGVzdC9hcHBzL3RvZG8vbGliL3RvZG8vY29tbWFuZHMvY3JlYXRlLnJi
416
- - !binary |-
417
- dGVzdC9hcHBzL3RvZG8vbGliL3RvZG8vY29tbWFuZHMvbGlzdC5yYg==
418
- - !binary |-
419
- dGVzdC9hcHBzL3RvZG8vbGliL3RvZG8vY29tbWFuZHMvbHMucmI=
420
- - !binary |-
421
- dGVzdC9hcHBzL3RvZG8vbGliL3RvZG8vdmVyc2lvbi5yYg==
422
- - !binary |-
423
- dGVzdC9hcHBzL3RvZG8vdGVzdC90Y19ub3RoaW5nLnJi
424
- - !binary |-
425
- dGVzdC9hcHBzL3RvZG8vdG9kby5nZW1zcGVj
426
- - !binary |-
427
- dGVzdC9hcHBzL3RvZG8vdG9kby5yZG9j
428
- - !binary |-
429
- dGVzdC9hcHBzL3RvZG9fcGx1Z2lucy9jb21tYW5kcy90aGlyZC5yYg==
430
- - !binary |-
431
- dGVzdC9jb25maWcueWFtbA==
432
- - !binary |-
433
- dGVzdC9mYWtlX3N0ZF9vdXQucmI=
434
- - !binary |-
435
- dGVzdC9nbGkucmVlaw==
436
- - !binary |-
437
- dGVzdC9pbml0X3NpbXBsZWNvdi5yYg==
438
- - !binary |-
439
- dGVzdC9vcHRpb25fdGVzdF9oZWxwZXIucmI=
440
- - !binary |-
441
- dGVzdC9yb29kaS55YW1s
442
- - !binary |-
443
- dGVzdC90Y19jb21tYW5kLnJi
444
- - !binary |-
445
- dGVzdC90Y19jb21wb3VudF9jb21tYW5kLnJi
446
- - !binary |-
447
- dGVzdC90Y19kb2MucmI=
448
- - !binary |-
449
- dGVzdC90Y19mbGFnLnJi
450
- - !binary |-
451
- dGVzdC90Y19nbGkucmI=
452
- - !binary |-
453
- dGVzdC90Y19oZWxwLnJi
454
- - !binary |-
455
- dGVzdC90Y19vcHRpb25zLnJi
456
- - !binary |-
457
- dGVzdC90Y19zdWJjb21tYW5kcy5yYg==
458
- - !binary |-
459
- dGVzdC90Y19zd2l0Y2gucmI=
460
- - !binary |-
461
- dGVzdC90Y190ZXJtaW5hbC5yYg==
462
- - !binary |-
463
- dGVzdC90Y192ZXJiYXRpbV93cmFwcGVyLnJi
464
- - !binary |-
465
- dGVzdC90ZXN0X2hlbHBlci5yYg==
257
+ test_files:
258
+ - features/gli_executable.feature
259
+ - features/gli_init.feature
260
+ - features/step_definitions/gli_executable_steps.rb
261
+ - features/step_definitions/gli_init_steps.rb
262
+ - features/step_definitions/todo_steps.rb
263
+ - features/support/env.rb
264
+ - features/todo.feature
265
+ - test/apps/README.md
266
+ - test/apps/todo/Gemfile
267
+ - test/apps/todo/README.rdoc
268
+ - test/apps/todo/Rakefile
269
+ - test/apps/todo/bin/todo
270
+ - test/apps/todo/lib/todo/commands/create.rb
271
+ - test/apps/todo/lib/todo/commands/list.rb
272
+ - test/apps/todo/lib/todo/commands/ls.rb
273
+ - test/apps/todo/lib/todo/version.rb
274
+ - test/apps/todo/test/tc_nothing.rb
275
+ - test/apps/todo/todo.gemspec
276
+ - test/apps/todo/todo.rdoc
277
+ - test/apps/todo_plugins/commands/third.rb
278
+ - test/config.yaml
279
+ - test/fake_std_out.rb
280
+ - test/init_simplecov.rb
281
+ - test/option_test_helper.rb
282
+ - test/tc_command.rb
283
+ - test/tc_compount_command.rb
284
+ - test/tc_doc.rb
285
+ - test/tc_flag.rb
286
+ - test/tc_gli.rb
287
+ - test/tc_help.rb
288
+ - test/tc_options.rb
289
+ - test/tc_subcommands.rb
290
+ - test/tc_switch.rb
291
+ - test/tc_terminal.rb
292
+ - test/tc_verbatim_wrapper.rb
293
+ - test/test_helper.rb
@@ -1,122 +0,0 @@
1
- ---
2
- ControlCouple:
3
- exclude:
4
- - 'parse_options_helper'
5
- - 'program_desc'
6
- - 'program_name'
7
- - 'name_as_string'
8
- - 'GLI::Command'
9
- enabled: false
10
- UncommunicativeParameterName:
11
- accept: []
12
-
13
- exclude: []
14
-
15
- enabled: false
16
- reject:
17
- - !ruby/regexp /^.$/
18
- - !ruby/regexp /[0-9]$/
19
- - !ruby/regexp /[A-Z]/
20
- LargeClass:
21
- max_methods: 25
22
- exclude: []
23
-
24
- enabled: true
25
- max_instance_variables: 10
26
- UncommunicativeMethodName:
27
- accept: []
28
-
29
- exclude: []
30
-
31
- enabled: true
32
- reject:
33
- - !ruby/regexp /^[a-z]$/
34
- - !ruby/regexp /[0-9]$/
35
- - !ruby/regexp /[A-Z]/
36
- LongParameterList:
37
- max_params: 5
38
- exclude: []
39
-
40
- enabled: true
41
- overrides:
42
- initialize:
43
- max_params: 6
44
- FeatureEnvy:
45
- exclude: &id001 []
46
-
47
- enabled: false
48
- ClassVariable:
49
- exclude: *id001
50
- enabled: false
51
- BooleanParameter:
52
- exclude: ['initialize']
53
- enabled: true
54
- IrresponsibleModule:
55
- exclude: *id001
56
- enabled: true
57
- UncommunicativeModuleName:
58
- accept:
59
- - Inline::C
60
- exclude: []
61
-
62
- enabled: true
63
- reject:
64
- - !ruby/regexp /^.$/
65
- - !ruby/regexp /[0-9]$/
66
- NestedIterators:
67
- ignore_iterators: []
68
-
69
- exclude: ['GLI::App']
70
-
71
- enabled: true
72
- max_allowed_nesting: 3
73
- LongMethod:
74
- max_statements: 10
75
- exclude:
76
- - initialize
77
- - parse_options
78
- - run
79
- - reset
80
- enabled: true
81
- Duplication:
82
- allow_calls: []
83
-
84
- exclude: ['run']
85
-
86
- enabled: true
87
- max_calls: 3
88
- UtilityFunction:
89
- max_helper_calls: 1
90
- exclude: [ 'find_non_flag_index', 'override_default', 'proceed?', 'command_exists?' ]
91
-
92
- enabled: true
93
- Attribute:
94
- exclude: []
95
-
96
- enabled: false
97
- UncommunicativeVariableName:
98
- accept: []
99
-
100
- exclude: []
101
-
102
- enabled: true
103
- reject:
104
- - !ruby/regexp /^[a-z]$/
105
- - !ruby/regexp /[0-9]$/
106
- - !ruby/regexp /[A-Z]/
107
- SimulatedPolymorphism:
108
- exclude: []
109
-
110
- enabled: true
111
- max_ifs: 2
112
- DataClump:
113
- exclude: []
114
-
115
- enabled: false
116
- max_copies: 2
117
- min_clump_size: 2
118
- LongYieldList:
119
- max_params: 3
120
- exclude: []
121
-
122
- enabled: true
@@ -1,18 +0,0 @@
1
- # Not the most strict checks, but they pass for now
2
- AssignmentInConditionalCheck: {}
3
- ClassLineCountCheck:
4
- line_count: 400
5
- ClassNameCheck:
6
- pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/
7
- CyclomaticComplexityBlockCheck:
8
- complexity: 5
9
- CyclomaticComplexityMethodCheck:
10
- complexity: 8
11
- EmptyRescueBodyCheck: {}
12
- ForLoopCheck: {}
13
- MethodNameCheck:
14
- pattern: !ruby/regexp /^[_a-z<>=\[\]|+-\/\*`]+[_a-z0-9_<>=~@\[\]]*[=!\?]?$/
15
- ModuleNameCheck:
16
- pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/
17
- ParameterNumberCheck:
18
- parameter_count: 8