rake 12.0.0.beta1 → 13.0.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- 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 +124 -11
- 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/doc/jamis.rb +1 -0
- data/doc/rakefile.rdoc +1 -1
- data/lib/rake.rb +1 -0
- data/lib/rake/application.rb +54 -15
- data/lib/rake/backtrace.rb +1 -0
- data/lib/rake/clean.rb +4 -3
- data/lib/rake/cloneable.rb +1 -0
- data/lib/rake/cpu_counter.rb +2 -1
- data/lib/rake/default_loader.rb +1 -0
- data/lib/rake/dsl_definition.rb +4 -3
- data/lib/rake/early_time.rb +1 -0
- data/lib/rake/ext/core.rb +1 -0
- data/lib/rake/ext/string.rb +2 -1
- data/lib/rake/file_creation_task.rb +2 -1
- data/lib/rake/file_list.rb +5 -4
- data/lib/rake/file_task.rb +11 -3
- data/lib/rake/file_utils.rb +10 -12
- data/lib/rake/file_utils_ext.rb +7 -17
- data/lib/rake/invocation_chain.rb +1 -0
- data/lib/rake/invocation_exception_mixin.rb +1 -0
- data/lib/rake/late_time.rb +1 -0
- data/lib/rake/linked_list.rb +1 -0
- data/lib/rake/loaders/makefile.rb +1 -0
- data/lib/rake/multi_task.rb +2 -37
- data/lib/rake/name_space.rb +1 -0
- data/lib/rake/packagetask.rb +18 -6
- data/lib/rake/phony.rb +1 -0
- data/lib/rake/private_reader.rb +1 -0
- data/lib/rake/promise.rb +3 -2
- data/lib/rake/pseudo_status.rb +1 -0
- data/lib/rake/rake_module.rb +29 -0
- data/lib/rake/rake_test_loader.rb +17 -11
- data/lib/rake/rule_recursion_overflow_error.rb +1 -0
- data/lib/rake/scope.rb +2 -1
- data/lib/rake/task.rb +59 -16
- data/lib/rake/task_argument_error.rb +1 -0
- data/lib/rake/task_arguments.rb +2 -0
- data/lib/rake/task_manager.rb +42 -17
- data/lib/rake/tasklib.rb +1 -0
- data/lib/rake/testtask.rb +3 -1
- data/lib/rake/thread_history_display.rb +1 -0
- data/lib/rake/thread_pool.rb +1 -0
- data/lib/rake/trace_output.rb +1 -0
- data/lib/rake/version.rb +2 -1
- data/lib/rake/win32.rb +1 -0
- data/rake.gemspec +4 -7
- metadata +13 -52
- data/.gitignore +0 -14
- data/.rubocop.yml +0 -57
- data/.travis.yml +0 -21
- data/appveyor.yml +0 -21
data/lib/rake/task_arguments.rb
CHANGED
data/lib/rake/task_manager.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module Rake
|
2
3
|
|
3
4
|
# The TaskManager module is a mixin for managing tasks.
|
@@ -14,13 +15,13 @@ module Rake
|
|
14
15
|
end
|
15
16
|
|
16
17
|
def create_rule(*args, &block) # :nodoc:
|
17
|
-
pattern, args, deps = resolve_args(args)
|
18
|
+
pattern, args, deps, order_only = resolve_args(args)
|
18
19
|
pattern = Regexp.new(Regexp.quote(pattern) + "$") if String === pattern
|
19
|
-
@rules << [pattern, args, deps, block]
|
20
|
+
@rules << [pattern, args, deps, order_only, block]
|
20
21
|
end
|
21
22
|
|
22
23
|
def define_task(task_class, *args, &block) # :nodoc:
|
23
|
-
task_name, arg_names, deps = resolve_args(args)
|
24
|
+
task_name, arg_names, deps, order_only = resolve_args(args)
|
24
25
|
|
25
26
|
original_scope = @scope
|
26
27
|
if String === task_name and
|
@@ -30,15 +31,15 @@ module Rake
|
|
30
31
|
end
|
31
32
|
|
32
33
|
task_name = task_class.scope_name(@scope, task_name)
|
33
|
-
deps = [deps] unless deps.respond_to?(:to_ary)
|
34
|
-
deps = deps.map { |d| Rake.from_pathname(d).to_s }
|
35
34
|
task = intern(task_class, task_name)
|
36
35
|
task.set_arg_names(arg_names) unless arg_names.empty?
|
37
36
|
if Rake::TaskManager.record_task_metadata
|
38
37
|
add_location(task)
|
39
38
|
task.add_description(get_description(task))
|
40
39
|
end
|
41
|
-
task.enhance(deps, &block)
|
40
|
+
task.enhance(Task.format_deps(deps), &block)
|
41
|
+
task | order_only unless order_only.nil?
|
42
|
+
task
|
42
43
|
ensure
|
43
44
|
@scope = original_scope
|
44
45
|
end
|
@@ -55,7 +56,26 @@ module Rake
|
|
55
56
|
self.lookup(task_name, scopes) or
|
56
57
|
enhance_with_matching_rule(task_name) or
|
57
58
|
synthesize_file_task(task_name) or
|
58
|
-
fail
|
59
|
+
fail generate_message_for_undefined_task(task_name)
|
60
|
+
end
|
61
|
+
|
62
|
+
def generate_message_for_undefined_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
|
67
|
+
|
68
|
+
def generate_did_you_mean_suggestions(task_name)
|
69
|
+
return "" unless defined?(::DidYouMean::SpellChecker)
|
70
|
+
|
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
|
59
79
|
end
|
60
80
|
|
61
81
|
def synthesize_file_task(task_name) # :nodoc:
|
@@ -89,7 +109,7 @@ module Rake
|
|
89
109
|
else
|
90
110
|
arg_names = args
|
91
111
|
end
|
92
|
-
[task_name, arg_names, []]
|
112
|
+
[task_name, arg_names, [], nil]
|
93
113
|
end
|
94
114
|
private :resolve_args_without_dependencies
|
95
115
|
|
@@ -102,7 +122,10 @@ module Rake
|
|
102
122
|
# task :t, [a] => [:d]
|
103
123
|
#
|
104
124
|
def resolve_args_with_dependencies(args, hash) # :nodoc:
|
105
|
-
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)
|
106
129
|
key, value = hash.map { |k, v| [k, v] }.first
|
107
130
|
if args.empty?
|
108
131
|
task_name = key
|
@@ -114,7 +137,7 @@ module Rake
|
|
114
137
|
deps = value
|
115
138
|
end
|
116
139
|
deps = [deps] unless deps.respond_to?(:to_ary)
|
117
|
-
[task_name, arg_names, deps]
|
140
|
+
[task_name, arg_names, deps, order_only]
|
118
141
|
end
|
119
142
|
private :resolve_args_with_dependencies
|
120
143
|
|
@@ -125,9 +148,10 @@ module Rake
|
|
125
148
|
def enhance_with_matching_rule(task_name, level=0)
|
126
149
|
fail Rake::RuleRecursionOverflowError,
|
127
150
|
"Rule Recursion Too Deep" if level >= 16
|
128
|
-
@rules.each do |pattern, args, extensions, block|
|
129
|
-
if pattern.match(task_name)
|
130
|
-
task = attempt_rule(task_name, args, extensions, block, level)
|
151
|
+
@rules.each do |pattern, args, extensions, order_only, block|
|
152
|
+
if pattern && pattern.match(task_name)
|
153
|
+
task = attempt_rule(task_name, pattern, args, extensions, block, level)
|
154
|
+
task | order_only unless order_only.nil?
|
131
155
|
return task if task
|
132
156
|
end
|
133
157
|
end
|
@@ -241,8 +265,8 @@ module Rake
|
|
241
265
|
end
|
242
266
|
|
243
267
|
# Attempt to create a rule given the list of prerequisites.
|
244
|
-
def attempt_rule(task_name, args, extensions, block, level)
|
245
|
-
sources = make_sources(task_name, extensions)
|
268
|
+
def attempt_rule(task_name, task_pattern, args, extensions, block, level)
|
269
|
+
sources = make_sources(task_name, task_pattern, extensions)
|
246
270
|
prereqs = sources.map { |source|
|
247
271
|
trace_rule level, "Attempting Rule #{task_name} => #{source}"
|
248
272
|
if File.exist?(source) || Rake::Task.task_defined?(source)
|
@@ -263,7 +287,7 @@ module Rake
|
|
263
287
|
|
264
288
|
# Make a list of sources from the list of file name extensions /
|
265
289
|
# translation procs.
|
266
|
-
def make_sources(task_name, extensions)
|
290
|
+
def make_sources(task_name, task_pattern, extensions)
|
267
291
|
result = extensions.map { |ext|
|
268
292
|
case ext
|
269
293
|
when /%/
|
@@ -271,7 +295,8 @@ module Rake
|
|
271
295
|
when %r{/}
|
272
296
|
ext
|
273
297
|
when /^\./
|
274
|
-
task_name.
|
298
|
+
source = task_name.sub(task_pattern, ext)
|
299
|
+
source == ext ? task_name.ext(ext) : source
|
275
300
|
when String
|
276
301
|
ext
|
277
302
|
when Proc, Method
|
data/lib/rake/tasklib.rb
CHANGED
data/lib/rake/testtask.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "rake"
|
2
3
|
require "rake/tasklib"
|
3
4
|
|
@@ -50,6 +51,7 @@ module Rake
|
|
50
51
|
|
51
52
|
# Request that the tests be run with the warning flag set.
|
52
53
|
# E.g. warning=true implies "ruby -w" used to run the tests.
|
54
|
+
# (default is true)
|
53
55
|
attr_accessor :warning
|
54
56
|
|
55
57
|
# Glob pattern to match test files. (default is 'test/test*.rb')
|
@@ -119,7 +121,7 @@ module Rake
|
|
119
121
|
status = "Command failed with status (#{status.exitstatus})"
|
120
122
|
details = ": [ruby #{args}]"
|
121
123
|
message =
|
122
|
-
if Rake.application.options.trace or @verbose
|
124
|
+
if Rake.application.options.trace or @verbose
|
123
125
|
status + details
|
124
126
|
else
|
125
127
|
status
|
data/lib/rake/thread_pool.rb
CHANGED
data/lib/rake/trace_output.rb
CHANGED
data/lib/rake/version.rb
CHANGED
data/lib/rake/win32.rb
CHANGED
data/rake.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
|
2
3
|
require 'rake/version'
|
3
4
|
|
4
5
|
Gem::Specification.new do |s|
|
5
6
|
s.name = "rake".freeze
|
6
7
|
s.version = Rake::VERSION
|
7
|
-
s.date = "2016-06-12"
|
8
8
|
s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze]
|
9
9
|
s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze]
|
10
10
|
|
@@ -23,17 +23,14 @@ Rake has the following features:
|
|
23
23
|
s.homepage = "https://github.com/ruby/rake".freeze
|
24
24
|
s.licenses = ["MIT".freeze]
|
25
25
|
|
26
|
-
s.files =
|
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]
|
27
28
|
s.bindir = "exe"
|
28
29
|
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
30
|
s.require_paths = ["lib".freeze]
|
30
31
|
|
31
|
-
s.required_ruby_version = Gem::Requirement.new(">=
|
32
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.2".freeze)
|
32
33
|
s.rubygems_version = "2.6.1".freeze
|
33
34
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze)
|
34
35
|
s.rdoc_options = ["--main".freeze, "README.rdoc".freeze]
|
35
|
-
|
36
|
-
s.add_development_dependency(%q<bundler>.freeze)
|
37
|
-
s.add_development_dependency(%q<minitest>.freeze)
|
38
|
-
s.add_development_dependency(%q<rdoc>.freeze, ["~> 5.0.0.beta2"])
|
39
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.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi SHIBATA
|
@@ -10,50 +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: 5.0.0.beta2
|
50
|
-
type: :development
|
51
|
-
prerelease: false
|
52
|
-
version_requirements: !ruby/object:Gem::Requirement
|
53
|
-
requirements:
|
54
|
-
- - "~>"
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: 5.0.0.beta2
|
13
|
+
date: 2019-09-09 00:00:00.000000000 Z
|
14
|
+
dependencies: []
|
57
15
|
description: |
|
58
16
|
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
|
59
17
|
specified in standard Ruby syntax.
|
@@ -73,17 +31,21 @@ executables:
|
|
73
31
|
extensions: []
|
74
32
|
extra_rdoc_files: []
|
75
33
|
files:
|
76
|
-
- ".
|
77
|
-
- ".
|
78
|
-
- ".
|
34
|
+
- ".github/workflows/macos.yml"
|
35
|
+
- ".github/workflows/ubuntu-rvm.yml"
|
36
|
+
- ".github/workflows/ubuntu.yml"
|
37
|
+
- ".github/workflows/windows.yml"
|
79
38
|
- CONTRIBUTING.rdoc
|
80
39
|
- Gemfile
|
81
40
|
- History.rdoc
|
82
41
|
- MIT-LICENSE
|
83
42
|
- README.rdoc
|
84
43
|
- Rakefile
|
85
|
-
-
|
44
|
+
- bin/bundle
|
86
45
|
- bin/console
|
46
|
+
- bin/rake
|
47
|
+
- bin/rdoc
|
48
|
+
- bin/rubocop
|
87
49
|
- bin/setup
|
88
50
|
- doc/command_line_usage.rdoc
|
89
51
|
- doc/example/Rakefile1
|
@@ -156,15 +118,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
156
118
|
requirements:
|
157
119
|
- - ">="
|
158
120
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
121
|
+
version: '2.2'
|
160
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
123
|
requirements:
|
162
124
|
- - ">="
|
163
125
|
- !ruby/object:Gem::Version
|
164
126
|
version: 1.3.2
|
165
127
|
requirements: []
|
166
|
-
|
167
|
-
rubygems_version: 2.6.8
|
128
|
+
rubygems_version: 3.1.0.pre1
|
168
129
|
signing_key:
|
169
130
|
specification_version: 4
|
170
131
|
summary: Rake is a Make-like program implemented in Ruby
|
data/.gitignore
DELETED
data/.rubocop.yml
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
AllCops:
|
2
|
-
TargetRubyVersion: 2.3
|
3
|
-
DisabledByDefault: true
|
4
|
-
Exclude:
|
5
|
-
- doc/**/*.rb
|
6
|
-
- rake.gemspec
|
7
|
-
|
8
|
-
Style/LineLength:
|
9
|
-
Enabled: true
|
10
|
-
Max: 120
|
11
|
-
|
12
|
-
Style/HashSyntax:
|
13
|
-
Enabled: true
|
14
|
-
|
15
|
-
Style/StringLiterals:
|
16
|
-
Enabled: true
|
17
|
-
EnforcedStyle: double_quotes
|
18
|
-
|
19
|
-
Style/IndentationWidth:
|
20
|
-
Enabled: true
|
21
|
-
|
22
|
-
Style/Tab:
|
23
|
-
Enabled: true
|
24
|
-
|
25
|
-
Style/EmptyLines:
|
26
|
-
Enabled: true
|
27
|
-
|
28
|
-
Style/TrailingBlankLines:
|
29
|
-
Enabled: true
|
30
|
-
|
31
|
-
Style/TrailingWhitespace:
|
32
|
-
Enabled: true
|
33
|
-
|
34
|
-
Style/SpaceBeforeBlockBraces:
|
35
|
-
Enabled: true
|
36
|
-
|
37
|
-
Style/SpaceInsideBlockBraces:
|
38
|
-
Enabled: true
|
39
|
-
|
40
|
-
Style/SpaceInsideHashLiteralBraces:
|
41
|
-
Enabled: true
|
42
|
-
|
43
|
-
Style/CaseIndentation:
|
44
|
-
Enabled: true
|
45
|
-
|
46
|
-
Style/MultilineIfThen:
|
47
|
-
Enabled: true
|
48
|
-
|
49
|
-
Style/MethodDefParentheses:
|
50
|
-
Enabled: true
|
51
|
-
|
52
|
-
Style/BracesAroundHashParameters:
|
53
|
-
Enabled: true
|
54
|
-
|
55
|
-
Lint/EndAlignment:
|
56
|
-
Enabled: true
|
57
|
-
AlignWith: variable
|
data/.travis.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
sudo: false
|
3
|
-
rvm:
|
4
|
-
- 1.9.3
|
5
|
-
- 2.0.0
|
6
|
-
- 2.1.10
|
7
|
-
- 2.2.5
|
8
|
-
- 2.3.1
|
9
|
-
- ruby-head
|
10
|
-
- jruby-1.7.20
|
11
|
-
- jruby-9.1.5.0
|
12
|
-
- jruby-head
|
13
|
-
before_install:
|
14
|
-
- gem install bundler --no-document -v '~> 1.13.3'
|
15
|
-
before_script:
|
16
|
-
- unset JRUBY_OPTS
|
17
|
-
script: ruby -Ilib exe/rake
|
18
|
-
notifications:
|
19
|
-
email:
|
20
|
-
- hsbt@ruby-lang.org
|
21
|
-
- drbrain@segment7.net
|