rake 12.3.0 → 12.3.1

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: e2b718e4a254e7cf9aa20eafd30a425fa232d4b7949279198ce96585dfb0d276
4
- data.tar.gz: 8470eefb329a55718ab467caddac13baa467fee4f1ec98c89d5465cf769c98f9
3
+ metadata.gz: 4b9ff07e1f0f9a98e322529b863347c78cbcf73dcf5f37d2fc99e46c467c0b1a
4
+ data.tar.gz: 944f537241285a1e4ab625ad32b0011c4b333645db6d250b0eb28f509a276967
5
5
  SHA512:
6
- metadata.gz: c76eafa2e92c5ddcc9ee9e47136e1e265c14b482361e256715aefd454c79223eedeacf2886560996769e0050501bd9780c85b699192f0f6fb074eeb01a1d5641
7
- data.tar.gz: 72562540e4ef42e556ede99ea8ecc8f0488da248b58bd1432e6834b6297f823af3518e0d358fd18054c0347e863aabe7a30ce4f7c9eff7850ddeb233c609af1c
6
+ metadata.gz: a7da79be40b88106ef9c4b839ddb00cc0306ab82620c6f126a79067af134ba9efe3adac6fcc5f170116ca373a425a0bcb3f767b604c1d1fd89a05f88953c0a3b
7
+ data.tar.gz: 8ded8d08547574dd077d4286e4f506765efa911c49a3f0e4d0551a243d73d156228222844499146458771a55fd83c65fa0c6ff3788065258aa7de7b224d6aec4
@@ -1,11 +1,29 @@
1
+ === 12.3.1
2
+
3
+ ==== Bug fixes
4
+
5
+ * Support did_you_mean >= v1.2.0 which has a breaking change on formatters.
6
+ Pull request #262 by FUJI Goro.
7
+
8
+ ==== Enhancements:
9
+
10
+ * Don't run task if it depends on already invoked but failed task.
11
+ Pull request #252 by Gonzalo Rodriguez.
12
+ * Make space trimming consistent for all task arguments.
13
+ Pull request #259 by Gonzalo Rodriguez.
14
+ * Removes duplicated inclusion of Rake::DSL in tests.
15
+ Pull request #254 by Gonzalo Rodriguez.
16
+ * Re-raise a LoadError that didn't come from require in the test loader.
17
+ Pull request #250 by Dylan Thacker-Smith.
18
+
1
19
  === 12.3.0
2
20
 
3
21
  ==== Compatibility Changes
4
22
 
5
- * Bump `required_ruby_verion` to Ruby 2.0.0. Rake was already
6
- removed to support for Ruby 1.9.x.
23
+ * Bump `required_ruby_version` to Ruby 2.0.0. Rake has already
24
+ removed support for Ruby 1.9.x.
7
25
 
8
- === Enhancements:
26
+ ==== Enhancements:
9
27
 
10
28
  * Support `test-bundled-gems` task on ruby core.
11
29
 
@@ -25,8 +25,8 @@ Rake has the following features:
25
25
 
26
26
  * A library of prepackaged tasks to make building rakefiles easier. For example,
27
27
  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 respectively.)
28
+ tasks for building RDoc, Gems, and publishing to FTP were included in rake but they're now
29
+ available in RDoc, RubyGems, and rake-contrib respectively.)
30
30
 
31
31
  * Supports parallel execution of tasks.
32
32
 
@@ -130,7 +130,7 @@ Rake is available under an MIT-style license.
130
130
  = Other stuff
131
131
 
132
132
  Author:: Jim Weirich <jim.weirich@gmail.com>
133
- Requires:: Ruby 1.9.3 or later
133
+ Requires:: Ruby 2.0.0 or later
134
134
  License:: Copyright Jim Weirich.
135
135
  Released under an MIT-style license. See the MIT-LICENSE
136
136
  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
- require "bundler/gem_tasks"
13
- require "rake/testtask"
14
- require "rdoc/task"
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
- `git checkout gh-pages`
33
+ %x[git checkout gh-pages]
31
34
  require "fileutils"
32
35
  FileUtils.rm_rf "/tmp/html"
33
36
  FileUtils.mv "html", "/tmp"
@@ -172,7 +172,7 @@ module Rake
172
172
  args = []
173
173
 
174
174
  begin
175
- /((?:[^\\,]|\\.)*?)\s*(?:,\s*(.*))?$/ =~ remaining_args
175
+ /\s*((?:[^\\,]|\\.)*?)\s*(?:,\s*(.*))?$/ =~ remaining_args
176
176
 
177
177
  remaining_args = $2
