thor 0.15.2 → 0.15.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +25 -0
- data/lib/thor/actions/directory.rb +2 -1
- data/lib/thor/base.rb +33 -10
- data/lib/thor/core_ext/dir_escape.rb +0 -0
- data/lib/thor/group.rb +1 -1
- data/lib/thor/parser/argument.rb +7 -5
- data/lib/thor/parser/option.rb +8 -8
- data/lib/thor/shell/basic.rb +5 -5
- data/lib/thor/util.rb +19 -1
- data/lib/thor/version.rb +1 -1
- data/spec/actions/directory_spec.rb +13 -0
- data/spec/fixtures/app{1}/README +3 -0
- data/spec/parser/argument_spec.rb +8 -8
- data/spec/parser/arguments_spec.rb +2 -1
- data/spec/parser/option_spec.rb +6 -6
- data/spec/parser/options_spec.rb +2 -1
- data/spec/task_spec.rb +2 -1
- data/spec/thor_spec.rb +31 -0
- data/spec/util_spec.rb +33 -0
- metadata +122 -109
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,28 @@
|
|
1
|
+
== 0.15.3, release 2012-06-18
|
2
|
+
* Support strict_args_position! for backwards compatibility
|
3
|
+
* Escape Dir glob characters in paths
|
4
|
+
|
5
|
+
== 0.15.2, released 2012-05-07
|
6
|
+
* Added print_in_columns
|
7
|
+
* Exposed terminal_width as a public API
|
8
|
+
|
9
|
+
== 0.15.1, release 2012-05-06
|
10
|
+
* Fix Ruby 1.8 truncation bug with unicode chars
|
11
|
+
* Fix shell delegate methods to pass their block
|
12
|
+
* Don't output trailing spaces when printing the last column in a table
|
13
|
+
|
14
|
+
== 0.15, released 2012-04-29
|
15
|
+
* Alias method_options to options
|
16
|
+
* Refactor say to allow multiple colors
|
17
|
+
* Exposed error as a public API
|
18
|
+
* Exposed file_collision as a public API
|
19
|
+
* Exposed print_wrapped as a public API
|
20
|
+
* Exposed set_color as a public API
|
21
|
+
* Fix number-formatting bugs in print_table
|
22
|
+
* Fix "indent" typo in print_table
|
23
|
+
* Fix Errno::EPIPE when piping tasks to `head`
|
24
|
+
* More friendly error messages
|
25
|
+
|
1
26
|
== 0.14, released 2010-07-25
|
2
27
|
|
3
28
|
* Added CreateLink class and #link_file method
|
@@ -71,7 +71,8 @@ class Thor
|
|
71
71
|
protected
|
72
72
|
|
73
73
|
def execute!
|
74
|
-
lookup =
|
74
|
+
lookup = Util.escape_globs(source)
|
75
|
+
lookup = config[:recursive] ? File.join(lookup, '**') : lookup
|
75
76
|
lookup = File.join(lookup, '{*,.[a-z]*}')
|
76
77
|
|
77
78
|
Dir[lookup].sort.each do |file_source|
|
data/lib/thor/base.rb
CHANGED
@@ -70,11 +70,12 @@ class Thor
|
|
70
70
|
# arguments declared using #argument (this is primarily used
|
71
71
|
# by Thor::Group). Tis will leave us with the remaining
|
72
72
|
# positional arguments.
|
73
|
-
|
74
|
-
|
75
|
-
args = thor_args.remaining
|
73
|
+
to_parse = args
|
74
|
+
to_parse += opts.remaining unless self.class.strict_args_position?(config)
|
76
75
|
|
77
|
-
|
76
|
+
thor_args = Thor::Arguments.new(self.class.arguments)
|
77
|
+
thor_args.parse(to_parse).each { |k,v| send("#{k}=", v) }
|
78
|
+
@args = thor_args.remaining
|
78
79
|
end
|
79
80
|
|
80
81
|
class << self
|
@@ -141,6 +142,21 @@ class Thor
|
|
141
142
|
!!check_unknown_options
|
142
143
|
end
|
143
144
|
|
145
|
+
# If you want only strict string args (useful when cascading thor classes),
|
146
|
+
# call strict_args_position! This is disabled by default to allow dynamic
|
147
|
+
# invocations.
|
148
|
+
def strict_args_position!
|
149
|
+
@strict_args_position = true
|
150
|
+
end
|
151
|
+
|
152
|
+
def strict_args_position #:nodoc:
|
153
|
+
@strict_args_position ||= from_superclass(:strict_args_position, false)
|
154
|
+
end
|
155
|
+
|
156
|
+
def strict_args_position?(config) #:nodoc:
|
157
|
+
!!strict_args_position
|
158
|
+
end
|
159
|
+
|
144
160
|
# Adds an argument to the class and creates an attr_accessor for it.
|
145
161
|
#
|
146
162
|
# Arguments are different from options in several aspects. The first one
|
@@ -196,8 +212,9 @@ class Thor
|
|
196
212
|
"the non-required argument #{argument.human_name.inspect}."
|
197
213
|
end if required
|
198
214
|
|
199
|
-
|
200
|
-
|
215
|
+
options[:required] = required
|
216
|
+
|
217
|
+
arguments << Thor::Argument.new(name, options)
|
201
218
|
end
|
202
219
|
|
203
220
|
# Returns this class arguments, looking up in the ancestors chain.
|
@@ -510,10 +527,9 @@ class Thor
|
|
510
527
|
# ==== Parameters
|
511
528
|
# name<Symbol>:: The name of the argument.
|
512
529
|
# options<Hash>:: Described in both class_option and method_option.
|
530
|
+
# scope<Hash>:: Options hash that is being built up
|
513
531
|
def build_option(name, options, scope) #:nodoc:
|
514
|
-
scope[name] = Thor::Option.new(name, options
|
515
|
-
options[:type], options[:default], options[:banner],
|
516
|
-
options[:lazy_default], options[:group], options[:aliases], options[:hide])
|
532
|
+
scope[name] = Thor::Option.new(name, options)
|
517
533
|
end
|
518
534
|
|
519
535
|
# Receives a hash of options, parse them and add to the scope. This is a
|
@@ -576,7 +592,14 @@ class Thor
|
|
576
592
|
default
|
577
593
|
else
|
578
594
|
value = superclass.send(method)
|
579
|
-
|
595
|
+
|
596
|
+
if value
|
597
|
+
if value.is_a?(TrueClass) || value.is_a?(Symbol)
|
598
|
+
value
|
599
|
+
else
|
600
|
+
value.dup
|
601
|
+
end
|
602
|
+
end
|
580
603
|
end
|
581
604
|
end
|
582
605
|
|
File without changes
|
data/lib/thor/group.rb
CHANGED
data/lib/thor/parser/argument.rb
CHANGED
@@ -5,18 +5,20 @@ class Thor
|
|
5
5
|
attr_reader :name, :description, :required, :type, :default, :banner
|
6
6
|
alias :human_name :name
|
7
7
|
|
8
|
-
def initialize(name,
|
8
|
+
def initialize(name, options={})
|
9
9
|
class_name = self.class.name.split("::").last
|
10
10
|
|
11
|
+
type = options[:type]
|
12
|
+
|
11
13
|
raise ArgumentError, "#{class_name} name can't be nil." if name.nil?
|
12
14
|
raise ArgumentError, "Type :#{type} is not valid for #{class_name.downcase}s." if type && !valid_type?(type)
|
13
15
|
|
14
16
|
@name = name.to_s
|
15
|
-
@description =
|
16
|
-
@required = required
|
17
|
+
@description = options[:desc]
|
18
|
+
@required = options.key?(:required) ? options[:required] : true
|
17
19
|
@type = (type || :string).to_sym
|
18
|
-
@default = default
|
19
|
-
@banner = banner || default_banner
|
20
|
+
@default = options[:default]
|
21
|
+
@banner = options[:banner] || default_banner
|
20
22
|
|
21
23
|
validate! # Trigger specific validations
|
22
24
|
end
|
data/lib/thor/parser/option.rb
CHANGED
@@ -4,12 +4,13 @@ class Thor
|
|
4
4
|
|
5
5
|
VALID_TYPES = [:boolean, :numeric, :hash, :array, :string]
|
6
6
|
|
7
|
-
def initialize(name,
|
8
|
-
|
9
|
-
|
10
|
-
@
|
11
|
-
@
|
12
|
-
@
|
7
|
+
def initialize(name, options={})
|
8
|
+
options[:required] = false unless options.key?(:required)
|
9
|
+
super
|
10
|
+
@lazy_default = options[:lazy_default]
|
11
|
+
@group = options[:group].to_s.capitalize if options[:group]
|
12
|
+
@aliases = Array(options[:aliases])
|
13
|
+
@hide = options[:hide]
|
13
14
|
end
|
14
15
|
|
15
16
|
# This parse quick options given as method_options. It makes several
|
@@ -64,8 +65,7 @@ class Thor
|
|
64
65
|
when Hash, Array, String
|
65
66
|
value.class.name.downcase.to_sym
|
66
67
|
end
|
67
|
-
|
68
|
-
self.new(name.to_s, nil, required, type, default, nil, nil, nil, aliases)
|
68
|
+
self.new(name.to_s, :required => required, :type => type, :default => default, :aliases => aliases)
|
69
69
|
end
|
70
70
|
|
71
71
|
def switch_name
|
data/lib/thor/shell/basic.rb
CHANGED
@@ -3,7 +3,8 @@ require 'tempfile'
|
|
3
3
|
class Thor
|
4
4
|
module Shell
|
5
5
|
class Basic
|
6
|
-
attr_accessor :base
|
6
|
+
attr_accessor :base
|
7
|
+
attr_reader :padding
|
7
8
|
|
8
9
|
# Initialize base, mute and padding to nil.
|
9
10
|
#
|
@@ -23,7 +24,7 @@ class Thor
|
|
23
24
|
# Check if base is muted
|
24
25
|
#
|
25
26
|
def mute?
|
26
|
-
@mute
|
27
|
+
@mute
|
27
28
|
end
|
28
29
|
|
29
30
|
# Sets the output padding, not allowing less than zero values.
|
@@ -113,13 +114,12 @@ class Thor
|
|
113
114
|
colwidth = (array.map{|el| el.to_s.size}.max || 0) + 2
|
114
115
|
array.each_with_index do |value, index|
|
115
116
|
# Don't output trailing spaces when printing the last column
|
116
|
-
if (((index + 1) % (terminal_width / colwidth))).zero? && !index.zero?
|
117
|
+
if ((((index + 1) % (terminal_width / colwidth))).zero? && !index.zero?) || index + 1 == array.length
|
117
118
|
stdout.puts value
|
118
119
|
else
|
119
120
|
stdout.printf("%-#{colwidth}s", value)
|
120
121
|
end
|
121
122
|
end
|
122
|
-
stdout.puts
|
123
123
|
end
|
124
124
|
|
125
125
|
# Prints a table.
|
@@ -147,7 +147,7 @@ class Thor
|
|
147
147
|
start.upto(colcount - 1) do |index|
|
148
148
|
maxima = array.map {|row| row[index] ? row[index].to_s.size : 0 }.max
|
149
149
|
maximas << maxima
|
150
|
-
if index == colcount -1
|
150
|
+
if index == colcount - 1
|
151
151
|
# Don't output 2 trailing spaces when printing the last column
|
152
152
|
formats << "%-s"
|
153
153
|
else
|
data/lib/thor/util.rb
CHANGED
@@ -198,7 +198,7 @@ class Thor
|
|
198
198
|
# If we don't #gsub the \ character, Dir.glob will fail.
|
199
199
|
#
|
200
200
|
def self.thor_root_glob
|
201
|
-
files = Dir["#{thor_root}/*"]
|
201
|
+
files = Dir["#{escape_globs(thor_root)}/*"]
|
202
202
|
|
203
203
|
files.map! do |file|
|
204
204
|
File.directory?(file) ? File.join(file, "main.thor") : file
|
@@ -208,6 +208,7 @@ class Thor
|
|
208
208
|
# Where to look for Thor files.
|
209
209
|
#
|
210
210
|
def self.globs_for(path)
|
211
|
+
path = escape_globs(path)
|
211
212
|
["#{path}/Thorfile", "#{path}/*.thor", "#{path}/tasks/*.thor", "#{path}/lib/tasks/*.thor"]
|
212
213
|
end
|
213
214
|
|
@@ -244,5 +245,22 @@ class Thor
|
|
244
245
|
end
|
245
246
|
end
|
246
247
|
|
248
|
+
# Returns a string that has had any glob characters escaped.
|
249
|
+
# The glob characters are `* ? { } [ ]`.
|
250
|
+
#
|
251
|
+
# ==== Examples
|
252
|
+
#
|
253
|
+
# Thor::Util.escape_globs('[apps]') # => '\[apps\]'
|
254
|
+
#
|
255
|
+
# ==== Parameters
|
256
|
+
# String
|
257
|
+
#
|
258
|
+
# ==== Returns
|
259
|
+
# String
|
260
|
+
#
|
261
|
+
def self.escape_globs(path)
|
262
|
+
path.to_s.gsub(/[*?{}\[\]]/, '\\\\\\&')
|
263
|
+
end
|
264
|
+
|
247
265
|
end
|
248
266
|
end
|
data/lib/thor/version.rb
CHANGED
@@ -121,6 +121,11 @@ describe Thor::Actions::Directory do
|
|
121
121
|
end
|
122
122
|
checked.should be_true
|
123
123
|
end
|
124
|
+
|
125
|
+
it "works with glob characters in the path" do
|
126
|
+
content = invoke!("app{1}")
|
127
|
+
content.should =~ /create app\{1\}\/README/
|
128
|
+
end
|
124
129
|
end
|
125
130
|
|
126
131
|
describe "#revoke!" do
|
@@ -132,5 +137,13 @@ describe Thor::Actions::Directory do
|
|
132
137
|
File.exists?(File.join(destination_root, "doc", "config.rb")).should be_false
|
133
138
|
File.exists?(File.join(destination_root, "doc", "components")).should be_false
|
134
139
|
end
|
140
|
+
|
141
|
+
it "works with glob characters in the path" do
|
142
|
+
invoke! "app{1}"
|
143
|
+
File.exists?(File.join(destination_root, "app{1}", "README")).should be_true
|
144
|
+
|
145
|
+
revoke! "app{1}"
|
146
|
+
File.exists?(File.join(destination_root, "app{1}", "README")).should be_false
|
147
|
+
end
|
135
148
|
end
|
136
149
|
end
|
@@ -3,8 +3,8 @@ require 'thor/parser'
|
|
3
3
|
|
4
4
|
describe Thor::Argument do
|
5
5
|
|
6
|
-
def argument(name,
|
7
|
-
@argument ||= Thor::Argument.new(name,
|
6
|
+
def argument(name, options={})
|
7
|
+
@argument ||= Thor::Argument.new(name, options)
|
8
8
|
end
|
9
9
|
|
10
10
|
describe "errors" do
|
@@ -16,32 +16,32 @@ describe Thor::Argument do
|
|
16
16
|
|
17
17
|
it "raises an error if type is unknown" do
|
18
18
|
lambda {
|
19
|
-
argument(:task, :unknown)
|
19
|
+
argument(:task, :type => :unknown)
|
20
20
|
}.should raise_error(ArgumentError, "Type :unknown is not valid for arguments.")
|
21
21
|
end
|
22
22
|
|
23
23
|
it "raises an error if argument is required and have default values" do
|
24
24
|
lambda {
|
25
|
-
argument(:task, :string, "bar", true)
|
25
|
+
argument(:task, :type => :string, :default => "bar", :required => true)
|
26
26
|
}.should raise_error(ArgumentError, "An argument cannot be required and have default value.")
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
30
|
describe "#usage" do
|
31
31
|
it "returns usage for string types" do
|
32
|
-
argument(:foo, :string).usage.should == "FOO"
|
32
|
+
argument(:foo, :type => :string).usage.should == "FOO"
|
33
33
|
end
|
34
34
|
|
35
35
|
it "returns usage for numeric types" do
|
36
|
-
argument(:foo, :numeric).usage.should == "N"
|
36
|
+
argument(:foo, :type => :numeric).usage.should == "N"
|
37
37
|
end
|
38
38
|
|
39
39
|
it "returns usage for array types" do
|
40
|
-
argument(:foo, :array).usage.should == "one two three"
|
40
|
+
argument(:foo, :type => :array).usage.should == "one two three"
|
41
41
|
end
|
42
42
|
|
43
43
|
it "returns usage for hash types" do
|
44
|
-
argument(:foo, :hash).usage.should == "key:value"
|
44
|
+
argument(:foo, :type => :hash).usage.should == "key:value"
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
@@ -4,7 +4,8 @@ require 'thor/parser'
|
|
4
4
|
describe Thor::Arguments do
|
5
5
|
def create(opts={})
|
6
6
|
arguments = opts.map do |type, default|
|
7
|
-
|
7
|
+
options = {:required => default.nil?, :type => type, :default => default}
|
8
|
+
Thor::Argument.new(type.to_s, options)
|
8
9
|
end
|
9
10
|
|
10
11
|
arguments.sort!{ |a,b| b.name <=> a.name }
|
data/spec/parser/option_spec.rb
CHANGED
@@ -6,8 +6,8 @@ describe Thor::Option do
|
|
6
6
|
Thor::Option.parse(key, value)
|
7
7
|
end
|
8
8
|
|
9
|
-
def option(name,
|
10
|
-
@option ||= Thor::Option.new(name,
|
9
|
+
def option(name, options={})
|
10
|
+
@option ||= Thor::Option.new(name, options)
|
11
11
|
end
|
12
12
|
|
13
13
|
describe "#parse" do
|
@@ -130,14 +130,14 @@ describe Thor::Option do
|
|
130
130
|
end
|
131
131
|
|
132
132
|
it "can be required and have default values" do
|
133
|
-
option = option("foo",
|
133
|
+
option = option("foo", :required => true, :type => :string, :default => "bar")
|
134
134
|
option.default.should == "bar"
|
135
135
|
option.should be_required
|
136
136
|
end
|
137
137
|
|
138
138
|
it "cannot be required and have type boolean" do
|
139
139
|
lambda {
|
140
|
-
option("foo",
|
140
|
+
option("foo", :required => true, :type => :boolean)
|
141
141
|
}.should raise_error(ArgumentError, "An option cannot be boolean and required.")
|
142
142
|
end
|
143
143
|
|
@@ -180,11 +180,11 @@ describe Thor::Option do
|
|
180
180
|
end
|
181
181
|
|
182
182
|
it "uses banner when supplied" do
|
183
|
-
option(:foo,
|
183
|
+
option(:foo, :required => false, :type => :string, :banner => "BAR").usage.should == "[--foo=BAR]"
|
184
184
|
end
|
185
185
|
|
186
186
|
it "checkes when banner is an empty string" do
|
187
|
-
option(:foo,
|
187
|
+
option(:foo, :required => false, :type => :string, :banner => "").usage.should == "[--foo]"
|
188
188
|
end
|
189
189
|
|
190
190
|
describe "with required values" do
|
data/spec/parser/options_spec.rb
CHANGED
@@ -168,7 +168,8 @@ describe Thor::Options do
|
|
168
168
|
end
|
169
169
|
|
170
170
|
it "does not raises an error if the required option has a default value" do
|
171
|
-
|
171
|
+
options = {:required => true, :type => :string, :default => "baz"}
|
172
|
+
create :foo => Thor::Option.new("foo", options), :bar => :boolean
|
172
173
|
lambda { parse("--bar") }.should_not raise_error
|
173
174
|
end
|
174
175
|
end
|
data/spec/task_spec.rb
CHANGED
@@ -26,7 +26,8 @@ describe Thor::Task do
|
|
26
26
|
end
|
27
27
|
|
28
28
|
it "injects arguments into usage" do
|
29
|
-
|
29
|
+
options = {:required => true, :type => :string}
|
30
|
+
object = Struct.new(:namespace, :arguments).new("foo", [Thor::Argument.new(:bar, options)])
|
30
31
|
task(:foo => :required).formatted_usage(object).should == "foo:can_has BAR --foo=FOO"
|
31
32
|
end
|
32
33
|
end
|
data/spec/thor_spec.rb
CHANGED
@@ -382,6 +382,37 @@ HELP
|
|
382
382
|
end
|
383
383
|
|
384
384
|
klass.start(["unknown", "foo", "--bar", "baz", "bat", "--bam"]).should == ["foo", "--bar", "baz", "bat", "--bam"]
|
385
|
+
klass.start(["unknown", "--bar", "baz"]).should == ["--bar", "baz"]
|
386
|
+
end
|
387
|
+
|
388
|
+
it "does not pass through unknown options with strict args" do
|
389
|
+
klass = Class.new(Thor) do
|
390
|
+
strict_args_position!
|
391
|
+
|
392
|
+
desc "unknown", "passing unknown options"
|
393
|
+
def unknown(*args)
|
394
|
+
args
|
395
|
+
end
|
396
|
+
end
|
397
|
+
|
398
|
+
klass.start(["unknown", "--bar", "baz"]).should == []
|
399
|
+
klass.start(["unknown", "foo", "--bar", "baz"]).should == ["foo"]
|
400
|
+
end
|
401
|
+
|
402
|
+
it "strict args works in the inheritance chain" do
|
403
|
+
parent = Class.new(Thor) do
|
404
|
+
strict_args_position!
|
405
|
+
end
|
406
|
+
|
407
|
+
klass = Class.new(parent) do
|
408
|
+
desc "unknown", "passing unknown options"
|
409
|
+
def unknown(*args)
|
410
|
+
args
|
411
|
+
end
|
412
|
+
end
|
413
|
+
|
414
|
+
klass.start(["unknown", "--bar", "baz"]).should == []
|
415
|
+
klass.start(["unknown", "foo", "--bar", "baz"]).should == ["foo"]
|
385
416
|
end
|
386
417
|
end
|
387
418
|
end
|
data/spec/util_spec.rb
CHANGED
@@ -160,4 +160,37 @@ describe Thor::Util do
|
|
160
160
|
Thor::Util.user_home.should == "/home/user/"
|
161
161
|
end
|
162
162
|
end
|
163
|
+
|
164
|
+
describe "#thor_root_glob" do
|
165
|
+
before do
|
166
|
+
ENV.stub!(:[])
|
167
|
+
Thor::Util.clear_user_home!
|
168
|
+
end
|
169
|
+
|
170
|
+
it "escapes globs in path" do
|
171
|
+
ENV.stub!(:[]).with("HOME").and_return("/home/user{1}/")
|
172
|
+
Dir.should_receive(:[]).with("/home/user\\{1\\}/.thor/*").and_return([])
|
173
|
+
Thor::Util.thor_root_glob.should == []
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
describe "#globs_for" do
|
178
|
+
it "escapes globs in path" do
|
179
|
+
Thor::Util.globs_for("/home/apps{1}").should == [
|
180
|
+
"/home/apps\\{1\\}/Thorfile",
|
181
|
+
"/home/apps\\{1\\}/*.thor",
|
182
|
+
"/home/apps\\{1\\}/tasks/*.thor",
|
183
|
+
"/home/apps\\{1\\}/lib/tasks/*.thor"
|
184
|
+
]
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
describe "#escape_globs" do
|
189
|
+
it "escapes ? * { } [ ] glob characters" do
|
190
|
+
Thor::Util.escape_globs("apps?").should == "apps\\?"
|
191
|
+
Thor::Util.escape_globs("apps*").should == "apps\\*"
|
192
|
+
Thor::Util.escape_globs("apps {1}").should == "apps \\{1\\}"
|
193
|
+
Thor::Util.escape_globs("apps [1]").should == "apps \\[1\\]"
|
194
|
+
end
|
195
|
+
end
|
163
196
|
end
|
metadata
CHANGED
@@ -1,141 +1,141 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: thor
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 37
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 15
|
9
|
+
- 3
|
10
|
+
version: 0.15.3
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Yehuda Katz
|
9
|
-
-
|
14
|
+
- "Jos\xC3\xA9 Valim"
|
10
15
|
autorequire:
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
18
|
+
|
19
|
+
date: 2012-06-18 00:00:00 +02:00
|
20
|
+
default_executable:
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
16
23
|
name: bundler
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
|
-
requirements:
|
20
|
-
- - ~>
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '1.0'
|
23
|
-
type: :development
|
24
24
|
prerelease: false
|
25
|
-
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
26
|
none: false
|
27
|
-
requirements:
|
27
|
+
requirements:
|
28
28
|
- - ~>
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
requirements:
|
36
|
-
- - ~>
|
37
|
-
- !ruby/object:Gem::Version
|
38
|
-
version: '1.3'
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 15
|
31
|
+
segments:
|
32
|
+
- 1
|
33
|
+
- 0
|
34
|
+
version: "1.0"
|
39
35
|
type: :development
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: fakeweb
|
40
39
|
prerelease: false
|
41
|
-
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
41
|
none: false
|
43
|
-
requirements:
|
42
|
+
requirements:
|
44
43
|
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
requirements:
|
52
|
-
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0.9'
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 9
|
46
|
+
segments:
|
47
|
+
- 1
|
48
|
+
- 3
|
49
|
+
version: "1.3"
|
55
50
|
type: :development
|
51
|
+
version_requirements: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
name: rake
|
56
54
|
prerelease: false
|
57
|
-
|
58
|
-
none: false
|
59
|
-
requirements:
|
60
|
-
- - ~>
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '0.9'
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: rdoc
|
65
|
-
requirement: !ruby/object:Gem::Requirement
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
66
56
|
none: false
|
67
|
-
requirements:
|
57
|
+
requirements:
|
68
58
|
- - ~>
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 25
|
61
|
+
segments:
|
62
|
+
- 0
|
63
|
+
- 9
|
64
|
+
version: "0.9"
|
71
65
|
type: :development
|
66
|
+
version_requirements: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: rdoc
|
72
69
|
prerelease: false
|
73
|
-
|
74
|
-
none: false
|
75
|
-
requirements:
|
76
|
-
- - ~>
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: '3.9'
|
79
|
-
- !ruby/object:Gem::Dependency
|
80
|
-
name: rspec
|
81
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
82
71
|
none: false
|
83
|
-
requirements:
|
72
|
+
requirements:
|
84
73
|
- - ~>
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
hash: 21
|
76
|
+
segments:
|
77
|
+
- 3
|
78
|
+
- 9
|
79
|
+
version: "3.9"
|
87
80
|
type: :development
|
81
|
+
version_requirements: *id004
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: rspec
|
88
84
|
prerelease: false
|
89
|
-
|
85
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
90
86
|
none: false
|
91
|
-
requirements:
|
87
|
+
requirements:
|
92
88
|
- - ~>
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
requirements:
|
100
|
-
- - ~>
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '0.4'
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
hash: 5
|
91
|
+
segments:
|
92
|
+
- 2
|
93
|
+
- 3
|
94
|
+
version: "2.3"
|
103
95
|
type: :development
|
96
|
+
version_requirements: *id005
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
104
99
|
prerelease: false
|
105
|
-
|
100
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
106
101
|
none: false
|
107
|
-
requirements:
|
102
|
+
requirements:
|
108
103
|
- - ~>
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
requirements:
|
116
|
-
- - ! '>='
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '0'
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
hash: 3
|
106
|
+
segments:
|
107
|
+
- 0
|
108
|
+
- 4
|
109
|
+
version: "0.4"
|
119
110
|
type: :development
|
111
|
+
version_requirements: *id006
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: childlabor
|
120
114
|
prerelease: false
|
121
|
-
|
115
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
122
116
|
none: false
|
123
|
-
requirements:
|
124
|
-
- -
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
hash: 3
|
121
|
+
segments:
|
122
|
+
- 0
|
123
|
+
version: "0"
|
124
|
+
type: :development
|
125
|
+
version_requirements: *id007
|
127
126
|
description: A scripting framework that replaces rake, sake and rubigen
|
128
127
|
email: ruby-thor@googlegroups.com
|
129
|
-
executables:
|
128
|
+
executables:
|
130
129
|
- rake2thor
|
131
130
|
- thor
|
132
131
|
extensions: []
|
133
|
-
|
132
|
+
|
133
|
+
extra_rdoc_files:
|
134
134
|
- CHANGELOG.rdoc
|
135
135
|
- LICENSE.md
|
136
136
|
- README.md
|
137
137
|
- Thorfile
|
138
|
-
files:
|
138
|
+
files:
|
139
139
|
- .autotest
|
140
140
|
- .document
|
141
141
|
- .gemtest
|
@@ -158,6 +158,7 @@ files:
|
|
158
158
|
- lib/thor/actions/file_manipulation.rb
|
159
159
|
- lib/thor/actions/inject_into_file.rb
|
160
160
|
- lib/thor/base.rb
|
161
|
+
- lib/thor/core_ext/dir_escape.rb
|
161
162
|
- lib/thor/core_ext/file_binary_read.rb
|
162
163
|
- lib/thor/core_ext/hash_with_indifferent_access.rb
|
163
164
|
- lib/thor/core_ext/ordered_hash.rb
|
@@ -190,6 +191,7 @@ files:
|
|
190
191
|
- spec/core_ext/ordered_hash_spec.rb
|
191
192
|
- spec/exit_condition_spec.rb
|
192
193
|
- spec/fixtures/application.rb
|
194
|
+
- spec/fixtures/app{1}/README
|
193
195
|
- spec/fixtures/bundle/execute.rb
|
194
196
|
- spec/fixtures/bundle/main.thor
|
195
197
|
- spec/fixtures/doc/%file_name%.rb.tt
|
@@ -222,32 +224,43 @@ files:
|
|
222
224
|
- spec/thor_spec.rb
|
223
225
|
- spec/util_spec.rb
|
224
226
|
- thor.gemspec
|
227
|
+
has_rdoc: true
|
225
228
|
homepage: http://github.com/wycats/thor
|
226
229
|
licenses: []
|
230
|
+
|
227
231
|
post_install_message:
|
228
|
-
rdoc_options:
|
232
|
+
rdoc_options:
|
229
233
|
- --charset=UTF-8
|
230
|
-
require_paths:
|
234
|
+
require_paths:
|
231
235
|
- lib
|
232
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
236
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
233
237
|
none: false
|
234
|
-
requirements:
|
235
|
-
- -
|
236
|
-
- !ruby/object:Gem::Version
|
237
|
-
|
238
|
-
|
238
|
+
requirements:
|
239
|
+
- - ">="
|
240
|
+
- !ruby/object:Gem::Version
|
241
|
+
hash: 3
|
242
|
+
segments:
|
243
|
+
- 0
|
244
|
+
version: "0"
|
245
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
239
246
|
none: false
|
240
|
-
requirements:
|
241
|
-
- -
|
242
|
-
- !ruby/object:Gem::Version
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
hash: 23
|
251
|
+
segments:
|
252
|
+
- 1
|
253
|
+
- 3
|
254
|
+
- 6
|
243
255
|
version: 1.3.6
|
244
256
|
requirements: []
|
257
|
+
|
245
258
|
rubyforge_project:
|
246
|
-
rubygems_version: 1.
|
259
|
+
rubygems_version: 1.5.3
|
247
260
|
signing_key:
|
248
261
|
specification_version: 3
|
249
262
|
summary: A scripting framework that replaces rake, sake and rubigen
|
250
|
-
test_files:
|
263
|
+
test_files:
|
251
264
|
- spec/actions/create_file_spec.rb
|
252
265
|
- spec/actions/create_link_spec.rb
|
253
266
|
- spec/actions/directory_spec.rb
|
@@ -260,6 +273,7 @@ test_files:
|
|
260
273
|
- spec/core_ext/ordered_hash_spec.rb
|
261
274
|
- spec/exit_condition_spec.rb
|
262
275
|
- spec/fixtures/application.rb
|
276
|
+
- spec/fixtures/app{1}/README
|
263
277
|
- spec/fixtures/bundle/execute.rb
|
264
278
|
- spec/fixtures/bundle/main.thor
|
265
279
|
- spec/fixtures/doc/%file_name%.rb.tt
|
@@ -291,4 +305,3 @@ test_files:
|
|
291
305
|
- spec/task_spec.rb
|
292
306
|
- spec/thor_spec.rb
|
293
307
|
- spec/util_spec.rb
|
294
|
-
has_rdoc:
|