rake 13.0.6 → 13.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d15ff579792b6bca336893adc15bc3de3d8c8580fcdb2b2201926df30752284d
4
- data.tar.gz: 499353c3ebbcd6492fb8d9fdd96078bf7954c1b3ec21f1d80bac8bf1ea592ea0
3
+ metadata.gz: d9d05e9e17d2650b5f35d5b08c11ce7d6bb42b2b240f2dd78b56ca15c0ac65ae
4
+ data.tar.gz: f98de3fab3e0d9c8938a790fef63841d0bdd6b9a33e85cd7a8dc3116a0ce42bd
5
5
  SHA512:
6
- metadata.gz: 664fa6daddc629e8bb6fd1863a765e8a7d7f2eda234ab423800dc810fe9bded3d4622e19f633e4307d322cd14adfb0c197de04394df1a0a6fa0b86fc702a7d93
7
- data.tar.gz: 7f0f7208745a41dacf9959b2a4ee063deeee549d0d2e90904c47d3e84feb976e65fcc4e33f943eefdfa0ec0334e83b63ad280be0ff3926aff471a9c0b25acef9
6
+ metadata.gz: f2bec8664323e358cff5cf78af40d4011e1d002639ad9e04e7ce6ef0debad26572a7db636ef26544c8901fd7975dffd2de5dcf0e2e03785319be38b292c87df9
7
+ data.tar.gz: f5c5b37cdfe7965d70bb74124496b54341789d05ccf1219e42467a57a3476b6d1f29f5fb9a65b3a0f85bc8a0644d338cd7a5facf1bc81e1221886f7d40437746
data/README.rdoc CHANGED
@@ -116,7 +116,7 @@ other projects with similar (and not so similar) goals.
116
116
 
117
117
  [<b>Eric Hodel</b>] For aid in maintaining rake.
118
118
 
119
- [<b>Hiroshi SHIBATA</b>] Maintainer of Rake 10.X and Rake 11.X
119
+ [<b>Hiroshi SHIBATA</b>] Maintainer of Rake 10 and later
120
120
 
121
121
  == License
122
122
 
@@ -94,10 +94,32 @@ module Rake
94
94
  # Backward compatibility for capistrano
95
95
  args = handle_options
96
96
  end
97
+ load_debug_at_stop_feature
97
98
  collect_command_line_tasks(args)
98
99
  end
99
100
  end
100
101
 
102
+ def load_debug_at_stop_feature
103
+ return unless ENV["RAKE_DEBUG"]
104
+ require "debug/session"
105
+ DEBUGGER__::start no_sigint_hook: true, nonstop: true
106
+ Rake::Task.prepend Module.new {
107
+ def execute(*)
108
+ exception = DEBUGGER__::SESSION.capture_exception_frames(/(exe|bin|lib)\/rake/) do
109
+ super
110
+ end
111
+
112
+ if exception
113
+ STDERR.puts exception.message
114
+ DEBUGGER__::SESSION.enter_postmortem_session exception
115
+ raise exception
116
+ end
117
+ end
118
+ }
119
+ rescue LoadError
120
+ end
121
+ private :load_debug_at_stop_feature
122
+
101
123
  # Find the rakefile and then load it and any pending imports.
102
124
  def load_rakefile
103
125
  standard_exception_handling do
@@ -124,7 +146,7 @@ module Rake
124
146
 
125
147
  yield
126
148
 
127
- thread_pool.join
149
+ thread_pool.join if defined?(@thread_pool)
128
150
  if options.job_stats
129
151
  stats = thread_pool.statistics
130
152
  puts "Maximum active threads: #{stats[:max_active_threads]} + main"
@@ -143,7 +165,13 @@ module Rake
143
165
 
144
166
  # Application options from the command line
145
167
  def options
146
- @options ||= OpenStruct.new
168
+ @options ||= Struct.new(
169
+ :always_multitask, :backtrace, :build_all, :dryrun,
170
+ :ignore_deprecate, :ignore_system, :job_stats, :load_system,
171
+ :nosearch, :rakelib, :show_all_tasks, :show_prereqs,
172
+ :show_task_pattern, :show_tasks, :silent, :suppress_backtrace_pattern,
173
+ :thread_pool_size, :trace, :trace_output, :trace_rules
174
+ ).new
147
175
  end
148
176
 
149
177
  # Return the thread pool used for multithreaded processing.
@@ -215,7 +243,7 @@ module Rake
215
243
  display_exception_details_seen << ex
216
244
 
217
245
  display_exception_message_details(ex)
218
- display_exception_backtrace(ex)
246
+ display_exception_backtrace(ex) if ex.backtrace
219
247
  display_cause_details(ex.cause) if has_cause?(ex)
220
248
  end
221
249
 
@@ -237,6 +265,8 @@ module Rake
237
265
  def display_exception_message_details(ex) # :nodoc:
