rake 12.2.1 → 13.0.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/.github/workflows/macos.yml +22 -0
- data/.github/workflows/ubuntu-rvm.yml +28 -0
- data/.github/workflows/ubuntu.yml +20 -0
- data/.github/workflows/windows.yml +20 -0
- data/CONTRIBUTING.rdoc +11 -4
- data/Gemfile +7 -0
- data/History.rdoc +71 -0
- data/README.rdoc +7 -8
- data/Rakefile +7 -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 +5 -5
- data/lib/rake/clean.rb +2 -2
- 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 +2 -2
- data/lib/rake/file_task.rb +2 -2
- data/lib/rake/file_utils.rb +8 -11
- data/lib/rake/file_utils_ext.rb +6 -17
- data/lib/rake/multi_task.rb +1 -37
- data/lib/rake/packagetask.rb +17 -6
- data/lib/rake/promise.rb +2 -2
- data/lib/rake/rake_test_loader.rb +1 -0
- data/lib/rake/scope.rb +1 -1
- data/lib/rake/task.rb +57 -15
- data/lib/rake/task_manager.rb +28 -19
- data/lib/rake/version.rb +1 -1
- data/rake.gemspec +3 -10
- metadata +13 -77
- data/.gitignore +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9da686fceba23353d1a9b4263d039b67c5e1ac76055165091a21e9c0cddbeffa
|
4
|
+
data.tar.gz: 3e650670e2aa77cd440555ac8283f14df42e465e3771c2a5e1da961de2dde444
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d555cfe77533730f79bad9d9a430dadd800df2986a32d8885dc078f0c4b481b1c4b9ea99d4a637c662e860ec75a8a74f10a4374d7b00aaf6631f09666b1720b
|
7
|
+
data.tar.gz: '03820d6035572fa9f3805f3190672265acd52dcfbc8bf8558351e1f4124031178ba70345647fae34a5770eaf32accb4ea337154f57055efbed2758c8862357f0'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: macos
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: macos-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ]
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@master
|
13
|
+
- name: Set up Ruby
|
14
|
+
uses: actions/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
version: ${{ matrix.ruby }}
|
17
|
+
- name: Install dependencies
|
18
|
+
run: gem install minitest
|
19
|
+
- name: Run test
|
20
|
+
env:
|
21
|
+
COVERALLS: "yes"
|
22
|
+
run: ruby -Ilib exe/rake
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: ubuntu-rvm
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'ruby-head', '2.2.10' ]
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@master
|
13
|
+
- name: Set up RVM
|
14
|
+
run: |
|
15
|
+
curl -sSL https://get.rvm.io | bash
|
16
|
+
- name: Set up Ruby
|
17
|
+
run: |
|
18
|
+
source $HOME/.rvm/scripts/rvm
|
19
|
+
rvm install ${{ matrix.ruby }} --binary
|
20
|
+
rvm --default use ${{ matrix.ruby }}
|
21
|
+
- name: Install dependencies
|
22
|
+
run: |
|
23
|
+
source $HOME/.rvm/scripts/rvm
|
24
|
+
gem install minitest
|
25
|
+
- name: Run test
|
26
|
+
run: |
|
27
|
+
source $HOME/.rvm/scripts/rvm
|
28
|
+
ruby -Ilib exe/rake
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: ubuntu
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ]
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@master
|
13
|
+
- name: Set up Ruby
|
14
|
+
uses: actions/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
version: ${{ matrix.ruby }}
|
17
|
+
- name: Install dependencies
|
18
|
+
run: gem install minitest
|
19
|
+
- name: Run test
|
20
|
+
run: ruby -Ilib exe/rake
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: windows
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: windows-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby: [ '2.6.x', '2.5.x', '2.4.x' ]
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@master
|
13
|
+
- name: Set up Ruby
|
14
|
+
uses: actions/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
version: ${{ matrix.ruby }}
|
17
|
+
- name: Install dependencies
|
18
|
+
run: gem install minitest
|
19
|
+
- name: Run test
|
20
|
+
run: ruby -Ilib exe/rake
|
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/Gemfile
CHANGED
data/History.rdoc
CHANGED
@@ -1,3 +1,74 @@
|
|
1
|
+
=== 13.0.0
|
2
|
+
|
3
|
+
==== Enhancements
|
4
|
+
|
5
|
+
* Follows recent changes on keyword arguments in ruby 2.7.
|
6
|
+
Pull Request #326 by nobu
|
7
|
+
* Make `PackageTask` be able to omit parent directory while packing files
|
8
|
+
Pull Request #310 by tonytonyjan
|
9
|
+
* Add order only dependency
|
10
|
+
Pull Request #269 by take-cheeze
|
11
|
+
|
12
|
+
==== Compatibility changes
|
13
|
+
|
14
|
+
* Drop old ruby versions(< 2.2)
|
15
|
+
|
16
|
+
=== 12.3.3
|
17
|
+
|
18
|
+
==== Bug fixes
|
19
|
+
|
20
|
+
* Use the application's name in error message if a task is not found.
|
21
|
+
Pull Request #303 by tmatilai
|
22
|
+
|
23
|
+
==== Enhancements:
|
24
|
+
|
25
|
+
* Use File.open explicitly.
|
26
|
+
|
27
|
+
=== 12.3.2
|
28
|
+
|
29
|
+
==== Bug fixes
|
30
|
+
|
31
|
+
* Fixed test fails caused by 2.6 warnings.
|
32
|
+
Pull Request #297 by hsbt
|
33
|
+
|
34
|
+
==== Enhancements:
|
35
|
+
|
36
|
+
* Rdoc improvements.
|
37
|
+
Pull Request #293 by colby-swandale
|
38
|
+
* Improve multitask performance.
|
39
|
+
Pull Request #273 by jsm
|
40
|
+
* Add alias `prereqs`.
|
41
|
+
Pull Request #268 by take-cheeze
|
42
|
+
|
43
|
+
=== 12.3.1
|
44
|
+
|
45
|
+
==== Bug fixes
|
46
|
+
|
47
|
+
* Support did_you_mean >= v1.2.0 which has a breaking change on formatters.
|
48
|
+
Pull request #262 by FUJI Goro.
|
49
|
+
|
50
|
+
==== Enhancements:
|
51
|
+
|
52
|
+
* Don't run task if it depends on already invoked but failed task.
|
53
|
+
Pull request #252 by Gonzalo Rodriguez.
|
54
|
+
* Make space trimming consistent for all task arguments.
|
55
|
+
Pull request #259 by Gonzalo Rodriguez.
|
56
|
+
* Removes duplicated inclusion of Rake::DSL in tests.
|
57
|
+
Pull request #254 by Gonzalo Rodriguez.
|
58
|
+
* Re-raise a LoadError that didn't come from require in the test loader.
|
59
|
+
Pull request #250 by Dylan Thacker-Smith.
|
60
|
+
|
61
|
+
=== 12.3.0
|
62
|
+
|
63
|
+
==== Compatibility Changes
|
64
|
+
|
65
|
+
* Bump `required_ruby_version` to Ruby 2.0.0. Rake has already
|
66
|
+
removed support for Ruby 1.9.x.
|
67
|
+
|
68
|
+
==== Enhancements:
|
69
|
+
|
70
|
+
* Support `test-bundled-gems` task on ruby core.
|
71
|
+
|
1
72
|
=== 12.2.1
|
2
73
|
|
3
74
|
==== Bug fixes
|
data/README.rdoc
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
home :: https://github.com/ruby/rake
|
4
4
|
bugs :: https://github.com/ruby/rake/issues
|
5
5
|
docs :: https://ruby.github.io/rake
|
6
|
-
build status :: {<img src="https://travis-ci.org/ruby/rake.svg?branch=master" alt="travis-ci">}[https://travis-ci.org/ruby/rake] {<img src="https://ci.appveyor.com/api/projects/status/github/ruby/rake?branch=master&svg=true" alt="appveyor">}[https://ci.appveyor.com/project/ruby/rake]
|
7
6
|
|
8
7
|
== Description
|
9
8
|
|
@@ -25,8 +24,8 @@ Rake has the following features:
|
|
25
24
|
|
26
25
|
* A library of prepackaged tasks to make building rakefiles easier. For example,
|
27
26
|
tasks for building tarballs. (Formerly
|
28
|
-
tasks for building RDoc, Gems and publishing to FTP were included in rake but they're now
|
29
|
-
available in RDoc, RubyGems and
|
27
|
+
tasks for building RDoc, Gems, and publishing to FTP were included in rake but they're now
|
28
|
+
available in RDoc, RubyGems, and rake-contrib respectively.)
|
30
29
|
|
31
30
|
* Supports parallel execution of tasks.
|
32
31
|
|
@@ -75,10 +74,10 @@ Type "rake --help" for all available options.
|
|
75
74
|
|
76
75
|
=== Rake Information
|
77
76
|
|
78
|
-
* {Rake command-line}[
|
79
|
-
* {Writing Rakefiles}[
|
80
|
-
* The original {Rake announcement}[
|
81
|
-
* Rake {glossary}[
|
77
|
+
* {Rake command-line}[link:doc/command_line_usage.rdoc]
|
78
|
+
* {Writing Rakefiles}[link:doc/rakefile.rdoc]
|
79
|
+
* The original {Rake announcement}[link:doc/rational.rdoc]
|
80
|
+
* Rake {glossary}[link:doc/glossary.rdoc]
|
82
81
|
|
83
82
|
=== Presentations and Articles about Rake
|
84
83
|
|
@@ -130,7 +129,7 @@ Rake is available under an MIT-style license.
|
|
130
129
|
= Other stuff
|
131
130
|
|
132
131
|
Author:: Jim Weirich <jim.weirich@gmail.com>
|
133
|
-
Requires:: Ruby
|
132
|
+
Requires:: Ruby 2.0.0 or later
|
134
133
|
License:: Copyright Jim Weirich.
|
135
134
|
Released under an MIT-style license. See the MIT-LICENSE
|
136
135
|
file included in the distribution.
|
data/Rakefile
CHANGED
@@ -9,16 +9,19 @@
|
|
9
9
|
lib = File.expand_path("../lib", __FILE__)
|
10
10
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
11
11
|
|
12
|
-
|
13
|
-
require "
|
14
|
-
|
12
|
+
begin
|
13
|
+
require "bundler/gem_tasks"
|
14
|
+
rescue LoadError
|
15
|
+
end
|
15
16
|
|
17
|
+
require "rake/testtask"
|
16
18
|
Rake::TestTask.new(:test) do |t|
|
17
19
|
t.libs << "test"
|
18
20
|
t.verbose = true
|
19
21
|
t.test_files = FileList["test/**/test_*.rb"]
|
20
22
|
end
|
21
23
|
|
24
|
+
require "rdoc/task"
|
22
25
|
RDoc::Task.new do |doc|
|
23
26
|
doc.main = "README.rdoc"
|
24
27
|
doc.title = "Rake -- Ruby Make"
|
@@ -27,7 +30,7 @@ RDoc::Task.new do |doc|
|
|
27
30
|
end
|
28
31
|
|
29
32
|
task ghpages: :rdoc do
|
30
|
-
|
33
|
+
%x[git checkout gh-pages]
|
31
34
|
require "fileutils"
|
32
35
|
FileUtils.rm_rf "/tmp/html"
|
33
36
|
FileUtils.mv "html", "/tmp"
|
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)
|
@@ -172,7 +172,7 @@ module Rake
|
|
172
172
|
args = []
|
173
173
|
|
174
174
|
begin
|
175
|
-
|
175
|
+
/\s*((?:[^\\,]|\\.)*?)\s*(?:,\s*(.*))?$/ =~ remaining_args
|
176
176
|
|
177
177
|
remaining_args = $2
|
178
178
|
args << $1.gsub(/\\(.)/, '\1')
|
@@ -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/clean.rb
CHANGED
@@ -28,10 +28,10 @@ module Rake
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
def cleanup(file_name, opts
|
31
|
+
def cleanup(file_name, **opts)
|
32
32
|
begin
|
33
33
|
opts = { verbose: Rake.application.options.trace }.merge(opts)
|
34
|
-
rm_r file_name, opts
|
34
|
+
rm_r file_name, **opts
|
35
35
|
rescue StandardError => ex
|
36
36
|
puts "Failed to remove #{file_name}: #{ex}" unless file_already_gone?(file_name)
|
37
37
|
end
|
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
@@ -294,7 +294,7 @@ module Rake
|
|
294
294
|
matched = 0
|
295
295
|
each do |fn|
|
296
296
|
begin
|
297
|
-
open(fn, "r", *options) do |inf|
|
297
|
+
File.open(fn, "r", *options) do |inf|
|
298
298
|
count = 0
|
299
299
|
inf.each do |line|
|
300
300
|
count += 1
|
@@ -385,7 +385,7 @@ module Rake
|
|
385
385
|
/~$/
|
386
386
|
]
|
387
387
|
DEFAULT_IGNORE_PROCS = [
|
388
|
-
proc { |fn| fn =~ /(^|[\/\\])core$/ && !
|
388
|
+
proc { |fn| fn =~ /(^|[\/\\])core$/ && !File.directory?(fn) }
|
389
389
|
]
|
390
390
|
|
391
391
|
def import(array) # :nodoc:
|
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
|
@@ -97,12 +97,11 @@ module FileUtils
|
|
97
97
|
# Example:
|
98
98
|
# ruby %{-pe '$_.upcase!' <README}
|
99
99
|
#
|
100
|
-
def ruby(*args, &block)
|
101
|
-
options = (Hash === args.last) ? args.pop : {}
|
100
|
+
def ruby(*args, **options, &block)
|
102
101
|
if args.length > 1
|
103
|
-
sh(
|
102
|
+
sh(RUBY, *args, **options, &block)
|
104
103
|
else
|
105
|
-
sh("#{RUBY} #{args.first}", options, &block)
|
104
|
+
sh("#{RUBY} #{args.first}", **options, &block)
|
106
105
|
end
|
107
106
|
end
|
108
107
|
|
@@ -110,17 +109,15 @@ module FileUtils
|
|
110
109
|
|
111
110
|
# Attempt to do a normal file link, but fall back to a copy if the link
|
112
111
|
# fails.
|
113
|
-
def safe_ln(*args)
|
114
|
-
if
|
115
|
-
cp(*args)
|
116
|
-
else
|
112
|
+
def safe_ln(*args, **options)
|
113
|
+
if LN_SUPPORTED[0]
|
117
114
|
begin
|
118
|
-
ln(*args)
|
115
|
+
return options.empty? ? ln(*args) : ln(*args, **options)
|
119
116
|
rescue StandardError, NotImplementedError
|
120
117
|
LN_SUPPORTED[0] = false
|
121
|
-
cp(*args)
|
122
118
|
end
|
123
119
|
end
|
120
|
+
options.empty? ? cp(*args) : cp(*args, **options)
|
124
121
|
end
|
125
122
|
|
126
123
|
# Split a file path into individual directory names.
|
data/lib/rake/file_utils_ext.rb
CHANGED
@@ -23,19 +23,18 @@ module Rake
|
|
23
23
|
opts = FileUtils.options_of name
|
24
24
|
default_options = []
|
25
25
|
if opts.include?("verbose")
|
26
|
-
default_options << ":
|
26
|
+
default_options << "verbose: FileUtilsExt.verbose_flag"
|
27
27
|
end
|
28
28
|
if opts.include?("noop")
|
29
|
-
default_options << ":
|
29
|
+
default_options << "noop: FileUtilsExt.nowrite_flag"
|
30
30
|
end
|
31
31
|
|
32
32
|
next if default_options.empty?
|
33
33
|
module_eval(<<-EOS, __FILE__, __LINE__ + 1)
|
34
|
-
def #{name}(
|
35
|
-
super(
|
36
|
-
|
37
|
-
|
38
|
-
), &block)
|
34
|
+
def #{name}(*args, **options, &block)
|
35
|
+
super(*args,
|
36
|
+
#{default_options.join(', ')},
|
37
|
+
**options, &block)
|
39
38
|
end
|
40
39
|
EOS
|
41
40
|
end
|
@@ -113,16 +112,6 @@ module Rake
|
|
113
112
|
end
|
114
113
|
end
|
115
114
|
|
116
|
-
# Merge the given options with the default values.
|
117
|
-
def rake_merge_option(args, defaults)
|
118
|
-
if Hash === args.last
|
119
|
-
defaults.update(args.last)
|
120
|
-
args.pop
|
121
|
-
end
|
122
|
-
args.push defaults
|
123
|
-
args
|
124
|
-
end
|
125
|
-
|
126
115
|
# Send the message to the default rake output (which is $stderr).
|
127
116
|
def rake_output_message(message)
|
128
117
|
$stderr.puts(message)
|
data/lib/rake/multi_task.rb
CHANGED
@@ -5,46 +5,10 @@ module Rake
|
|
5
5
|
# parallel using Ruby threads.
|
6
6
|
#
|
7
7
|
class MultiTask < Task
|
8
|
-
|
9
|
-
# Same as invoke, but explicitly pass a call chain to detect
|
10
|
-
# circular dependencies. This is largely copied from Rake::Task
|
11
|
-
# but has been updated such that if multiple tasks depend on this
|
12
|
-
# one in parallel, they will all fail if the first execution of
|
13
|
-
# this task fails.
|
14
|
-
def invoke_with_call_chain(task_args, invocation_chain)
|
15
|
-
new_chain = Rake::InvocationChain.append(self, invocation_chain)
|
16
|
-
@lock.synchronize do
|
17
|
-
begin
|
18
|
-
if @already_invoked
|
19
|
-
if @invocation_exception
|
20
|
-
if application.options.trace
|
21
|
-
application.trace "** Previous invocation of #{name} failed #{format_trace_flags}"
|
22
|
-
end
|
23
|
-
raise @invocation_exception
|
24
|
-
else
|
25
|
-
return
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
if application.options.trace
|
30
|
-
application.trace "** Invoke #{name} #{format_trace_flags}"
|
31
|
-
end
|
32
|
-
@already_invoked = true
|
33
|
-
|
34
|
-
invoke_prerequisites(task_args, new_chain)
|
35
|
-
execute(task_args) if needed?
|
36
|
-
rescue Exception => ex
|
37
|
-
add_chain_to(ex, new_chain)
|
38
|
-
@invocation_exception = ex
|
39
|
-
raise
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
8
|
private
|
9
|
+
|
45
10
|
def invoke_prerequisites(task_args, invocation_chain) # :nodoc:
|
46
11
|
invoke_prerequisites_concurrently(task_args, invocation_chain)
|
47
12
|
end
|
48
13
|
end
|
49
|
-
|
50
14
|
end
|
data/lib/rake/packagetask.rb
CHANGED
@@ -79,6 +79,9 @@ 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 omited (default is false)
|
83
|
+
attr_accessor :without_parent_dir
|
84
|
+
|
82
85
|
# Create a Package Task with the given name and version. Use +:noversion+
|
83
86
|
# as the version to build a package without a version or to provide a
|
84
87
|
# fully-versioned package name.
|
@@ -102,6 +105,7 @@ module Rake
|
|
102
105
|
@need_zip = false
|
103
106
|
@tar_command = "tar"
|
104
107
|
@zip_command = "zip"
|
108
|
+
@without_parent_dir = false
|
105
109
|
end
|
106
110
|
|
107
111
|
# Create the tasks defined by this task library.
|
@@ -132,9 +136,8 @@ module Rake
|
|
132
136
|
task package: ["#{package_dir}/#{file}"]
|
133
137
|
file "#{package_dir}/#{file}" =>
|
134
138
|
[package_dir_path] + package_files do
|
135
|
-
chdir(
|
136
|
-
|
137
|
-
end
|
139
|
+
chdir(working_dir) { sh @tar_command, "#{flag}cvf", file, target_dir }
|
140
|
+
mv "#{package_dir_path}/#{target_dir}", package_dir if without_parent_dir
|
138
141
|
end
|
139
142
|
end
|
140
143
|
end
|
@@ -143,9 +146,8 @@ module Rake
|
|
143
146
|
task package: ["#{package_dir}/#{zip_file}"]
|
144
147
|
file "#{package_dir}/#{zip_file}" =>
|
145
148
|
[package_dir_path] + package_files do
|
146
|
-
chdir(
|
147
|
-
|
148
|
-
end
|
149
|
+
chdir(working_dir) { sh @zip_command, "-r", zip_file, target_dir }
|
150
|
+
mv "#{package_dir_path}/#{zip_file}", package_dir if without_parent_dir
|
149
151
|
end
|
150
152
|
end
|
151
153
|
|
@@ -206,6 +208,15 @@ module Rake
|
|
206
208
|
def zip_file
|
207
209
|
"#{package_name}.zip"
|
208
210
|
end
|
211
|
+
|
212
|
+
def working_dir
|
213
|
+
without_parent_dir ? package_dir_path : package_dir
|
214
|
+
end
|
215
|
+
|
216
|
+
# target directory relative to working_dir
|
217
|
+
def target_dir
|
218
|
+
without_parent_dir ? "." : package_name
|
219
|
+
end
|
209
220
|
end
|
210
221
|
|
211
222
|
end
|
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,10 @@ module Rake
|
|
15
15
|
class Task
|
16
16
|
# List of prerequisites for a task.
|
17
17
|
attr_reader :prerequisites
|
18
|
+
alias prereqs prerequisites
|
19
|
+
|
20
|
+
# List of order only prerequisites for a task.
|
21
|
+
attr_reader :order_only_prerequisites
|
18
22
|
|
19
23
|
# List of actions attached to a task.
|
20
24
|
attr_reader :actions
|
@@ -55,7 +59,7 @@ module Rake
|
|
55
59
|
|
56
60
|
# List of prerequisite tasks
|
57
61
|
def prerequisite_tasks
|
58
|
-
prerequisites.map { |pre| lookup_prerequisite(pre) }
|
62
|
+
(prerequisites + order_only_prerequisites).map { |pre| lookup_prerequisite(pre) }
|
59
63
|
end
|
60
64
|
|
61
65
|
def lookup_prerequisite(prerequisite_name) # :nodoc:
|
@@ -103,6 +107,8 @@ module Rake
|
|
103
107
|
@scope = app.current_scope
|
104
108
|
@arg_names = nil
|
105
109
|
@locations = []
|
110
|
+
@invocation_exception = nil
|
111
|
+
@order_only_prerequisites = []
|
106
112
|
end
|
107
113
|
|
108
114
|
# Enhance a task with prerequisites or actions. Returns self.
|
@@ -183,20 +189,39 @@ module Rake
|
|
183
189
|
|
184
190
|
# Same as invoke, but explicitly pass a call chain to detect
|
185
191
|
# circular dependencies.
|
186
|
-
|
187
|
-
|
192
|
+
#
|
193
|
+
# If multiple tasks depend on this
|
194
|
+
# one in parallel, they will all fail if the first execution of
|
195
|
+
# this task fails.
|
196
|
+
def invoke_with_call_chain(task_args, invocation_chain)
|
197
|
+
new_chain = Rake::InvocationChain.append(self, invocation_chain)
|
188
198
|
@lock.synchronize do
|
189
|
-
|
190
|
-
application.trace
|
199
|
+
begin
|
200
|
+
if application.options.trace
|
201
|
+
application.trace "** Invoke #{name} #{format_trace_flags}"
|
202
|
+
end
|
203
|
+
|
204
|
+
if @already_invoked
|
205
|
+
if @invocation_exception
|
206
|
+
if application.options.trace
|
207
|
+
application.trace "** Previous invocation of #{name} failed #{format_trace_flags}"
|
208
|
+
end
|
209
|
+
raise @invocation_exception
|
210
|
+
else
|
211
|
+
return
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
@already_invoked = true
|
216
|
+
|
217
|
+
invoke_prerequisites(task_args, new_chain)
|
218
|
+
execute(task_args) if needed?
|
219
|
+
rescue Exception => ex
|
220
|
+
add_chain_to(ex, new_chain)
|
221
|
+
@invocation_exception = ex
|
222
|
+
raise ex
|
191
223
|
end
|
192
|
-
return if @already_invoked
|
193
|
-
@already_invoked = true
|
194
|
-
invoke_prerequisites(task_args, new_chain)
|
195
|
-
execute(task_args) if needed?
|
196
224
|
end
|
197
|
-
rescue Exception => ex
|
198
|
-
add_chain_to(ex, new_chain)
|
199
|
-
raise ex
|
200
225
|
end
|
201
226
|
protected :invoke_with_call_chain
|
202
227
|
|
@@ -227,7 +252,8 @@ module Rake
|
|
227
252
|
r.invoke_with_call_chain(prereq_args, invocation_chain)
|
228
253
|
end
|
229
254
|
end
|
230
|
-
|
255
|
+
# Iterate in reverse to improve performance related to thread waiting and switching
|
256
|
+
futures.reverse_each(&:value)
|
231
257
|
end
|
232
258
|
|
233
259
|
# Format the trace flags for display.
|
@@ -248,7 +274,11 @@ module Rake
|
|
248
274
|
end
|
249
275
|
application.trace "** Execute #{name}" if application.options.trace
|
250
276
|
application.enhance_with_matching_rule(name) if @actions.empty?
|
251
|
-
|
277
|
+
if opts = Hash.try_convert(args) and !opts.empty?
|
278
|
+
@actions.each { |act| act.call(self, args, **opts)}
|
279
|
+
else
|
280
|
+
@actions.each { |act| act.call(self, args)}
|
281
|
+
end
|
252
282
|
end
|
253
283
|
|
254
284
|
# Is this task needed?
|
@@ -267,7 +297,7 @@ module Rake
|
|
267
297
|
def add_description(description)
|
268
298
|
return unless description
|
269
299
|
comment = description.strip
|
270
|
-
add_comment(comment) if comment && !
|
300
|
+
add_comment(comment) if comment && !comment.empty?
|
271
301
|
end
|
272
302
|
|
273
303
|
def comment=(comment) # :nodoc:
|
@@ -338,6 +368,18 @@ module Rake
|
|
338
368
|
return result
|
339
369
|
end
|
340
370
|
|
371
|
+
# Format dependencies parameter to pass to task.
|
372
|
+
def self.format_deps(deps)
|
373
|
+
deps = [deps] unless deps.respond_to?(:to_ary)
|
374
|
+
deps.map { |d| Rake.from_pathname(d).to_s }
|
375
|
+
end
|
376
|
+
|
377
|
+
# Add order only dependencies.
|
378
|
+
def |(deps)
|
379
|
+
@order_only_prerequisites |= Task.format_deps(deps) - @prerequisites
|
380
|
+
self
|
381
|
+
end
|
382
|
+
|
341
383
|
# ----------------------------------------------------------------
|
342
384
|
# Rake Module Methods
|
343
385
|
#
|
data/lib/rake/task_manager.rb
CHANGED
@@ -15,13 +15,13 @@ module Rake
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def create_rule(*args, &block) # :nodoc:
|
18
|
-
pattern, args, deps = resolve_args(args)
|
18
|
+
pattern, args, deps, order_only = resolve_args(args)
|
19
19
|
pattern = Regexp.new(Regexp.quote(pattern) + "$") if String === pattern
|
20
|
-
@rules << [pattern, args, deps, block]
|
20
|
+
@rules << [pattern, args, deps, order_only, block]
|
21
21
|
end
|
22
22
|
|
23
23
|
def define_task(task_class, *args, &block) # :nodoc:
|
24
|
-
task_name, arg_names, deps = resolve_args(args)
|
24
|
+
task_name, arg_names, deps, order_only = resolve_args(args)
|
25
25
|
|
26
26
|
original_scope = @scope
|
27
27
|
if String === task_name and
|
@@ -31,15 +31,15 @@ module Rake
|
|
31
31
|
end
|
32
32
|
|
33
33
|
task_name = task_class.scope_name(@scope, task_name)
|
34
|
-
deps = [deps] unless deps.respond_to?(:to_ary)
|
35
|
-
deps = deps.map { |d| Rake.from_pathname(d).to_s }
|
36
34
|
task = intern(task_class, task_name)
|
37
35
|
task.set_arg_names(arg_names) unless arg_names.empty?
|
38
36
|
if Rake::TaskManager.record_task_metadata
|
39
37
|
add_location(task)
|
40
38
|
task.add_description(get_description(task))
|
41
39
|
end
|
42
|
-
task.enhance(deps, &block)
|
40
|
+
task.enhance(Task.format_deps(deps), &block)
|
41
|
+
task | order_only unless order_only.nil?
|
42
|
+
task
|
43
43
|
ensure
|
44
44
|
@scope = original_scope
|
45
45
|
end
|
@@ -60,17 +60,22 @@ 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}' "\
|
64
|
+
"(See the list of available tasks with `#{Rake.application.name} --tasks`)"
|
65
|
+
message + generate_did_you_mean_suggestions(task_name)
|
66
|
+
end
|
64
67
|
|
65
|
-
|
66
|
-
|
67
|
-
suggestions = ::DidYouMean::SpellChecker.new(dictionary: @tasks.keys).correct(task_name.to_s)
|
68
|
-
::DidYouMean::Formatter.new(suggestions).to_s
|
69
|
-
else
|
70
|
-
""
|
71
|
-
end
|
68
|
+
def generate_did_you_mean_suggestions(task_name)
|
69
|
+
return "" unless defined?(::DidYouMean::SpellChecker)
|
72
70
|
|
73
|
-
|
71
|
+
suggestions = ::DidYouMean::SpellChecker.new(dictionary: @tasks.keys).correct(task_name.to_s)
|
72
|
+
if ::DidYouMean.respond_to?(:formatter)# did_you_mean v1.2.0 or later
|
73
|
+
::DidYouMean.formatter.message_for(suggestions)
|
74
|
+
elsif defined?(::DidYouMean::Formatter) # before did_you_mean v1.2.0
|
75
|
+
::DidYouMean::Formatter.new(suggestions).to_s
|
76
|
+
else
|
77
|
+
""
|
78
|
+
end
|
74
79
|
end
|
75
80
|
|
76
81
|
def synthesize_file_task(task_name) # :nodoc:
|
@@ -104,7 +109,7 @@ module Rake
|
|
104
109
|
else
|
105
110
|
arg_names = args
|
106
111
|
end
|
107
|
-
[task_name, arg_names, []]
|
112
|
+
[task_name, arg_names, [], nil]
|
108
113
|
end
|
109
114
|
private :resolve_args_without_dependencies
|
110
115
|
|
@@ -117,7 +122,10 @@ module Rake
|
|
117
122
|
# task :t, [a] => [:d]
|
118
123
|
#
|
119
124
|
def resolve_args_with_dependencies(args, hash) # :nodoc:
|
120
|
-
fail "Task Argument Error" if
|
125
|
+
fail "Task Argument Error" if
|
126
|
+
hash.size != 1 &&
|
127
|
+
(hash.size != 2 || !hash.key?(:order_only))
|
128
|
+
order_only = hash.delete(:order_only)
|
121
129
|
key, value = hash.map { |k, v| [k, v] }.first
|
122
130
|
if args.empty?
|
123
131
|
task_name = key
|
@@ -129,7 +137,7 @@ module Rake
|
|
129
137
|
deps = value
|
130
138
|
end
|
131
139
|
deps = [deps] unless deps.respond_to?(:to_ary)
|
132
|
-
[task_name, arg_names, deps]
|
140
|
+
[task_name, arg_names, deps, order_only]
|
133
141
|
end
|
134
142
|
private :resolve_args_with_dependencies
|
135
143
|
|
@@ -140,9 +148,10 @@ module Rake
|
|
140
148
|
def enhance_with_matching_rule(task_name, level=0)
|
141
149
|
fail Rake::RuleRecursionOverflowError,
|
142
150
|
"Rule Recursion Too Deep" if level >= 16
|
143
|
-
@rules.each do |pattern, args, extensions, block|
|
151
|
+
@rules.each do |pattern, args, extensions, order_only, block|
|
144
152
|
if pattern && pattern.match(task_name)
|
145
153
|
task = attempt_rule(task_name, pattern, args, extensions, block, level)
|
154
|
+
task | order_only unless order_only.nil?
|
146
155
|
return task if task
|
147
156
|
end
|
148
157
|
end
|
data/lib/rake/version.rb
CHANGED
data/rake.gemspec
CHANGED
@@ -5,7 +5,6 @@ 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 = "2017-10-25"
|
9
8
|
s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze]
|
10
9
|
s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze]
|
11
10
|
|
@@ -24,20 +23,14 @@ Rake has the following features:
|
|
24
23
|
s.homepage = "https://github.com/ruby/rake".freeze
|
25
24
|
s.licenses = ["MIT".freeze]
|
26
25
|
|
27
|
-
s.files =
|
28
|
-
%w[.rubocop.yml .travis.yml appveyor.yml]
|
26
|
+
s.files = %x[git ls-files -z].split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } -
|
27
|
+
%w[.rubocop.yml .gitignore .travis.yml appveyor.yml]
|
29
28
|
s.bindir = "exe"
|
30
29
|
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
30
|
s.require_paths = ["lib".freeze]
|
32
31
|
|
33
|
-
s.required_ruby_version = Gem::Requirement.new(">=
|
32
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.2".freeze)
|
34
33
|
s.rubygems_version = "2.6.1".freeze
|
35
34
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze)
|
36
35
|
s.rdoc_options = ["--main".freeze, "README.rdoc".freeze]
|
37
|
-
|
38
|
-
s.add_development_dependency(%q<bundler>.freeze)
|
39
|
-
s.add_development_dependency(%q<minitest>.freeze)
|
40
|
-
s.add_development_dependency(%q<rdoc>.freeze)
|
41
|
-
s.add_development_dependency(%q<coveralls>.freeze)
|
42
|
-
s.add_development_dependency(%q<rubocop>.freeze)
|
43
36
|
end
|
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:
|
4
|
+
version: 13.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi SHIBATA
|
@@ -10,78 +10,8 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
14
|
-
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: bundler
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
requirements:
|
19
|
-
- - ">="
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :development
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
requirements:
|
26
|
-
- - ">="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
version: '0'
|
29
|
-
- !ruby/object:Gem::Dependency
|
30
|
-
name: minitest
|
31
|
-
requirement: !ruby/object:Gem::Requirement
|
32
|
-
requirements:
|
33
|
-
- - ">="
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version: '0'
|
36
|
-
type: :development
|
37
|
-
prerelease: false
|
38
|
-
version_requirements: !ruby/object:Gem::Requirement
|
39
|
-
requirements:
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '0'
|
43
|
-
- !ruby/object:Gem::Dependency
|
44
|
-
name: rdoc
|
45
|
-
requirement: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - ">="
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '0'
|
50
|
-
type: :development
|
51
|
-
prerelease: false
|
52
|
-
version_requirements: !ruby/object:Gem::Requirement
|
53
|
-
requirements:
|
54
|
-
- - ">="
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: '0'
|
57
|
-
- !ruby/object:Gem::Dependency
|
58
|
-
name: coveralls
|
59
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
-
requirements:
|
61
|
-
- - ">="
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '0'
|
64
|
-
type: :development
|
65
|
-
prerelease: false
|
66
|
-
version_requirements: !ruby/object:Gem::Requirement
|
67
|
-
requirements:
|
68
|
-
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: '0'
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: rubocop
|
73
|
-
requirement: !ruby/object:Gem::Requirement
|
74
|
-
requirements:
|
75
|
-
- - ">="
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
78
|
-
type: :development
|
79
|
-
prerelease: false
|
80
|
-
version_requirements: !ruby/object:Gem::Requirement
|
81
|
-
requirements:
|
82
|
-
- - ">="
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version: '0'
|
13
|
+
date: 2019-09-27 00:00:00.000000000 Z
|
14
|
+
dependencies: []
|
85
15
|
description: |
|
86
16
|
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
|
87
17
|
specified in standard Ruby syntax.
|
@@ -101,14 +31,21 @@ executables:
|
|
101
31
|
extensions: []
|
102
32
|
extra_rdoc_files: []
|
103
33
|
files:
|
104
|
-
- ".
|
34
|
+
- ".github/workflows/macos.yml"
|
35
|
+
- ".github/workflows/ubuntu-rvm.yml"
|
36
|
+
- ".github/workflows/ubuntu.yml"
|
37
|
+
- ".github/workflows/windows.yml"
|
105
38
|
- CONTRIBUTING.rdoc
|
106
39
|
- Gemfile
|
107
40
|
- History.rdoc
|
108
41
|
- MIT-LICENSE
|
109
42
|
- README.rdoc
|
110
43
|
- Rakefile
|
44
|
+
- bin/bundle
|
111
45
|
- bin/console
|
46
|
+
- bin/rake
|
47
|
+
- bin/rdoc
|
48
|
+
- bin/rubocop
|
112
49
|
- bin/setup
|
113
50
|
- doc/command_line_usage.rdoc
|
114
51
|
- doc/example/Rakefile1
|
@@ -181,15 +118,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
118
|
requirements:
|
182
119
|
- - ">="
|
183
120
|
- !ruby/object:Gem::Version
|
184
|
-
version:
|
121
|
+
version: '2.2'
|
185
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
123
|
requirements:
|
187
124
|
- - ">="
|
188
125
|
- !ruby/object:Gem::Version
|
189
126
|
version: 1.3.2
|
190
127
|
requirements: []
|
191
|
-
|
192
|
-
rubygems_version: 2.6.14
|
128
|
+
rubygems_version: 3.0.3
|
193
129
|
signing_key:
|
194
130
|
specification_version: 4
|
195
131
|
summary: Rake is a Make-like program implemented in Ruby
|