rake 12.1.0 → 12.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rake might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/History.rdoc +17 -1
- data/lib/rake/application.rb +45 -12
- data/lib/rake/file_list.rb +2 -2
- data/lib/rake/file_task.rb +2 -2
- data/lib/rake/rake_module.rb +28 -0
- data/lib/rake/version.rb +1 -1
- data/rake.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 11b276b752a4c2dd03e84880c1702e0ed103b589bae72f6172ddadb502311bac
|
4
|
+
data.tar.gz: a2bfe2510937c8f503c84a4c1c534d961cf9a06901dd439b65df9a31e0502690
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4525784f4fb2aa4c3cfa345eed357f94e130495eed80c7bca57cb5d429d7ea5e25b3c8c066ac3df950596c7c5faa1ebfd7311589dc11c1485fc08f6189cbd6b
|
7
|
+
data.tar.gz: 5a10b6f9247bd9bf5d9aacc173cc516e6ca9248000ac22fd2a0bb28e5c08f49c0e5581a4dbfae67e9e14eb0befe74521528f01e81d07645387b858c3de6f12d4
|
data/History.rdoc
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
=== 12.2.0
|
2
|
+
|
3
|
+
==== Enhancements:
|
4
|
+
|
5
|
+
* Make rake easier to use as a library
|
6
|
+
Pull request #211 by @drbrain
|
7
|
+
* Fix quadratic performance in FileTask#out_of_date?
|
8
|
+
Pull request #224 by @doudou
|
9
|
+
* Clarify output when printing nested exception traces
|
10
|
+
Pull request #232 by @urbanautomaton
|
11
|
+
|
12
|
+
==== Bug fixes
|
13
|
+
|
14
|
+
* Account for a file that match 2 or more patterns.
|
15
|
+
Pull request #231 by @styd
|
16
|
+
|
1
17
|
=== 12.1.0
|
2
18
|
|
3
19
|
==== Enhancements:
|
@@ -14,7 +30,7 @@
|
|
14
30
|
Pull request #183 by @aycabta.
|
15
31
|
* Make LoadError from running tests more obvious. Pull request #195
|
16
32
|
by Eric Hodel.
|
17
|
-
* Fix unexpected TypeError with hash
|
33
|
+
* Fix unexpected TypeError with hash style option. Pull request #202
|
18
34
|
by Kuniaki IGARASHI.
|
19
35
|
|
20
36
|
=== 12.0.0
|
data/lib/rake/application.rb
CHANGED
@@ -62,6 +62,8 @@ module Rake
|
|
62
62
|
add_loader("rake", DefaultLoader.new)
|
63
63
|
@tty_output = STDOUT.tty?
|
64
64
|
@terminal_columns = ENV["RAKE_COLUMNS"].to_i
|
65
|
+
|
66
|
+
set_default_options
|
65
67
|
end
|
66
68
|
|
67
69
|
# Run the Rake application. The run method performs the following
|
@@ -74,19 +76,19 @@ module Rake
|
|
74
76
|
# If you wish to build a custom rake command, you should call
|
75
77
|
# +init+ on your application. Then define any tasks. Finally,
|
76
78
|
# call +top_level+ to run your top level tasks.
|
77
|
-
def run
|
79
|
+
def run(argv = ARGV)
|
78
80
|
standard_exception_handling do
|
79
|
-
init
|
81
|
+
init "rake", argv
|
80
82
|
load_rakefile
|
81
83
|
top_level
|
82
84
|
end
|
83
85
|
end
|
84
86
|
|
85
87
|
# Initialize the command line parameters and app name.
|
86
|
-
def init(app_name="rake")
|
88
|
+
def init(app_name="rake", argv = ARGV)
|
87
89
|
standard_exception_handling do
|
88
90
|
@name = app_name
|
89
|
-
args = handle_options
|
91
|
+
args = handle_options argv
|
90
92
|
collect_command_line_tasks(args)
|
91
93
|
end
|
92
94
|
end
|
@@ -205,13 +207,22 @@ module Rake
|
|
205
207
|
end
|
206
208
|
|
207
209
|
def display_exception_details(ex) # :nodoc:
|
208
|
-
|
209
|
-
return if seen.include? ex
|
210
|
-
seen << ex
|
210
|
+
display_exception_details_seen << ex
|
211
211
|
|
212
212
|
display_exception_message_details(ex)
|
213
213
|
display_exception_backtrace(ex)
|
214
|
-
|
214
|
+
display_cause_details(ex.cause) if has_cause?(ex)
|
215
|
+
end
|
216
|
+
|
217
|
+
def display_cause_details(ex) # :nodoc:
|
218
|
+
return if display_exception_details_seen.include? ex
|
219
|
+
|
220
|
+
trace "\nCaused by:"
|
221
|
+
display_exception_details(ex)
|
222
|
+
end
|
223
|
+
|
224
|
+
def display_exception_details_seen # :nodoc:
|
225
|
+
Thread.current[:rake_display_exception_details_seen] ||= []
|
215
226
|
end
|
216
227
|
|
217
228
|
def has_cause?(ex) # :nodoc:
|
@@ -618,9 +629,8 @@ module Rake
|
|
618
629
|
# Read and handle the command line options. Returns the command line
|
619
630
|
# arguments that we didn't understand, which should (in theory) be just
|
620
631
|
# task names and env vars.
|
621
|
-
def handle_options # :nodoc:
|
622
|
-
|
623
|
-
options.trace_output = $stderr
|
632
|
+
def handle_options(argv) # :nodoc:
|
633
|
+
set_default_options
|
624
634
|
|
625
635
|
OptionParser.new do |opts|
|
626
636
|
opts.banner = "#{Rake.application.name} [-f rakefile] {options} targets..."
|
@@ -634,7 +644,7 @@ module Rake
|
|
634
644
|
|
635
645
|
standard_rake_options.each { |args| opts.on(*args) }
|
636
646
|
opts.environment("RAKEOPT")
|
637
|
-
end.parse(
|
647
|
+
end.parse(argv)
|
638
648
|
end
|
639
649
|
|
640
650
|
# Similar to the regular Ruby +require+ command, but will check
|
@@ -782,5 +792,28 @@ module Rake
|
|
782
792
|
backtrace.find { |str| str =~ re } || ""
|
783
793
|
end
|
784
794
|
|
795
|
+
def set_default_options
|
796
|
+
options.always_multitask = false
|
797
|
+
options.backtrace = false
|
798
|
+
options.build_all = false
|
799
|
+
options.dryrun = false
|
800
|
+
options.ignore_deprecate = false
|
801
|
+
options.ignore_system = false
|
802
|
+
options.job_stats = false
|
803
|
+
options.load_system = false
|
804
|
+
options.nosearch = false
|
805
|
+
options.rakelib = %w[rakelib]
|
806
|
+
options.show_all_tasks = false
|
807
|
+
options.show_prereqs = false
|
808
|
+
options.show_task_pattern = nil
|
809
|
+
options.show_tasks = nil
|
810
|
+
options.silent = false
|
811
|
+
options.suppress_backtrace_pattern = nil
|
812
|
+
options.thread_pool_size = Rake.suggested_thread_count
|
813
|
+
options.trace = false
|
814
|
+
options.trace_output = $stderr
|
815
|
+
options.trace_rules = false
|
816
|
+
end
|
817
|
+
|
785
818
|
end
|
786
819
|
end
|
data/lib/rake/file_list.rb
CHANGED
@@ -318,14 +318,14 @@ module Rake
|
|
318
318
|
# Return a new file list that only contains file names from the current
|
319
319
|
# file list that exist on the file system.
|
320
320
|
def existing
|
321
|
-
select { |fn| File.exist?(fn) }
|
321
|
+
select { |fn| File.exist?(fn) }.uniq
|
322
322
|
end
|
323
323
|
|
324
324
|
# Modify the current file list so that it contains only file name that
|
325
325
|
# exist on the file system.
|
326
326
|
def existing!
|
327
327
|
resolve
|
328
|
-
@items = @items.select { |fn| File.exist?(fn) }
|
328
|
+
@items = @items.select { |fn| File.exist?(fn) }.uniq
|
329
329
|
self
|
330
330
|
end
|
331
331
|
|
data/lib/rake/file_task.rb
CHANGED
@@ -30,10 +30,10 @@ module Rake
|
|
30
30
|
|
31
31
|
# Are there any prerequisites with a later time than the given time stamp?
|
32
32
|
def out_of_date?(stamp)
|
33
|
-
|
33
|
+
all_prerequisite_tasks.any? { |prereq|
|
34
34
|
prereq_task = application[prereq, @scope]
|
35
35
|
if prereq_task.instance_of?(Rake::FileTask)
|
36
|
-
prereq_task.timestamp > stamp ||
|
36
|
+
prereq_task.timestamp > stamp || @application.options.build_all
|
37
37
|
else
|
38
38
|
prereq_task.timestamp > stamp
|
39
39
|
end
|
data/lib/rake/rake_module.rb
CHANGED
@@ -34,6 +34,34 @@ module Rake
|
|
34
34
|
application.options.rakelib ||= []
|
35
35
|
application.options.rakelib.concat(files)
|
36
36
|
end
|
37
|
+
|
38
|
+
# Make +block_application+ the default rake application inside a block so
|
39
|
+
# you can load rakefiles into a different application.
|
40
|
+
#
|
41
|
+
# This is useful when you want to run rake tasks inside a library without
|
42
|
+
# running rake in a sub-shell.
|
43
|
+
#
|
44
|
+
# Example:
|
45
|
+
#
|
46
|
+
# Dir.chdir 'other/directory'
|
47
|
+
#
|
48
|
+
# other_rake = Rake.with_application do |rake|
|
49
|
+
# rake.load_rakefile
|
50
|
+
# end
|
51
|
+
#
|
52
|
+
# puts other_rake.tasks
|
53
|
+
|
54
|
+
def with_application(block_application = Rake::Application.new)
|
55
|
+
orig_application = Rake.application
|
56
|
+
|
57
|
+
Rake.application = block_application
|
58
|
+
|
59
|
+
yield block_application
|
60
|
+
|
61
|
+
block_application
|
62
|
+
ensure
|
63
|
+
Rake.application = orig_application
|
64
|
+
end
|
37
65
|
end
|
38
66
|
|
39
67
|
end
|
data/lib/rake/version.rb
CHANGED
data/rake.gemspec
CHANGED
@@ -5,7 +5,7 @@ require 'rake/version'
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "rake".freeze
|
7
7
|
s.version = Rake::VERSION
|
8
|
-
s.date = "
|
8
|
+
s.date = "2017-10-25"
|
9
9
|
s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze]
|
10
10
|
s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze]
|
11
11
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.
|
4
|
+
version: 12.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi SHIBATA
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2017-10-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
189
|
version: 1.3.2
|
190
190
|
requirements: []
|
191
191
|
rubyforge_project:
|
192
|
-
rubygems_version: 2.6.
|
192
|
+
rubygems_version: 2.6.14
|
193
193
|
signing_key:
|
194
194
|
specification_version: 4
|
195
195
|
summary: Rake is a Make-like program implemented in Ruby
|