178
178
  args << $1.gsub(/\\(.)/, '\1')
@@ -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
@@ -19,6 +19,7 @@ argv = ARGV.select do |argument|
19
19
  false
20
20
  end
21
21
  rescue LoadError => e
22
+ raise unless e.path
22
23
  abort "\nFile does not exist: #{e.path}\n\n"
23
24
  end
24
25
  end
@@ -103,6 +103,7 @@ module Rake
103
103
  @scope = app.current_scope
104
104
  @arg_names = nil
105
105
  @locations = []
106
+ @invocation_exception = nil
106
107
  end
107
108
 
108
109
  # Enhance a task with prerequisites or actions. Returns self.
@@ -183,20 +184,39 @@ module Rake
183
184
 
184
185
  # Same as invoke, but explicitly pass a call chain to detect
185
186
  # circular dependencies.
186
- def invoke_with_call_chain(task_args, invocation_chain) # :nodoc:
187
- new_chain = InvocationChain.append(self, invocation_chain)
187
+ #
188
+ # If multiple tasks depend on this
189
+ # one in parallel, they will all fail if the first execution of
190
+ # this task fails.
191
+ def invoke_with_call_chain(task_args, invocation_chain)
192
+ new_chain = Rake::InvocationChain.append(self, invocation_chain)
188
193
  @lock.synchronize do
189
- if application.options.trace
190
- application.trace "** Invoke #{name} #{format_trace_flags}"
194
+ begin
195
+ if application.options.trace
196
+ application.trace "** Invoke #{name} #{format_trace_flags}"
197
+ end
198
+
199
+ if @already_invoked
200
+ if @invocation_exception
201
+ if application.options.trace
202
+ application.trace "** Previous invocation of #{name} failed #{format_trace_flags}"
203
+ end
204
+ raise @invocation_exception
205
+ else
206
+ return
207
+ end
208
+ end
209
+
210
+ @already_invoked = true
211
+
212
+ invoke_prerequisites(task_args, new_chain)
213
+ execute(task_args) if needed?
214
+ rescue Exception => ex
215
+ add_chain_to(ex, new_chain)
216
+ @invocation_exception = ex
217
+ raise ex
191
218
  end
192
- return if @already_invoked
193
- @already_invoked = true
194
- invoke_prerequisites(task_args, new_chain)
195
- execute(task_args) if needed?
196
219
  end
197
- rescue Exception => ex
198
- add_chain_to(ex, new_chain)
199
- raise ex
200
220
  end
201
221
  protected :invoke_with_call_chain
202
222
 
@@ -61,16 +61,20 @@ module Rake
61
61
 
62
62
  def generate_message_for_undefined_task(task_name)
63
63
  message = "Don't know how to build task '#{task_name}' (see --tasks)"
64
+ message + generate_did_you_mean_suggestions(task_name)
65
+ end
64
66
 
65
- suggestion_message = \
66
- if defined?(::DidYouMean::SpellChecker) && defined?(::DidYouMean::Formatter)
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
67
+ def generate_did_you_mean_suggestions(task_name)
68
+ return "" unless defined?(::DidYouMean::SpellChecker)
72
69
 
73
- message + suggestion_message
70
+ suggestions = ::DidYouMean::SpellChecker.new(dictionary: @tasks.keys).correct(task_name.to_s)
71
+ if ::DidYouMean.respond_to?(:formatter)# did_you_mean v1.2.0 or later
72
+ ::DidYouMean.formatter.message_for(suggestions)
73
+ elsif defined?(::DidYouMean::Formatter) # before did_you_mean v1.2.0
74
+ ::DidYouMean::Formatter.new(suggestions).to_s
75
+ else
76
+ ""
77
+ end
74
78
  end
75
79
 
76
80
  def synthesize_file_task(task_name) # :nodoc:
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Rake
3
- VERSION = "12.3.0"
3
+ VERSION = "12.3.1"
4
4
 
5
5
  module Version # :nodoc: all
6
6
  MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "."
@@ -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,7 +23,7 @@ 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 = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } -
26
+ s.files = %x[git ls-files -z].split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } -
28
27
  %w[.rubocop.yml .travis.yml appveyor.yml]
29
28
  s.bindir = "exe"
30
29
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
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.0
4
+ version: 12.3.1
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: 2017-10-25 00:00:00.000000000 Z
13
+ date: 2018-03-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  version: 1.3.2
190
190
  requirements: []
191
191
  rubyforge_project:
192
- rubygems_version: 2.7.2
192
+ rubygems_version: 2.7.6
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: Rake is a Make-like program implemented in Ruby