rake 13.0.6 → 13.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.rdoc +1 -1
- data/lib/rake/application.rb +34 -4
- data/lib/rake/backtrace.rb +1 -0
- data/lib/rake/dsl_definition.rb +3 -2
- data/lib/rake/file_task.rb +8 -4
- data/lib/rake/file_utils.rb +0 -2
- data/lib/rake/packagetask.rb +1 -1
- data/lib/rake/task.rb +2 -2
- data/lib/rake/thread_pool.rb +1 -1
- data/lib/rake/version.rb +1 -1
- data/lib/rake.rb +0 -1
- data/rake.gemspec +24 -23
- metadata +6 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70e1c62235097400cab35576324e9b3fcb48b90559477aedbbef03c9815a2fff
|
4
|
+
data.tar.gz: 94599a5608579b6b1e475a96694f2474a8d0fb4ee4fd526aeb82f13188aed3f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fa7156b0b9dd984ca3b08061fb62d386407584a69b9442d88c424d847a20523d68555cc9a6e59b8dea58390839e0b588f5f406097cf8670b079672ad543cba4
|
7
|
+
data.tar.gz: 56edb7f28a274c3d2ba30ad80906194a0ef44a765c8d6ee11c922e62f075ccb132e3bcebbe9d25194ce498dc83748eec85a56aa99fd7d34a20eed553bf79f8ee
|
data/README.rdoc
CHANGED
@@ -116,7 +116,7 @@ other projects with similar (and not so similar) goals.
|
|
116
116
|
|
117
117
|
[<b>Eric Hodel</b>] For aid in maintaining rake.
|
118
118
|
|
119
|
-
[<b>Hiroshi SHIBATA</b>] Maintainer of Rake 10
|
119
|
+
[<b>Hiroshi SHIBATA</b>] Maintainer of Rake 10 and later
|
120
120
|
|
121
121
|
== License
|
122
122
|
|
data/lib/rake/application.rb
CHANGED
@@ -94,10 +94,32 @@ module Rake
|
|
94
94
|
# Backward compatibility for capistrano
|
95
95
|
args = handle_options
|
96
96
|
end
|
97
|
+
load_debug_at_stop_feature
|
97
98
|
collect_command_line_tasks(args)
|
98
99
|
end
|
99
100
|
end
|
100
101
|
|
102
|
+
def load_debug_at_stop_feature
|
103
|
+
return unless ENV["RAKE_DEBUG"]
|
104
|
+
require "debug/session"
|
105
|
+
DEBUGGER__::start no_sigint_hook: true, nonstop: true
|
106
|
+
Rake::Task.prepend Module.new {
|
107
|
+
def execute(*)
|
108
|
+
exception = DEBUGGER__::SESSION.capture_exception_frames(/(exe|bin|lib)\/rake/) do
|
109
|
+
super
|
110
|
+
end
|
111
|
+
|
112
|
+
if exception
|
113
|
+
STDERR.puts exception.message
|
114
|
+
DEBUGGER__::SESSION.enter_postmortem_session exception
|
115
|
+
raise exception
|
116
|
+
end
|
117
|
+
end
|
118
|
+
}
|
119
|
+
rescue LoadError
|
120
|
+
end
|
121
|
+
private :load_debug_at_stop_feature
|
122
|
+
|
101
123
|
# Find the rakefile and then load it and any pending imports.
|
102
124
|
def load_rakefile
|
103
125
|
standard_exception_handling do
|
@@ -124,7 +146,7 @@ module Rake
|
|
124
146
|
|
125
147
|
yield
|
126
148
|
|
127
|
-
thread_pool.join
|
149
|
+
thread_pool.join if defined?(@thread_pool)
|
128
150
|
if options.job_stats
|
129
151
|
stats = thread_pool.statistics
|
130
152
|
puts "Maximum active threads: #{stats[:max_active_threads]} + main"
|
@@ -143,7 +165,13 @@ module Rake
|
|
143
165
|
|
144
166
|
# Application options from the command line
|
145
167
|
def options
|
146
|
-
@options ||=
|
168
|
+
@options ||= Struct.new(
|
169
|
+
:always_multitask, :backtrace, :build_all, :dryrun,
|
170
|
+
:ignore_deprecate, :ignore_system, :job_stats, :load_system,
|
171
|
+
:nosearch, :rakelib, :show_all_tasks, :show_prereqs,
|
172
|
+
:show_task_pattern, :show_tasks, :silent, :suppress_backtrace_pattern,
|
173
|
+
:thread_pool_size, :trace, :trace_output, :trace_rules
|
174
|
+
).new
|
147
175
|
end
|
148
176
|
|
149
177
|
# Return the thread pool used for multithreaded processing.
|
@@ -215,7 +243,7 @@ module Rake
|
|
215
243
|
display_exception_details_seen << ex
|
216
244
|
|
217
245
|
display_exception_message_details(ex)
|
218
|
-
display_exception_backtrace(ex)
|
246
|
+
display_exception_backtrace(ex) if ex.backtrace
|
219
247
|
display_cause_details(ex.cause) if has_cause?(ex)
|
220
248
|
end
|
221
249
|
|
@@ -237,6 +265,8 @@ module Rake
|
|
237
265
|
def display_exception_message_details(ex) # :nodoc:
|
238
266
|
if ex.instance_of?(RuntimeError)
|
239
267
|
trace ex.message
|
268
|
+
elsif ex.respond_to?(:detailed_message)
|
269
|
+
trace "#{ex.class.name}: #{ex.detailed_message(highlight: false)}"
|
240
270
|
else
|
241
271
|
trace "#{ex.class.name}: #{ex.message}"
|
242
272
|
end
|
@@ -575,7 +605,7 @@ module Rake
|
|
575
605
|
["--tasks", "-T [PATTERN]",
|
576
606
|
"Display the tasks (matching optional PATTERN) " +
|
577
607
|
"with descriptions, then exit. " +
|
578
|
-
"-AT combination displays all
|
608
|
+
"-AT combination displays all the tasks, including those without descriptions.",
|
579
609
|
lambda { |value|
|
580
610
|
select_tasks_to_show(options, :tasks, value)
|
581
611
|
}
|
data/lib/rake/backtrace.rb
CHANGED
@@ -10,6 +10,7 @@ module Rake
|
|
10
10
|
map { |f| File.expand_path(f) }.
|
11
11
|
reject { |s| s.nil? || s =~ /^ *$/ }
|
12
12
|
SUPPRESSED_PATHS_RE = SUPPRESSED_PATHS.map { |f| Regexp.quote(f) }.join("|")
|
13
|
+
SUPPRESSED_PATHS_RE << "|^<internal:\\w+>"
|
13
14
|
SUPPRESSED_PATHS_RE << "|^org\\/jruby\\/\\w+\\.java" if
|
14
15
|
Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == "jruby"
|
15
16
|
|
data/lib/rake/dsl_definition.rb
CHANGED
@@ -90,6 +90,7 @@ module Rake
|
|
90
90
|
# directory "testdata/doc"
|
91
91
|
#
|
92
92
|
def directory(*args, &block) # :doc:
|
93
|
+
args = args.flat_map { |arg| arg.is_a?(FileList) ? arg.to_a.flatten : arg }
|
93
94
|
result = file_create(*args, &block)
|
94
95
|
dir, _ = *Rake.application.resolve_args(args)
|
95
96
|
dir = Rake.from_pathname(dir)
|
@@ -145,7 +146,7 @@ module Rake
|
|
145
146
|
#
|
146
147
|
# Example:
|
147
148
|
# rule '.o' => '.c' do |t|
|
148
|
-
# sh 'cc', '-o', t.name, t.source
|
149
|
+
# sh 'cc', '-c', '-o', t.name, t.source
|
149
150
|
# end
|
150
151
|
#
|
151
152
|
def rule(*args, &block) # :doc:
|
@@ -158,7 +159,7 @@ module Rake
|
|
158
159
|
#
|
159
160
|
# Example:
|
160
161
|
# desc "Run the Unit Tests"
|
161
|
-
# task test: [:build]
|
162
|
+
# task test: [:build] do
|
162
163
|
# # ... run tests
|
163
164
|
# end
|
164
165
|
#
|
data/lib/rake/file_task.rb
CHANGED
@@ -14,14 +14,18 @@ module Rake
|
|
14
14
|
# Is this file task needed? Yes if it doesn't exist, or if its time stamp
|
15
15
|
# is out of date.
|
16
16
|
def needed?
|
17
|
-
|
17
|
+
begin
|
18
|
+
out_of_date?(File.mtime(name)) || @application.options.build_all
|
19
|
+
rescue Errno::ENOENT
|
20
|
+
true
|
21
|
+
end
|
18
22
|
end
|
19
23
|
|
20
24
|
# Time stamp for file task.
|
21
25
|
def timestamp
|
22
|
-
|
23
|
-
File.mtime(name
|
24
|
-
|
26
|
+
begin
|
27
|
+
File.mtime(name)
|
28
|
+
rescue Errno::ENOENT
|
25
29
|
Rake::LATE
|
26
30
|
end
|
27
31
|
end
|
data/lib/rake/file_utils.rb
CHANGED
@@ -60,8 +60,6 @@ module FileUtils
|
|
60
60
|
|
61
61
|
def create_shell_runner(cmd) # :nodoc:
|
62
62
|
show_command = sh_show_command cmd
|
63
|
-
show_command = show_command[0, 42] + "..." unless $trace
|
64
|
-
|
65
63
|
lambda do |ok, status|
|
66
64
|
ok or
|
67
65
|
fail "Command failed with status (#{status.exitstatus}): " +
|
data/lib/rake/packagetask.rb
CHANGED
@@ -79,7 +79,7 @@ module Rake
|
|
79
79
|
# Zip command for zipped archives. The default is 'zip'.
|
80
80
|
attr_accessor :zip_command
|
81
81
|
|
82
|
-
# True if parent directory should be
|
82
|
+
# True if parent directory should be omitted (default is false)
|
83
83
|
attr_accessor :without_parent_dir
|
84
84
|
|
85
85
|
# Create a Package Task with the given name and version. Use +:noversion+
|
data/lib/rake/task.rb
CHANGED
@@ -276,9 +276,9 @@ module Rake
|
|
276
276
|
application.trace "** Execute #{name}" if application.options.trace
|
277
277
|
application.enhance_with_matching_rule(name) if @actions.empty?
|
278
278
|
if opts = Hash.try_convert(args) and !opts.empty?
|
279
|
-
@actions.each { |act| act.call(self, args, **opts)}
|
279
|
+
@actions.each { |act| act.call(self, args, **opts) }
|
280
280
|
else
|
281
|
-
@actions.each { |act| act.call(self, args)}
|
281
|
+
@actions.each { |act| act.call(self, args) }
|
282
282
|
end
|
283
283
|
end
|
284
284
|
|
data/lib/rake/thread_pool.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "rake/promise"
|
4
|
+
require "set"
|
4
5
|
|
5
6
|
module Rake
|
6
7
|
|
@@ -9,7 +10,6 @@ module Rake
|
|
9
10
|
# Creates a ThreadPool object. The +thread_count+ parameter is the size
|
10
11
|
# of the pool.
|
11
12
|
def initialize(thread_count)
|
12
|
-
require "set"
|
13
13
|
@max_active_threads = [thread_count, 0].max
|
14
14
|
@threads = Set.new
|
15
15
|
@threads_mon = Monitor.new
|
data/lib/rake/version.rb
CHANGED
data/lib/rake.rb
CHANGED
data/rake.gemspec
CHANGED
@@ -1,32 +1,33 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
2
|
+
|
3
|
+
require_relative "lib/rake/version"
|
3
4
|
|
4
5
|
Gem::Specification.new do |s|
|
5
|
-
s.name = "rake"
|
6
|
+
s.name = "rake"
|
6
7
|
s.version = Rake::VERSION
|
7
|
-
s.authors = ["Hiroshi SHIBATA"
|
8
|
-
s.email = ["[email protected]"
|
8
|
+
s.authors = ["Hiroshi SHIBATA", "Eric Hodel", "Jim Weirich"]
|
9
|
+
s.email = ["[email protected]", "[email protected]", ""]
|
9
10
|
|
10
|
-
s.summary = "Rake is a Make-like program implemented in Ruby"
|
11
|
-
s.description =
|
12
|
-
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
|
13
|
-
specified in standard Ruby syntax.
|
14
|
-
Rake has the following features:
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
11
|
+
s.summary = "Rake is a Make-like program implemented in Ruby"
|
12
|
+
s.description = <<~DESCRIPTION
|
13
|
+
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
|
14
|
+
specified in standard Ruby syntax.
|
15
|
+
Rake has the following features:
|
16
|
+
* Rakefiles (rake's version of Makefiles) are completely defined in standard Ruby syntax.
|
17
|
+
No XML files to edit. No quirky Makefile syntax to worry about (is that a tab or a space?)
|
18
|
+
* Users can specify tasks with prerequisites.
|
19
|
+
* Rake supports rule patterns to synthesize implicit tasks.
|
20
|
+
* Flexible FileLists that act like arrays but know about manipulating file names and paths.
|
21
|
+
* Supports parallel execution of tasks.
|
21
22
|
DESCRIPTION
|
22
|
-
s.homepage = "https://github.com/ruby/rake"
|
23
|
-
s.licenses = ["MIT"
|
23
|
+
s.homepage = "https://github.com/ruby/rake"
|
24
|
+
s.licenses = ["MIT"]
|
24
25
|
|
25
26
|
s.metadata = {
|
26
|
-
"bug_tracker_uri"
|
27
|
-
"changelog_uri"
|
27
|
+
"bug_tracker_uri" => "https://github.com/ruby/rake/issues",
|
28
|
+
"changelog_uri" => "https://github.com/ruby/rake/blob/v#{s.version}/History.rdoc",
|
28
29
|
"documentation_uri" => "https://ruby.github.io/rake",
|
29
|
-
"source_code_uri"
|
30
|
+
"source_code_uri" => "https://github.com/ruby/rake/tree/v#{s.version}"
|
30
31
|
}
|
31
32
|
|
32
33
|
s.files = [
|
@@ -93,8 +94,8 @@ Rake has the following features:
|
|
93
94
|
]
|
94
95
|
s.bindir = "exe"
|
95
96
|
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
96
|
-
s.require_paths = ["lib"
|
97
|
+
s.require_paths = ["lib"]
|
97
98
|
|
98
|
-
s.required_ruby_version = Gem::Requirement.new(">= 2.
|
99
|
-
s.rdoc_options = ["--main"
|
99
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.3")
|
100
|
+
s.rdoc_options = ["--main", "README.rdoc"]
|
100
101
|
end
|
metadata
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.
|
4
|
+
version: 13.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi SHIBATA
|
8
8
|
- Eric Hodel
|
9
9
|
- Jim Weirich
|
10
|
-
autorequire:
|
11
10
|
bindir: exe
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2024-04-05 00:00:00.000000000 Z
|
14
13
|
dependencies: []
|
15
14
|
description: |
|
16
15
|
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
|
@@ -96,10 +95,9 @@ licenses:
|
|
96
95
|
- MIT
|
97
96
|
metadata:
|
98
97
|
bug_tracker_uri: https://github.com/ruby/rake/issues
|
99
|
-
changelog_uri: https://github.com/ruby/rake/blob/v13.
|
98
|
+
changelog_uri: https://github.com/ruby/rake/blob/v13.2.1/History.rdoc
|
100
99
|
documentation_uri: https://ruby.github.io/rake
|
101
|
-
source_code_uri: https://github.com/ruby/rake/tree/v13.
|
102
|
-
post_install_message:
|
100
|
+
source_code_uri: https://github.com/ruby/rake/tree/v13.2.1
|
103
101
|
rdoc_options:
|
104
102
|
- "--main"
|
105
103
|
- README.rdoc
|
@@ -109,15 +107,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
107
|
requirements:
|
110
108
|
- - ">="
|
111
109
|
- !ruby/object:Gem::Version
|
112
|
-
version: '2.
|
110
|
+
version: '2.3'
|
113
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
112
|
requirements:
|
115
113
|
- - ">="
|
116
114
|
- !ruby/object:Gem::Version
|
117
115
|
version: '0'
|
118
116
|
requirements: []
|
119
|
-
rubygems_version: 3.
|
120
|
-
signing_key:
|
117
|
+
rubygems_version: 3.6.0.dev
|
121
118
|
specification_version: 4
|
122
119
|
summary: Rake is a Make-like program implemented in Ruby
|
123
120
|
test_files: []
|