rake 12.3.3 → 13.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8bdd2e72f2f0ed9bd143e9f691203343bc430717dde81d9928807ce267c60d49
4
- data.tar.gz: 77a5a8acd239396ac98ae54b146d70e1c8407d18109010eaa495f4fb15310f6b
3
+ metadata.gz: d15ff579792b6bca336893adc15bc3de3d8c8580fcdb2b2201926df30752284d
4
+ data.tar.gz: 499353c3ebbcd6492fb8d9fdd96078bf7954c1b3ec21f1d80bac8bf1ea592ea0
5
5
  SHA512:
6
- metadata.gz: 3c47fee4f4436744de8cf095683f5298920128a12bd6415c689ca815626bbf36330015bed62e758324ee4762a018294695f6106f9c29883330cea7915787b957
7
- data.tar.gz: 5d9c91f228cb06f6ebbb3b3aaae13664f4d12b04cfdd3413e4c0d1c6083ec5de2c3b89a5bf9e62a9a82105a7411ac2cb2bdb84cb36ca033a4b710d10a5661312
6
+ metadata.gz: 664fa6daddc629e8bb6fd1863a765e8a7d7f2eda234ab423800dc810fe9bded3d4622e19f633e4307d322cd14adfb0c197de04394df1a0a6fa0b86fc702a7d93
7
+ data.tar.gz: 7f0f7208745a41dacf9959b2a4ee063deeee549d0d2e90904c47d3e84feb976e65fcc4e33f943eefdfa0ec0334e83b63ad280be0ff3926aff471a9c0b25acef9
data/History.rdoc CHANGED
@@ -1,3 +1,62 @@
1
+ === 13.0.6
2
+
3
+ * Additional fix for #389
4
+ Pull request #390 by hsbt
5
+
6
+ === 13.0.5
7
+
8
+ * Fixed the regression of #388
9
+ Pull request #389 by hsbt
10
+
11
+ === 13.0.4
12
+
13
+ * Fix rake test loader swallowing useful error information.
14
+ Pull request #367 by deivid-rodriguez
15
+ * Add -C/--directory option the same as GNU make.
16
+ Pull request #376 by nobu
17
+
18
+ === 13.0.3
19
+
20
+ * Fix breaking change of execution order on TestTask.
21
+ Pull request #368 by ysakasin
22
+
23
+ === 13.0.2
24
+
25
+ ==== Enhancements
26
+
27
+ * Fix tests to work with current FileUtils
28
+ Pull Request #358 by jeremyevans
29
+ * Simplify default rake test loader
30
+ Pull Request #357 by deivid-rodriguez
31
+ * Update rdoc
32
+ Pull Request #366 by bahasalien
33
+ * Update broken links to rake articles from Avdi in README
34
+ Pull Request #360 by svl7
35
+
36
+ === 13.0.1
37
+
38
+ ==== Bug fixes
39
+
40
+ * Fixed bug: Reenabled task raises previous exception on second invokation
41
+ Pull Request #271 by thorsteneckel
42
+ * Fix an incorrectly resolved arg pattern
43
+ Pull Request #327 by mjbellantoni
44
+
45
+ === 13.0.0
46
+
47
+ ==== Enhancements
48
+
49
+ * Follows recent changes on keyword arguments in ruby 2.7.
50
+ Pull Request #326 by nobu
51
+ * Make `PackageTask` be able to omit parent directory while packing files
52
+ Pull Request #310 by tonytonyjan
53
+ * Add order only dependency
54
+ Pull Request #269 by take-cheeze
55
+
56
+ ==== Compatibility changes
57
+
58
+ * Drop old ruby versions(< 2.2)
59
+
1
60
  === 12.3.3
2
61
 
3
62
  ==== 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
 
@@ -83,27 +82,27 @@ Type "rake --help" for all available options.
83
82
  === Presentations and Articles about Rake
84
83
 
85
84
  * Avdi Grimm's rake series:
