choosy 0.2.5 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/CHANGELOG.md +8 -0
  2. data/LICENSE +2 -0
  3. data/README.markdown +102 -54
  4. data/Rakefile +27 -5
  5. data/TODO.md +5 -0
  6. data/examples/bar.rb +9 -7
  7. data/examples/foo.rb +9 -7
  8. data/examples/superfoo.rb +48 -36
  9. data/lib/VERSION.yml +6 -0
  10. data/lib/choosy/argument.rb +5 -0
  11. data/lib/choosy/base_command.rb +11 -10
  12. data/lib/choosy/command.rb +17 -1
  13. data/lib/choosy/converter.rb +5 -1
  14. data/lib/choosy/dsl/argument_builder.rb +33 -21
  15. data/lib/choosy/dsl/base_builder.rb +26 -0
  16. data/lib/choosy/dsl/base_command_builder.rb +23 -30
  17. data/lib/choosy/dsl/command_builder.rb +8 -12
  18. data/lib/choosy/dsl/option_builder.rb +14 -45
  19. data/lib/choosy/dsl/super_command_builder.rb +17 -20
  20. data/lib/choosy/errors.rb +1 -0
  21. data/lib/choosy/option.rb +19 -0
  22. data/lib/choosy/printing/base_printer.rb +231 -0
  23. data/lib/choosy/printing/color.rb +8 -5
  24. data/lib/choosy/printing/erb_printer.rb +1 -1
  25. data/lib/choosy/printing/help_printer.rb +49 -163
  26. data/lib/choosy/printing/manpage.rb +235 -0
  27. data/lib/choosy/printing/manpage_printer.rb +95 -0
  28. data/lib/choosy/printing/terminal.rb +39 -8
  29. data/lib/choosy/printing.rb +1 -0
  30. data/lib/choosy/super_command.rb +13 -4
  31. data/lib/choosy/super_parser.rb +5 -1
  32. data/lib/choosy/verifier.rb +8 -0
  33. data/lib/choosy/version.rb +64 -5
  34. data/spec/choosy/argument_spec.rb +28 -0
  35. data/spec/choosy/base_command_spec.rb +7 -3
  36. data/spec/choosy/command_spec.rb +2 -2
  37. data/spec/choosy/converter_spec.rb +3 -2
  38. data/spec/choosy/dsl/argument_builder_spec.rb +19 -8
  39. data/spec/choosy/dsl/base_builder_spec.rb +43 -0
  40. data/spec/choosy/dsl/base_command_builder_spec.rb +7 -9
  41. data/spec/choosy/dsl/commmand_builder_spec.rb +9 -1
  42. data/spec/choosy/dsl/option_builder_spec.rb +1 -65
  43. data/spec/choosy/dsl/super_command_builder_spec.rb +19 -8
  44. data/spec/choosy/option_spec.rb +68 -0
  45. data/spec/choosy/printing/base_printer_spec.rb +155 -0
  46. data/spec/choosy/printing/color_spec.rb +4 -0
  47. data/spec/choosy/printing/help_printer_spec.rb +15 -109
  48. data/spec/choosy/printing/manpage_printer_spec.rb +95 -0
  49. data/spec/choosy/printing/manpage_spec.rb +206 -0
  50. data/spec/choosy/super_command_spec.rb +7 -0
  51. data/spec/choosy/super_parser_spec.rb +9 -0
  52. data/spec/choosy/verifier_spec.rb +31 -1
  53. data/spec/choosy/version.yml +5 -0
  54. data/spec/choosy/version_spec.rb +87 -0
  55. data/spec/integration/command-C_spec.rb +23 -0
  56. data/spec/integration/supercommand-C_spec.rb +45 -0
  57. metadata +81 -78
  58. data/lib/VERSION +0 -1
metadata CHANGED
@@ -1,98 +1,85 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: choosy
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 2
8
- - 5
9
- version: 0.2.5
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Gabe McArthur
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-03-09 00:00:00 -08:00
12
+ date: 2011-03-25 00:00:00.000000000 -07:00
18
13
  default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
21
16
  name: rspec
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &81909430 !ruby/object:Gem::Requirement
24
18
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- version: "0"
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
31
23
  type: :development
32
- version_requirements: *id001
33
- - !ruby/object:Gem::Dependency
34
- name: autotest
35
24
  prerelease: false
