rake 12.3.1 → 12.3.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rake might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b9ff07e1f0f9a98e322529b863347c78cbcf73dcf5f37d2fc99e46c467c0b1a
4
- data.tar.gz: 944f537241285a1e4ab625ad32b0011c4b333645db6d250b0eb28f509a276967
3
+ metadata.gz: 99ff54932cfc348c5536806e90de3ad7ff47a67dfd2499eef46e29d616ed0e61
4
+ data.tar.gz: f9687a6a1790750b5301e0df314f9c6715123913e82eefdc99aa658bb5b2494f
5
5
  SHA512:
6
- metadata.gz: a7da79be40b88106ef9c4b839ddb00cc0306ab82620c6f126a79067af134ba9efe3adac6fcc5f170116ca373a425a0bcb3f767b604c1d1fd89a05f88953c0a3b
7
- data.tar.gz: 8ded8d08547574dd077d4286e4f506765efa911c49a3f0e4d0551a243d73d156228222844499146458771a55fd83c65fa0c6ff3788065258aa7de7b224d6aec4
6
+ metadata.gz: deac7dec6000ea0ecd3b48c5af16281ab442edce63576dc85d62cb77de7b7b742530d2006bdeb2269fc7dc5c8efbfcebe9e681d7f3f60b548865abe9a62b30f7
7
+ data.tar.gz: 997176963c950b687defab8cb5a62c45807887efb1631dd6b1a593b16a094c18f26211ba57e28a49db804976fb8588dbaf0a27cc5156c1ea4908a275b43bc350
@@ -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
- git://github.com/ruby/rake.git
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
- * Type one of the following:
17
+ * Run the test suite
18
18
 
19
- rake # If you have run rake's tests
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
 
@@ -1,3 +1,19 @@
1
+ === 12.3.2
2
+
3
+ ==== Bug fixes
4
+
5
+ * Fixed test fails caused by 2.6 warnings.
6
+ Pull Request #297 by hsbt
7
+
8
+ ==== Enhancements:
9
+
10
+ * Rdoc improvements.
11
+ Pull Request #293 by colby-swandale
12
+ * Improve multitask performance.
13
+ Pull Request #273 by jsm
14
+ * Add alias `prereqs`.
15
+ Pull Request #268 by take-cheeze
16
+
1
17
  === 12.3.1
2
18
 
3
19
  ==== Bug fixes
@@ -75,10 +75,10 @@ Type "rake --help" for all available options.
75
75
 
76
76
  === Rake Information
77
77
 
78
- * {Rake command-line}[rdoc-ref:doc/command_line_usage.rdoc]
79
- * {Writing Rakefiles}[rdoc-ref:doc/rakefile.rdoc]
80
- * The original {Rake announcement}[rdoc-ref:doc/rational.rdoc]
81
- * Rake {glossary}[rdoc-ref:doc/glossary.rdoc]
78
+ * {Rake command-line}[link:doc/command_line_usage.rdoc]
79
+ * {Writing Rakefiles}[link:doc/rakefile.rdoc]
80
+ * The original {Rake announcement}[link:doc/rational.rdoc]
81
+ * Rake {glossary}[link:doc/glossary.rdoc]
82
82
 
83
83
  === Presentations and Articles about Rake
84
84
 
@@ -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
@@ -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")
@@ -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")
@@ -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")
@@ -91,7 +91,7 @@ module Rake
91
91
  begin
92
92
  args = handle_options argv
93
93
  rescue ArgumentError
94
- # Backword compatibility for capistrano
94
+ # Backward compatibility for capistrano
95
95
  args = handle_options
96
96
  end
97
97
  collect_command_line_tasks(args)
@@ -392,7 +392,7 @@ module Rake
392
392
 
393
393
  def sort_options(options) # :nodoc:
394
394
  options.sort_by { |opt|
395
- opt.select { |o| o =~ /^-/ }.map(&:downcase).sort.reverse
395
+ opt.select { |o| o.is_a?(String) && o =~ /^-/ }.map(&:downcase).sort.reverse
396
396
  }
397
397
  end
398
398
  private :sort_options
@@ -687,7 +687,7 @@ module Rake
687
687
 
688
688
  def raw_load_rakefile # :nodoc:
689
689
  rakefile, location = find_rakefile_location
690
- if (! options.ignore_system) &&
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
@@ -32,7 +32,7 @@ unless Rake::CpuCounter.method_defined?(:count)
32
32
  require 'rbconfig'
33
33
 
34
34
  def count
35
- if defined?(Java::Java)
35
+ if RUBY_PLATFORM == 'java'
36
36
  count_via_java_runtime
37
37
  else
38
38
  case RbConfig::CONFIG['host_os']
@@ -26,9 +26,9 @@ module Rake
26
26
  private
27
27
 
28
28
  # :call-seq:
29
- # task task_name
30
- # task task_name: dependencies
31
- # task task_name, arguments => dependencies
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.
@@ -12,7 +12,7 @@ module Rake
12
12
  class FileCreationTask < FileTask
13
13
  # Is this file task needed? Yes if it doesn't exist.
14
14
  def needed?
15
- ! File.exist?(name)
15
+ !File.exist?(name)
16
16
  end
17
17
 
18
18
  # Time stamp for file creation task. This time stamp is earlier