86
- 1. {Rake Basics}[http://devblog.avdi.org/2014/04/21/rake-part-1-basics/]
87
- 2. {Rake File Lists}[http://devblog.avdi.org/2014/04/22/rake-part-2-file-lists/]
88
- 3. {Rake Rules}[http://devblog.avdi.org/2014/04/23/rake-part-3-rules/]
89
- 4. {Rake Pathmap}[http://devblog.avdi.org/2014/04/24/rake-part-4-pathmap/]
90
- 5. {File Operations}[http://devblog.avdi.org/2014/04/25/rake-part-5-file-operations/]
91
- 6. {Clean and Clobber}[http://devblog.avdi.org/2014/04/28/rake-part-6-clean-and-clobber/]
92
- 7. {MultiTask}[http://devblog.avdi.org/2014/04/29/rake-part-7-multitask/]
93
- * {Jim Weirich's 2003 RubyConf presentation}[http://web.archive.org/web/20140221123354/http://onestepback.org/articles/buildingwithrake/]
94
- * Martin Fowler's article on Rake: http://martinfowler.com/articles/rake.html
85
+ 1. {Rake Basics}[https://avdi.codes/rake-part-1-basics/]
86
+ 2. {Rake File Lists}[https://avdi.codes/rake-part-2-file-lists-2/]
87
+ 3. {Rake Rules}[https://avdi.codes/rake-part-3-rules/]
88
+ 4. {Rake Pathmap}[https://avdi.codes/rake-part-4-pathmap/]
89
+ 5. {File Operations}[https://avdi.codes/rake-part-5-file-operations/]
90
+ 6. {Clean and Clobber}[https://avdi.codes/rake-part-6-clean-and-clobber/]
91
+ 7. {MultiTask}[https://avdi.codes/rake-part-7-multitask/]
92
+ * {Jim Weirich's 2003 RubyConf presentation}[https://web.archive.org/web/20140221123354/http://onestepback.org/articles/buildingwithrake/]
93
+ * Martin Fowler's article on Rake: https://martinfowler.com/articles/rake.html
95
94
 
96
95
  == Other Make Re-envisionings ...
97
96
 
98
97
  Rake is a late entry in the make replacement field. Here are links to
99
98
  other projects with similar (and not so similar) goals.
100
99
 
101
- * http://directory.fsf.org/wiki/Bras -- Bras, one of earliest
100
+ * https://directory.fsf.org/wiki/Bras -- Bras, one of earliest
102
101
  implementations of "make in a scripting language".
103
102
  * http://www.a-a-p.org -- Make in Python
104
- * http://ant.apache.org -- The Ant project
105
- * http://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System
106
- * http://www.rubydoc.info/gems/rant/0.5.7/frames -- Rant, another Ruby make tool.
103
+ * https://ant.apache.org -- The Ant project
104
+ * https://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System
105
+ * https://www.rubydoc.info/gems/rant/0.5.7/frames -- Rant, another Ruby make tool.
107
106
 
108
107
  == Credits
109
108
 
@@ -433,6 +433,13 @@ module Rake
433
433
  select_tasks_to_show(options, :describe, value)
434
434
  }
435
435
  ],
436
+ ["--directory", "-C [DIRECTORY]",
437
+ "Change to DIRECTORY before doing anything.",
438
+ lambda { |value|
439
+ Dir.chdir value
440
+ @original_dir = Dir.pwd
441
+ }
442
+ ],
436
443
  ["--dry-run", "-n",
437
444
  "Do a dry run without executing actions.",
438
445
  lambda { |value|
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
@@ -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(*([RUBY] + args + [options]), &block)
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 !LN_SUPPORTED[0]
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.
@@ -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 << ":verbose => FileUtilsExt.verbose_flag"
26
+ default_options << "verbose: FileUtilsExt.verbose_flag"
27
27
  end
28
28
  if opts.include?("noop")
29
- default_options << ":noop => FileUtilsExt.nowrite_flag"
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}( *args, &block )
35
- super(
36
- *rake_merge_option(args,
37
- #{default_options.join(', ')}
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)
@@ -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,7 +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(package_dir) { sh @tar_command, "#{flag}cvf", file, package_name }
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
136
141
  end
137
142
  end
138
143
  end
@@ -141,7 +146,8 @@ module Rake
141
146
  task package: ["#{package_dir}/#{zip_file}"]
142
147
  file "#{package_dir}/#{zip_file}" =>
143
148
  [package_dir_path] + package_files do
144
- chdir(package_dir) { sh @zip_command, "-r", zip_file, package_name }
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
145
151
  end
146
152
  end
147
153
 
@@ -202,6 +208,15 @@ module Rake
202
208
  def zip_file
203
209
  "#{package_name}.zip"
204
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
205
220
  end
206
221
 
207
222
  end
@@ -1,26 +1,26 @@
1
1
  # frozen_string_literal: true
2
- require "rake"
2
+
3
+ require "rake/file_list"
3
4
 
4
5
  # Load the test files from the command line.
5
6
  argv = ARGV.select do |argument|
6
- begin
7
- case argument
8
- when /^-/ then
9
- argument
10
- when /\*/ then
11
- FileList[argument].to_a.each do |file|
12
- require File.expand_path file
13
- end
7
+ case argument
8
+ when /^-/ then
9
+ argument
10
+ when /\*/ then
11
+ Rake::FileList[argument].to_a.each do |file|
12
+ require File.expand_path file
13
+ end
14
14
 
15
- false
16
- else
17
- require File.expand_path argument
15
+ false
16
+ else
17
+ path = File.expand_path argument
18
18
 
19
- false
20
- end
21
- rescue LoadError => e
22
- raise unless e.path
23
- abort "\nFile does not exist: #{e.path}\n\n"
19
+ abort "\nFile does not exist: #{path}\n\n" unless File.exist?(path)
20
+
21
+ require path
22
+
23
+ false
24
24
  end
25
25
  end
26
26
 
data/lib/rake/task.rb CHANGED
@@ -17,6 +17,9 @@ module Rake
17
17
  attr_reader :prerequisites
18
18
  alias prereqs prerequisites
19
19
 
20
+ # List of order only prerequisites for a task.
21
+ attr_reader :order_only_prerequisites
22
+
20
23
  # List of actions attached to a task.
21
24
  attr_reader :actions
22
25
 
@@ -56,7 +59,7 @@ module Rake
56
59
 
57
60
  # List of prerequisite tasks
58
61
  def prerequisite_tasks
59
- prerequisites.map { |pre| lookup_prerequisite(pre) }
62
+ (prerequisites + order_only_prerequisites).map { |pre| lookup_prerequisite(pre) }
60
63
  end
61
64
 
62
65
  def lookup_prerequisite(prerequisite_name) # :nodoc:
@@ -105,6 +108,7 @@ module Rake
105
108
  @arg_names = nil
106
109
  @locations = []
107
110
  @invocation_exception = nil
111
+ @order_only_prerequisites = []
108
112
  end
109
113
 
110
114
  # Enhance a task with prerequisites or actions. Returns self.
@@ -142,6 +146,7 @@ module Rake
142
146
  # is invoked again.
143
147
  def reenable
144
148
  @already_invoked = false
149
+ @invocation_exception = nil
145
150
  end
146
151
 
147
152
  # Clear the existing prerequisites, actions, comments, and arguments of a rake task.
@@ -270,7 +275,11 @@ module Rake
270
275
  end
271
276
  application.trace "** Execute #{name}" if application.options.trace
272
277
  application.enhance_with_matching_rule(name) if @actions.empty?
273
- @actions.each { |act| act.call(self, args) }
278
+ if opts = Hash.try_convert(args) and !opts.empty?
279
+ @actions.each { |act| act.call(self, args, **opts)}
280
+ else
281
+ @actions.each { |act| act.call(self, args)}
282
+ end
274
283
  end
275
284
 
276
285
  # Is this task needed?
@@ -360,6 +369,18 @@ module Rake
360
369
  return result
361
370
  end
362
371
 
372
+ # Format dependencies parameter to pass to task.
373
+ def self.format_deps(deps)
374
+ deps = [deps] unless deps.respond_to?(:to_ary)
375
+ deps.map { |d| Rake.from_pathname(d).to_s }
376
+ end
377
+
378
+ # Add order only dependencies.
379
+ def |(deps)
380
+ @order_only_prerequisites |= Task.format_deps(deps) - @prerequisites
381
+ self
382
+ end
383
+
363
384
  # ----------------------------------------------------------------
364
385
  # Rake Module Methods
365
386
  #
@@ -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
@@ -83,8 +83,8 @@ module Rake
83
83
  define_task(Rake::FileTask, task_name)
84
84
  end
85
85
 
86
- # Resolve the arguments for a task/rule. Returns a triplet of
87
- # [task_name, arg_name_list, prerequisites].
86
+ # Resolve the arguments for a task/rule. Returns a tuple of
87
+ # [task_name, arg_name_list, prerequisites, order_only_prerequisites].
88
88
  def resolve_args(args)
89
89
  if args.last.is_a?(Hash)
90
90
  deps = args.pop
@@ -109,7 +109,7 @@ module Rake
109
109
  else
110
110
  arg_names = args
111
111
  end
112
- [task_name, arg_names, []]
112
+ [task_name, arg_names, [], nil]
113
113
  end
114
114
  private :resolve_args_without_dependencies
115
115
 
@@ -118,11 +118,17 @@ module Rake
118
118
  #
119
119
  # The patterns recognized by this argument resolving function are:
120
120
  #
121
+ # task :t, order_only: [:e]
121
122
  # task :t => [:d]
123
+ # task :t => [:d], order_only: [:e]
122
124
  # task :t, [a] => [:d]
125
+ # task :t, [a] => [:d], order_only: [:e]
123
126
  #
124
127
  def resolve_args_with_dependencies(args, hash) # :nodoc:
125
- fail "Task Argument Error" if hash.size != 1
128
+ fail "Task Argument Error" if
129
+ hash.size != 1 &&
130
+ (hash.size != 2 || !hash.key?(:order_only))
131
+ order_only = hash.delete(:order_only)
126
132
  key, value = hash.map { |k, v| [k, v] }.first
127
133
  if args.empty?
128
134
  task_name = key
@@ -130,11 +136,11 @@ module Rake
130
136
  deps = value || []
131
137
  else
132
138
  task_name = args.shift
133
- arg_names = key
134
- deps = value
139
+ arg_names = key || args.shift|| []
140
+ deps = value || []
135
141
  end
136
142
  deps = [deps] unless deps.respond_to?(:to_ary)
137
- [task_name, arg_names, deps]
143
+ [task_name, arg_names, deps, order_only]
138
144
  end
139
145
  private :resolve_args_with_dependencies
140
146
 
@@ -145,9 +151,10 @@ module Rake
145
151
  def enhance_with_matching_rule(task_name, level=0)
146
152
  fail Rake::RuleRecursionOverflowError,
147
153
  "Rule Recursion Too Deep" if level >= 16
148
- @rules.each do |pattern, args, extensions, block|
154
+ @rules.each do |pattern, args, extensions, order_only, block|
149
155
  if pattern && pattern.match(task_name)
150
156
  task = attempt_rule(task_name, pattern, args, extensions, block, level)
157
+ task | order_only unless order_only.nil?
151
158
  return task if task
152
159
  end
153
160
  end
@@ -293,8 +300,8 @@ module Rake
293
300
  when /^\./
294
301
  source = task_name.sub(task_pattern, ext)
295
302
  source == ext ? task_name.ext(ext) : source
296
- when String
297
- ext
303
+ when String, Symbol
304
+ ext.to_s
298
305
  when Proc, Method
299
306
  if ext.arity == 1
300
307
  ext.call(task_name)
data/lib/rake/testtask.rb CHANGED
@@ -181,44 +181,9 @@ module Rake
181
181
  when :testrb
182
182
  "-S testrb"
183
183
  when :rake
184
- "#{rake_include_arg} \"#{rake_loader}\""
184
+ "#{__dir__}/rake_test_loader.rb"
185
185
  end
186
186
  end
187
187
 
188
- def rake_loader # :nodoc:
189
- find_file("rake/rake_test_loader") or
190
- fail "unable to find rake test loader"
191
- end
192
-
193
- def find_file(fn) # :nodoc:
194
- $LOAD_PATH.each do |path|
195
- file_path = File.join(path, "#{fn}.rb")
196
- return file_path if File.exist? file_path
197
- end
198
- nil
199
- end
200
-
201
- def rake_include_arg # :nodoc:
202
- spec = Gem.loaded_specs["rake"]
203
- if spec.respond_to?(:default_gem?) && spec.default_gem?
204
- ""
205
- else
206
- "-I\"#{rake_lib_dir}\""
207
- end
208
- end
209
-
210
- def rake_lib_dir # :nodoc:
211
- find_dir("rake") or
212
- fail "unable to find rake lib"
213
- end
214
-
215
- def find_dir(fn) # :nodoc:
216
- $LOAD_PATH.each do |path|
217
- file_path = File.join(path, "#{fn}.rb")
218
- return path if File.exist? file_path
219
- end
220
- nil
221
- end
222
-
223
188
  end
224
189
  end
@@ -1,5 +1,4 @@
1
1
  # frozen_string_literal: true
2
- require "set"
3
2
 
4
3
  require "rake/promise"
5
4
 
@@ -10,6 +9,7 @@ module Rake
10
9
  # Creates a ThreadPool object. The +thread_count+ parameter is the size
11
10
  # of the pool.
12
11
  def initialize(thread_count)
12
+ require "set"
13
13
  @max_active_threads = [thread_count, 0].max
14
14
  @threads = Set.new
15
15
  @threads_mon = Monitor.new
data/lib/rake/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Rake
3
- VERSION = "12.3.3"
3
+ VERSION = "13.0.6"
4
4
 
5
5
  module Version # :nodoc: all
6
6
  MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "."
data/rake.gemspec CHANGED
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
- $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
3
- require 'rake/version'
2
+ require_relative 'lib/rake/version'
4
3
 
5
4
  Gem::Specification.new do |s|
6
5
  s.name = "rake".freeze
@@ -23,20 +22,79 @@ Rake has the following features:
23
22
  s.homepage = "https://github.com/ruby/rake".freeze
24
23
  s.licenses = ["MIT".freeze]
25
24
 
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]
25
+ s.metadata = {
26
+ "bug_tracker_uri" => "https://github.com/ruby/rake/issues",
27
+ "changelog_uri" => "https://github.com/ruby/rake/blob/v#{s.version}/History.rdoc",
28
+ "documentation_uri" => "https://ruby.github.io/rake",
29
+ "source_code_uri" => "https://github.com/ruby/rake/tree/v#{s.version}",
30
+ }
31
+
32
+ s.files = [
33
+ "History.rdoc",
34
+ "MIT-LICENSE",
35
+ "README.rdoc",
36
+ "doc/command_line_usage.rdoc",
37
+ "doc/example/Rakefile1",
38
+ "doc/example/Rakefile2",
39
+ "doc/example/a.c",
40
+ "doc/example/b.c",
41
+ "doc/example/main.c",
42
+ "doc/glossary.rdoc",
43
+ "doc/jamis.rb",
44
+ "doc/proto_rake.rdoc",
45
+ "doc/rake.1",
46
+ "doc/rakefile.rdoc",
47
+ "doc/rational.rdoc",
48
+ "exe/rake",
49
+ "lib/rake.rb",
50
+ "lib/rake/application.rb",
51
+ "lib/rake/backtrace.rb",
52
+ "lib/rake/clean.rb",
53
+ "lib/rake/cloneable.rb",
54
+ "lib/rake/cpu_counter.rb",
55
+ "lib/rake/default_loader.rb",
56
+ "lib/rake/dsl_definition.rb",
57
+ "lib/rake/early_time.rb",
58
+ "lib/rake/ext/core.rb",
59
+ "lib/rake/ext/string.rb",
60
+ "lib/rake/file_creation_task.rb",
61
+ "lib/rake/file_list.rb",
62
+ "lib/rake/file_task.rb",
63
+ "lib/rake/file_utils.rb",
64
+ "lib/rake/file_utils_ext.rb",
65
+ "lib/rake/invocation_chain.rb",
66
+ "lib/rake/invocation_exception_mixin.rb",
67
+ "lib/rake/late_time.rb",
68
+ "lib/rake/linked_list.rb",
69
+ "lib/rake/loaders/makefile.rb",
70
+ "lib/rake/multi_task.rb",
71
+ "lib/rake/name_space.rb",
72
+ "lib/rake/packagetask.rb",
73
+ "lib/rake/phony.rb",
74
+ "lib/rake/private_reader.rb",
75
+ "lib/rake/promise.rb",
76
+ "lib/rake/pseudo_status.rb",
77
+ "lib/rake/rake_module.rb",
78
+ "lib/rake/rake_test_loader.rb",
79
+ "lib/rake/rule_recursion_overflow_error.rb",
80
+ "lib/rake/scope.rb",
81
+ "lib/rake/task.rb",
82
+ "lib/rake/task_argument_error.rb",
83
+ "lib/rake/task_arguments.rb",
84
+ "lib/rake/task_manager.rb",
85
+ "lib/rake/tasklib.rb",
86
+ "lib/rake/testtask.rb",
87
+ "lib/rake/thread_history_display.rb",
88
+ "lib/rake/thread_pool.rb",
89
+ "lib/rake/trace_output.rb",
90
+ "lib/rake/version.rb",
91
+ "lib/rake/win32.rb",
92
+ "rake.gemspec"
93
+ ]
28
94
  s.bindir = "exe"
29
95
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
96
  s.require_paths = ["lib".freeze]
31
97
 
32
- s.required_ruby_version = Gem::Requirement.new(">= 2.0.0".freeze)
33
- s.rubygems_version = "2.6.1".freeze
34
- s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze)
98
+ s.required_ruby_version = Gem::Requirement.new(">= 2.2".freeze)
35
99
  s.rdoc_options = ["--main".freeze, "README.rdoc".freeze]
36
-
37
- s.add_development_dependency(%q<bundler>.freeze)
38
- s.add_development_dependency(%q<minitest>.freeze)
39
- s.add_development_dependency(%q<rdoc>.freeze)
40
- s.add_development_dependency(%q<coveralls>.freeze)
41
- s.add_development_dependency(%q<rubocop>.freeze)
42
100
  end
metadata CHANGED
@@ -1,87 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.3.3
4
+ version: 13.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi SHIBATA
8
8
  - Eric Hodel
9
9
  - Jim Weirich
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2019-07-22 00:00:00.000000000 Z
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: 2021-07-09 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,19 +31,9 @@ executables:
101
31
  extensions: []
102
32
  extra_rdoc_files: []
103
33
  files:
104
- - CONTRIBUTING.rdoc
105
- - Gemfile
106
34
  - History.rdoc
107
35
  - MIT-LICENSE
108
36
  - README.rdoc
109
- - Rakefile
110
- - azure-pipelines.yml
111
- - bin/bundle
112
- - bin/console
113
- - bin/rake
114
- - bin/rdoc
115
- - bin/rubocop
116
- - bin/setup
117
37
  - doc/command_line_usage.rdoc
118
38
  - doc/example/Rakefile1
119
39
  - doc/example/Rakefile2
@@ -174,8 +94,12 @@ files:
174
94
  homepage: https://github.com/ruby/rake
175
95
  licenses:
176
96
  - MIT
177
- metadata: {}
178
- post_install_message:
97
+ metadata:
98
+ bug_tracker_uri: https://github.com/ruby/rake/issues
99
+ changelog_uri: https://github.com/ruby/rake/blob/v13.0.6/History.rdoc
100
+ documentation_uri: https://ruby.github.io/rake
101
+ source_code_uri: https://github.com/ruby/rake/tree/v13.0.6
102
+ post_install_message:
179
103
  rdoc_options:
180
104
  - "--main"
181
105
  - README.rdoc
@@ -185,15 +109,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
109
  requirements:
186
110
  - - ">="
187
111
  - !ruby/object:Gem::Version
188
- version: 2.0.0
112
+ version: '2.2'
189
113
  required_rubygems_version: !ruby/object:Gem::Requirement
190
114
  requirements:
191
115
  - - ">="
192
116
  - !ruby/object:Gem::Version
193
- version: 1.3.2
117
+ version: '0'
194
118
  requirements: []
195
- rubygems_version: 3.0.3
196
- signing_key:
119
+ rubygems_version: 3.3.0.dev
120
+ signing_key:
197
121
  specification_version: 4
198
122
  summary: Rake is a Make-like program implemented in Ruby
199
123
  test_files: []
data/CONTRIBUTING.rdoc DELETED
@@ -1,43 +0,0 @@
1
- = Source Repository
2
-
3
- Rake is currently hosted at github. The github web page is
4
- https://github.com/ruby/rake . The public git clone URL is
5
-
6
- https://github.com/ruby/rake.git
7
-
8
- = Running the Rake Test Suite
9
-
10
- If you wish to run the unit and functional tests that come with Rake:
11
-
12
- * +cd+ into the top project directory of rake.
13
- * Install gem dependency using bundler:
14
-
15
- $ bundle install # Install bundler, minitest and rdoc
16
-
17
- * Run the test suite
18
-
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
27
-
28
- = Issues and Bug Reports
29
-
30
- Feel free to submit commits or feature requests. If you send a patch,
31
- remember to update the corresponding unit tests. In fact, I prefer
32
- new feature to be submitted in the form of new unit tests.
33
-
34
- For other information, feel free to ask on the ruby-talk mailing list.
35
-
36
- If you have found a bug in rake please try with the latest version of rake
37
- before filing an issue. Also check History.rdoc for bug fixes that may have
38
- addressed your issue.
39
-
40
- When submitting pull requests please check the rake Travis-CI page for test
41
- failures:
42
-
43
- https://travis-ci.org/ruby/rake
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
data/Rakefile DELETED
@@ -1,41 +0,0 @@
1
- # Rakefile for rake -*- ruby -*-
2
-
3
- # Copyright 2003, 2004, 2005 by Jim Weirich ([email protected])
4
- # All rights reserved.
5
-
6
- # This file may be distributed under an MIT style license. See
7
- # MIT-LICENSE for details.
8
-
9
- lib = File.expand_path("../lib", __FILE__)
10
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
11
-
12
- begin
13
- require "bundler/gem_tasks"
14
- rescue LoadError
15
- end
16
-
17
- require "rake/testtask"
18
- Rake::TestTask.new(:test) do |t|
19
- t.libs << "test"
20
- t.verbose = true
21
- t.test_files = FileList["test/**/test_*.rb"]
22
- end
23
-
24
- require "rdoc/task"
25
- RDoc::Task.new do |doc|
26
- doc.main = "README.rdoc"
27
- doc.title = "Rake -- Ruby Make"
28
- doc.rdoc_files = FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc]
29
- doc.rdoc_dir = "html"
30
- end
31
-
32
- task ghpages: :rdoc do
33
- %x[git checkout gh-pages]
34
- require "fileutils"
35
- FileUtils.rm_rf "/tmp/html"
36
- FileUtils.mv "html", "/tmp"
37
- FileUtils.rm_rf "*"
38
- FileUtils.cp_r Dir.glob("/tmp/html/*"), "."
39
- end
40
-
41
- task default: :test
data/azure-pipelines.yml DELETED
@@ -1,11 +0,0 @@
1
- jobs:
2
- - job: macOS
3
- pool:
4
- vmImage: 'macos-10.13'
5
- steps:
6
- - script: |
7
- gem install bundler
8
- bundle install --retry=3 --jobs=4
9
- displayName: 'bundle install'
10
- - script: ruby -Ilib exe/rake
11
- displayName: 'ruby -Ilib exe/rake'
data/bin/bundle DELETED
@@ -1,105 +0,0 @@
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/console DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "rake"
5
-
6
- require "irb"
7
- IRB.start
data/bin/rake DELETED
@@ -1,29 +0,0 @@
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 DELETED
@@ -1,29 +0,0 @@
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 DELETED
@@ -1,29 +0,0 @@
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/bin/setup DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
OSZAR »