36
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *81909430
26
+ - !ruby/object:Gem::Dependency
27
+ name: autotest
28
+ requirement: &81909190 !ruby/object:Gem::Requirement
37
29
  none: false
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
- version: "0"
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
44
34
  type: :development
45
- version_requirements: *id002
46
- - !ruby/object:Gem::Dependency
47
- name: autotest-notification
48
35
  prerelease: false
49
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ version_requirements: *81909190
37
+ - !ruby/object:Gem::Dependency
38
+ name: autotest-notification
39
+ requirement: &81908950 !ruby/object:Gem::Requirement
50
40
  none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- segments:
55
- - 0
56
- version: "0"
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
57
45
  type: :development
58
- version_requirements: *id003
59
- - !ruby/object:Gem::Dependency
60
- name: rspec
61
46
  prerelease: false
62
- requirement: &id004 !ruby/object:Gem::Requirement
47
+ version_requirements: *81908950
48
+ - !ruby/object:Gem::Dependency
49
+ name: rspec
50
+ requirement: &81908710 !ruby/object:Gem::Requirement
63
51
  none: false
64
- requirements:
52
+ requirements:
65
53
  - - ~>
66
- - !ruby/object:Gem::Version
67
- segments:
68
- - 2
69
- - 5
70
- version: "2.5"
54
+ - !ruby/object:Gem::Version
55
+ version: '2.5'
71
56
  type: :development
72
- version_requirements: *id004
57
+ prerelease: false
58
+ version_requirements: *81908710
73
59
  description: This is a DSL for creating more complicated command line tools.
74
- email:
60
+ email:
75
61
  - madeonamac@gmail.com
76
62
  executables: []
77
-
78
63
  extensions: []
79
-
80
- extra_rdoc_files:
64
+ extra_rdoc_files:
81
65
  - LICENSE
82
66
  - README.markdown
83
- files:
67
+ files:
68
+ - CHANGELOG.md
84
69
  - Gemfile
85
70
  - Gemfile.lock
86
71
  - LICENSE
87
72
  - README.markdown
88
73
  - Rakefile
89
- - lib/VERSION
74
+ - TODO.md
75
+ - lib/VERSION.yml
90
76
  - lib/choosy.rb
91
77
  - lib/choosy/argument.rb
92
78
  - lib/choosy/base_command.rb
93
79
  - lib/choosy/command.rb
94
80
  - lib/choosy/converter.rb
95
81
  - lib/choosy/dsl/argument_builder.rb
82
+ - lib/choosy/dsl/base_builder.rb
96
83
  - lib/choosy/dsl/base_command_builder.rb
97
84
  - lib/choosy/dsl/command_builder.rb
98
85
  - lib/choosy/dsl/option_builder.rb
@@ -101,34 +88,48 @@ files:
101
88
  - lib/choosy/option.rb
102
89
  - lib/choosy/parse_result.rb
103
90
  - lib/choosy/parser.rb
91
+ - lib/choosy/printing.rb
92
+ - lib/choosy/printing/base_printer.rb
104
93
  - lib/choosy/printing/color.rb
105
94
  - lib/choosy/printing/erb_printer.rb
106
95
  - lib/choosy/printing/formatting_element.rb
107
96
  - lib/choosy/printing/help_printer.rb
97
+ - lib/choosy/printing/manpage.rb
98
+ - lib/choosy/printing/manpage_printer.rb
108
99
  - lib/choosy/printing/terminal.rb
109
100
  - lib/choosy/super_command.rb
110
101
  - lib/choosy/super_parser.rb
111
102
  - lib/choosy/verifier.rb
112
103
  - lib/choosy/version.rb
104
+ - spec/choosy/argument_spec.rb
113
105
  - spec/choosy/base_command_spec.rb
114
106
  - spec/choosy/command_spec.rb
115
107
  - spec/choosy/converter_spec.rb
116
108
  - spec/choosy/dsl/argument_builder_spec.rb
109
+ - spec/choosy/dsl/base_builder_spec.rb
117
110
  - spec/choosy/dsl/base_command_builder_spec.rb
118
111
  - spec/choosy/dsl/commmand_builder_spec.rb
119
112
  - spec/choosy/dsl/option_builder_spec.rb
120
113
  - spec/choosy/dsl/super_command_builder_spec.rb
114
+ - spec/choosy/option_spec.rb
121
115
  - spec/choosy/parser_spec.rb