238
266
  if ex.instance_of?(RuntimeError)
239
267
  trace ex.message
268
+ elsif ex.respond_to?(:detailed_message)
269
+ trace "#{ex.class.name}: #{ex.detailed_message(highlight: false)}"
240
270
  else
241
271
  trace "#{ex.class.name}: #{ex.message}"
242
272
  end
@@ -575,7 +605,7 @@ module Rake
575
605
  ["--tasks", "-T [PATTERN]",
576
606
  "Display the tasks (matching optional PATTERN) " +
577
607
  "with descriptions, then exit. " +
578
- "-AT combination displays all of tasks contained no description.",
608
+ "-AT combination displays all the tasks, including those without descriptions.",
579
609
  lambda { |value|
580
610
  select_tasks_to_show(options, :tasks, value)
581
611
  }
@@ -90,6 +90,7 @@ module Rake
90
90
  # directory "testdata/doc"
91
91
  #
92
92
  def directory(*args, &block) # :doc:
93
+ args = args.flat_map { |arg| arg.is_a?(FileList) ? arg.to_a.flatten : arg }
93
94
  result = file_create(*args, &block)
94
95
  dir, _ = *Rake.application.resolve_args(args)
95
96
  dir = Rake.from_pathname(dir)
@@ -145,7 +146,7 @@ module Rake
145
146
  #
146
147
  # Example:
147
148
  # rule '.o' => '.c' do |t|
148
- # sh 'cc', '-o', t.name, t.source
149
+ # sh 'cc', '-c', '-o', t.name, t.source
149
150
  # end
150
151
  #
151
152
  def rule(*args, &block) # :doc:
@@ -158,7 +159,7 @@ module Rake
158
159
  #
159
160
  # Example:
160
161
  # desc "Run the Unit Tests"
161
- # task test: [:build]
162
+ # task test: [:build] do
162
163
  # # ... run tests
163
164
  # end
164
165
  #
@@ -14,14 +14,18 @@ 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
+ begin
18
+ out_of_date?(File.mtime(name)) || @application.options.build_all
19
+ rescue Errno::ENOENT
20
+ true
21
+ end
18
22
  end
19
23
 
20
24
  # Time stamp for file task.
21
25
  def timestamp
22
- if File.exist?(name)
23
- File.mtime(name.to_s)
24
- else
26
+ begin
27
+ File.mtime(name)
28
+ rescue Errno::ENOENT
25
29
  Rake::LATE
26
30
  end
27
31
  end
@@ -60,8 +60,6 @@ module FileUtils
60
60
 
61
61
  def create_shell_runner(cmd) # :nodoc:
62
62
  show_command = sh_show_command cmd
63
- show_command = show_command[0, 42] + "..." unless $trace
64
-
65
63
  lambda do |ok, status|
66
64
  ok or
67
65
  fail "Command failed with status (#{status.exitstatus}): " +
@@ -79,7 +79,7 @@ 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)
82
+ # True if parent directory should be omitted (default is false)
83
83
  attr_accessor :without_parent_dir
84
84
 
85
85
  # Create a Package Task with the given name and version. Use +:noversion+
data/lib/rake/task.rb CHANGED
@@ -276,9 +276,9 @@ module Rake
276
276
  application.trace "** Execute #{name}" if application.options.trace
277
277
  application.enhance_with_matching_rule(name) if @actions.empty?
278
278
  if opts = Hash.try_convert(args) and !opts.empty?
279
- @actions.each { |act| act.call(self, args, **opts)}
279
+ @actions.each { |act| act.call(self, args, **opts) }
280
280
  else
281
- @actions.each { |act| act.call(self, args)}
281
+ @actions.each { |act| act.call(self, args) }
282
282
  end
283
283
  end
284
284
 
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "rake/promise"
4
+ require "set"
4
5
 
5
6
  module Rake
6
7
 
@@ -9,7 +10,6 @@ module Rake
9
10
  # Creates a ThreadPool object. The +thread_count+ parameter is the size
10
11
  # of the pool.
11
12
  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 = "13.0.6"
3
+ VERSION = "13.2.0"
4
4
 
5
5
  module Version # :nodoc: all
6
6
  MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "."
data/lib/rake.rb CHANGED
@@ -30,7 +30,6 @@ require "fileutils"
30
30
  require "singleton"
31
31
  require "monitor"
32
32
  require "optparse"
33
- require "ostruct"
34
33
 
35
34
  require "rake/ext/string"
36
35
 
data/rake.gemspec CHANGED
@@ -1,32 +1,33 @@
1
1
  # frozen_string_literal: true
2
- require_relative 'lib/rake/version'
2
+
3
+ require_relative "lib/rake/version"
3
4
 
4
5
  Gem::Specification.new do |s|
5
- s.name = "rake".freeze
6
+ s.name = "rake"
6
7
  s.version = Rake::VERSION