@@ -385,7 +385,7 @@ module Rake
385
385
  /~$/
386
386
  ]
387
387
  DEFAULT_IGNORE_PROCS = [
388
- proc { |fn| fn =~ /(^|[\/\\])core$/ && ! File.directory?(fn) }
388
+ proc { |fn| fn =~ /(^|[\/\\])core$/ && !File.directory?(fn) }
389
389
  ]
390
390
 
391
391
  def import(array) # :nodoc:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- require "rake/task.rb"
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
- ! File.exist?(name) || out_of_date?(timestamp) || @application.options.build_all
17
+ !File.exist?(name) || out_of_date?(timestamp) || @application.options.build_all
18
18
  end
19
19
 
20
20
  # Time stamp for file task.
@@ -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 ! ok
38
+ # if !ok
39
39
  # puts "pattern not found (status = #{res.exitstatus})"
40
40
  # end
41
41
  # end
@@ -111,7 +111,7 @@ module FileUtils
111
111
  # Attempt to do a normal file link, but fall back to a copy if the link
112
112
  # fails.
113
113
  def safe_ln(*args)
114
- if ! LN_SUPPORTED[0]
114
+ if !LN_SUPPORTED[0]
115
115
  cp(*args)
116
116
  else
117
117
  begin
@@ -132,9 +132,7 @@ module Rake
132
132
  task package: ["#{package_dir}/#{file}"]
133
133
  file "#{package_dir}/#{file}" =>
134
134
  [package_dir_path] + package_files do
135
- chdir(package_dir) do
136
- sh @tar_command, "#{flag}cvf", file, package_name
137
- end
135
+ chdir(package_dir) { sh @tar_command, "#{flag}cvf", file, package_name }
138
136
  end
139
137
  end
140
138
  end
@@ -143,9 +141,7 @@ module Rake
143
141
  task package: ["#{package_dir}/#{zip_file}"]
144
142
  file "#{package_dir}/#{zip_file}" =>
145
143
  [package_dir_path] + package_files do
146
- chdir(package_dir) do
147
- sh @zip_command, "-r", zip_file, package_name
148
- end
144
+ chdir(package_dir) { sh @zip_command, "-r", zip_file, package_name }
149
145
  end
150
146
  end
151
147
 
@@ -71,12 +71,12 @@ module Rake
71
71
 
72
72
  # Do we have a result for the promise
73
73
  def result?
74
- ! @result.equal?(NOT_SET)
74
+ !@result.equal?(NOT_SET)
75
75
  end
76
76
 
77
77
  # Did the promise throw an error
78
78
  def error?
79
- ! @error.equal?(NOT_SET)
79
+ !@error.equal?(NOT_SET)
80
80
  end
81
81
 
82
82
  # Are we done with the promise
@@ -16,7 +16,7 @@ module Rake
16
16
  # this trim beyond the toplevel scope.
17
17
  def trim(n)
18
18
  result = self
19
- while n > 0 && ! result.empty?
19
+ while n > 0 && !result.empty?
20
20
  result = result.tail
21
21
  n -= 1
22
22
  end
@@ -15,6 +15,7 @@ module Rake
15
15
  class Task
16
16
  # List of prerequisites for a task.
17
17
  attr_reader :prerequisites
18
+ alias prereqs prerequisites
18
19
 
19
20
  # List of actions attached to a task.
20
21
  attr_reader :actions
@@ -247,7 +248,8 @@ module Rake
247
248
  r.invoke_with_call_chain(prereq_args, invocation_chain)
248
249
  end
249
250
  end
250
- futures.each(&:value)
251
+ # Iterate in reverse to improve performance related to thread waiting and switching
252
+ futures.reverse_each(&:value)
251
253
  end
252
254
 
253
255
  # Format the trace flags for display.
@@ -287,7 +289,7 @@ module Rake
287
289
  def add_description(description)
288
290
  return unless description
289
291
  comment = description.strip
290
- add_comment(comment) if comment && ! comment.empty?
292
+ add_comment(comment) if comment && !comment.empty?
291
293
  end
292
294
 
293
295
  def comment=(comment) # :nodoc:
@@ -60,7 +60,7 @@ module Rake
60
60
  end
61
61
 
62
62
  def generate_message_for_undefined_task(task_name)
63
- message = "Don't know how to build task '#{task_name}' (see --tasks)"
63
+ message = "Don't know how to build task '#{task_name}' (See the list of available tasks with `rake --tasks`)"
64
64
  message + generate_did_you_mean_suggestions(task_name)
65
65
  end
66
66
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Rake
3
- VERSION = "12.3.1"
3
+ VERSION = "12.3.2"
4
4
 
5
5
  module Version # :nodoc: all
6
6
  MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.3.1
4
+ version: 12.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi SHIBATA
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2018-03-22 00:00:00.000000000 Z
13
+ date: 2018-12-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -108,7 +108,11 @@ files:
108
108
  - MIT-LICENSE
109
109
  - README.rdoc
110
110
  - Rakefile
111
+ - bin/bundle
111
112
  - bin/console
113
+ - bin/rake
114
+ - bin/rdoc
115
+ - bin/rubocop
112
116
  - bin/setup
113
117
  - doc/command_line_usage.rdoc
114
118
  - doc/example/Rakefile1