116
+ - spec/choosy/printing/base_printer_spec.rb
122
117
  - spec/choosy/printing/color_spec.rb
123
118
  - spec/choosy/printing/help_printer_spec.rb
119
+ - spec/choosy/printing/manpage_printer_spec.rb
120
+ - spec/choosy/printing/manpage_spec.rb
124
121
  - spec/choosy/printing/terminal_spec.rb
125
122
  - spec/choosy/super_command_spec.rb
126
123
  - spec/choosy/super_parser_spec.rb
127
124
  - spec/choosy/verifier_spec.rb
125
+ - spec/choosy/version.yml
126
+ - spec/choosy/version_spec.rb
128
127
  - spec/integration/command-A_spec.rb
129
128
  - spec/integration/command-B_spec.rb
129
+ - spec/integration/command-C_spec.rb
130
130
  - spec/integration/supercommand-A_spec.rb
131
131
  - spec/integration/supercommand-B_spec.rb
132
+ - spec/integration/supercommand-C_spec.rb
132
133
  - spec/spec_helpers.rb
133
134
  - examples/bar.rb
134
135
  - examples/foo.rb
@@ -136,56 +137,58 @@ files:
136
137
  has_rdoc: true
137
138
  homepage: http://github.com/gabemc/choosy
138
139
  licenses: []
139
-
140
140
  post_install_message:
141
141
  rdoc_options: []
142
-
143
- require_paths:
142
+ require_paths:
144
143
  - lib
145
- required_ruby_version: !ruby/object:Gem::Requirement
144
+ required_ruby_version: !ruby/object:Gem::Requirement
146
145
  none: false
147
- requirements:
148
- - - ">="
149
- - !ruby/object:Gem::Version
150
- segments:
151
- - 0
152
- version: "0"
153
- required_rubygems_version: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ required_rubygems_version: !ruby/object:Gem::Requirement
154
151
  none: false
155
- requirements:
156
- - - ">="
157
- - !ruby/object:Gem::Version
158
- segments:
159
- - 0
160
- version: "0"
152
+ requirements:
153
+ - - ! '>='
154
+ - !ruby/object:Gem::Version
155
+ version: '0'
161
156
  requirements: []
162
-
163
157
  rubyforge_project:
164
- rubygems_version: 1.3.7
158
+ rubygems_version: 1.6.1
165
159
  signing_key:
166
160
  specification_version: 3
167
161
  summary: Yet another option parsing library.
168
- test_files:
162
+ test_files:
169
163
  - examples/bar.rb
170
164
  - examples/foo.rb
171
165
  - examples/superfoo.rb
166
+ - spec/choosy/argument_spec.rb
172
167
  - spec/choosy/base_command_spec.rb
173
168
  - spec/choosy/command_spec.rb
174
169
  - spec/choosy/converter_spec.rb
175
170
  - spec/choosy/dsl/argument_builder_spec.rb
171
+ - spec/choosy/dsl/base_builder_spec.rb
176
172
  - spec/choosy/dsl/base_command_builder_spec.rb
177
173
  - spec/choosy/dsl/commmand_builder_spec.rb
178
174
  - spec/choosy/dsl/option_builder_spec.rb
179
175
  - spec/choosy/dsl/super_command_builder_spec.rb
176
+ - spec/choosy/option_spec.rb
180
177
  - spec/choosy/parser_spec.rb
178
+ - spec/choosy/printing/base_printer_spec.rb
181
179
  - spec/choosy/printing/color_spec.rb
182
180
  - spec/choosy/printing/help_printer_spec.rb
181
+ - spec/choosy/printing/manpage_printer_spec.rb
182
+ - spec/choosy/printing/manpage_spec.rb
183
183
  - spec/choosy/printing/terminal_spec.rb
184
184
  - spec/choosy/super_command_spec.rb
185
185
  - spec/choosy/super_parser_spec.rb
186
186
  - spec/choosy/verifier_spec.rb
187
+ - spec/choosy/version_spec.rb
187
188
  - spec/integration/command-A_spec.rb
188
189
  - spec/integration/command-B_spec.rb
190
+ - spec/integration/command-C_spec.rb
189
191
  - spec/integration/supercommand-A_spec.rb
190
192
  - spec/integration/supercommand-B_spec.rb
193
+ - spec/integration/supercommand-C_spec.rb
191
194
  - spec/spec_helpers.rb
data/lib/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.5