rake 13.3.1 → 13.4.0
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/doc/command_line_usage.rdoc +4 -4
- data/doc/rakefile.rdoc +14 -1
- data/lib/rake/application.rb +7 -14
- data/lib/rake/file_utils.rb +8 -3
- data/lib/rake/file_utils_ext.rb +1 -0
- data/lib/rake/task_manager.rb +2 -0
- data/lib/rake/testtask.rb +1 -3
- data/lib/rake/version.rb +1 -1
- data/lib/rake/win32.rb +1 -35
- data/lib/rake.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 85f5ba92bb3bcf4a2a2c791c2c26009e75143bf70ac26dbc0b7f619fef4cafc1
|
|
4
|
+
data.tar.gz: c411a8b49c26d25f0560f7aa05889cc2f365d5caf6594e834eeeaa88354ae02c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc7a67e8481634df0077751f949abdeaab8af1a88dbb0880a4d2f3343e827ea6b1d72761b2005e2de723faa08d9948dc99deb87b8f9074f6f4cb959c637ed229
|
|
7
|
+
data.tar.gz: 7c1df4f498ef475b112491b3b6c15d032fdcf557313b85e2884901e2eb65ba35e48f8ebd6ddc61a11954a6fa68be8bbd6041f82ff11402967561d768587231e7
|
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.
|
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,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
require "optparse"
|
|
3
3
|
|
|
4
|
+
require_relative "options"
|
|
4
5
|
require_relative "task_manager"
|
|
5
6
|
require_relative "file_list"
|
|
6
7
|
require_relative "thread_pool"
|
|
@@ -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.
|
|
@@ -759,12 +754,10 @@ module Rake
|
|
|
759
754
|
end
|
|
760
755
|
|
|
761
756
|
# The standard directory containing system wide rake files.
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
else
|
|
767
|
-
def standard_system_dir #:nodoc:
|
|
757
|
+
def standard_system_dir #:nodoc:
|
|
758
|
+
if windows?
|
|
759
|
+
File.join(Dir.home, "Rake")
|
|
760
|
+
else
|
|
768
761
|
File.join(Dir.home, ".rake")
|
|
769
762
|
end
|
|
770
763
|
end
|
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
data/lib/rake/task_manager.rb
CHANGED
data/lib/rake/testtask.rb
CHANGED
|
@@ -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/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
|
@@ -43,6 +43,7 @@ require_relative "rake/rule_recursion_overflow_error"
|
|
|
43
43
|
require_relative "rake/rake_module"
|
|
44
44
|
require_relative "rake/trace_output"
|
|
45
45
|
require_relative "rake/pseudo_status"
|
|
46
|
+
require_relative "rake/options"
|
|
46
47
|
require_relative "rake/task_arguments"
|
|
47
48
|
require_relative "rake/invocation_chain"
|
|
48
49
|
require_relative "rake/task"
|
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.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hiroshi SHIBATA
|
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
114
114
|
- !ruby/object:Gem::Version
|
|
115
115
|
version: '0'
|
|
116
116
|
requirements: []
|
|
117
|
-
rubygems_version:
|
|
117
|
+
rubygems_version: 4.0.6
|
|
118
118
|
specification_version: 4
|
|
119
119
|
summary: Rake is a Make-like program implemented in Ruby
|
|
120
120
|
test_files: []
|