choosy 0.3.5 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +16 -0
- data/lib/VERSION.yml +3 -3
- data/lib/choosy/dsl/base_command_builder.rb +19 -1
- data/lib/choosy/dsl/command_builder.rb +0 -14
- data/lib/choosy/dsl/super_command_builder.rb +14 -14
- data/lib/choosy/printing/base_printer.rb +3 -3
- data/lib/choosy/printing/help_printer.rb +1 -1
- data/lib/choosy/printing/manpage.rb +1 -1
- data/lib/choosy/printing/manpage_printer.rb +3 -2
- data/lib/choosy/rake.rb +13 -2
- data/lib/choosy/super_parser.rb +4 -4
- data/spec/choosy/dsl/base_command_builder_spec.rb +48 -8
- data/spec/choosy/dsl/commmand_builder_spec.rb +0 -19
- data/spec/choosy/dsl/super_command_builder_spec.rb +7 -5
- data/spec/choosy/printing/help_printer_spec.rb +3 -3
- data/spec/choosy/printing/manpage_printer_spec.rb +2 -2
- data/spec/choosy/super_command_spec.rb +2 -2
- data/spec/choosy/super_parser_spec.rb +10 -1
- data/spec/integration/supercommand-A_spec.rb +3 -3
- data/spec/integration/supercommand-B_spec.rb +1 -1
- metadata +44 -51
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## 0.4.0 (March 28, 2011)
|
2
|
+
|
3
|
+
Features:
|
4
|
+
|
5
|
+
- Added a 'section' operation to allow for subsection grouping in commands, for greater clarity.
|
6
|
+
|
7
|
+
Fixes:
|
8
|
+
|
9
|
+
- 'parsimonious' operation failed to handle global options.
|
10
|
+
- Renamed 'header' to 'heading'.
|
11
|
+
- Fixed 'default' operation for SuperCommands.
|
12
|
+
- Made sure the usage width in manpages is reasonable.
|
13
|
+
- 'help' subcommand now exposed via the 'command' operation, so that the '--help' option can be attached to options.
|
14
|
+
- '&.' bug in the manpage output.
|
15
|
+
- Added a 'gem cleanup' to the rake integration.
|
16
|
+
|
1
17
|
## 0.3.5 (March 26, 2011)
|
2
18
|
|
3
19
|
Features:
|
data/lib/VERSION.yml
CHANGED
@@ -37,10 +37,13 @@ module Choosy::DSL
|
|
37
37
|
|
38
38
|
# Formatting
|
39
39
|
|
40
|
-
def
|
40
|
+
def heading(msg, *styles, &block)
|
41
41
|
@entity.listing << Choosy::Printing::FormattingElement.new(:header, msg, styles)
|
42
|
+
evaluate!(&block) if block_given?
|
42
43
|
end
|
43
44
|
|
45
|
+
alias :section :heading
|
46
|
+
|
44
47
|
def para(msg=nil, *styles)
|
45
48
|
@entity.listing << Choosy::Printing::FormattingElement.new(:para, msg, styles)
|
46
49
|
end
|
@@ -120,7 +123,22 @@ module Choosy::DSL
|
|
120
123
|
def enum_(sym, allowed, desc, config=nil, &block)
|
121
124
|
simple_option(sym, desc, false, :one, :symbol, allowed, config, &block)
|
122
125
|
end
|
126
|
+
|
123
127
|
# Additional helpers
|
128
|
+
|
129
|
+
def help(msg=nil, &block)
|
130
|
+
h = OptionBuilder.new(OptionBuilder::HELP)
|
131
|
+
h.short '-h'
|
132
|
+
h.long '--help'
|
133
|
+
msg ||= "Show this help message"
|
134
|
+
h.desc msg
|
135
|
+
|
136
|
+
h.validate do
|
137
|
+
raise Choosy::HelpCalled.new(@name)
|
138
|
+
end
|
139
|
+
|
140
|
+
evaluate_option_builder!(h, &block)
|
141
|
+
end
|
124
142
|
|
125
143
|
def version(msg, &block)
|
126
144
|
v = OptionBuilder.new(OptionBuilder::VERSION)
|
@@ -21,20 +21,6 @@ module Choosy::DSL
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
def help(msg=nil, &block)
|
25
|
-
h = OptionBuilder.new(OptionBuilder::HELP)
|
26
|
-
h.short '-h'
|
27
|
-
h.long '--help'
|
28
|
-
msg ||= "Show this help message"
|
29
|
-
h.desc msg
|
30
|
-
|
31
|
-
h.validate do
|
32
|
-
raise Choosy::HelpCalled.new(@name)
|
33
|
-
end
|
34
|
-
|
35
|
-
evaluate_option_builder!(h, &block)
|
36
|
-
end
|
37
|
-
|
38
24
|
def arguments(&block)
|
39
25
|
builder = ArgumentBuilder.new
|
40
26
|
# Set multiple by default
|
@@ -8,7 +8,9 @@ module Choosy::DSL
|
|
8
8
|
SUPER = :__SUPER_COMMAND__
|
9
9
|
|
10
10
|
def command(cmd, &block)
|
11
|
-
subcommand = if cmd
|
11
|
+
subcommand = if cmd == :help
|
12
|
+
help_command
|
13
|
+
elsif cmd.is_a?(Choosy::Command)
|
12
14
|
cmd.parent = entity
|
13
15
|
cmd
|
14
16
|
else
|
@@ -30,10 +32,17 @@ module Choosy::DSL
|
|
30
32
|
@entity.default_command = cmd
|
31
33
|
end
|
32
34
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
35
|
+
protected
|
36
|
+
def evaluate_command_builder!(builder, &block)
|
37
|
+
builder.evaluate!(&block)
|
38
|
+
@entity.listing << builder.entity
|
39
|
+
@entity.command_builders[builder.entity.name] = builder
|
40
|
+
builder.entity
|
41
|
+
end
|
42
|
+
|
43
|
+
def help_command
|
44
|
+
Choosy::Command.new HELP, @entity do |help|
|
45
|
+
help.summary "Show the info for a command, or this message"
|
37
46
|
|
38
47
|
help.arguments do
|
39
48
|
count 0..1
|
@@ -52,15 +61,6 @@ module Choosy::DSL
|
|
52
61
|
end
|
53
62
|
end
|
54
63
|
end
|
55
|
-
evaluate_command_builder!(help_command.builder, &block)
|
56
|
-
end
|
57
|
-
|
58
|
-
protected
|
59
|
-
def evaluate_command_builder!(builder, &block)
|
60
|
-
builder.evaluate!(&block)
|
61
|
-
@entity.listing << builder.entity
|
62
|
-
@entity.command_builders[builder.entity.name] = builder
|
63
|
-
builder.entity
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|
@@ -5,12 +5,12 @@ module Choosy::Printing
|
|
5
5
|
class BasePrinter
|
6
6
|
include Terminal
|
7
7
|
|
8
|
-
attr_accessor :indent, :offset, :formatting_options, :
|
8
|
+
attr_accessor :indent, :offset, :formatting_options, :heading_styles, :option_styles
|
9
9
|
|
10
10
|
def initialize(options)
|
11
11
|
@formatting_options = options
|
12
12
|
|
13
|
-
@
|
13
|
+
@heading_styles = options[:heading_styles] || [:bold, :blue]
|
14
14
|
@option_styles = options[:option_styles] || [:bold]
|
15
15
|
@indent = options[:indent] || ' '
|
16
16
|
@offset = options[:offset] || ' '
|
@@ -177,7 +177,7 @@ module Choosy::Printing
|
|
177
177
|
protected
|
178
178
|
def fix_termcap
|
179
179
|
if pager.include?('less')
|
180
|
-
headers = color.multiple(nil, @
|
180
|
+
headers = color.multiple(nil, @heading_styles)
|
181
181
|
options = color.multiple(nil, @option_styles)
|
182
182
|
|
183
183
|
ENV['LESS_TERMCAP_mb'] ||= "\e[31m" # Begin blinking
|
@@ -24,7 +24,7 @@ module Choosy::Printing
|
|
24
24
|
def print!(command)
|
25
25
|
if command_exists?('groff') && pager?
|
26
26
|
fix_termcap
|
27
|
-
page format!(command)
|
27
|
+
page format!(command)#, 'groff -t -e -W all -Tutf8 -mandoc'
|
28
28
|
else
|
29
29
|
# Fall back to a help printer if there is no pager
|
30
30
|
help = HelpPrinter.new(formatting_options)
|
@@ -56,8 +56,9 @@ module Choosy::Printing
|
|
56
56
|
|
57
57
|
def format_synopsis(command)
|
58
58
|
@manpage.section_heading(@synopsis)
|
59
|
+
cols = (columns > 70) ? 70 : columns
|
59
60
|
@manpage.nofill do |man|
|
60
|
-
usage_wrapped(command, '',
|
61
|
+
usage_wrapped(command, '', cols).each do |line|
|
61
62
|
man.text line
|
62
63
|
end
|
63
64
|
end
|
data/lib/choosy/rake.rb
CHANGED
@@ -82,8 +82,9 @@ namespace :git do
|
|
82
82
|
end
|
83
83
|
|
84
84
|
task :tag => [:diff, 'version:load'] do
|
85
|
-
|
86
|
-
SH.attempt "git tag -a -m
|
85
|
+
puts "Tagging version #{$version}"
|
86
|
+
SH.attempt "git tag -a -m \"Tagging release #{$version}\" v#{$version}" do |code, contents|
|
87
|
+
puts contents
|
87
88
|
SH.attempt "git tag -d v#{$version}", :error => "git tag: unable to delete tag"
|
88
89
|
raise "Unable to commit tag."
|
89
90
|
end
|
@@ -122,6 +123,16 @@ namespace :gem do
|
|
122
123
|
SH.files("#{$version}.gem") do |gem|
|
123
124
|
puts " Installing gem: #{gem}"
|
124
125
|
SH.attempt "gem install --no-ri --no-rdoc #{gem}"
|
126
|
+
SH.attempt "gem cleanup #{gem}"
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
desc "Installs the current gem using sudo."
|
131
|
+
task :sudo => :build do
|
132
|
+
SH.files("#{$version}.gem") do |gem|
|
133
|
+
puts " Installing gem: #{gem}"
|
134
|
+
SH.attempt "sudo gem install --no-ri --no-rdoc #{gem}"
|
135
|
+
SH.attempt "sudo gem cleanup #{gem}"
|
125
136
|
end
|
126
137
|
end
|
127
138
|
|
data/lib/choosy/super_parser.rb
CHANGED
@@ -55,16 +55,16 @@ module Choosy
|
|
55
55
|
count = args.count
|
56
56
|
|
57
57
|
result = SuperParseResult.new(@super_command)
|
58
|
-
parser = Parser.new(@super_command, true,
|
58
|
+
parser = Parser.new(@super_command, true, [])
|
59
59
|
parser.parse!(args, result)
|
60
60
|
verifier.verify_special!(result)
|
61
61
|
|
62
62
|
# if we found a global action, we should have hit it by now...
|
63
63
|
if result.unparsed.length == 0
|
64
|
-
if @super_command.
|
65
|
-
raise Choosy::HelpCalled.new(Choosy::DSL::SuperCommandBuilder::SUPER)
|
66
|
-
elsif count == 0 && @super_command.has_default?
|
64
|
+
if count == 0 && @super_command.has_default?
|
67
65
|
result.unparsed << @super_command.default_command.to_s
|
66
|
+
elsif @super_command.command_builders[Choosy::DSL::SuperCommandBuilder::HELP]
|
67
|
+
raise Choosy::HelpCalled.new(Choosy::DSL::SuperCommandBuilder::SUPER)
|
68
68
|
else
|
69
69
|
raise Choosy::SuperParseError.new("requires a command")
|
70
70
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'spec_helpers'
|
2
2
|
require 'choosy/dsl/base_command_builder'
|
3
3
|
require 'choosy/command'
|
4
|
+
require 'choosy/super_command'
|
4
5
|
|
5
6
|
module Choosy::DSL
|
6
7
|
describe BaseCommandBuilder do
|
@@ -37,14 +38,14 @@ module Choosy::DSL
|
|
37
38
|
end
|
38
39
|
|
39
40
|
it "should know how to set the header attributes" do
|
40
|
-
@builder.printer :standard, :
|
41
|
-
@command.printer.
|
41
|
+
@builder.printer :standard, :heading_styles => [:bold, :green]
|
42
|
+
@command.printer.heading_styles.should eql([:bold, :green])
|
42
43
|
end
|
43
44
|
|
44
45
|
it "should be able to set multiple properties of the printer" do
|
45
|
-
@builder.printer :standard, :max_width => 25, :
|
46
|
+
@builder.printer :standard, :max_width => 25, :heading_styles => [:bold, :red], :color => false
|
46
47
|
@command.printer.color.should be_disabled
|
47
|
-
@command.printer.
|
48
|
+
@command.printer.heading_styles.should eql([:bold, :red])
|
48
49
|
@command.printer.columns.should eql(25)
|
49
50
|
end
|
50
51
|
|
@@ -93,17 +94,29 @@ module Choosy::DSL
|
|
93
94
|
end
|
94
95
|
end#summary
|
95
96
|
|
96
|
-
describe :
|
97
|
+
describe :heading do
|
97
98
|
it "should set a header for this command" do
|
98
|
-
@builder.
|
99
|
+
@builder.heading 'HEADER'
|
99
100
|
@command.listing[0].value.should eql('HEADER')
|
100
101
|
end
|
101
102
|
|
102
103
|
it "should set the attributes of the header effectively" do
|
103
|
-
@builder.
|
104
|
+
@builder.heading 'HEADER', :bold, :blue
|
104
105
|
@command.listing[0].styles.should eql([:bold, :blue])
|
105
106
|
end
|
106
|
-
|
107
|
+
|
108
|
+
it "should accept an inner block" do
|
109
|
+
@builder.heading 'Header' do
|
110
|
+
para 'this'
|
111
|
+
end
|
112
|
+
@command.listing[1].value.should eql('this')
|
113
|
+
end
|
114
|
+
|
115
|
+
it "should allow for the 'section' alias" do
|
116
|
+
@builder.section 'here'
|
117
|
+
@command.listing[0].value.should eql('here')
|
118
|
+
end
|
119
|
+
end#heading
|
107
120
|
|
108
121
|
describe :para do
|
109
122
|
it "should add a paragraph to the list of options for printing" do
|
@@ -127,6 +140,33 @@ module Choosy::DSL
|
|
127
140
|
end
|
128
141
|
end#para
|
129
142
|
|
143
|
+
describe :help do
|
144
|
+
it "should allow for a no arg" do
|
145
|
+
h = @builder.help
|
146
|
+
h.description.should eql("Show this help message")
|
147
|
+
end
|
148
|
+
|
149
|
+
it "should allow you to set the message" do
|
150
|
+
h = @builder.help 'Help message'
|
151
|
+
h.description.should eql('Help message')
|
152
|
+
end
|
153
|
+
|
154
|
+
it "should throw a HelpCalled upon validation" do
|
155
|
+
h = @builder.help
|
156
|
+
attempting {
|
157
|
+
h.validation_step.call
|
158
|
+
}.should raise_error(Choosy::HelpCalled)
|
159
|
+
end
|
160
|
+
|
161
|
+
it "should allow for help on super commands" do
|
162
|
+
s = Choosy::SuperCommand.new :super
|
163
|
+
h = s.builder.help
|
164
|
+
attempting {
|
165
|
+
h.validation_step.call
|
166
|
+
}.should raise_error(Choosy::HelpCalled)
|
167
|
+
end
|
168
|
+
end#help
|
169
|
+
|
130
170
|
describe :option do
|
131
171
|
describe "when using just a name" do
|
132
172
|
it "should set the name of the option" do
|
@@ -43,25 +43,6 @@ module Choosy::DSL
|
|
43
43
|
end
|
44
44
|
end#executor
|
45
45
|
|
46
|
-
describe :help do
|
47
|
-
it "should allow for a no arg" do
|
48
|
-
h = @builder.help
|
49
|
-
h.description.should eql("Show this help message")
|
50
|
-
end
|
51
|
-
|
52
|
-
it "should allow you to set the message" do
|
53
|
-
h = @builder.help 'Help message'
|
54
|
-
h.description.should eql('Help message')
|
55
|
-
end
|
56
|
-
|
57
|
-
it "should throw a HelpCalled upon validation" do
|
58
|
-
h = @builder.help
|
59
|
-
attempting {
|
60
|
-
h.validation_step.call
|
61
|
-
}.should raise_error(Choosy::HelpCalled)
|
62
|
-
end
|
63
|
-
end#help
|
64
|
-
|
65
46
|
describe :arguments do
|
66
47
|
it "should not fail if there is no block given" do
|
67
48
|
attempting {
|
@@ -85,30 +85,32 @@ module Choosy::DSL
|
|
85
85
|
|
86
86
|
describe :help do
|
87
87
|
it "should create a help command when asked" do
|
88
|
-
h = @builder.help
|
88
|
+
h = @builder.command :help
|
89
89
|
@command.listing[0].should be(h)
|
90
90
|
end
|
91
91
|
|
92
92
|
it "should set the default summary of the help command" do
|
93
|
-
h = @builder.help
|
93
|
+
h = @builder.command :help
|
94
94
|
h.summary.should match(/Show the info/)
|
95
95
|
end
|
96
96
|
|
97
97
|
it "should st the summary of the command when given" do
|
98
|
-
h = @builder.
|
98
|
+
h = @builder.command :help do
|
99
|
+
summary "Show this help message"
|
100
|
+
end
|
99
101
|
h.summary.should match(/Show this/)
|
100
102
|
end
|
101
103
|
|
102
104
|
describe "when validated" do
|
103
105
|
it "should return the super command name when called without arguments" do
|
104
|
-
h = @builder.help
|
106
|
+
h = @builder.command :help
|
105
107
|
attempting {
|
106
108
|
h.arguments.validation_step.call([])
|
107
109
|
}.should raise_error(Choosy::HelpCalled, nil)
|
108
110
|
end
|
109
111
|
|
110
112
|
it "should return the name of the first argument when called, as a symbol" do
|
111
|
-
h = @builder.help
|
113
|
+
h = @builder.command :help
|
112
114
|
attempting {
|
113
115
|
h.arguments.validation_step.call(['foo'])
|
114
116
|
}.should raise_error(Choosy::HelpCalled, :foo)
|
@@ -9,11 +9,11 @@ module Choosy::Printing
|
|
9
9
|
@c = Choosy::Command.new :foo do
|
10
10
|
summary "This is a fairly long summary that should wrap around the whole screen at least once, so that I can test whether it's properly formatted"
|
11
11
|
|
12
|
-
|
12
|
+
heading 'DESCRIPTION'
|
13
13
|
para 'This is a description of this command that should span'
|
14
14
|
para 'Multiple lines and carry itself beyond the average line length when actually called out from the unit tests itself so that we can correctly guage the line wrapping.'
|
15
15
|
|
16
|
-
|
16
|
+
heading 'OPTIONS'
|
17
17
|
boolean :evaluate, "The evaluation of some boolean something or other that really should span at least 3 lines of continuous text for testing the output of the option command."
|
18
18
|
integer :count, "The count of something that should also really span multiple lines, if possible."
|
19
19
|
boolean_ :debug, "Debug output"
|
@@ -29,7 +29,7 @@ module Choosy::Printing
|
|
29
29
|
@b = @c.builder
|
30
30
|
|
31
31
|
@s = Choosy::SuperCommand.new :super do
|
32
|
-
printer :standard, :color => true, :
|
32
|
+
printer :standard, :color => true, :heading_styles => [:bold, :blue]
|
33
33
|
command @c
|
34
34
|
metaname 'CMDS'
|
35
35
|
|
@@ -55,7 +55,7 @@ manpage [\\-b|\\-\\-bold]
|
|
55
55
|
@man.format_option(o, @man.regular_option(o), ' ')
|
56
56
|
output.should eql('.TP 8
|
57
57
|
\\fI\\-o\\fP, \\fI\\-\\-opt\\fP OPT
|
58
|
-
option line here
|
58
|
+
option line here.')
|
59
59
|
end
|
60
60
|
|
61
61
|
it "should format a command" do
|
@@ -70,7 +70,7 @@ this is a summary')
|
|
70
70
|
|
71
71
|
it "should format a heading correctly" do
|
72
72
|
@cmd.alter do
|
73
|
-
|
73
|
+
heading 'here'
|
74
74
|
end
|
75
75
|
@man.format_element(@cmd.listing[0])
|
76
76
|
output.should eql('.SH "HERE"')
|
@@ -22,7 +22,7 @@ module Choosy
|
|
22
22
|
|
23
23
|
it "should print out the supercommand help message" do
|
24
24
|
@c.alter do
|
25
|
-
help
|
25
|
+
command :help
|
26
26
|
end
|
27
27
|
|
28
28
|
o = capture :stdout do
|
@@ -34,7 +34,7 @@ module Choosy
|
|
34
34
|
|
35
35
|
it "should print out a subcommand help message" do
|
36
36
|
@c.alter do
|
37
|
-
help
|
37
|
+
command :help
|
38
38
|
command :bar do
|
39
39
|
boolean :count, "The count"
|
40
40
|
end
|
@@ -68,7 +68,7 @@ module Choosy
|
|
68
68
|
end
|
69
69
|
|
70
70
|
it "should raise a HelpCalled error when a help command is defined" do
|
71
|
-
@p.super.builder.help
|
71
|
+
@p.super.builder.command :help
|
72
72
|
attempting {
|
73
73
|
@p.parse!()
|
74
74
|
}.should raise_error(Choosy::HelpCalled, Choosy::DSL::SuperCommandBuilder::SUPER)
|
@@ -119,6 +119,15 @@ module Choosy
|
|
119
119
|
it "should parse separate commands" do
|
120
120
|
@p.command(:bar).command(:baz).parse!('bar', 'baz').subresults.should have(2).items
|
121
121
|
end
|
122
|
+
|
123
|
+
it "should be able to read global options" do
|
124
|
+
@p.super.alter do
|
125
|
+
version 'this'
|
126
|
+
end
|
127
|
+
attempting {
|
128
|
+
@p.command(:bar).parse!('bar', '--version')
|
129
|
+
}.should raise_error(Choosy::VersionCalled)
|
130
|
+
end
|
122
131
|
end
|
123
132
|
end
|
124
133
|
end
|
@@ -7,7 +7,7 @@ describe "SuperCommand A" do
|
|
7
7
|
before :each do
|
8
8
|
@cmd = Choosy::SuperCommand.new :superfoo do
|
9
9
|
para "This is a supercommand of a definite size"
|
10
|
-
|
10
|
+
heading 'Commands:'
|
11
11
|
|
12
12
|
command :bar do
|
13
13
|
summary notes[:this]
|
@@ -23,9 +23,9 @@ describe "SuperCommand A" do
|
|
23
23
|
integer :amount, "How much money do you save?"
|
24
24
|
end
|
25
25
|
|
26
|
-
help
|
26
|
+
command :help
|
27
27
|
|
28
|
-
|
28
|
+
heading 'Options:'
|
29
29
|
integer :count, "The Count" do
|
30
30
|
#required
|
31
31
|
end
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: choosy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
7
|
+
- 4
|
8
|
+
- 0
|
9
|
+
version: 0.4.0
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Gabe McArthur
|
@@ -15,7 +14,7 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2011-03-
|
17
|
+
date: 2011-03-28 00:00:00 -07:00
|
19
18
|
default_executable:
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
@@ -26,7 +25,6 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ~>
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 9
|
30
28
|
segments:
|
31
29
|
- 2
|
32
30
|
- 5
|
@@ -41,7 +39,6 @@ dependencies:
|
|
41
39
|
requirements:
|
42
40
|
- - ">="
|
43
41
|
- !ruby/object:Gem::Version
|
44
|
-
hash: 3
|
45
42
|
segments:
|
46
43
|
- 0
|
47
44
|
version: "0"
|
@@ -55,7 +52,6 @@ dependencies:
|
|
55
52
|
requirements:
|
56
53
|
- - ">="
|
57
54
|
- !ruby/object:Gem::Version
|
58
|
-
hash: 3
|
59
55
|
segments:
|
60
56
|
- 0
|
61
57
|
version: "0"
|
@@ -69,7 +65,6 @@ dependencies:
|
|
69
65
|
requirements:
|
70
66
|
- - ">="
|
71
67
|
- !ruby/object:Gem::Version
|
72
|
-
hash: 43
|
73
68
|
segments:
|
74
69
|
- 4
|
75
70
|
- 5
|
@@ -88,71 +83,71 @@ extra_rdoc_files: []
|
|
88
83
|
|
89
84
|
files:
|
90
85
|
- TODO.md
|
91
|
-
- LICENSE
|
92
|
-
- Rakefile
|
93
86
|
- Gemfile
|
94
87
|
- README.markdown
|
95
|
-
- CHANGELOG.md
|
96
88
|
- Gemfile.lock
|
97
|
-
-
|
98
|
-
-
|
99
|
-
-
|
89
|
+
- CHANGELOG.md
|
90
|
+
- LICENSE
|
91
|
+
- Rakefile
|
92
|
+
- lib/choosy.rb
|
93
|
+
- lib/VERSION.yml
|
94
|
+
- lib/choosy/errors.rb
|
100
95
|
- lib/choosy/printing.rb
|
101
|
-
- lib/choosy/
|
96
|
+
- lib/choosy/rake.rb
|
102
97
|
- lib/choosy/converter.rb
|
103
98
|
- lib/choosy/parse_result.rb
|
104
|
-
- lib/choosy/
|
99
|
+
- lib/choosy/verifier.rb
|
105
100
|
- lib/choosy/argument.rb
|
101
|
+
- lib/choosy/version.rb
|
102
|
+
- lib/choosy/option.rb
|
103
|
+
- lib/choosy/command.rb
|
106
104
|
- lib/choosy/super_command.rb
|
107
|
-
- lib/choosy/dsl/
|
105
|
+
- lib/choosy/dsl/argument_builder.rb
|
108
106
|
- lib/choosy/dsl/super_command_builder.rb
|
109
|
-
- lib/choosy/dsl/command_builder.rb
|
110
107
|
- lib/choosy/dsl/base_builder.rb
|
108
|
+
- lib/choosy/dsl/command_builder.rb
|
111
109
|
- lib/choosy/dsl/option_builder.rb
|
112
|
-
- lib/choosy/dsl/
|
110
|
+
- lib/choosy/dsl/base_command_builder.rb
|
111
|
+
- lib/choosy/parser.rb
|
113
112
|
- lib/choosy/base_command.rb
|
114
|
-
- lib/choosy/errors.rb
|
115
|
-
- lib/choosy/printing/terminal.rb
|
116
|
-
- lib/choosy/printing/manpage.rb
|
117
113
|
- lib/choosy/printing/manpage_printer.rb
|
118
|
-
- lib/choosy/printing/
|
114
|
+
- lib/choosy/printing/base_printer.rb
|
119
115
|
- lib/choosy/printing/formatting_element.rb
|
120
|
-
- lib/choosy/printing/
|
116
|
+
- lib/choosy/printing/manpage.rb
|
117
|
+
- lib/choosy/printing/terminal.rb
|
121
118
|
- lib/choosy/printing/color.rb
|
122
|
-
- lib/choosy/printing/
|
123
|
-
- lib/choosy/
|
124
|
-
- lib/choosy/
|
125
|
-
-
|
126
|
-
-
|
119
|
+
- lib/choosy/printing/erb_printer.rb
|
120
|
+
- lib/choosy/printing/help_printer.rb
|
121
|
+
- lib/choosy/super_parser.rb
|
122
|
+
- spec/integration/command-A_spec.rb
|
123
|
+
- spec/integration/supercommand-C_spec.rb
|
124
|
+
- spec/integration/command-B_spec.rb
|
125
|
+
- spec/integration/supercommand-B_spec.rb
|
126
|
+
- spec/integration/supercommand-A_spec.rb
|
127
|
+
- spec/integration/command-C_spec.rb
|
128
|
+
- spec/choosy/converter_spec.rb
|
129
|
+
- spec/choosy/option_spec.rb
|
127
130
|
- spec/choosy/version_spec.rb
|
128
|
-
- spec/choosy/
|
129
|
-
- spec/choosy/
|
131
|
+
- spec/choosy/argument_spec.rb
|
132
|
+
- spec/choosy/base_command_spec.rb
|
130
133
|
- spec/choosy/version.yml
|
131
134
|
- spec/choosy/command_spec.rb
|
132
|
-
- spec/choosy/converter_spec.rb
|
133
|
-
- spec/choosy/dsl/argument_builder_spec.rb
|
134
|
-
- spec/choosy/dsl/commmand_builder_spec.rb
|
135
135
|
- spec/choosy/dsl/super_command_builder_spec.rb
|
136
136
|
- spec/choosy/dsl/option_builder_spec.rb
|
137
137
|
- spec/choosy/dsl/base_builder_spec.rb
|
138
|
+
- spec/choosy/dsl/argument_builder_spec.rb
|
139
|
+
- spec/choosy/dsl/commmand_builder_spec.rb
|
138
140
|
- spec/choosy/dsl/base_command_builder_spec.rb
|
139
|
-
- spec/choosy/
|
141
|
+
- spec/choosy/super_command_spec.rb
|
142
|
+
- spec/choosy/super_parser_spec.rb
|
140
143
|
- spec/choosy/verifier_spec.rb
|
141
|
-
- spec/choosy/printing/
|
142
|
-
- spec/choosy/printing/base_printer_spec.rb
|
144
|
+
- spec/choosy/printing/help_printer_spec.rb
|
143
145
|
- spec/choosy/printing/terminal_spec.rb
|
146
|
+
- spec/choosy/printing/base_printer_spec.rb
|
144
147
|
- spec/choosy/printing/manpage_printer_spec.rb
|
145
|
-
- spec/choosy/printing/help_printer_spec.rb
|
146
148
|
- spec/choosy/printing/color_spec.rb
|
147
|
-
- spec/choosy/
|
148
|
-
- spec/choosy/base_command_spec.rb
|
149
|
+
- spec/choosy/printing/manpage_spec.rb
|
149
150
|
- spec/choosy/parser_spec.rb
|
150
|
-
- spec/integration/supercommand-A_spec.rb
|
151
|
-
- spec/integration/command-A_spec.rb
|
152
|
-
- spec/integration/supercommand-C_spec.rb
|
153
|
-
- spec/integration/command-B_spec.rb
|
154
|
-
- spec/integration/command-C_spec.rb
|
155
|
-
- spec/integration/supercommand-B_spec.rb
|
156
151
|
- spec/spec_helpers.rb
|
157
152
|
has_rdoc: true
|
158
153
|
homepage: http://github.com/gabemc/choosy
|
@@ -168,7 +163,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
163
|
requirements:
|
169
164
|
- - ">="
|
170
165
|
- !ruby/object:Gem::Version
|
171
|
-
hash: 3
|
172
166
|
segments:
|
173
167
|
- 0
|
174
168
|
version: "0"
|
@@ -177,7 +171,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
171
|
requirements:
|
178
172
|
- - ">="
|
179
173
|
- !ruby/object:Gem::Version
|
180
|
-
hash: 23
|
181
174
|
segments:
|
182
175
|
- 1
|
183
176
|
- 3
|
@@ -186,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
179
|
requirements: []
|
187
180
|
|
188
181
|
rubyforge_project:
|
189
|
-
rubygems_version: 1.
|
182
|
+
rubygems_version: 1.3.7
|
190
183
|
signing_key:
|
191
184
|
specification_version: 3
|
192
185
|
summary: Yet another option parsing library.
|