7
- s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze]
8
- s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze]
8
+ s.authors = ["Hiroshi SHIBATA", "Eric Hodel", "Jim Weirich"]
9
+ s.email = ["hsbt@ruby-lang.org", "drbrain@segment7.net", ""]
9
10
 
10
- s.summary = "Rake is a Make-like program implemented in Ruby".freeze
11
- s.description = <<-DESCRIPTION
12
- Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
13
- specified in standard Ruby syntax.
14
- Rake has the following features:
15
- * Rakefiles (rake's version of Makefiles) are completely defined in standard Ruby syntax.
16
- No XML files to edit. No quirky Makefile syntax to worry about (is that a tab or a space?)
17
- * Users can specify tasks with prerequisites.
18
- * Rake supports rule patterns to synthesize implicit tasks.
19
- * Flexible FileLists that act like arrays but know about manipulating file names and paths.
20
- * Supports parallel execution of tasks.
11
+ s.summary = "Rake is a Make-like program implemented in Ruby"
12
+ s.description = <<~DESCRIPTION
13
+ Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
14
+ specified in standard Ruby syntax.
15
+ Rake has the following features:
16
+ * Rakefiles (rake's version of Makefiles) are completely defined in standard Ruby syntax.
17
+ No XML files to edit. No quirky Makefile syntax to worry about (is that a tab or a space?)
18
+ * Users can specify tasks with prerequisites.
19
+ * Rake supports rule patterns to synthesize implicit tasks.
20
+ * Flexible FileLists that act like arrays but know about manipulating file names and paths.
21
+ * Supports parallel execution of tasks.
21
22
  DESCRIPTION
22
- s.homepage = "https://github.com/ruby/rake".freeze
23
- s.licenses = ["MIT".freeze]
23
+ s.homepage = "https://github.com/ruby/rake"
24
+ s.licenses = ["MIT"]
24
25
 
25
26
  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",
27
+ "bug_tracker_uri" => "https://github.com/ruby/rake/issues",
28
+ "changelog_uri" => "https://github.com/ruby/rake/blob/v#{s.version}/History.rdoc",
28
29
  "documentation_uri" => "https://ruby.github.io/rake",
29
- "source_code_uri" => "https://github.com/ruby/rake/tree/v#{s.version}",
30
+ "source_code_uri" => "https://github.com/ruby/rake/tree/v#{s.version}"
30
31
  }
31
32
 
32
33
  s.files = [
@@ -93,8 +94,8 @@ Rake has the following features:
93
94
  ]
94
95
  s.bindir = "exe"
95
96
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
96
- s.require_paths = ["lib".freeze]
97
+ s.require_paths = ["lib"]
97
98
 
98
- s.required_ruby_version = Gem::Requirement.new(">= 2.2".freeze)
99
- s.rdoc_options = ["--main".freeze, "README.rdoc".freeze]
99
+ s.required_ruby_version = Gem::Requirement.new(">= 2.3")
100
+ s.rdoc_options = ["--main", "README.rdoc"]
100
101
  end
metadata CHANGED
@@ -1,16 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.0.6
4
+ version: 13.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi SHIBATA
8
8
  - Eric Hodel
9
9
  - Jim Weirich
10
- autorequire:
11
10
  bindir: exe
12
11
  cert_chain: []
13
- date: 2021-07-09 00:00:00.000000000 Z
12
+ date: 2024-04-02 00:00:00.000000000 Z
14
13
  dependencies: []
15
14
  description: |
16
15
  Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
@@ -96,10 +95,9 @@ licenses:
96
95
  - MIT
97
96
  metadata:
98
97
  bug_tracker_uri: https://github.com/ruby/rake/issues
99
- changelog_uri: https://github.com/ruby/rake/blob/v13.0.6/History.rdoc
98
+ changelog_uri: https://github.com/ruby/rake/blob/v13.2.0/History.rdoc
100
99
  documentation_uri: https://ruby.github.io/rake
101
- source_code_uri: https://github.com/ruby/rake/tree/v13.0.6
102
- post_install_message:
100
+ source_code_uri: https://github.com/ruby/rake/tree/v13.2.0
103
101
  rdoc_options:
104
102
  - "--main"
105
103
  - README.rdoc
@@ -109,15 +107,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
107
  requirements:
110
108
  - - ">="
111
109
  - !ruby/object:Gem::Version
112
- version: '2.2'
110
+ version: '2.3'
113
111
  required_rubygems_version: !ruby/object:Gem::Requirement
114
112
  requirements:
115
113
  - - ">="
116
114
  - !ruby/object:Gem::Version
117
115
  version: '0'
118
116
  requirements: []
119
- rubygems_version: 3.3.0.dev
120
- signing_key:
117
+ rubygems_version: 3.6.0.dev
121
118
  specification_version: 4
122
119
  summary: Rake is a Make-like program implemented in Ruby
123
120
  test_files: []