rake 13.2.1 → 13.4.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/History.rdoc +53 -2
- data/README.rdoc +5 -5
- data/doc/command_line_usage.rdoc +17 -4
- data/doc/rakefile.rdoc +14 -1
- data/lib/rake/application.rb +16 -30
- data/lib/rake/clean.rb +1 -1
- data/lib/rake/cpu_counter.rb +20 -5
- data/lib/rake/dsl_definition.rb +1 -1
- data/lib/rake/ext/string.rb +1 -1
- data/lib/rake/file_creation_task.rb +2 -2
- data/lib/rake/file_list.rb +3 -3
- data/lib/rake/file_task.rb +2 -2
- data/lib/rake/file_utils.rb +8 -3
- data/lib/rake/file_utils_ext.rb +2 -1
- data/lib/rake/options.rb +31 -0
- data/lib/rake/packagetask.rb +2 -2
- data/lib/rake/phony.rb +1 -1
- data/lib/rake/rake_test_loader.rb +1 -1
- data/lib/rake/task.rb +1 -1
- data/lib/rake/task_arguments.rb +4 -0
- data/lib/rake/task_manager.rb +4 -2
- data/lib/rake/tasklib.rb +1 -1
- data/lib/rake/testtask.rb +3 -5
- data/lib/rake/thread_history_display.rb +1 -1
- data/lib/rake/thread_pool.rb +2 -8
- data/lib/rake/version.rb +1 -1
- data/lib/rake/win32.rb +1 -35
- data/lib/rake.rb +28 -29
- data/rake.gemspec +3 -2
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 50b267edafff35a6c2aaa0fbd00616439ee8dff0c33311375becd913030a6849
|
|
4
|
+
data.tar.gz: 8ab984dd32f7ec784a579a2e8742e64cc054d8ca917bf7d5dedc55efc95bf328
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b94ffabd5d18c5f18d3377ecb26db69861dce0e431cb9f17bef0b27244064a28c0121efabbebc1a3eadfd8aa17d4ef81514c1fa21209b48f23585b43963b56a
|
|
7
|
+
data.tar.gz: 54a94802768ee7293c6476fcd2891b1b9e6592b8587f9020b5be939fabfd0b5857661e40800f5c4221eb8630312276dd6acb5791e801875393ca8a12d92911f9
|
data/History.rdoc
CHANGED
|
@@ -1,3 +1,54 @@
|
|
|
1
|
+
=== 13.2.1
|
|
2
|
+
|
|
3
|
+
* Suppressed "internal:array:52:in 'Array#each'" from backtrace by @hsbt in #554
|
|
4
|
+
* Bump actions/configure-pages from 4 to 5 by @dependabot in #553
|
|
5
|
+
|
|
6
|
+
=== 13.2.0
|
|
7
|
+
|
|
8
|
+
* Fix rule example to be correct by @zenspider in #525
|
|
9
|
+
* Switch to use test-unit by @hsbt in #536
|
|
10
|
+
* Removed redundant block by @hsbt in #537
|
|
11
|
+
* Use Struct instead of OpenStruct. by @hsbt in #545
|
|
12
|
+
* Accept FileList object as directory task's target by @gemmaro in #530
|
|
13
|
+
* Fix exception when exception has nil backtrace by @janbiedermann in #451
|
|
14
|
+
* Add TruffleRuby on CI by @andrykonchin in #551
|
|
15
|
+
|
|
16
|
+
=== 13.1.0
|
|
17
|
+
|
|
18
|
+
* Added dependabot.yml for actions by @hsbt in #416
|
|
19
|
+
* Add Ruby 3.1 to the CI matrix by @petergoldstein in #415
|
|
20
|
+
* (Performance) Remove unnecessary I/O syscalls for FileTasks by @da2x in #393
|
|
21
|
+
* Skip test failure with JRuby by @hsbt in #418
|
|
22
|
+
* Remove bin/rdoc by @tnir in #421
|
|
23
|
+
* Remove bin/rake by @tnir in #422
|
|
24
|
+
* Remove bin/bundle by @tnir in #425
|
|
25
|
+
* Apply RuboCop linting for Ruby 2.3 by @tnir in #423
|
|
26
|
+
* Update rubocop to work with Ruby 2.4 compatible by @tnir in #424
|
|
27
|
+
* chore: fix typo in comments by @tnir in #429
|
|
28
|
+
* Use 'test' as workflow name on Actions by @tnir in #427
|
|
29
|
+
* docs: update CONTRIBUTING.rdoc by @tnir in #428
|
|
30
|
+
* Add RuboCop job to Actions by @tnir in #426
|
|
31
|
+
* Lock minitest-5.15.0 for Ruby 2.2 by @hsbt in #442
|
|
32
|
+
* Eagerly require set in thread_pool.rb by @jeremyevans in #440
|
|
33
|
+
* Avoid creating an unnecessary thread pool by @jeremyevans in #441
|
|
34
|
+
* Add credit for maintenance in Rake 12/13 by @tnir in #443
|
|
35
|
+
* Sh fully echoes commands which error exit by @MarkDBlackwell in #147
|
|
36
|
+
* Correct RuboCop offenses by @deivid-rodriguez in #444
|
|
37
|
+
* [StepSecurity] ci: Harden GitHub Actions by @step-security-bot in #450
|
|
38
|
+
* Add ruby 3.2 to test matrix by @hanneskaeufler in #458
|
|
39
|
+
* Missing 'do' on example by @zzak in #467
|
|
40
|
+
* Try to use dependabot automerge by @hsbt in #470
|
|
41
|
+
* Rewrite auto-merge feature for dependabot by @hsbt in #471
|
|
42
|
+
* Update bundler in Dependabot by @ono-max in #472
|
|
43
|
+
* Fix grammar in help text by @mebezac in #381
|
|
44
|
+
* Try to use ruby/ruby/.github/workflows/ruby_versions.yml@master by @hsbt in #475
|
|
45
|
+
* Use GitHub Pages Action for generating rdoc page by @hsbt in #477
|
|
46
|
+
* Support #detailed_message when task failed by @ksss in #486
|
|
47
|
+
* Debug at stop when task fail by @ksss in #489
|
|
48
|
+
* Drop to support Ruby 2.2 by @hsbt in #492
|
|
49
|
+
* Bump up setup-ruby by @hsbt in #497
|
|
50
|
+
* Update development dependencies by @hsbt in #505
|
|
51
|
+
|
|
1
52
|
=== 13.0.6
|
|
2
53
|
|
|
3
54
|
* Additional fix for #389
|
|
@@ -37,7 +88,7 @@
|
|
|
37
88
|
|
|
38
89
|
==== Bug fixes
|
|
39
90
|
|
|
40
|
-
* Fixed bug: Reenabled task raises previous exception on second invokation
|
|
91
|
+
* Fixed bug: Reenabled task raises previous exception on second invokation
|
|
41
92
|
Pull Request #271 by thorsteneckel
|
|
42
93
|
* Fix an incorrectly resolved arg pattern
|
|
43
94
|
Pull Request #327 by mjbellantoni
|
|
@@ -48,7 +99,7 @@
|
|
|
48
99
|
|
|
49
100
|
* Follows recent changes on keyword arguments in ruby 2.7.
|
|
50
101
|
Pull Request #326 by nobu
|
|
51
|
-
* Make `PackageTask` be able to omit parent directory while packing files
|
|
102
|
+
* Make `PackageTask` be able to omit parent directory while packing files
|
|
52
103
|
Pull Request #310 by tonytonyjan
|
|
53
104
|
* Add order only dependency
|
|
54
105
|
Pull Request #269 by take-cheeze
|
data/README.rdoc
CHANGED
|
@@ -74,10 +74,10 @@ Type "rake --help" for all available options.
|
|
|
74
74
|
|
|
75
75
|
=== Rake Information
|
|
76
76
|
|
|
77
|
-
* {Rake command-line}[
|
|
78
|
-
* {Writing Rakefiles}[
|
|
79
|
-
* The original {Rake announcement}[
|
|
80
|
-
* Rake {glossary}[
|
|
77
|
+
* {Rake command-line}[rdoc-ref:doc/command_line_usage.rdoc]
|
|
78
|
+
* {Writing Rakefiles}[rdoc-ref:doc/rakefile.rdoc]
|
|
79
|
+
* The original {Rake announcement}[rdoc-ref:doc/rational.rdoc]
|
|
80
|
+
* Rake {glossary}[rdoc-ref:doc/glossary.rdoc]
|
|
81
81
|
|
|
82
82
|
=== Presentations and Articles about Rake
|
|
83
83
|
|
|
@@ -148,7 +148,7 @@ February 2014. This repository was originally hosted at
|
|
|
148
148
|
with his passing, has been moved to {ruby/rake}[https://github.com/ruby/rake].
|
|
149
149
|
|
|
150
150
|
You can view Jim's last commit here:
|
|
151
|
-
https://github.com/jimweirich/rake/
|
|
151
|
+
https://github.com/jimweirich/rake/commit/336559f28f55bce418e2ebcc0a57548dcbac4025
|
|
152
152
|
|
|
153
153
|
You can {read more about Jim}[https://en.wikipedia.org/wiki/Jim_Weirich] at Wikipedia.
|
|
154
154
|
|
data/doc/command_line_usage.rdoc
CHANGED
|
@@ -6,10 +6,10 @@ Rake is invoked from the command line using:
|
|
|
6
6
|
|
|
7
7
|
Options are:
|
|
8
8
|
|
|
9
|
-
[<tt
|
|
9
|
+
[<tt>name=value</tt>]
|
|
10
10
|
Set the environment variable <em>name</em> to <em>value</em>
|
|
11
11
|
during the execution of the <b>rake</b> command. You can access
|
|
12
|
-
the value by using ENV['
|
|
12
|
+
the value by using <tt>ENV['name']</tt>.
|
|
13
13
|
|
|
14
14
|
[<tt>--all</tt> (-A)]
|
|
15
15
|
Used in combination with the -T and -D options, will force
|
|
@@ -105,12 +105,12 @@ Options are:
|
|
|
105
105
|
Require _name_ before executing the Rakefile.
|
|
106
106
|
|
|
107
107
|
[<tt>--rules</tt>]
|
|
108
|
-
Trace the rules
|
|
108
|
+
Trace the resolution of rules used to create tasks.
|
|
109
109
|
|
|
110
110
|
[<tt>--silent (-s)</tt>]
|
|
111
111
|
Like --quiet, but also suppresses the 'in directory' announcement.
|
|
112
112
|
|
|
113
|
-
[<tt>--suppress-backtrace
|
|
113
|
+
[<tt>--suppress-backtrace</tt> _pattern_]
|
|
114
114
|
Line matching the regular expression _pattern_ will be removed
|
|
115
115
|
from the backtrace output. Note that the --backtrace option is the
|
|
116
116
|
full backtrace without these lines suppressed.
|
|
@@ -153,6 +153,19 @@ Options are:
|
|
|
153
153
|
[<tt>--no-deprecation-warnings</tt> (-X)]
|
|
154
154
|
Do not display the deprecation warnings.
|
|
155
155
|
|
|
156
|
+
== Environment Variables
|
|
157
|
+
|
|
158
|
+
[<tt>RAKEOPT</tt>]
|
|
159
|
+
Command line options can be specified in the <tt>RAKEOPT</tt>
|
|
160
|
+
environment variable. These options will be processed as if they
|
|
161
|
+
were given on the command line. This is useful for setting default
|
|
162
|
+
options that you want to use with every rake invocation.
|
|
163
|
+
|
|
164
|
+
For example, setting:
|
|
165
|
+
export RAKEOPT="-s --trace"
|
|
166
|
+
|
|
167
|
+
would cause rake to run silently with tracing enabled by default.
|
|
168
|
+
|
|
156
169
|
In addition, any command line option of the form
|
|
157
170
|
<em>VAR</em>=<em>VALUE</em> will be added to the environment hash
|
|
158
171
|
<tt>ENV</tt> and may be tested in the Rakefile.
|
data/doc/rakefile.rdoc
CHANGED
|
@@ -30,7 +30,7 @@ parameter that is the name of the task.
|
|
|
30
30
|
Any prerequisites are given as a list (enclosed in square brackets)
|
|
31
31
|
following the name and an arrow (=>).
|
|
32
32
|
|
|
33
|
-
task name
|
|
33
|
+
task :name => [:prereq1, :prereq2]
|
|
34
34
|
|
|
35
35
|
*NOTE:* Although this syntax looks a little funky, it is legal
|
|
36
36
|
Ruby. We are constructing a hash where the key is :name and the value
|
|
@@ -360,6 +360,19 @@ The following rule might be used for Java files ...
|
|
|
360
360
|
*NOTE:* +java_compile+ is a hypothetical method that invokes the
|
|
361
361
|
java compiler.
|
|
362
362
|
|
|
363
|
+
=== Implicit File Tasks
|
|
364
|
+
|
|
365
|
+
When a task is not defined but a file with that name exists, Rake
|
|
366
|
+
automatically creates an implicit file task for it. For example:
|
|
367
|
+
|
|
368
|
+
$ rake hello_world # Error: task not found
|
|
369
|
+
$ touch hello_world # Create a file with the same name
|
|
370
|
+
$ rake hello_world # Now succeeds automatically
|
|
371
|
+
|
|
372
|
+
Use the <tt>--rules</tt> command line option to trace how rules are
|
|
373
|
+
resolved when searching for tasks; note that creation of implicit file
|
|
374
|
+
tasks is not traced.
|
|
375
|
+
|
|
363
376
|
== Importing Dependencies
|
|
364
377
|
|
|
365
378
|
Any ruby file (including other rakefiles) can be included with a
|
data/lib/rake/application.rb
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
require "optparse"
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
require_relative "options"
|
|
5
|
+
require_relative "task_manager"
|
|
6
|
+
require_relative "file_list"
|
|
7
|
+
require_relative "thread_pool"
|
|
8
|
+
require_relative "thread_history_display"
|
|
9
|
+
require_relative "trace_output"
|
|
10
|
+
require_relative "win32"
|
|
10
11
|
|
|
11
12
|
module Rake
|
|
12
13
|
|
|
@@ -145,7 +146,7 @@ module Rake
|
|
|
145
146
|
thread_pool.gather_history if options.job_stats == :history
|
|
146
147
|
|
|
147
148
|
yield
|
|
148
|
-
|
|
149
|
+
ensure
|
|
149
150
|
thread_pool.join if defined?(@thread_pool)
|
|
150
151
|
if options.job_stats
|
|
151
152
|
stats = thread_pool.statistics
|
|
@@ -165,13 +166,7 @@ module Rake
|
|
|
165
166
|
|
|
166
167
|
# Application options from the command line
|
|
167
168
|
def options
|
|
168
|
-
@options ||=
|
|
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
|
|
169
|
+
@options ||= Options.new
|
|
175
170
|
end
|
|
176
171
|
|
|
177
172
|
# Return the thread pool used for multithreaded processing.
|
|
@@ -691,7 +686,7 @@ module Rake
|
|
|
691
686
|
|
|
692
687
|
# Similar to the regular Ruby +require+ command, but will check
|
|
693
688
|
# for *.rake files in addition to *.rb files.
|
|
694
|
-
def rake_require(file_name, paths=$LOAD_PATH, loaded=$
|
|
689
|
+
def rake_require(file_name, paths=$LOAD_PATH, loaded=$LOADED_FEATURES) # :nodoc:
|
|
695
690
|
fn = file_name + ".rake"
|
|
696
691
|
return false if loaded.include?(fn)
|
|
697
692
|
paths.each do |path|
|
|
@@ -755,24 +750,15 @@ module Rake
|
|
|
755
750
|
|
|
756
751
|
# The directory path containing the system wide rakefiles.
|
|
757
752
|
def system_dir # :nodoc:
|
|
758
|
-
@system_dir ||=
|
|
759
|
-
begin
|
|
760
|
-
if ENV["RAKE_SYSTEM"]
|
|
761
|
-
ENV["RAKE_SYSTEM"]
|
|
762
|
-
else
|
|
763
|
-
standard_system_dir
|
|
764
|
-
end
|
|
765
|
-
end
|
|
753
|
+
@system_dir ||= ENV["RAKE_SYSTEM"] || standard_system_dir
|
|
766
754
|
end
|
|
767
755
|
|
|
768
756
|
# The standard directory containing system wide rake files.
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
def standard_system_dir #:nodoc:
|
|
775
|
-
File.join(File.expand_path("~"), ".rake")
|
|
757
|
+
def standard_system_dir #:nodoc:
|
|
758
|
+
if windows?
|
|
759
|
+
File.join(Dir.home, "Rake")
|
|
760
|
+
else
|
|
761
|
+
File.join(Dir.home, ".rake")
|
|
776
762
|
end
|
|
777
763
|
end
|
|
778
764
|
private :standard_system_dir
|
data/lib/rake/clean.rb
CHANGED
data/lib/rake/cpu_counter.rb
CHANGED
|
@@ -58,11 +58,20 @@ unless Rake::CpuCounter.method_defined?(:count)
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def count_via_win32
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
# Get-CimInstance introduced in PowerShell 3 or earlier: https://learn.microsoft.com/en-us/previous-versions/powershell/module/cimcmdlets/get-ciminstance?view=powershell-3.0
|
|
62
|
+
result = run_win32(
|
|
63
|
+
'powershell -command "Get-CimInstance -ClassName Win32_Processor -Property NumberOfCores ' \
|
|
64
|
+
'| Select-Object -Property NumberOfCores"'
|
|
65
|
+
)
|
|
66
|
+
if !result || $?.exitstatus != 0
|
|
67
|
+
# fallback to deprecated wmic for older systems
|
|
68
|
+
result = run_win32("wmic cpu get NumberOfCores")
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# powershell: "\nNumberOfCores\n-------------\n 4\n\n\n"
|
|
72
|
+
# wmic: "NumberOfCores \n\n4 \n\n\n\n"
|
|
73
|
+
result.scan(/\d+/).map(&:to_i).reduce(:+) if result
|
|
74
|
+
rescue StandardError
|
|
66
75
|
nil
|
|
67
76
|
end
|
|
68
77
|
|
|
@@ -87,6 +96,12 @@ unless Rake::CpuCounter.method_defined?(:count)
|
|
|
87
96
|
end
|
|
88
97
|
end
|
|
89
98
|
|
|
99
|
+
def run_win32(command, *args)
|
|
100
|
+
IO.popen(command, &:read)
|
|
101
|
+
rescue Errno::ENOENT
|
|
102
|
+
nil
|
|
103
|
+
end
|
|
104
|
+
|
|
90
105
|
def resolve_command(command)
|
|
91
106
|
look_for_command("/usr/sbin", command) ||
|
|
92
107
|
look_for_command("/sbin", command) ||
|
data/lib/rake/dsl_definition.rb
CHANGED
data/lib/rake/ext/string.rb
CHANGED
data/lib/rake/file_list.rb
CHANGED
data/lib/rake/file_task.rb
CHANGED
data/lib/rake/file_utils.rb
CHANGED
|
@@ -48,7 +48,7 @@ module FileUtils
|
|
|
48
48
|
verbose = options.delete :verbose
|
|
49
49
|
noop = options.delete(:noop) || Rake::FileUtilsExt.nowrite_flag
|
|
50
50
|
|
|
51
|
-
Rake.rake_output_message sh_show_command
|
|
51
|
+
Rake.rake_output_message sh_show_command(cmd, options) if verbose
|
|
52
52
|
|
|
53
53
|
unless noop
|
|
54
54
|
res = (Hash === cmd.last) ? system(*cmd) : system(*cmd, options)
|
|
@@ -68,7 +68,7 @@ module FileUtils
|
|
|
68
68
|
end
|
|
69
69
|
private :create_shell_runner
|
|
70
70
|
|
|
71
|
-
def sh_show_command(cmd) # :nodoc:
|
|
71
|
+
def sh_show_command(cmd, options = nil) # :nodoc:
|
|
72
72
|
cmd = cmd.dup
|
|
73
73
|
|
|
74
74
|
if Hash === cmd.first
|
|
@@ -77,7 +77,12 @@ module FileUtils
|
|
|
77
77
|
cmd[0] = env
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
-
cmd.join " "
|
|
80
|
+
cmd = cmd.join " "
|
|
81
|
+
if options and chdir = options[:chdir]
|
|
82
|
+
"(cd #{chdir} && #{cmd})"
|
|
83
|
+
else
|
|
84
|
+
cmd
|
|
85
|
+
end
|
|
81
86
|
end
|
|
82
87
|
private :sh_show_command
|
|
83
88
|
|
data/lib/rake/file_utils_ext.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
require_relative "file_utils"
|
|
3
3
|
|
|
4
4
|
module Rake
|
|
5
5
|
#
|
|
@@ -53,6 +53,7 @@ module Rake
|
|
|
53
53
|
def verbose(value=nil)
|
|
54
54
|
oldvalue = FileUtilsExt.verbose_flag
|
|
55
55
|
FileUtilsExt.verbose_flag = value unless value.nil?
|
|
56
|
+
ENV["TESTOPTS"] = "-v" if value
|
|
56
57
|
if block_given?
|
|
57
58
|
begin
|
|
58
59
|
yield
|
data/lib/rake/options.rb
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Rake
|
|
4
|
+
|
|
5
|
+
##
|
|
6
|
+
# Options used by the Rake command line application.
|
|
7
|
+
#
|
|
8
|
+
class Options
|
|
9
|
+
attr_accessor :always_multitask
|
|
10
|
+
attr_accessor :backtrace
|
|
11
|
+
attr_accessor :build_all
|
|
12
|
+
attr_accessor :dryrun
|
|
13
|
+
attr_accessor :ignore_deprecate
|
|
14
|
+
attr_accessor :ignore_system
|
|
15
|
+
attr_accessor :job_stats
|
|
16
|
+
attr_accessor :load_system
|
|
17
|
+
attr_accessor :nosearch
|
|
18
|
+
attr_accessor :rakelib
|
|
19
|
+
attr_accessor :show_all_tasks
|
|
20
|
+
attr_accessor :show_prereqs
|
|
21
|
+
attr_accessor :show_task_pattern
|
|
22
|
+
attr_accessor :show_tasks
|
|
23
|
+
attr_accessor :silent
|
|
24
|
+
attr_accessor :suppress_backtrace_pattern
|
|
25
|
+
attr_accessor :thread_pool_size
|
|
26
|
+
attr_accessor :trace
|
|
27
|
+
attr_accessor :trace_output
|
|
28
|
+
attr_accessor :trace_rules
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
data/lib/rake/packagetask.rb
CHANGED
data/lib/rake/phony.rb
CHANGED
data/lib/rake/task.rb
CHANGED
data/lib/rake/task_arguments.rb
CHANGED
data/lib/rake/task_manager.rb
CHANGED
|
@@ -35,7 +35,7 @@ module Rake
|
|
|
35
35
|
task.set_arg_names(arg_names) unless arg_names.empty?
|
|
36
36
|
if Rake::TaskManager.record_task_metadata
|
|
37
37
|
add_location(task)
|
|
38
|
-
task.add_description(get_description
|
|
38
|
+
task.add_description(get_description)
|
|
39
39
|
end
|
|
40
40
|
task.enhance(Task.format_deps(deps), &block)
|
|
41
41
|
task | order_only unless order_only.nil?
|
|
@@ -302,6 +302,8 @@ module Rake
|
|
|
302
302
|
source == ext ? task_name.ext(ext) : source
|
|
303
303
|
when String, Symbol
|
|
304
304
|
ext.to_s
|
|
305
|
+
when Pathname
|
|
306
|
+
Rake.from_pathname(ext)
|
|
305
307
|
when Proc, Method
|
|
306
308
|
if ext.arity == 1
|
|
307
309
|
ext.call(task_name)
|
|
@@ -316,7 +318,7 @@ module Rake
|
|
|
316
318
|
end
|
|
317
319
|
|
|
318
320
|
# Return the current description, clearing it in the process.
|
|
319
|
-
def get_description
|
|
321
|
+
def get_description
|
|
320
322
|
desc = @last_description
|
|
321
323
|
@last_description = nil
|
|
322
324
|
desc
|
data/lib/rake/tasklib.rb
CHANGED
data/lib/rake/testtask.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
require_relative "../rake"
|
|
3
|
+
require_relative "tasklib"
|
|
4
4
|
|
|
5
5
|
module Rake
|
|
6
6
|
|
|
@@ -109,8 +109,6 @@ module Rake
|
|
|
109
109
|
desc @description
|
|
110
110
|
task @name => Array(deps) do
|
|
111
111
|
FileUtilsExt.verbose(@verbose) do
|
|
112
|
-
puts "Use TESTOPTS=\"--verbose\" to pass --verbose" \
|
|
113
|
-
", etc. to runners." if ARGV.include? "--verbose"
|
|
114
112
|
args =
|
|
115
113
|
"#{ruby_opts_string} #{run_code} " +
|
|
116
114
|
"#{file_list_string} #{option_list}"
|
|
@@ -161,7 +159,7 @@ module Rake
|
|
|
161
159
|
|
|
162
160
|
def file_list # :nodoc:
|
|
163
161
|
if ENV["TEST"]
|
|
164
|
-
FileList[ENV["TEST"]]
|
|
162
|
+
FileList[ENV["TEST"].split(",")]
|
|
165
163
|
else
|
|
166
164
|
result = []
|
|
167
165
|
result += @test_files.to_a if @test_files
|
data/lib/rake/thread_pool.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require_relative "promise"
|
|
4
4
|
require "set"
|
|
5
5
|
|
|
6
6
|
module Rake
|
|
@@ -108,19 +108,13 @@ module Rake
|
|
|
108
108
|
false
|
|
109
109
|
end
|
|
110
110
|
|
|
111
|
-
def safe_thread_count
|
|
112
|
-
@threads_mon.synchronize do
|
|
113
|
-
@threads.count
|
|
114
|
-
end
|
|
115
|
-
end
|
|
116
|
-
|
|
117
111
|
def start_thread # :nodoc:
|
|
118
112
|
@threads_mon.synchronize do
|
|
119
113
|
next unless @threads.count < @max_active_threads
|
|
120
114
|
|
|
121
115
|
t = Thread.new do
|
|
122
116
|
begin
|
|
123
|
-
|
|
117
|
+
loop do
|
|
124
118
|
break unless process_queue_item
|
|
125
119
|
end
|
|
126
120
|
ensure
|
data/lib/rake/version.rb
CHANGED
data/lib/rake/win32.rb
CHANGED
|
@@ -6,46 +6,12 @@ module Rake
|
|
|
6
6
|
# will be placed here to collect that knowledge in one spot.
|
|
7
7
|
module Win32 # :nodoc: all
|
|
8
8
|
|
|
9
|
-
# Error indicating a problem in locating the home directory on a
|
|
10
|
-
# Win32 system.
|
|
11
|
-
class Win32HomeError < RuntimeError
|
|
12
|
-
end
|
|
13
|
-
|
|
14
9
|
class << self
|
|
15
10
|
# True if running on a windows system.
|
|
16
11
|
def windows?
|
|
17
12
|
RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw|[Ww]indows)!
|
|
18
13
|
end
|
|
19
|
-
|
|
20
|
-
# The standard directory containing system wide rake files on
|
|
21
|
-
# Win 32 systems. Try the following environment variables (in
|
|
22
|
-
# order):
|
|
23
|
-
#
|
|
24
|
-
# * HOME
|
|
25
|
-
# * HOMEDRIVE + HOMEPATH
|
|
26
|
-
# * APPDATA
|
|
27
|
-
# * USERPROFILE
|
|
28
|
-
#
|
|
29
|
-
# If the above are not defined, the return nil.
|
|
30
|
-
def win32_system_dir #:nodoc:
|
|
31
|
-
win32_shared_path = ENV["HOME"]
|
|
32
|
-
if win32_shared_path.nil? && ENV["HOMEDRIVE"] && ENV["HOMEPATH"]
|
|
33
|
-
win32_shared_path = ENV["HOMEDRIVE"] + ENV["HOMEPATH"]
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
win32_shared_path ||= ENV["APPDATA"]
|
|
37
|
-
win32_shared_path ||= ENV["USERPROFILE"]
|
|
38
|
-
raise Win32HomeError,
|
|
39
|
-
"Unable to determine home path environment variable." if
|
|
40
|
-
win32_shared_path.nil? or win32_shared_path.empty?
|
|
41
|
-
normalize(File.join(win32_shared_path, "Rake"))
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# Normalize a win32 path so that the slashes are all forward slashes.
|
|
45
|
-
def normalize(path)
|
|
46
|
-
path.gsub(/\\/, "/")
|
|
47
|
-
end
|
|
48
|
-
|
|
49
14
|
end
|
|
15
|
+
|
|
50
16
|
end
|
|
51
17
|
end
|
data/lib/rake.rb
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
module Rake; end
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
require_relative "rake/version"
|
|
27
27
|
|
|
28
28
|
require "rbconfig"
|
|
29
29
|
require "fileutils"
|
|
@@ -31,36 +31,35 @@ require "singleton"
|
|
|
31
31
|
require "monitor"
|
|
32
32
|
require "optparse"
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
require_relative "rake/ext/string"
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
require_relative "rake/win32"
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
$trace = false
|
|
38
|
+
require_relative "rake/linked_list"
|
|
39
|
+
require_relative "rake/cpu_counter"
|
|
40
|
+
require_relative "rake/scope"
|
|
41
|
+
require_relative "rake/task_argument_error"
|
|
42
|
+
require_relative "rake/rule_recursion_overflow_error"
|
|
43
|
+
require_relative "rake/rake_module"
|
|
44
|
+
require_relative "rake/trace_output"
|
|
45
|
+
require_relative "rake/pseudo_status"
|
|
46
|
+
require_relative "rake/options"
|
|
47
|
+
require_relative "rake/task_arguments"
|
|
48
|
+
require_relative "rake/invocation_chain"
|
|
49
|
+
require_relative "rake/task"
|
|
50
|
+
require_relative "rake/file_task"
|
|
51
|
+
require_relative "rake/file_creation_task"
|
|
52
|
+
require_relative "rake/multi_task"
|
|
53
|
+
require_relative "rake/dsl_definition"
|
|
54
|
+
require_relative "rake/file_utils_ext"
|
|
55
|
+
require_relative "rake/file_list"
|
|
56
|
+
require_relative "rake/default_loader"
|
|
57
|
+
require_relative "rake/early_time"
|
|
58
|
+
require_relative "rake/late_time"
|
|
59
|
+
require_relative "rake/name_space"
|
|
60
|
+
require_relative "rake/task_manager"
|
|
61
|
+
require_relative "rake/application"
|
|
62
|
+
require_relative "rake/backtrace"
|
|
64
63
|
|
|
65
64
|
# :stopdoc:
|
|
66
65
|
#
|
data/rake.gemspec
CHANGED
|
@@ -25,9 +25,9 @@ Gem::Specification.new do |s|
|
|
|
25
25
|
|
|
26
26
|
s.metadata = {
|
|
27
27
|
"bug_tracker_uri" => "https://github.com/ruby/rake/issues",
|
|
28
|
-
"changelog_uri" => "https://github.com/ruby/rake/
|
|
28
|
+
"changelog_uri" => "https://github.com/ruby/rake/releases",
|
|
29
29
|
"documentation_uri" => "https://ruby.github.io/rake",
|
|
30
|
-
"source_code_uri" =>
|
|
30
|
+
"source_code_uri" => s.homepage
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
s.files = [
|
|
@@ -70,6 +70,7 @@ Gem::Specification.new do |s|
|
|
|
70
70
|
"lib/rake/loaders/makefile.rb",
|
|
71
71
|
"lib/rake/multi_task.rb",
|
|
72
72
|
"lib/rake/name_space.rb",
|
|
73
|
+
"lib/rake/options.rb",
|
|
73
74
|
"lib/rake/packagetask.rb",
|
|
74
75
|
"lib/rake/phony.rb",
|
|
75
76
|
"lib/rake/private_reader.rb",
|
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: 13.
|
|
4
|
+
version: 13.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hiroshi SHIBATA
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
- Jim Weirich
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: |
|
|
15
15
|
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
|
|
@@ -69,6 +69,7 @@ files:
|
|
|
69
69
|
- lib/rake/loaders/makefile.rb
|
|
70
70
|
- lib/rake/multi_task.rb
|
|
71
71
|
- lib/rake/name_space.rb
|
|
72
|
+
- lib/rake/options.rb
|
|
72
73
|
- lib/rake/packagetask.rb
|
|
73
74
|
- lib/rake/phony.rb
|
|
74
75
|
- lib/rake/private_reader.rb
|
|
@@ -95,9 +96,9 @@ licenses:
|
|
|
95
96
|
- MIT
|
|
96
97
|
metadata:
|
|
97
98
|
bug_tracker_uri: https://github.com/ruby/rake/issues
|
|
98
|
-
changelog_uri: https://github.com/ruby/rake/
|
|
99
|
+
changelog_uri: https://github.com/ruby/rake/releases
|
|
99
100
|
documentation_uri: https://ruby.github.io/rake
|
|
100
|
-
source_code_uri: https://github.com/ruby/rake
|
|
101
|
+
source_code_uri: https://github.com/ruby/rake
|
|
101
102
|
rdoc_options:
|
|
102
103
|
- "--main"
|
|
103
104
|
- README.rdoc
|
|
@@ -114,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
114
115
|
- !ruby/object:Gem::Version
|
|
115
116
|
version: '0'
|
|
116
117
|
requirements: []
|
|
117
|
-
rubygems_version:
|
|
118
|
+
rubygems_version: 4.0.6
|
|
118
119
|
specification_version: 4
|
|
119
120
|
summary: Rake is a Make-like program implemented in Ruby
|
|
120
121
|
test_files: []
|