rake 12.3.1 → 12.3.2
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 +4 -4
- data/CONTRIBUTING.rdoc +11 -4
- data/History.rdoc +16 -0
- data/README.rdoc +4 -4
- data/bin/bundle +105 -0
- data/bin/rake +29 -0
- data/bin/rdoc +29 -0
- data/bin/rubocop +29 -0
- data/lib/rake/application.rb +4 -4
- data/lib/rake/cpu_counter.rb +1 -1
- data/lib/rake/dsl_definition.rb +3 -3
- data/lib/rake/file_creation_task.rb +1 -1
- data/lib/rake/file_list.rb +1 -1
- data/lib/rake/file_task.rb +2 -2
- data/lib/rake/file_utils.rb +2 -2
- data/lib/rake/packagetask.rb +2 -6
- data/lib/rake/promise.rb +2 -2
- data/lib/rake/scope.rb +1 -1
- data/lib/rake/task.rb +4 -2
- data/lib/rake/task_manager.rb +1 -1
- data/lib/rake/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99ff54932cfc348c5536806e90de3ad7ff47a67dfd2499eef46e29d616ed0e61
|
4
|
+
data.tar.gz: f9687a6a1790750b5301e0df314f9c6715123913e82eefdc99aa658bb5b2494f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deac7dec6000ea0ecd3b48c5af16281ab442edce63576dc85d62cb77de7b7b742530d2006bdeb2269fc7dc5c8efbfcebe9e681d7f3f60b548865abe9a62b30f7
|
7
|
+
data.tar.gz: 997176963c950b687defab8cb5a62c45807887efb1631dd6b1a593b16a094c18f26211ba57e28a49db804976fb8588dbaf0a27cc5156c1ea4908a275b43bc350
|
data/CONTRIBUTING.rdoc
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Rake is currently hosted at github. The github web page is
|
4
4
|
https://github.com/ruby/rake . The public git clone URL is
|
5
5
|
|
6
|
-
|
6
|
+
https://github.com/ruby/rake.git
|
7
7
|
|
8
8
|
= Running the Rake Test Suite
|
9
9
|
|
@@ -12,11 +12,18 @@ If you wish to run the unit and functional tests that come with Rake:
|
|
12
12
|
* +cd+ into the top project directory of rake.
|
13
13
|
* Install gem dependency using bundler:
|
14
14
|
|
15
|
-
bundle install # Install bundler, minitest and rdoc
|
15
|
+
$ bundle install # Install bundler, minitest and rdoc
|
16
16
|
|
17
|
-
*
|
17
|
+
* Run the test suite
|
18
18
|
|
19
|
-
|
19
|
+
$ rake
|
20
|
+
|
21
|
+
= Rubocop
|
22
|
+
|
23
|
+
Rake uses Rubocop to enforce a consistent style on new changes being
|
24
|
+
proposed. You can check your code with Rubocop using:
|
25
|
+
|
26
|
+
$ ./bin/rubocop
|
20
27
|
|
21
28
|
= Issues and Bug Reports
|
22
29
|
|
data/History.rdoc
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
=== 12.3.2
|
2
|
+
|
3
|
+
==== Bug fixes
|
4
|
+
|
5
|
+
* Fixed test fails caused by 2.6 warnings.
|
6
|
+
Pull Request #297 by hsbt
|
7
|
+
|
8
|
+
==== Enhancements:
|
9
|
+
|
10
|
+
* Rdoc improvements.
|
11
|
+
Pull Request #293 by colby-swandale
|
12
|
+
* Improve multitask performance.
|
13
|
+
Pull Request #273 by jsm
|
14
|
+
* Add alias `prereqs`.
|
15
|
+
Pull Request #268 by take-cheeze
|
16
|
+
|
1
17
|
=== 12.3.1
|
2
18
|
|
3
19
|
==== Bug fixes
|
data/README.rdoc
CHANGED
@@ -75,10 +75,10 @@ Type "rake --help" for all available options.
|
|
75
75
|
|
76
76
|
=== Rake Information
|
77
77
|
|
78
|
-
* {Rake command-line}[
|
79
|
-
* {Writing Rakefiles}[
|
80
|
-
* The original {Rake announcement}[
|
81
|
-
* Rake {glossary}[
|
78
|
+
* {Rake command-line}[link:doc/command_line_usage.rdoc]
|
79
|
+
* {Writing Rakefiles}[link:doc/rakefile.rdoc]
|
80
|
+
* The original {Rake announcement}[link:doc/rational.rdoc]
|
81
|
+
* Rake {glossary}[link:doc/glossary.rdoc]
|
82
82
|
|
83
83
|
=== Presentations and Articles about Rake
|
84
84
|
|
data/bin/bundle
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'bundle' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "rubygems"
|
12
|
+
|
13
|
+
m = Module.new do
|
14
|
+
module_function
|
15
|
+
|
16
|
+
def invoked_as_script?
|
17
|
+
File.expand_path($0) == File.expand_path(__FILE__)
|
18
|
+
end
|
19
|
+
|
20
|
+
def env_var_version
|
21
|
+
ENV["BUNDLER_VERSION"]
|
22
|
+
end
|
23
|
+
|
24
|
+
def cli_arg_version
|
25
|
+
return unless invoked_as_script? # don't want to hijack other binstubs
|
26
|
+
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
27
|
+
bundler_version = nil
|
28
|
+
update_index = nil
|
29
|
+
ARGV.each_with_index do |a, i|
|
30
|
+
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
31
|
+
bundler_version = a
|
32
|
+
end
|
33
|
+
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
|
34
|
+
bundler_version = $1 || ">= 0.a"
|
35
|
+
update_index = i
|
36
|
+
end
|
37
|
+
bundler_version
|
38
|
+
end
|
39
|
+
|
40
|
+
def gemfile
|
41
|
+
gemfile = ENV["BUNDLE_GEMFILE"]
|
42
|
+
return gemfile if gemfile && !gemfile.empty?
|
43
|
+
|
44
|
+
File.expand_path("../../Gemfile", __FILE__)
|
45
|
+
end
|
46
|
+
|
47
|
+
def lockfile
|
48
|
+
lockfile =
|
49
|
+
case File.basename(gemfile)
|
50
|
+
when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
|
51
|
+
else "#{gemfile}.lock"
|
52
|
+
end
|
53
|
+
File.expand_path(lockfile)
|
54
|
+
end
|
55
|
+
|
56
|
+
def lockfile_version
|
57
|
+
return unless File.file?(lockfile)
|
58
|
+
lockfile_contents = File.read(lockfile)
|
59
|
+
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
60
|
+
Regexp.last_match(1)
|
61
|
+
end
|
62
|
+
|
63
|
+
def bundler_version
|
64
|
+
@bundler_version ||= begin
|
65
|
+
env_var_version || cli_arg_version ||
|
66
|
+
lockfile_version || "#{Gem::Requirement.default}.a"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def load_bundler!
|
71
|
+
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
72
|
+
|
73
|
+
# must dup string for RG < 1.8 compatibility
|
74
|
+
activate_bundler(bundler_version.dup)
|
75
|
+
end
|
76
|
+
|
77
|
+
def activate_bundler(bundler_version)
|
78
|
+
if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
|
79
|
+
bundler_version = "< 2"
|
80
|
+
end
|
81
|
+
gem_error = activation_error_handling do
|
82
|
+
gem "bundler", bundler_version
|
83
|
+
end
|
84
|
+
return if gem_error.nil?
|
85
|
+
require_error = activation_error_handling do
|
86
|
+
require "bundler/version"
|
87
|
+
end
|
88
|
+
return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION))
|
89
|
+
warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`"
|
90
|
+
exit 42
|
91
|
+
end
|
92
|
+
|
93
|
+
def activation_error_handling
|
94
|
+
yield
|
95
|
+
nil
|
96
|
+
rescue StandardError, LoadError => e
|
97
|
+
e
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
m.load_bundler!
|
102
|
+
|
103
|
+
if m.invoked_as_script?
|
104
|
+
load Gem.bin_path("bundler", "bundle")
|
105
|
+
end
|
data/bin/rake
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rake' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rake", "rake")
|
data/bin/rdoc
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rdoc' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rdoc", "rdoc")
|
data/bin/rubocop
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rubocop' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rubocop", "rubocop")
|
data/lib/rake/application.rb
CHANGED
@@ -91,7 +91,7 @@ module Rake
|
|
91
91
|
begin
|
92
92
|
args = handle_options argv
|
93
93
|
rescue ArgumentError
|
94
|
-
#
|
94
|
+
# Backward compatibility for capistrano
|
95
95
|
args = handle_options
|
96
96
|
end
|
97
97
|
collect_command_line_tasks(args)
|
@@ -392,7 +392,7 @@ module Rake
|
|
392
392
|
|
393
393
|
def sort_options(options) # :nodoc:
|
394
394
|
options.sort_by { |opt|
|
395
|
-
opt.select { |o| o =~ /^-/ }.map(&:downcase).sort.reverse
|
395
|
+
opt.select { |o| o.is_a?(String) && o =~ /^-/ }.map(&:downcase).sort.reverse
|
396
396
|
}
|
397
397
|
end
|
398
398
|
private :sort_options
|
@@ -687,7 +687,7 @@ module Rake
|
|
687
687
|
|
688
688
|
def raw_load_rakefile # :nodoc:
|
689
689
|
rakefile, location = find_rakefile_location
|
690
|
-
if (!
|
690
|
+
if (!options.ignore_system) &&
|
691
691
|
(options.load_system || rakefile.nil?) &&
|
692
692
|
system_dir && File.directory?(system_dir)
|
693
693
|
print_rakefile_directory(location)
|
@@ -797,7 +797,7 @@ module Rake
|
|
797
797
|
backtrace.find { |str| str =~ re } || ""
|
798
798
|
end
|
799
799
|
|
800
|
-
def set_default_options
|
800
|
+
def set_default_options # :nodoc:
|
801
801
|
options.always_multitask = false
|
802
802
|
options.backtrace = false
|
803
803
|
options.build_all = false
|
data/lib/rake/cpu_counter.rb
CHANGED
data/lib/rake/dsl_definition.rb
CHANGED
@@ -26,9 +26,9 @@ module Rake
|
|
26
26
|
private
|
27
27
|
|
28
28
|
# :call-seq:
|
29
|
-
# task
|
30
|
-
# task
|
31
|
-
# task
|
29
|
+
# task(task_name)
|
30
|
+
# task(task_name: dependencies)
|
31
|
+
# task(task_name, arguments => dependencies)
|
32
32
|
#
|
33
33
|
# Declare a basic task. The +task_name+ is always the first argument. If
|
34
34
|
# the task name contains a ":" it is defined in that namespace.
|
data/lib/rake/file_list.rb
CHANGED
data/lib/rake/file_task.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
require "rake/task
|
2
|
+
require "rake/task"
|
3
3
|
require "rake/early_time"
|
4
4
|
|
5
5
|
module Rake
|
@@ -14,7 +14,7 @@ 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
|
+
!File.exist?(name) || out_of_date?(timestamp) || @application.options.build_all
|
18
18
|
end
|
19
19
|
|
20
20
|
# Time stamp for file task.
|
data/lib/rake/file_utils.rb
CHANGED
@@ -35,7 +35,7 @@ module FileUtils
|
|
35
35
|
#
|
36
36
|
# # check exit status after command runs
|
37
37
|
# sh %{grep pattern file} do |ok, res|
|
38
|
-
# if !
|
38
|
+
# if !ok
|
39
39
|
# puts "pattern not found (status = #{res.exitstatus})"
|
40
40
|
# end
|
41
41
|
# end
|
@@ -111,7 +111,7 @@ module FileUtils
|
|
111
111
|
# Attempt to do a normal file link, but fall back to a copy if the link
|
112
112
|
# fails.
|
113
113
|
def safe_ln(*args)
|
114
|
-
if !
|
114
|
+
if !LN_SUPPORTED[0]
|
115
115
|
cp(*args)
|
116
116
|
else
|
117
117
|
begin
|
data/lib/rake/packagetask.rb
CHANGED
@@ -132,9 +132,7 @@ module Rake
|
|
132
132
|
task package: ["#{package_dir}/#{file}"]
|
133
133
|
file "#{package_dir}/#{file}" =>
|
134
134
|
[package_dir_path] + package_files do
|
135
|
-
chdir(package_dir)
|
136
|
-
sh @tar_command, "#{flag}cvf", file, package_name
|
137
|
-
end
|
135
|
+
chdir(package_dir) { sh @tar_command, "#{flag}cvf", file, package_name }
|
138
136
|
end
|
139
137
|
end
|
140
138
|
end
|
@@ -143,9 +141,7 @@ module Rake
|
|
143
141
|
task package: ["#{package_dir}/#{zip_file}"]
|
144
142
|
file "#{package_dir}/#{zip_file}" =>
|
145
143
|
[package_dir_path] + package_files do
|
146
|
-
chdir(package_dir)
|
147
|
-
sh @zip_command, "-r", zip_file, package_name
|
148
|
-
end
|
144
|
+
chdir(package_dir) { sh @zip_command, "-r", zip_file, package_name }
|
149
145
|
end
|
150
146
|
end
|
151
147
|
|
data/lib/rake/promise.rb
CHANGED
@@ -71,12 +71,12 @@ module Rake
|
|
71
71
|
|
72
72
|
# Do we have a result for the promise
|
73
73
|
def result?
|
74
|
-
|
74
|
+
!@result.equal?(NOT_SET)
|
75
75
|
end
|
76
76
|
|
77
77
|
# Did the promise throw an error
|
78
78
|
def error?
|
79
|
-
|
79
|
+
!@error.equal?(NOT_SET)
|
80
80
|
end
|
81
81
|
|
82
82
|
# Are we done with the promise
|
data/lib/rake/scope.rb
CHANGED
data/lib/rake/task.rb
CHANGED
@@ -15,6 +15,7 @@ module Rake
|
|
15
15
|
class Task
|
16
16
|
# List of prerequisites for a task.
|
17
17
|
attr_reader :prerequisites
|
18
|
+
alias prereqs prerequisites
|
18
19
|
|
19
20
|
# List of actions attached to a task.
|
20
21
|
attr_reader :actions
|
@@ -247,7 +248,8 @@ module Rake
|
|
247
248
|
r.invoke_with_call_chain(prereq_args, invocation_chain)
|
248
249
|
end
|
249
250
|
end
|
250
|
-
|
251
|
+
# Iterate in reverse to improve performance related to thread waiting and switching
|
252
|
+
futures.reverse_each(&:value)
|
251
253
|
end
|
252
254
|
|
253
255
|
# Format the trace flags for display.
|
@@ -287,7 +289,7 @@ module Rake
|
|
287
289
|
def add_description(description)
|
288
290
|
return unless description
|
289
291
|
comment = description.strip
|
290
|
-
add_comment(comment) if comment && !
|
292
|
+
add_comment(comment) if comment && !comment.empty?
|
291
293
|
end
|
292
294
|
|
293
295
|
def comment=(comment) # :nodoc:
|
data/lib/rake/task_manager.rb
CHANGED
@@ -60,7 +60,7 @@ module Rake
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def generate_message_for_undefined_task(task_name)
|
63
|
-
message = "Don't know how to build task '#{task_name}' (
|
63
|
+
message = "Don't know how to build task '#{task_name}' (See the list of available tasks with `rake --tasks`)"
|
64
64
|
message + generate_did_you_mean_suggestions(task_name)
|
65
65
|
end
|
66
66
|
|
data/lib/rake/version.rb
CHANGED
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.3.
|
4
|
+
version: 12.3.2
|
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: 2018-
|
13
|
+
date: 2018-12-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -108,7 +108,11 @@ files:
|
|
108
108
|
- MIT-LICENSE
|
109
109
|
- README.rdoc
|
110
110
|
- Rakefile
|
111
|
+
- bin/bundle
|
111
112
|
- bin/console
|
113
|
+
- bin/rake
|
114
|
+
- bin/rdoc
|
115
|
+
- bin/rubocop
|
112
116
|
- bin/setup
|
113
117
|
- doc/command_line_usage.rdoc
|
114
118
|
- doc/example/Rakefile1
|