From 84a91848bf0070bf83e3e69f4b2cd294bbcc98fb Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 20 Jun 2013 11:40:23 +0800 Subject: [PATCH 001/813] Bump to 10.1.1.beta.1 --- lib/rake/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 05c934d78..b03fb74b8 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,5 +1,5 @@ module Rake - VERSION = '10.1.0' + VERSION = '10.1.1.beta.1' module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split '.' From 492177f7b045d902e318049226b3e2071fcd2108 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 20 Jun 2013 11:45:09 +0800 Subject: [PATCH 002/813] Allow -j1 Also fix so that the main thread is counted in the J number. --- lib/rake/application.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index b76244b7a..8f85c42a0 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -117,8 +117,8 @@ def run_with_threads thread_pool.join if options.job_stats stats = thread_pool.statistics - puts "Maximum active threads: #{stats[:max_active_threads]}" - puts "Total threads in play: #{stats[:total_threads_in_play]}" + puts "Maximum active threads: #{stats[:max_active_threads]} + main" + puts "Total threads in play: #{stats[:total_threads_in_play]} + main" end ThreadHistoryDisplay.new(thread_pool.history).show if options.job_stats == :history @@ -409,7 +409,7 @@ def standard_rake_options "Specifies the maximum number of tasks to execute in parallel. " + "(default is 2)", lambda { |value| - options.thread_pool_size = [(value || 2).to_i, 2].max + options.thread_pool_size = [(value || 2).to_i, 1].max - 1 } ], ['--job-stats [LEVEL]', From 56b44c96c01d0b6ee9626686fcf9a15f560daa59 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 20 Jun 2013 12:07:35 +0800 Subject: [PATCH 003/813] Fix pool size tests. --- lib/rake/application.rb | 2 +- test/test_rake_application_options.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 8f85c42a0..ea433bad4 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -409,7 +409,7 @@ def standard_rake_options "Specifies the maximum number of tasks to execute in parallel. " + "(default is 2)", lambda { |value| - options.thread_pool_size = [(value || 2).to_i, 1].max - 1 + options.thread_pool_size = [(value || 3).to_i, 3].max - 1 } ], ['--job-stats [LEVEL]', diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index b3220b8a9..dccf62dc2 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -112,7 +112,7 @@ def test_help def test_jobs flags(['--jobs', '4'], ['-j', '4']) do |opts| - assert_equal 4, opts.thread_pool_size + assert_equal 3, opts.thread_pool_size end flags(['--jobs', 'asdas'], ['-j', 'asdas']) do |opts| assert_equal 2, opts.thread_pool_size From 95514fa764529d4d485d07e9686cd42a8e45e785 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 20 Jun 2013 12:22:55 +0800 Subject: [PATCH 004/813] Add CPU count autodetect. --- lib/rake.rb | 1 + lib/rake/application.rb | 10 ++- lib/rake/cpu_counter.rb | 100 ++++++++++++++++++++++++++ lib/rake/rake_module.rb | 5 ++ test/test_rake_application_options.rb | 13 +++- 5 files changed, 126 insertions(+), 3 deletions(-) create mode 100644 lib/rake/cpu_counter.rb diff --git a/lib/rake.rb b/lib/rake.rb index 531cfc82b..ecec28847 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -41,6 +41,7 @@ require 'rake/win32' require 'rake/linked_list' +require 'rake/cpu_counter' require 'rake/scope' require 'rake/task_argument_error' require 'rake/rule_recursion_overflow_error' diff --git a/lib/rake/application.rb b/lib/rake/application.rb index ea433bad4..d51d2e26e 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -409,7 +409,15 @@ def standard_rake_options "Specifies the maximum number of tasks to execute in parallel. " + "(default is 2)", lambda { |value| - options.thread_pool_size = [(value || 3).to_i, 3].max - 1 + if value == 'max' + value = FIXNUM_MAX + elsif value =~ /^\d+$/ + value = value.to_i + else + value = Rake.suggested_thread_count + end + value = 1 if value < 1 + options.thread_pool_size = value - 1 } ], ['--job-stats [LEVEL]', diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb new file mode 100644 index 000000000..b68b9b428 --- /dev/null +++ b/lib/rake/cpu_counter.rb @@ -0,0 +1,100 @@ +require 'rbconfig' + +module Rake + + # Based on a script at: + # http://stackoverflow.com/questions/891537/ruby-detect-number-of-cpus-installed + class CpuCounter + def self.count + new.count_with_default + end + + def count_with_default(default=4) + count || default + rescue StandardError + default + end + + def count + if defined?(Java::Java) + count_via_java_runtime + else + case RbConfig::CONFIG['host_os'] + when /darwin9/ + count_via_hwprefs_cpu_count + when /darwin/ + count_via_hwprefs_thread_count || count_via_sysctl + when /linux/ + count_via_cpuinfo + when /freebsd/ + count_via_sysctl + when /mswin|mingw/ + count_via_win32 + else + # Try everything + count_via_win32 || + count_via_sysctl || + count_via_hwprefs_thread_count || + count_via_hwprefs_cpu_count + end + end + end + + def count_via_java_runtime + Java::Java.lang.Runtime.getRuntime.availableProcessors + rescue StandardError + nil + end + + def count_via_win32 + require 'win32ole' + wmi = WIN32OLE.connect("winmgmts://") + cpu = wmi.ExecQuery("select NumberOfCores from Win32_Processor") # TODO count hyper-threaded in this + cpu.to_enum.first.NumberOfCores + rescue StandardError + nil + end + + def count_via_cpuinfo + open('/proc/cpuinfo') { |f| f.readlines }.grep(/processor/).size + rescue StandardError + nil + end + + def count_via_hwprefs_thread_count + run 'hwprefs', 'thread_count' + end + + def count_via_hwprefs_cpu_count + run 'hwprefs', 'cpu_count' + end + + def count_via_sysctl + run 'sysctl', '-n hw.ncpu' + end + + def run(command, args) + cmd = resolve_command(command) + if cmd + `#{cmd} #{args}`.to_i + else + nil + end + end + + def resolve_command(command) + look_for_command("/usr/sbin", command) || + look_for_command("/sbin", command) || + in_path_command(command) + end + + def look_for_command(dir, command) + path = File.join(dir, command) + File.exist?(path) ? path : nil + end + + def in_path_command(command) + `which #{command}` != '' ? command : nil + end + end +end diff --git a/lib/rake/rake_module.rb b/lib/rake/rake_module.rb index fcf580006..a9d9c67dd 100644 --- a/lib/rake/rake_module.rb +++ b/lib/rake/rake_module.rb @@ -15,6 +15,11 @@ def application=(app) @application = app end + def suggested_thread_count + cpus = Rake::CpuCounter.count || 2 + cpus + 4 + end + # Return the original directory where the Rake application was started. def original_dir application.original_dir diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index dccf62dc2..fce59344b 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -111,14 +111,23 @@ def test_help end def test_jobs + flags(['--jobs', '0'], ['-j', '0']) do |opts| + assert_equal 0, opts.thread_pool_size + end + flags(['--jobs', '1'], ['-j', '1']) do |opts| + assert_equal 0, opts.thread_pool_size + end flags(['--jobs', '4'], ['-j', '4']) do |opts| assert_equal 3, opts.thread_pool_size end flags(['--jobs', 'asdas'], ['-j', 'asdas']) do |opts| - assert_equal 2, opts.thread_pool_size + assert_equal Rake.suggested_thread_count-1, opts.thread_pool_size + end + flags(['--jobs', 'max'], ['-j', 'max']) do |opts| + assert opts.thread_pool_size > 1_000_000, "thread pool size should be huge (was #{opts.thread_pool_size})" end flags('--jobs', '-j') do |opts| - assert_equal 2, opts.thread_pool_size + assert_equal Rake.suggested_thread_count-1, opts.thread_pool_size end end From ecdcbc98fbc3ce9da166ba1e0f4bfe96db8a711c Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 20 Jun 2013 13:19:08 +0800 Subject: [PATCH 005/813] Use suggested thread count when no -j is given. --- lib/rake/application.rb | 2 +- lib/rake/rake_module.rb | 4 ++-- test/test_rake_application_options.rb | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index d51d2e26e..73e68957d 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -138,7 +138,7 @@ def options # Return the thread pool used for multithreaded processing. def thread_pool # :nodoc: - @thread_pool ||= ThreadPool.new(options.thread_pool_size || FIXNUM_MAX) + @thread_pool ||= ThreadPool.new(options.thread_pool_size || Rake.suggested_thread_count-1) end # private ---------------------------------------------------------------- diff --git a/lib/rake/rake_module.rb b/lib/rake/rake_module.rb index a9d9c67dd..6d569acc9 100644 --- a/lib/rake/rake_module.rb +++ b/lib/rake/rake_module.rb @@ -16,8 +16,8 @@ def application=(app) end def suggested_thread_count - cpus = Rake::CpuCounter.count || 2 - cpus + 4 + @cpu_count ||= Rake::CpuCounter.count + @cpu_count + 4 end # Return the original directory where the Rake application was started. diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index fce59344b..b29eac7de 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -111,6 +111,9 @@ def test_help end def test_jobs + flags([]) do |opts| + assert_nil opts.thread_pool_size + end flags(['--jobs', '0'], ['-j', '0']) do |opts| assert_equal 0, opts.thread_pool_size end From bfa3218fd17c64cff27456ae2f57ecfb6249e1d7 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 20 Jun 2013 13:36:52 +0800 Subject: [PATCH 006/813] Use suggested thread count for max number of threads --- doc/command_line_usage.rdoc | 27 +++++++++++++++++---------- lib/rake/application.rb | 2 +- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/doc/command_line_usage.rdoc b/doc/command_line_usage.rdoc index 57d51e8d0..47d5d2489 100644 --- a/doc/command_line_usage.rdoc +++ b/doc/command_line_usage.rdoc @@ -48,22 +48,29 @@ Options are: Display some help text and exit. [--jobs _number_ (-j)] - Specifies the number of active concurrent tasks used. The - suggested value is equal to the number of CPUs. The concurrent - tasks are used to execute the multitask prerequisites. - Also see the -m option which turns all tasks into - multitasks. + + Specifies the maximun number of concurrent threads allowed. Rake + will allocate threads as needed up to this maximum number. + + If omitted, Rake will attempt to estimate the number of CPUs on + the system and add 4 to that number. + + The concurrent threads are used to execute the multitask + prerequisites. Also see the -m option which turns all + tasks into multitasks. Sample values: - (no -j) : unlimited concurrent tasks (standard rake behavior) - -j : 2 concurrent tasks (exact number may change) - -j 16 : 16 concurrent tasks + (no -j) : Allow up to (# of CPUs + 4) number of threads + -j : Allow up to (# of CPUs + 4) number of threads + -j1 : Allow only one thread (the main thread) + -j16 : Allow up to 16 concurrent threads + -jmax : Allow unlimited number of threads [--job-stats _level_] Display job statistics at the completion of the run. By default, - this will display the requested number of active tasks (from the - -j options) and the maximum number of tasks in play at any given + this will display the requested number of active threads (from the + -j options) and the maximum number of threads in play at any given time. If the optional _level_ is history, then a complete trace diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 73e68957d..92272cd46 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -407,7 +407,7 @@ def standard_rake_options ], ['--jobs', '-j [NUMBER]', "Specifies the maximum number of tasks to execute in parallel. " + - "(default is 2)", + "(default is number of CPU cores + 4)", lambda { |value| if value == 'max' value = FIXNUM_MAX From a850537787776ca0e7fab0c775234a14bdb601df Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 20 Jun 2013 13:51:57 +0800 Subject: [PATCH 007/813] --jobs is now unlimited --- doc/command_line_usage.rdoc | 9 ++++----- lib/rake/application.rb | 2 +- test/test_rake_application_options.rb | 5 +---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/doc/command_line_usage.rdoc b/doc/command_line_usage.rdoc index 47d5d2489..4d13370ec 100644 --- a/doc/command_line_usage.rdoc +++ b/doc/command_line_usage.rdoc @@ -60,11 +60,10 @@ Options are: tasks into multitasks. Sample values: - (no -j) : Allow up to (# of CPUs + 4) number of threads - -j : Allow up to (# of CPUs + 4) number of threads - -j1 : Allow only one thread (the main thread) - -j16 : Allow up to 16 concurrent threads - -jmax : Allow unlimited number of threads + (no -j) : Allow up to (# of CPUs + 4) number of threads + --jobs : Allow unlimited number of threads + --jobs=1 : Allow only one thread (the main thread) + --jobs=16 : Allow up to 16 concurrent threads [--job-stats _level_] diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 92272cd46..9269a52ef 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -409,7 +409,7 @@ def standard_rake_options "Specifies the maximum number of tasks to execute in parallel. " + "(default is number of CPU cores + 4)", lambda { |value| - if value == 'max' + if value.nil? || value == '' value = FIXNUM_MAX elsif value =~ /^\d+$/ value = value.to_i diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index b29eac7de..f6c8ad326 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -126,11 +126,8 @@ def test_jobs flags(['--jobs', 'asdas'], ['-j', 'asdas']) do |opts| assert_equal Rake.suggested_thread_count-1, opts.thread_pool_size end - flags(['--jobs', 'max'], ['-j', 'max']) do |opts| - assert opts.thread_pool_size > 1_000_000, "thread pool size should be huge (was #{opts.thread_pool_size})" - end flags('--jobs', '-j') do |opts| - assert_equal Rake.suggested_thread_count-1, opts.thread_pool_size + assert opts.thread_pool_size > 1_000_000, "thread pool size should be huge (was #{opts.thread_pool_size})" end end From 20a1f414eaa1d51cf66c6100e5b3b41e8745cf53 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Sat, 22 Jun 2013 13:49:43 +0530 Subject: [PATCH 008/813] Fix some typos --- lib/rake/linked_list.rb | 2 +- lib/rake/task_arguments.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rake/linked_list.rb b/lib/rake/linked_list.rb index 26483703f..7369e83ac 100644 --- a/lib/rake/linked_list.rb +++ b/lib/rake/linked_list.rb @@ -80,7 +80,7 @@ def self.empty # # When inheriting from the LinkedList class, you should implement # a type specific Empty class as well. Make sure you set the class - # instance variable @parent to the assocated list class (this + # instance variable @parent to the associated list class (this # allows conj, cons and make to work polymorphically). class EmptyLinkedList < LinkedList @parent = LinkedList diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index 009468257..1e40b3bbe 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -21,12 +21,12 @@ def initialize(names, values, parent=nil) } end - # Retrive the complete array of sequential values + # Retrieve the complete array of sequential values def to_a @values.dup end - # Retrive the list of values not associated with named arguments + # Retrieve the list of values not associated with named arguments def extras @values[@names.length..-1] || [] end From 586bd519d7e83e15692b209b9e154e5cfe0020b8 Mon Sep 17 00:00:00 2001 From: Randy Coulman Date: Sat, 6 Jul 2013 16:18:13 -0700 Subject: [PATCH 009/813] Regenerate and reload any imported files. In some cases, loading an imported file will modify the task that generates that file. However, since that task was already invoked prior to the import, it will not be re-invoked. This can result in the imported file never being re-generated. --- lib/rake/application.rb | 5 +++++ test/support/rakefile_definitions.rb | 24 ++++++++++++++++++++++++ test/test_rake_application.rb | 2 -- test/test_rake_functional.rb | 8 ++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 9269a52ef..b50a2e918 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -716,6 +716,11 @@ def load_imports ext = File.extname(fn) loader = @loaders[ext] || @default_loader loader.load(fn) + if fn_task = lookup(fn) and fn_task.needed? + fn_task.reenable + fn_task.invoke + loader.load(fn) + end @imported << fn end end diff --git a/test/support/rakefile_definitions.rb b/test/support/rakefile_definitions.rb index 5cc2ae129..1ab9da160 100644 --- a/test/support/rakefile_definitions.rb +++ b/test/support/rakefile_definitions.rb @@ -217,6 +217,30 @@ def rakefile_imports end end + def rakefile_regenerate_imports + rakefile <<-REGENERATE_IMPORTS +task :default + +task :regenerate do + open("deps", "w") do |f| + f << <<-CONTENT +file "deps" => :regenerate +puts "REGENERATED" + CONTENT + end +end + +import "deps" + REGENERATE_IMPORTS + + open "deps", "w" do |f| + f << <<-CONTENT +file "deps" => :regenerate +puts "INITIAL" + CONTENT + end + end + def rakefile_multidesc rakefile <<-MULTIDESC task :b diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index aa5ed39f8..b7d55959b 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -500,14 +500,12 @@ def util_loader loader.instance_variable_set :@load_called, false def loader.load arg - raise 'called more than once' if @load_called raise ArgumentError, arg unless arg == 'x.dummy' @load_called = true end loader.instance_variable_set :@make_dummy_called, false def loader.make_dummy - raise 'called more than once' if @make_dummy_called @make_dummy_called = true end diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index f2ce2f78f..7b6c6bd5d 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -268,6 +268,14 @@ def test_imports assert_match(/^FIRST$\s+^DYNAMIC$\s+^STATIC$\s+^OTHER$/, @out) end + def test_regenerate_imports + rakefile_regenerate_imports + + rake + + assert_match(/^INITIAL\s+^REGENERATED$/, @out) + end + def test_rules_chaining_to_file_task rakefile_chains From 514da2cec2ef3ca821c444f6b7b24f51bdd6e5d4 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Wed, 10 Jul 2013 08:40:04 -0400 Subject: [PATCH 010/813] Cleanup for 1.8.7 syntax. --- test/test_rake_backtrace.rb | 4 ++++ test/test_rake_clean.rb | 6 +++--- test/test_rake_path_map.rb | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/test/test_rake_backtrace.rb b/test/test_rake_backtrace.rb index 8db3b5ab5..9a9c9e584 100644 --- a/test/test_rake_backtrace.rb +++ b/test/test_rake_backtrace.rb @@ -12,6 +12,8 @@ def test_bin_rake_suppressed def test_system_dir_suppressed path = RbConfig::CONFIG['rubylibprefix'] + skip if path.nil? + paths = [path + ":12"] actual = Rake::Backtrace.collapse(paths) @@ -21,6 +23,8 @@ def test_system_dir_suppressed def test_near_system_dir_isnt_suppressed path = RbConfig::CONFIG['rubylibprefix'] + skip if path.nil? + paths = [" " + path + ":12"] actual = Rake::Backtrace.collapse(paths) diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index a6539fb21..1dc79748f 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -15,7 +15,7 @@ def test_cleanup file_name = create_undeletable_file out, _ = capture_io do - Rake::Cleaner.cleanup(file_name, verbose: false) + Rake::Cleaner.cleanup(file_name, :verbose => false) end assert_match(/failed to remove/i, out) @@ -40,7 +40,7 @@ def remove_undeletable_file file_name = File.join(dir_name, "deleteme") FileUtils.chmod(0777, dir_name) FileUtils.chmod(0777, file_name) - Rake::Cleaner.cleanup(file_name, verbose: false) - Rake::Cleaner.cleanup(dir_name, verbose: false) + Rake::Cleaner.cleanup(file_name, :verbose => false) + Rake::Cleaner.cleanup(dir_name, :verbose => false) end end diff --git a/test/test_rake_path_map.rb b/test/test_rake_path_map.rb index b76a9491f..038ba1f9a 100644 --- a/test/test_rake_path_map.rb +++ b/test/test_rake_path_map.rb @@ -156,8 +156,8 @@ def test_complex_patterns "src/org/onstepback/proj/A.java".pathmap("%{src,bin}d/%n.class")) assert_equal( "src_work/bin/org/onstepback/proj/A.class", - "src_work/src/org/onstepback/proj/A.java" - .pathmap('%{\bsrc\b,bin}X.class')) + "src_work/src/org/onstepback/proj/A.java". + pathmap('%{\bsrc\b,bin}X.class')) assert_equal( ".depends.bak", ".depends".pathmap("%X.bak")) From c4d1bbd1c07060b120c5ca654c3475f889c53082 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Wed, 10 Jul 2013 08:40:29 -0400 Subject: [PATCH 011/813] Re-enable 1.8.7 in travis. --- .travis.yml | 2 +- Gemfile | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 Gemfile diff --git a/.travis.yml b/.travis.yml index 48b0a62e0..fa5239bec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: ruby env: - CI=true rvm: -# - 1.8.7 # Needs mini-test + - 1.8.7 # Needs mini-test # - rbx-19mode # Time comparison fails - jruby # 2 failures - 1.9.3 diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..ce87d9027 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'minitest', '~> 4.3' From ca2d7cc0a397777b9dc4b0db6f236ecd36a8ef8a Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Wed, 10 Jul 2013 08:47:11 -0400 Subject: [PATCH 012/813] Add rake to Gemfile. This seems weird, but its required for Travis. --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index ce87d9027..834a44bf6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ source 'https://rubygems.org' gem 'minitest', '~> 4.3' +gem 'rake' From aab4fafcbfe584f4b39a01a88d546af2f7df0678 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Wed, 10 Jul 2013 09:13:32 -0400 Subject: [PATCH 013/813] Don't invoke system rake on travis. --- .gitignore | 8 ++++---- .travis.yml | 3 ++- Gemfile | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 415d69ced..4d5ba9e3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,15 @@ -.rbx -xxx-* *.bak *.patch *.rbc *.swp *~ .#* +.DS_Store .idea +.rbx /TAGS /coverage /html /pkg - -.DS_Store +Gemfile.lock +xxx-* diff --git a/.travis.yml b/.travis.yml index fa5239bec..7495ba901 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,4 +6,5 @@ rvm: # - rbx-19mode # Time comparison fails - jruby # 2 failures - 1.9.3 - - 2.0.0 \ No newline at end of file + - 2.0.0 +script: ruby -Ilib bin/rake \ No newline at end of file diff --git a/Gemfile b/Gemfile index 834a44bf6..ce87d9027 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,3 @@ source 'https://rubygems.org' gem 'minitest', '~> 4.3' -gem 'rake' From 2ab84104137b8a10ee2b2fb7743301f9d223ec78 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 11 Jul 2013 17:19:50 -0400 Subject: [PATCH 014/813] Pull option list into constant. --- lib/rake/application.rb | 403 ++++++++++++++++++++-------------------- 1 file changed, 202 insertions(+), 201 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 9269a52ef..dadce26a8 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -347,210 +347,211 @@ def sort_options(options) end private :sort_options + OPTION_LIST = [ + ['--all', '-A', + "Show all tasks, even uncommented ones", + lambda { |value| + options.show_all_tasks = value + } + ], + ['--backtrace=[OUT]', + "Enable full backtrace. OUT can be stderr (default) or stdout.", + lambda { |value| + options.backtrace = true + select_trace_output(options, 'backtrace', value) + } + ], + ['--comments', + "Show commented tasks only", + lambda { |value| + options.show_all_tasks = !value + } + ], + ['--describe', '-D [PATTERN]', + "Describe the tasks (matching optional PATTERN), then exit.", + lambda { |value| + select_tasks_to_show(options, :describe, value) + } + ], + ['--dry-run', '-n', + "Do a dry run without executing actions.", + lambda { |value| + Rake.verbose(true) + Rake.nowrite(true) + options.dryrun = true + options.trace = true + } + ], + ['--execute', '-e CODE', + "Execute some Ruby code and exit.", + lambda { |value| + eval(value) + exit + } + ], + ['--execute-print', '-p CODE', + "Execute some Ruby code, print the result, then exit.", + lambda { |value| + puts eval(value) + exit + } + ], + ['--execute-continue', '-E CODE', + "Execute some Ruby code, " + + "then continue with normal task processing.", + lambda { |value| eval(value) } + ], + ['--jobs', '-j [NUMBER]', + "Specifies the maximum number of tasks to execute in parallel. " + + "(default is number of CPU cores + 4)", + lambda { |value| + if value.nil? || value == '' + value = FIXNUM_MAX + elsif value =~ /^\d+$/ + value = value.to_i + else + value = Rake.suggested_thread_count + end + value = 1 if value < 1 + options.thread_pool_size = value - 1 + } + ], + ['--job-stats [LEVEL]', + "Display job statistics. " + + "LEVEL=history displays a complete job list", + lambda { |value| + if value =~ /^history/i + options.job_stats = :history + else + options.job_stats = true + end + } + ], + ['--libdir', '-I LIBDIR', + "Include LIBDIR in the search path for required modules.", + lambda { |value| $:.push(value) } + ], + ['--multitask', '-m', + "Treat all tasks as multitasks.", + lambda { |value| options.always_multitask = true } + ], + ['--no-search', '--nosearch', + '-N', "Do not search parent directories for the Rakefile.", + lambda { |value| options.nosearch = true } + ], + ['--prereqs', '-P', + "Display the tasks and dependencies, then exit.", + lambda { |value| options.show_prereqs = true } + ], + ['--quiet', '-q', + "Do not log messages to standard output.", + lambda { |value| Rake.verbose(false) } + ], + ['--rakefile', '-f [FILE]', + "Use FILE as the rakefile.", + lambda { |value| + value ||= '' + @rakefiles.clear + @rakefiles << value + } + ], + ['--rakelibdir', '--rakelib', '-R RAKELIBDIR', + "Auto-import any .rake files in RAKELIBDIR. " + + "(default is 'rakelib')", + lambda { |value| + options.rakelib = value.split(File::PATH_SEPARATOR) + } + ], + ['--require', '-r MODULE', + "Require MODULE before executing rakefile.", + lambda { |value| + begin + require value + rescue LoadError => ex + begin + rake_require value + rescue LoadError + raise ex + end + end + } + ], + ['--rules', + "Trace the rules resolution.", + lambda { |value| options.trace_rules = true } + ], + ['--silent', '-s', + "Like --quiet, but also suppresses the " + + "'in directory' announcement.", + lambda { |value| + Rake.verbose(false) + options.silent = true + } + ], + ['--suppress-backtrace PATTERN', + "Suppress backtrace lines matching regexp PATTERN. " + + "Ignored if --trace is on.", + lambda { |value| + options.suppress_backtrace_pattern = Regexp.new(value) + } + ], + ['--system', '-g', + "Using system wide (global) rakefiles " + + "(usually '~/.rake/*.rake').", + lambda { |value| options.load_system = true } + ], + ['--no-system', '--nosystem', '-G', + "Use standard project Rakefile search paths, " + + "ignore system wide rakefiles.", + lambda { |value| options.ignore_system = true } + ], + ['--tasks', '-T [PATTERN]', + "Display the tasks (matching optional PATTERN) " + + "with descriptions, then exit.", + lambda { |value| + select_tasks_to_show(options, :tasks, value) + } + ], + ['--trace=[OUT]', '-t', + "Turn on invoke/execute tracing, enable full backtrace. " + + "OUT can be stderr (default) or stdout.", + lambda { |value| + options.trace = true + options.backtrace = true + select_trace_output(options, 'trace', value) + Rake.verbose(true) + } + ], + ['--verbose', '-v', + "Log message to standard output.", + lambda { |value| Rake.verbose(true) } + ], + ['--version', '-V', + "Display the program version.", + lambda { |value| + puts "rake, version #{RAKEVERSION}" + exit + } + ], + ['--where', '-W [PATTERN]', + "Describe the tasks (matching optional PATTERN), then exit.", + lambda { |value| + select_tasks_to_show(options, :lines, value) + options.show_all_tasks = true + } + ], + ['--no-deprecation-warnings', '-X', + "Disable the deprecation warnings.", + lambda { |value| + options.ignore_deprecate = true + } + ], + ] + # A list of all the standard options used in rake, suitable for # passing to OptionParser. def standard_rake_options - sort_options( - [ - ['--all', '-A', - "Show all tasks, even uncommented ones", - lambda { |value| - options.show_all_tasks = value - } - ], - ['--backtrace=[OUT]', - "Enable full backtrace. OUT can be stderr (default) or stdout.", - lambda { |value| - options.backtrace = true - select_trace_output(options, 'backtrace', value) - } - ], - ['--comments', - "Show commented tasks only", - lambda { |value| - options.show_all_tasks = !value - } - ], - ['--describe', '-D [PATTERN]', - "Describe the tasks (matching optional PATTERN), then exit.", - lambda { |value| - select_tasks_to_show(options, :describe, value) - } - ], - ['--dry-run', '-n', - "Do a dry run without executing actions.", - lambda { |value| - Rake.verbose(true) - Rake.nowrite(true) - options.dryrun = true - options.trace = true - } - ], - ['--execute', '-e CODE', - "Execute some Ruby code and exit.", - lambda { |value| - eval(value) - exit - } - ], - ['--execute-print', '-p CODE', - "Execute some Ruby code, print the result, then exit.", - lambda { |value| - puts eval(value) - exit - } - ], - ['--execute-continue', '-E CODE', - "Execute some Ruby code, " + - "then continue with normal task processing.", - lambda { |value| eval(value) } - ], - ['--jobs', '-j [NUMBER]', - "Specifies the maximum number of tasks to execute in parallel. " + - "(default is number of CPU cores + 4)", - lambda { |value| - if value.nil? || value == '' - value = FIXNUM_MAX - elsif value =~ /^\d+$/ - value = value.to_i - else - value = Rake.suggested_thread_count - end - value = 1 if value < 1 - options.thread_pool_size = value - 1 - } - ], - ['--job-stats [LEVEL]', - "Display job statistics. " + - "LEVEL=history displays a complete job list", - lambda { |value| - if value =~ /^history/i - options.job_stats = :history - else - options.job_stats = true - end - } - ], - ['--libdir', '-I LIBDIR', - "Include LIBDIR in the search path for required modules.", - lambda { |value| $:.push(value) } - ], - ['--multitask', '-m', - "Treat all tasks as multitasks.", - lambda { |value| options.always_multitask = true } - ], - ['--no-search', '--nosearch', - '-N', "Do not search parent directories for the Rakefile.", - lambda { |value| options.nosearch = true } - ], - ['--prereqs', '-P', - "Display the tasks and dependencies, then exit.", - lambda { |value| options.show_prereqs = true } - ], - ['--quiet', '-q', - "Do not log messages to standard output.", - lambda { |value| Rake.verbose(false) } - ], - ['--rakefile', '-f [FILE]', - "Use FILE as the rakefile.", - lambda { |value| - value ||= '' - @rakefiles.clear - @rakefiles << value - } - ], - ['--rakelibdir', '--rakelib', '-R RAKELIBDIR', - "Auto-import any .rake files in RAKELIBDIR. " + - "(default is 'rakelib')", - lambda { |value| - options.rakelib = value.split(File::PATH_SEPARATOR) - } - ], - ['--require', '-r MODULE', - "Require MODULE before executing rakefile.", - lambda { |value| - begin - require value - rescue LoadError => ex - begin - rake_require value - rescue LoadError - raise ex - end - end - } - ], - ['--rules', - "Trace the rules resolution.", - lambda { |value| options.trace_rules = true } - ], - ['--silent', '-s', - "Like --quiet, but also suppresses the " + - "'in directory' announcement.", - lambda { |value| - Rake.verbose(false) - options.silent = true - } - ], - ['--suppress-backtrace PATTERN', - "Suppress backtrace lines matching regexp PATTERN. " + - "Ignored if --trace is on.", - lambda { |value| - options.suppress_backtrace_pattern = Regexp.new(value) - } - ], - ['--system', '-g', - "Using system wide (global) rakefiles " + - "(usually '~/.rake/*.rake').", - lambda { |value| options.load_system = true } - ], - ['--no-system', '--nosystem', '-G', - "Use standard project Rakefile search paths, " + - "ignore system wide rakefiles.", - lambda { |value| options.ignore_system = true } - ], - ['--tasks', '-T [PATTERN]', - "Display the tasks (matching optional PATTERN) " + - "with descriptions, then exit.", - lambda { |value| - select_tasks_to_show(options, :tasks, value) - } - ], - ['--trace=[OUT]', '-t', - "Turn on invoke/execute tracing, enable full backtrace. " + - "OUT can be stderr (default) or stdout.", - lambda { |value| - options.trace = true - options.backtrace = true - select_trace_output(options, 'trace', value) - Rake.verbose(true) - } - ], - ['--verbose', '-v', - "Log message to standard output.", - lambda { |value| Rake.verbose(true) } - ], - ['--version', '-V', - "Display the program version.", - lambda { |value| - puts "rake, version #{RAKEVERSION}" - exit - } - ], - ['--where', '-W [PATTERN]', - "Describe the tasks (matching optional PATTERN), then exit.", - lambda { |value| - select_tasks_to_show(options, :lines, value) - options.show_all_tasks = true - } - ], - ['--no-deprecation-warnings', '-X', - "Disable the deprecation warnings.", - lambda { |value| - options.ignore_deprecate = true - } - ], - ]) + sort_options(OPTION_LIST) end def select_tasks_to_show(options, show_tasks, value) From db9ddedc7f4d2f96f9f9e67271aa353ab7656252 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 11 Jul 2013 17:20:10 -0400 Subject: [PATCH 015/813] Improved pathmap comment. --- lib/rake/ext/string.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb index 07ef167f8..2a0a85bb1 100644 --- a/lib/rake/ext/string.rb +++ b/lib/rake/ext/string.rb @@ -106,11 +106,11 @@ def pathmap_replace(patterns, &block) # # For example: # - # "src/org/onestepback/proj/A.java".pathmap("%{^src,bin}X.class") + # "src/org/onestepback/proj/A.java".pathmap("%{^src,class}X.class") # # returns: # - # "bin/org/onestepback/proj/A.class" + # "class/org/onestepback/proj/A.class" # # If the replacement text is '*', then a block may be provided to perform # some arbitrary calculation for the replacement. From 55c95d74a8ebc1bebef0c01dc31a8fb604b4d780 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 11 Jul 2013 17:20:21 -0400 Subject: [PATCH 016/813] Add -m to flog rake task. --- rakelib/metrics.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rakelib/metrics.rake b/rakelib/metrics.rake index 7b9dfdeb7..8a1bc6a76 100644 --- a/rakelib/metrics.rake +++ b/rakelib/metrics.rake @@ -2,7 +2,7 @@ METRICS_FILES = FileList['lib/**/*.rb'] task :flog, [:all] do |t, args| flags = args.all ? "--all" : "" - sh "flog #{flags} #{METRICS_FILES}" + sh "flog -m #{flags} #{METRICS_FILES}" end task :flay do From 3754a7639b3f42c2347857a0878beb3523542aee Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Fri, 12 Jul 2013 10:57:29 -0400 Subject: [PATCH 017/813] Revert "Pull option list into constant." This reverts commit 2ab84104137b8a10ee2b2fb7743301f9d223ec78. The options array must be evaluated in an instance environment. Pulling it into a constant at the class level fails. --- lib/rake/application.rb | 403 ++++++++++++++++++++-------------------- 1 file changed, 201 insertions(+), 202 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index dadce26a8..9269a52ef 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -347,211 +347,210 @@ def sort_options(options) end private :sort_options - OPTION_LIST = [ - ['--all', '-A', - "Show all tasks, even uncommented ones", - lambda { |value| - options.show_all_tasks = value - } - ], - ['--backtrace=[OUT]', - "Enable full backtrace. OUT can be stderr (default) or stdout.", - lambda { |value| - options.backtrace = true - select_trace_output(options, 'backtrace', value) - } - ], - ['--comments', - "Show commented tasks only", - lambda { |value| - options.show_all_tasks = !value - } - ], - ['--describe', '-D [PATTERN]', - "Describe the tasks (matching optional PATTERN), then exit.", - lambda { |value| - select_tasks_to_show(options, :describe, value) - } - ], - ['--dry-run', '-n', - "Do a dry run without executing actions.", - lambda { |value| - Rake.verbose(true) - Rake.nowrite(true) - options.dryrun = true - options.trace = true - } - ], - ['--execute', '-e CODE', - "Execute some Ruby code and exit.", - lambda { |value| - eval(value) - exit - } - ], - ['--execute-print', '-p CODE', - "Execute some Ruby code, print the result, then exit.", - lambda { |value| - puts eval(value) - exit - } - ], - ['--execute-continue', '-E CODE', - "Execute some Ruby code, " + - "then continue with normal task processing.", - lambda { |value| eval(value) } - ], - ['--jobs', '-j [NUMBER]', - "Specifies the maximum number of tasks to execute in parallel. " + - "(default is number of CPU cores + 4)", - lambda { |value| - if value.nil? || value == '' - value = FIXNUM_MAX - elsif value =~ /^\d+$/ - value = value.to_i - else - value = Rake.suggested_thread_count - end - value = 1 if value < 1 - options.thread_pool_size = value - 1 - } - ], - ['--job-stats [LEVEL]', - "Display job statistics. " + - "LEVEL=history displays a complete job list", - lambda { |value| - if value =~ /^history/i - options.job_stats = :history - else - options.job_stats = true - end - } - ], - ['--libdir', '-I LIBDIR', - "Include LIBDIR in the search path for required modules.", - lambda { |value| $:.push(value) } - ], - ['--multitask', '-m', - "Treat all tasks as multitasks.", - lambda { |value| options.always_multitask = true } - ], - ['--no-search', '--nosearch', - '-N', "Do not search parent directories for the Rakefile.", - lambda { |value| options.nosearch = true } - ], - ['--prereqs', '-P', - "Display the tasks and dependencies, then exit.", - lambda { |value| options.show_prereqs = true } - ], - ['--quiet', '-q', - "Do not log messages to standard output.", - lambda { |value| Rake.verbose(false) } - ], - ['--rakefile', '-f [FILE]', - "Use FILE as the rakefile.", - lambda { |value| - value ||= '' - @rakefiles.clear - @rakefiles << value - } - ], - ['--rakelibdir', '--rakelib', '-R RAKELIBDIR', - "Auto-import any .rake files in RAKELIBDIR. " + - "(default is 'rakelib')", - lambda { |value| - options.rakelib = value.split(File::PATH_SEPARATOR) - } - ], - ['--require', '-r MODULE', - "Require MODULE before executing rakefile.", - lambda { |value| - begin - require value - rescue LoadError => ex - begin - rake_require value - rescue LoadError - raise ex - end - end - } - ], - ['--rules', - "Trace the rules resolution.", - lambda { |value| options.trace_rules = true } - ], - ['--silent', '-s', - "Like --quiet, but also suppresses the " + - "'in directory' announcement.", - lambda { |value| - Rake.verbose(false) - options.silent = true - } - ], - ['--suppress-backtrace PATTERN', - "Suppress backtrace lines matching regexp PATTERN. " + - "Ignored if --trace is on.", - lambda { |value| - options.suppress_backtrace_pattern = Regexp.new(value) - } - ], - ['--system', '-g', - "Using system wide (global) rakefiles " + - "(usually '~/.rake/*.rake').", - lambda { |value| options.load_system = true } - ], - ['--no-system', '--nosystem', '-G', - "Use standard project Rakefile search paths, " + - "ignore system wide rakefiles.", - lambda { |value| options.ignore_system = true } - ], - ['--tasks', '-T [PATTERN]', - "Display the tasks (matching optional PATTERN) " + - "with descriptions, then exit.", - lambda { |value| - select_tasks_to_show(options, :tasks, value) - } - ], - ['--trace=[OUT]', '-t', - "Turn on invoke/execute tracing, enable full backtrace. " + - "OUT can be stderr (default) or stdout.", - lambda { |value| - options.trace = true - options.backtrace = true - select_trace_output(options, 'trace', value) - Rake.verbose(true) - } - ], - ['--verbose', '-v', - "Log message to standard output.", - lambda { |value| Rake.verbose(true) } - ], - ['--version', '-V', - "Display the program version.", - lambda { |value| - puts "rake, version #{RAKEVERSION}" - exit - } - ], - ['--where', '-W [PATTERN]', - "Describe the tasks (matching optional PATTERN), then exit.", - lambda { |value| - select_tasks_to_show(options, :lines, value) - options.show_all_tasks = true - } - ], - ['--no-deprecation-warnings', '-X', - "Disable the deprecation warnings.", - lambda { |value| - options.ignore_deprecate = true - } - ], - ] - # A list of all the standard options used in rake, suitable for # passing to OptionParser. def standard_rake_options - sort_options(OPTION_LIST) + sort_options( + [ + ['--all', '-A', + "Show all tasks, even uncommented ones", + lambda { |value| + options.show_all_tasks = value + } + ], + ['--backtrace=[OUT]', + "Enable full backtrace. OUT can be stderr (default) or stdout.", + lambda { |value| + options.backtrace = true + select_trace_output(options, 'backtrace', value) + } + ], + ['--comments', + "Show commented tasks only", + lambda { |value| + options.show_all_tasks = !value + } + ], + ['--describe', '-D [PATTERN]', + "Describe the tasks (matching optional PATTERN), then exit.", + lambda { |value| + select_tasks_to_show(options, :describe, value) + } + ], + ['--dry-run', '-n', + "Do a dry run without executing actions.", + lambda { |value| + Rake.verbose(true) + Rake.nowrite(true) + options.dryrun = true + options.trace = true + } + ], + ['--execute', '-e CODE', + "Execute some Ruby code and exit.", + lambda { |value| + eval(value) + exit + } + ], + ['--execute-print', '-p CODE', + "Execute some Ruby code, print the result, then exit.", + lambda { |value| + puts eval(value) + exit + } + ], + ['--execute-continue', '-E CODE', + "Execute some Ruby code, " + + "then continue with normal task processing.", + lambda { |value| eval(value) } + ], + ['--jobs', '-j [NUMBER]', + "Specifies the maximum number of tasks to execute in parallel. " + + "(default is number of CPU cores + 4)", + lambda { |value| + if value.nil? || value == '' + value = FIXNUM_MAX + elsif value =~ /^\d+$/ + value = value.to_i + else + value = Rake.suggested_thread_count + end + value = 1 if value < 1 + options.thread_pool_size = value - 1 + } + ], + ['--job-stats [LEVEL]', + "Display job statistics. " + + "LEVEL=history displays a complete job list", + lambda { |value| + if value =~ /^history/i + options.job_stats = :history + else + options.job_stats = true + end + } + ], + ['--libdir', '-I LIBDIR', + "Include LIBDIR in the search path for required modules.", + lambda { |value| $:.push(value) } + ], + ['--multitask', '-m', + "Treat all tasks as multitasks.", + lambda { |value| options.always_multitask = true } + ], + ['--no-search', '--nosearch', + '-N', "Do not search parent directories for the Rakefile.", + lambda { |value| options.nosearch = true } + ], + ['--prereqs', '-P', + "Display the tasks and dependencies, then exit.", + lambda { |value| options.show_prereqs = true } + ], + ['--quiet', '-q', + "Do not log messages to standard output.", + lambda { |value| Rake.verbose(false) } + ], + ['--rakefile', '-f [FILE]', + "Use FILE as the rakefile.", + lambda { |value| + value ||= '' + @rakefiles.clear + @rakefiles << value + } + ], + ['--rakelibdir', '--rakelib', '-R RAKELIBDIR', + "Auto-import any .rake files in RAKELIBDIR. " + + "(default is 'rakelib')", + lambda { |value| + options.rakelib = value.split(File::PATH_SEPARATOR) + } + ], + ['--require', '-r MODULE', + "Require MODULE before executing rakefile.", + lambda { |value| + begin + require value + rescue LoadError => ex + begin + rake_require value + rescue LoadError + raise ex + end + end + } + ], + ['--rules', + "Trace the rules resolution.", + lambda { |value| options.trace_rules = true } + ], + ['--silent', '-s', + "Like --quiet, but also suppresses the " + + "'in directory' announcement.", + lambda { |value| + Rake.verbose(false) + options.silent = true + } + ], + ['--suppress-backtrace PATTERN', + "Suppress backtrace lines matching regexp PATTERN. " + + "Ignored if --trace is on.", + lambda { |value| + options.suppress_backtrace_pattern = Regexp.new(value) + } + ], + ['--system', '-g', + "Using system wide (global) rakefiles " + + "(usually '~/.rake/*.rake').", + lambda { |value| options.load_system = true } + ], + ['--no-system', '--nosystem', '-G', + "Use standard project Rakefile search paths, " + + "ignore system wide rakefiles.", + lambda { |value| options.ignore_system = true } + ], + ['--tasks', '-T [PATTERN]', + "Display the tasks (matching optional PATTERN) " + + "with descriptions, then exit.", + lambda { |value| + select_tasks_to_show(options, :tasks, value) + } + ], + ['--trace=[OUT]', '-t', + "Turn on invoke/execute tracing, enable full backtrace. " + + "OUT can be stderr (default) or stdout.", + lambda { |value| + options.trace = true + options.backtrace = true + select_trace_output(options, 'trace', value) + Rake.verbose(true) + } + ], + ['--verbose', '-v', + "Log message to standard output.", + lambda { |value| Rake.verbose(true) } + ], + ['--version', '-V', + "Display the program version.", + lambda { |value| + puts "rake, version #{RAKEVERSION}" + exit + } + ], + ['--where', '-W [PATTERN]', + "Describe the tasks (matching optional PATTERN), then exit.", + lambda { |value| + select_tasks_to_show(options, :lines, value) + options.show_all_tasks = true + } + ], + ['--no-deprecation-warnings', '-X', + "Disable the deprecation warnings.", + lambda { |value| + options.ignore_deprecate = true + } + ], + ]) end def select_tasks_to_show(options, show_tasks, value) From 2b1bea5373bc5331ae4a69afce9b255fc100e2d7 Mon Sep 17 00:00:00 2001 From: Andy Lindeman Date: Fri, 19 Jul 2013 14:02:02 -0700 Subject: [PATCH 018/813] Corrects typo in deprecation error --- lib/rake/gempackagetask.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/gempackagetask.rb b/lib/rake/gempackagetask.rb index 4ace0a6f0..b7c68213d 100644 --- a/lib/rake/gempackagetask.rb +++ b/lib/rake/gempackagetask.rb @@ -1,2 +1,2 @@ fail "ERROR: 'rake/gempackagetask' is obsolete and no longer supported. " + - "Use 'rubygems/packagetask' instead." + "Use 'rubygems/package_task' instead." From 033e85b96144130781083367265caedeae1d42c8 Mon Sep 17 00:00:00 2001 From: Avdi Grimm Date: Fri, 2 Aug 2013 11:01:55 -0400 Subject: [PATCH 019/813] Make Task#source default to the first prerequisite in non-rule tasks. --- lib/rake/task.rb | 6 +++++- test/test_rake_file_task.rb | 5 +++++ test/test_rake_task.rb | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 5e4dd64d4..56f1b4905 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -74,7 +74,11 @@ def collect_prerequisites(seen) # First source from a rule (nil if no sources) def source - @sources.first if defined?(@sources) + if defined?(@sources) + @sources.first + else + prerequisites.first + end end # Create a task named +task_name+ with no actions or prerequisites. Use diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index fa3241b78..d3e705b67 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -98,6 +98,11 @@ def test_existing_file_depends_on_non_existing_file assert @ran end + def test_source_is_first_prerequisite + t = file :f => ["preqA", "preqB"] + assert_equal "preqA", t.source + end + # I have currently disabled this test. I'm not convinced that # deleting the file target on failure is always the proper thing to # do. I'm willing to hear input on this topic. diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 2ab995a6f..fac714488 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -373,4 +373,9 @@ def test_interspersed_duplicate_comments task(:t) assert_equal "line one / line two", t.comment end + + def test_source_is_first_prerequisite + t = task :t => ["preqA", "preqB"] + assert_equal "preqA", t.source + end end From f6ba31ff86a3cf88da708bcfc2120bd0da1af7cc Mon Sep 17 00:00:00 2001 From: Avdi Grimm Date: Fri, 2 Aug 2013 11:34:07 -0400 Subject: [PATCH 020/813] Enable rules to accept Method object as prerequisites. --- lib/rake/task_manager.rb | 2 +- test/test_rake_rules.rb | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 06c243a7b..9e95761dc 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -265,7 +265,7 @@ def make_sources(task_name, extensions) task_name.ext(ext) when String ext - when Proc + when Proc, Method if ext.arity == 1 ext.call(task_name) else diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index 376b99889..ece75e5d9 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -359,4 +359,30 @@ def test_regex_rule_with_args_and_lambda_prereq Task[OBJFILE].invoke('arg') end + def test_rule_with_method_prereq + create_file(".foo") + obj = Object.new + def obj.find_prereq + ".foo" + end + rule '.o' => obj.method(:find_prereq) do |t| + @runs << "#{t.name} - #{t.source}" + end + Task[OBJFILE].invoke + assert_equal ["#{OBJFILE} - .foo"], @runs + end + + def test_rule_with_one_arg_method_prereq + create_file(SRCFILE) + obj = Object.new + def obj.find_prereq(task_name) + task_name.ext(".c") + end + rule '.o' => obj.method(:find_prereq) do |t| + @runs << "#{t.name} - #{t.source}" + end + Task[OBJFILE].invoke + assert_equal ["#{OBJFILE} - abc.c"], @runs + end + end From 20ea30551c4f27bbd9f5f509fe5d13f6f37f30c5 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Tue, 13 Aug 2013 12:29:12 -0400 Subject: [PATCH 021/813] Tweeked some readme URLs. --- README.rdoc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.rdoc b/README.rdoc index 7eabde9e6..6894dffbf 100644 --- a/README.rdoc +++ b/README.rdoc @@ -81,7 +81,7 @@ Type "rake --help" for all available options. === Source Repository Rake is currently hosted at github. The github web page is -http://github.com/jimweirich/rake. The public git clone URL is +http://github.com/jimweirich/rake . The public git clone URL is * git://github.com/jimweirich/rake.git @@ -103,16 +103,12 @@ Feature requests and bug reports can be made here * https://github.com/jimweirich/rake/issues -Issues and bug reports can also be tracked here: - -* http://www.pivotaltracker.com/projects/28469 - == Online Resources === Rake References * Rake Documentation Home: http://docs.rubyrake.org -* Rake Project Page: http://rubyforge.org/projects/rake +* Rake Project Page: http://github.com/jimweirich/rake * Rake API Documents: http://rake.rubyforge.org * Rake Source Code Repo: http://github.com/jimweirich/rake * Rake Git Repo Clone URL: git://github.com/jimweirich/rake.git From 7671e96478192526963625d1d0e5a57079433206 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Tue, 13 Aug 2013 12:51:12 -0400 Subject: [PATCH 022/813] Update links to other make-like projects. --- README.rdoc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.rdoc b/README.rdoc index 6894dffbf..8e97e6232 100644 --- a/README.rdoc +++ b/README.rdoc @@ -131,10 +131,8 @@ other projects with similar (and not so similar) goals. * http://www.a-a-p.org -- Make in Python * http://www.aromatic.com/tools/jam.txt -- JAM, Java Automated Make * http://ant.apache.org -- The Ant project -* http://ppt.perl.org/commands/make/index.html -- Make from the Perl - Power Tools implementation. * http://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System -* http://make.rubyforge.org -- Rant, another Ruby make tool. +* http://rant.rubyforge.org -- Rant, another Ruby make tool. == Credits From b28511d3ed154ff7d74d651b7849deffb6652c5e Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Tue, 13 Aug 2013 12:51:26 -0400 Subject: [PATCH 023/813] Change umlcoop to linode. --- rakelib/publish.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rakelib/publish.rake b/rakelib/publish.rake index c94504b23..bb71c9aec 100644 --- a/rakelib/publish.rake +++ b/rakelib/publish.rake @@ -7,7 +7,7 @@ begin publisher = Rake::CompositePublisher.new publisher.add Rake::RubyForgePublisher.new('rake', 'jimweirich') publisher.add Rake::SshFilePublisher.new( - 'umlcoop', + 'linode', 'htdocs/software/rake', '.', 'rake.blurb') From eee2cf32b19d81f2283393e5d010777568aa75d6 Mon Sep 17 00:00:00 2001 From: fhrbek Date: Fri, 26 Jul 2013 14:47:49 +0200 Subject: [PATCH 024/813] Better rake task argument parser that accepts commas in argument values --- lib/rake/application.rb | 13 ++++++++++++- test/test_rake_task_argument_parsing.rb | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 9269a52ef..811452978 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -150,9 +150,20 @@ def invoke_task(task_string) end def parse_task_string(string) + @token_re ||= /((?:[^\\,]|\\.)*)(?:,(.*))?$/ if string =~ /^([^\[]+)(\[(.*)\])$/ name = $1 - args = $3.split(/\s*,\s*/) + args = [] + + if $2 != '[]' + match_data = @token_re.match($3) + while !match_data.nil? + token, rest = match_data[1].strip, match_data[2] + args << (token.gsub!(/\\(.)/, '\1') || token) + break if rest.nil? + match_data = @token_re.match(rest) + end + end else name = string args = [] diff --git a/test/test_rake_task_argument_parsing.rb b/test/test_rake_task_argument_parsing.rb index 9b99991de..0294a9fb2 100644 --- a/test/test_rake_task_argument_parsing.rb +++ b/test/test_rake_task_argument_parsing.rb @@ -43,6 +43,12 @@ def test_keeps_embedded_spaces assert_equal ["a one ana", "two"], args end + def test_can_handle_commas_in_args + name, args = @app.parse_task_string("name[one, two, three_a\\, three_b, four]") + assert_equal "name", name + assert_equal ["one", "two", "three_a, three_b", "four"], args + end + def test_terminal_width_using_env app = Rake::Application.new app.terminal_columns = 1234 From 5bcfa9c561ac37d341413608f8d0d2a56d564e2e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 20 Aug 2013 14:58:10 -0700 Subject: [PATCH 025/813] Improve Rake::DSL method documentation Task definition was inadequately documented. When built from the gem, the DSL methods did not appear in documentation as they are marked private. Now documentation is forced (except for file_create) which appears to be internal). --- lib/rake/dsl_definition.rb | 67 ++++++++++++++++++++++++++++++-------- 1 file changed, 54 insertions(+), 13 deletions(-) diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index b24a82138..8552e9885 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -6,6 +6,9 @@ module Rake ## # DSL is a module that provides #task, #desc, #namespace, etc. Use this # when you'd like to use rake outside the top level scope. + # + # For a Rakefile you run from the comamnd line this module is automatically + # included. module DSL @@ -21,14 +24,45 @@ module DSL private - # Declare a basic task. + # :call-seq: + # task task_name + # task task_name => dependencies + # task task_name, arguments => dependencies + # task task_name, argument[, argument ...], :needs => dependencies + # + # Declare a basic task. The +task_name+ is always the first argument. If + # the task name contains a ":" it is defined in that namespace. + # + # The +dependencies+ may be a single task name or an Array of task names. + # The +argument+ (a single name) or +arguments+ (an Array of names) define + # the arguments provided to the task. + # + # The task, argument and dependency names may be either symbols or + # strings. + # + # A task with a single dependency: # - # Example: # task :clobber => [:clean] do # rm_rf "html" # end # - def task(*args, &block) + # A task with an argument and a dependency: + # + # task :package, [:version] => :test do |t, args| + # # ... + # end + # + # To invoke this task from the command line: + # + # $ rake package[1.2.3] + # + # Alternate definition: + # + # task :package, :version, :needs => :test do |t, args| + # # ... + # end + # + def task(*args, &block) # :doc: Rake::Task.define_task(*args, &block) end @@ -45,7 +79,7 @@ def task(*args, &block) # end # end # - def file(*args, &block) + def file(*args, &block) # :doc: Rake::FileTask.define_task(*args, &block) end @@ -61,7 +95,7 @@ def file_create(*args, &block) # Example: # directory "testdata/doc" # - def directory(*args, &block) + def directory(*args, &block) # :doc: result = file_create(*args, &block) dir, _ = *Rake.application.resolve_args(args) Rake.each_dir_parent(dir) do |d| @@ -80,7 +114,7 @@ def directory(*args, &block) # Example: # multitask :deploy => [:deploy_gem, :deploy_rdoc] # - def multitask(*args, &block) + def multitask(*args, &block) # :doc: Rake::MultiTask.define_task(*args, &block) end @@ -88,14 +122,22 @@ def multitask(*args, &block) # block. Returns a NameSpace object that can be used to lookup # tasks defined in the namespace. # - # E.g. + # Example: # # ns = namespace "nested" do + # # the "nested:run" task # task :run # end # task_run = ns[:run] # find :run in the given namespace. # - def namespace(name=nil, &block) + # Tasks can also be defined in a namespace by using a ":" in the task + # name: + # + # task "nested:test" do + # # ... + # end + # + def namespace(name=nil, &block) # :doc: name = name.to_s if name.kind_of?(Symbol) name = name.to_str if name.respond_to?(:to_str) unless name.kind_of?(String) || name.nil? @@ -111,12 +153,11 @@ def namespace(name=nil, &block) # sh %{cc -o #{t.name} #{t.source}} # end # - def rule(*args, &block) + def rule(*args, &block) # :doc: Rake::Task.create_rule(*args, &block) end - # Describe the next rake task. - # Duplicate descriptions are discarded. + # Describes the next rake task. Duplicate descriptions are discarded. # # Example: # desc "Run the Unit Tests" @@ -124,7 +165,7 @@ def rule(*args, &block) # runtests # end # - def desc(description) + def desc(description) # :doc: Rake.application.last_description = description end @@ -142,7 +183,7 @@ def desc(description) # Example: # import ".depend", "my_rules" # - def import(*fns) + def import(*fns) # :doc: fns.each do |fn| Rake.application.add_import(fn) end From 5c6c01d9cb02099df9eb9fcd26d2aec4dc3f19a6 Mon Sep 17 00:00:00 2001 From: Avdi Grimm Date: Fri, 30 Aug 2013 13:20:23 -0400 Subject: [PATCH 026/813] Make #sources a synonym for #prerequisites if @sources isn't set. I've opted for a pretty conservative definition of this - `#sources` will prefer to return `@sources` even if `@sources` is set to `nil` --- lib/rake/task.rb | 12 ++++++------ test/test_rake_file_task.rb | 5 +++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 56f1b4905..7eeefa68e 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -41,7 +41,11 @@ def inspect # List of sources for task. attr_writer :sources def sources - @sources ||= [] + if defined?(@sources) + @sources + else + prerequisites + end end # List of prerequisite tasks @@ -74,11 +78,7 @@ def collect_prerequisites(seen) # First source from a rule (nil if no sources) def source - if defined?(@sources) - @sources.first - else - prerequisites.first - end + sources.first end # Create a task named +task_name+ with no actions or prerequisites. Use diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index d3e705b67..f75122956 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -103,6 +103,11 @@ def test_source_is_first_prerequisite assert_equal "preqA", t.source end + def test_sources_is_all_prerequisites + t = file :f => ["preqA", "preqB"] + assert_equal ["preqA", "preqB"], t.sources + end + # I have currently disabled this test. I'm not convinced that # deleting the file target on failure is always the proper thing to # do. I'm willing to hear input on this topic. From 2c54fab282a68b9b4bad6c4b49b56421541cce4b Mon Sep 17 00:00:00 2001 From: Kent Wang Date: Thu, 26 Sep 2013 21:46:09 +0800 Subject: [PATCH 027/813] code format --- install.rb | 2 +- lib/rake/application.rb | 2 +- lib/rake/rake_module.rb | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/install.rb b/install.rb index 45946c198..feffbd50f 100644 --- a/install.rb +++ b/install.rb @@ -68,7 +68,7 @@ def installBIN(from, opfile) for fn in files fn_dir = File.dirname(fn) target_dir = File.join($sitedir, fn_dir) - if ! File.exist?(target_dir) + if !File.exist?(target_dir) FileUtils.mkdir_p(target_dir) end FileUtils.install(File.join('lib', fn), File.join($sitedir, fn), diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 9269a52ef..381a55c1b 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -629,7 +629,7 @@ def print_rakefile_directory(location) def raw_load_rakefile # :nodoc: rakefile, location = find_rakefile_location - if (! options.ignore_system) && + if (!options.ignore_system) && (options.load_system || rakefile.nil?) && system_dir && File.directory?(system_dir) print_rakefile_directory(location) diff --git a/lib/rake/rake_module.rb b/lib/rake/rake_module.rb index 6d569acc9..a7e972c56 100644 --- a/lib/rake/rake_module.rb +++ b/lib/rake/rake_module.rb @@ -33,9 +33,7 @@ def load_rakefile(path) # Add files to the rakelib list def add_rakelib(*files) application.options.rakelib ||= [] - files.each do |file| - application.options.rakelib << file - end + application.options.rakelib.concat(files) end end From da23e215de0fc62afb74ce53f12c3cf9e13f4209 Mon Sep 17 00:00:00 2001 From: Kent Wang Date: Thu, 26 Sep 2013 22:38:50 +0800 Subject: [PATCH 028/813] code format --- install.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.rb b/install.rb index feffbd50f..8273a76dc 100644 --- a/install.rb +++ b/install.rb @@ -35,7 +35,7 @@ def installBIN(from, opfile) $sitedir = CONFIG["sitelibdir"] unless $sitedir - version = CONFIG["MAJOR"]+"."+CONFIG["MINOR"] + version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"] $libdir = File.join(CONFIG["libdir"], "ruby", version) $sitedir = $:.find {|x| x =~ /site_ruby/} if !$sitedir From acf43280db01b8c58aae7ec72f3adc590538c334 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Tue, 8 Oct 2013 17:44:59 -0400 Subject: [PATCH 029/813] Fix typo in documentation From Alex Yaremyuk (mutuh). --- doc/rakefile.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index 688535b6e..bb3b1bb0f 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -275,7 +275,7 @@ parameters as well: mail = Mail.new(args.message) recipients = args.extras recipients.each do |target| - mail.send_to(recipents) + mail.send_to(target) end end From fb7d1e474001bc66ada844d381b68a8e97283c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leo=20Correa=20and=20Hrvoje=20=C5=A0imi=C4=87?= Date: Sun, 1 Sep 2013 23:54:21 +0200 Subject: [PATCH 030/813] making description overridable for Rake::TestTask --- lib/rake/testtask.rb | 6 +++++- test/support/rakefile_definitions.rb | 10 ++++++++++ test/test_rake_functional.rb | 8 ++++++++ test/test_rake_test_task.rb | 2 ++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index c693dd262..71a76b458 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -67,6 +67,9 @@ class TestTask < TaskLib # Array of commandline options to pass to ruby when running test loader. attr_accessor :ruby_opts + # Description of the test task. (default is 'Run tests') + attr_accessor :description + # Explicitly define the list of test files to be included in a # test. +list+ is expected to be an array of file names (a # FileList is acceptable). If both +pattern+ and +test_files+ are @@ -86,6 +89,7 @@ def initialize(name=:test) @warning = false @loader = :rake @ruby_opts = [] + @description = "Run tests" + (@name == :test ? "" : " for #{@name}") yield self if block_given? @pattern = 'test/test*.rb' if @pattern.nil? && @test_files.nil? define @@ -93,7 +97,7 @@ def initialize(name=:test) # Create the tasks defined by this task lib. def define - desc "Run tests" + (@name == :test ? "" : " for #{@name}") + desc @description task @name do FileUtilsExt.verbose(@verbose) do args = diff --git a/test/support/rakefile_definitions.rb b/test/support/rakefile_definitions.rb index 5cc2ae129..3ccbb6147 100644 --- a/test/support/rakefile_definitions.rb +++ b/test/support/rakefile_definitions.rb @@ -41,6 +41,16 @@ def a_top_level_function ACCESS end + def rakefile_test_task + rakefile <<-RAKEFILE + require "rake/testtask" + + Rake::TestTask.new(:unit) do |t| + t.description = "custom test task description" + end + RAKEFILE + end + def rakefile_chains rakefile <<-DEFAULT task :default => "play.app" diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index f2ce2f78f..37a0aeadf 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -368,6 +368,14 @@ def test_file_task_dependencies_scoped_by_namespaces assert_match(/^PREPARE\nSCOPEDEP$/m, @out) end + def test_test_task_descriptions + rakefile_test_task + + rake "-T" + + assert_match(/custom test task description/, @out) + end + def test_comment_before_task_acts_like_desc rakefile_comments diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 637accc29..294c3661c 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -16,11 +16,13 @@ def test_initialize def test_initialize_override tt = Rake::TestTask.new(:example) do |t| + t.description = "Run example tests" t.libs = ['src', 'ext'] t.pattern = 'test/tc_*.rb' t.verbose = true end refute_nil tt + assert_equal "Run example tests", tt.description assert_equal :example, tt.name assert_equal ['src', 'ext'], tt.libs assert_equal 'test/tc_*.rb', tt.pattern From 5db6af44854f58c01e8409112de9d78b5ba6ff33 Mon Sep 17 00:00:00 2001 From: nfedorov Date: Wed, 9 Oct 2013 16:09:04 +0400 Subject: [PATCH 031/813] Handle assigning nils to comments Changes include: * added test * use compact for array --- lib/rake/task.rb | 2 +- test/test_rake_task.rb | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 5e4dd64d4..724b359fa 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -281,7 +281,7 @@ def comment # Transform the list of comments as specified by the block and # join with the separator. def transform_comments(separator, &block) - if @comments.empty? + if @comments.compact.empty? nil else block ||= lambda { |c| c } diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 2ab995a6f..9fb1504d7 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -332,6 +332,17 @@ def test_comments_with_decimal_points assert_equal "Revision 1.2.3", t.comment end + def test_comments_do_not_set + t = task(:t, :name, :rev) + assert_equal nil, t.comment + end + + def test_comments_is_nil + t = task(:t, :name, :rev) + t.comment = nil + assert_equal nil, t.comment + end + def test_extended_comments desc %{ This is a comment. From 34f3bfd6ed8bdb5ed1e3d3a78d143ec5a16a27c7 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Wed, 9 Oct 2013 17:07:42 -0400 Subject: [PATCH 032/813] Prevent nil comments from entering the comment list --- lib/rake/task.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 724b359fa..0d13f0009 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -262,6 +262,7 @@ def comment=(comment) end def add_comment(comment) + return if comment.nil? @comments << comment unless @comments.include?(comment) end private :add_comment @@ -281,7 +282,7 @@ def comment # Transform the list of comments as specified by the block and # join with the separator. def transform_comments(separator, &block) - if @comments.compact.empty? + if @comments.empty? nil else block ||= lambda { |c| c } From b0c5a251838555d5a2fc7d9541608a7e984522ea Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 11 Oct 2013 13:59:56 -0700 Subject: [PATCH 033/813] Restrict rake to minitest ~> 4 Rake is included in ruby which is only up to minitest 4.x, not minitest 5. If minitest 5 features are used rake's tests will not run after an import into ruby. --- Rakefile | 2 +- test/helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 5868b5255..d45c1a458 100644 --- a/Rakefile +++ b/Rakefile @@ -171,7 +171,7 @@ specified in standard Ruby syntax. s.required_ruby_version = '>= 1.8.6' s.required_rubygems_version = '>= 1.3.2' - s.add_development_dependency 'minitest', '~> 2.1' + s.add_development_dependency 'minitest', '~> 4' s.files = PKG_FILES.to_a diff --git a/test/helper.rb b/test/helper.rb index 5e8700dfd..9a288a431 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -2,7 +2,7 @@ $:.unshift File.expand_path('../../lib', __FILE__) begin - gem 'minitest' + gem 'minitest', '~> 4' rescue Gem::LoadError end From d212fd737ab313d65f73b895fb7765c6bdd7ae48 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 11 Oct 2013 14:37:15 -0700 Subject: [PATCH 034/813] Use require_relative for test/support/* Ruby trunk has the tests in a separate directory than the rake repository. To load these files on both platforms require_relative is used with a fallback to regular require for 1.8 tests. --- test/helper.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index 9a288a431..992c6bffa 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -11,13 +11,15 @@ require 'tmpdir' require File.expand_path('../file_creation', __FILE__) -require 'test/support/ruby_runner' -require 'test/support/rakefile_definitions' begin require_relative '../ruby/envutil' + require_relative 'support/ruby_runner' + require_relative 'support/rakefile_definitions' rescue NoMethodError, LoadError - # for ruby trunk + # ruby 1.8 + require 'test/support/ruby_runner' + require 'test/support/rakefile_definitions' end class Rake::TestCase < MiniTest::Unit::TestCase From ea834c6afde1bdb25edc4ba82fc0ae0c4c4df2ce Mon Sep 17 00:00:00 2001 From: Michel Boaventura Date: Fri, 18 Oct 2013 00:17:58 -0300 Subject: [PATCH 035/813] Fix rake.1.gz. It was corrupted. --- doc/rake.1.gz | Bin 1370 -> 1369 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/doc/rake.1.gz b/doc/rake.1.gz index 8cf443b3426b0457719a9c3a50299942161be668..d323267771560806afe32240a5393773a714a90e 100644 GIT binary patch delta 18 Zcmcb`b(4!zzMF&N`SOGyhK-y7tN=XP1=;`r delta 20 bcmcb~b&HErzMF%i|AB}T(?-q!Rz@xWL+k}? From 7f79c136061b78a5f1f07ae7995bfa00710f57f5 Mon Sep 17 00:00:00 2001 From: Sven Amonat Date: Fri, 18 Oct 2013 18:23:06 +0200 Subject: [PATCH 036/813] remove unneeded files --- lib/rake/lib/.document | 1 - lib/rake/lib/project.rake | 21 --------------------- 2 files changed, 22 deletions(-) delete mode 100644 lib/rake/lib/.document delete mode 100644 lib/rake/lib/project.rake diff --git a/lib/rake/lib/.document b/lib/rake/lib/.document deleted file mode 100644 index 098e64716..000000000 --- a/lib/rake/lib/.document +++ /dev/null @@ -1 +0,0 @@ -# Ignore project.rake diff --git a/lib/rake/lib/project.rake b/lib/rake/lib/project.rake deleted file mode 100644 index a5497328a..000000000 --- a/lib/rake/lib/project.rake +++ /dev/null @@ -1,21 +0,0 @@ -task "create:project" => ["lib", "test", "Rakefile"] - -directory "lib" -directory "test" - -file "Rakefile" do - File.open("Rakefile", "w") do |out| - out.puts %{# -*- ruby -*- - -require 'rake/clean' -require 'rake/testtask' - -task :default => :test - -Rake::TestTask.new do |t| - t.verbose = false - t.test_files = FileList['test/test_*.rb'] -end -} - end -end From 75cb1231cbc4ce36c13b0b66d166a575f1b0b283 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sat, 19 Oct 2013 01:10:13 -0200 Subject: [PATCH 037/813] Don't include rake directory in the load path if it's a default gem --- lib/rake/testtask.rb | 11 ++++++++++- test/test_rake_test_task.rb | 22 +++++++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 71a76b458..43e700f9b 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -171,7 +171,7 @@ def run_code when :testrb "-S testrb #{fix}" when :rake - "-I\"#{rake_lib_dir}\" \"#{rake_loader}\"" + "#{rake_include_arg} \"#{rake_loader}\"" end end @@ -188,6 +188,15 @@ def find_file(fn) # :nodoc: nil end + def rake_include_arg # :nodoc: + spec = Gem.loaded_specs['rake'] + if spec.respond_to?(:default_gem?) && spec.default_gem? + "" + else + "-I\"#{rake_lib_dir}\"" + end + end + def rake_lib_dir # :nodoc: find_dir('rake') or fail "unable to find rake lib" diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 294c3661c..9b500dc04 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -83,11 +83,31 @@ def test_run_code_direct end def test_run_code_rake + spec = Gem::Specification.new 'rake', 0 + spec.loaded_from = File.join Gem::Specification.dirs.last, 'rake-0.gemspec' + rake, Gem.loaded_specs['rake'] = Gem.loaded_specs['rake'], spec + + test_task = Rake::TestTask.new do |t| + t.loader = :rake + end + + assert_match(/\A-I".*?" ".*?"\Z/, test_task.run_code) + ensure + Gem.loaded_specs['rake'] = rake + end + + def test_run_code_rake_default_gem + default_spec = Gem::Specification.new 'rake', 0 + default_spec.loaded_from = File.join Gem::Specification.default_specifications_dir, 'rake-0.gemspec' + rake, Gem.loaded_specs['rake'] = Gem.loaded_specs['rake'], default_spec + test_task = Rake::TestTask.new do |t| t.loader = :rake end - assert_match(/-I".*?" ".*?"/, test_task.run_code) + assert_match(/\A ".*?"\Z/, test_task.run_code) + ensure + Gem.loaded_specs['rake'] = rake end def test_run_code_testrb_ruby_1_8_2 From b1562e6f75b6f6843643d749292425aae080cf33 Mon Sep 17 00:00:00 2001 From: Daniel Holmes Date: Fri, 25 Oct 2013 22:24:10 +1100 Subject: [PATCH 038/813] Fixed double phrase typo --- doc/rakefile.rdoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index bb3b1bb0f..d5862085d 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -453,8 +453,7 @@ common for task names to begin to clash. For example, if you might have a main program and a set of sample programs built by a single Rakefile. By placing the tasks related to the main program in one namespace, and the tasks for building the sample programs in a -different namespace, the task names will not will not interfere with -each other. +different namespace, the task names will not interfere with each other. For example: From 88bd4ce0da04b13a94033e91f4ebc46411337ef2 Mon Sep 17 00:00:00 2001 From: Kent Wang Date: Tue, 29 Oct 2013 11:04:00 +0800 Subject: [PATCH 039/813] Keep the space after the "!" operator --- install.rb | 2 +- lib/rake/application.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.rb b/install.rb index 8273a76dc..9f5faf09c 100644 --- a/install.rb +++ b/install.rb @@ -68,7 +68,7 @@ def installBIN(from, opfile) for fn in files fn_dir = File.dirname(fn) target_dir = File.join($sitedir, fn_dir) - if !File.exist?(target_dir) + if ! File.exist?(target_dir) FileUtils.mkdir_p(target_dir) end FileUtils.install(File.join('lib', fn), File.join($sitedir, fn), diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 381a55c1b..9269a52ef 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -629,7 +629,7 @@ def print_rakefile_directory(location) def raw_load_rakefile # :nodoc: rakefile, location = find_rakefile_location - if (!options.ignore_system) && + if (! options.ignore_system) && (options.load_system || rakefile.nil?) && system_dir && File.directory?(system_dir) print_rakefile_directory(location) From ae56178e7ab9dc088c3f024d858cc57d7e32e10f Mon Sep 17 00:00:00 2001 From: Hiroshi Shirosaki Date: Wed, 6 Nov 2013 13:00:37 +0900 Subject: [PATCH 040/813] Fix a test failure on Windows test-all on ruby repository fails because the path doesn't have a drive letter on Windows. Rake::Backtrace.collapse also uses File.expand_path internally to make suppressed paths. --- test/test_rake_backtrace.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_rake_backtrace.rb b/test/test_rake_backtrace.rb index 9a9c9e584..3f9bce063 100644 --- a/test/test_rake_backtrace.rb +++ b/test/test_rake_backtrace.rb @@ -11,7 +11,7 @@ def test_bin_rake_suppressed end def test_system_dir_suppressed - path = RbConfig::CONFIG['rubylibprefix'] + path = File.expand_path(RbConfig::CONFIG['rubylibprefix']) skip if path.nil? paths = [path + ":12"] @@ -22,7 +22,7 @@ def test_system_dir_suppressed end def test_near_system_dir_isnt_suppressed - path = RbConfig::CONFIG['rubylibprefix'] + path = File.expand_path(RbConfig::CONFIG['rubylibprefix']) skip if path.nil? paths = [" " + path + ":12"] From 0205cb041b74c64768974e7e47027b995bc87674 Mon Sep 17 00:00:00 2001 From: Judson Date: Thu, 7 Nov 2013 17:16:05 -0800 Subject: [PATCH 041/813] Completed namespaced task definitions Tests include working within another namespace, and that the TM scope isn't clobbered --- lib/rake/task_manager.rb | 9 +++++++++ test/test_rake_task_manager.rb | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 9e95761dc..b52ae72c9 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -22,6 +22,13 @@ def create_rule(*args, &block) def define_task(task_class, *args, &block) task_name, arg_names, deps = resolve_args(args) + + original_scope = @scope + if(task_name.is_a? String) + task_name, *definition_scope = *(task_name.split(":").reverse) + @scope = Scope.make(*(definition_scope + @scope.to_a)) + end + task_name = task_class.scope_name(@scope, task_name) deps = [deps] unless deps.respond_to?(:to_ary) deps = deps.map { |d| d.to_s } @@ -32,6 +39,8 @@ def define_task(task_class, *args, &block) task.add_description(get_description(task)) end task.enhance(deps, &block) + ensure + @scope = original_scope end # Lookup a task. Return an existing task if found, otherwise diff --git a/test/test_rake_task_manager.rb b/test/test_rake_task_manager.rb index 5ec4c0e65..c2730b67e 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -40,6 +40,23 @@ def test_namespace_task_create assert_equal ["x:t"], @tm.tasks.map { |t| t.name } end + def test_define_namespaced_task + t = @tm.define_task(Rake::Task, 'n:a:m:e:t') + assert_equal Rake::Scope.make("e", "m", "a", "n"), t.scope + assert_equal "n:a:m:e:t", t.name + assert_equal @tm, t.application + end + + def test_define_namespace_in_namespace + t = nil + @tm.in_namespace("n") do + t = @tm.define_task(Rake::Task, 'a:m:e:t') + end + assert_equal Rake::Scope.make("e", "m", "a", "n"), t.scope + assert_equal "n:a:m:e:t", t.name + assert_equal @tm, t.application + end + def test_anonymous_namespace anon_ns = @tm.in_namespace(nil) do t = @tm.define_task(Rake::Task, :t) @@ -89,6 +106,7 @@ def test_name_lookup_in_multiple_scopes @tm.in_namespace("a") do aa = @tm.define_task(Rake::Task, :aa) mid_z = @tm.define_task(Rake::Task, :z) + ns_d = @tm.define_task(Rake::Task, "n:t") @tm.in_namespace("b") do bb = @tm.define_task(Rake::Task, :bb) bot_z = @tm.define_task(Rake::Task, :z) @@ -116,6 +134,8 @@ def test_name_lookup_in_multiple_scopes assert_equal top_z, @tm["^z"] assert_equal top_z, @tm["^^z"] # Over the top assert_equal top_z, @tm["rake:z"] + assert_equal ns_d, @tm["n:t"] + assert_equal ns_d, @tm["a:n:t"] end assert_equal Rake::Scope.make, @tm.current_scope From e024abf0df68301f3e927857508348254de52467 Mon Sep 17 00:00:00 2001 From: Ofer Nave Date: Fri, 8 Nov 2013 12:14:32 -0500 Subject: [PATCH 042/813] added important bit of info from docs --- lib/rake/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 9269a52ef..adb8be0d4 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -353,7 +353,7 @@ def standard_rake_options sort_options( [ ['--all', '-A', - "Show all tasks, even uncommented ones", + "Show all tasks, even uncommented ones (in combination with -T or -D)", lambda { |value| options.show_all_tasks = value } From 990876a46f7d8d30a126e6fb40a4a9ea577a196a Mon Sep 17 00:00:00 2001 From: John Varghese Date: Sat, 9 Nov 2013 20:15:12 -0800 Subject: [PATCH 043/813] Made a correction to the documentation, explaining how to call tasks with arguments when the arguments contain spaces --- doc/rakefile.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index d5862085d..46eff80e0 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -175,7 +175,7 @@ arguments can be passed by separating them with a comma, for example: Just a few words of caution. The rake task name and its arguments need to be a single command line argument to rake. This generally -means no spaces. If spaces are needed, then the entire rake + +means no spaces. If spaces are needed, then the entire name + argument string should be quoted. Something like this: rake "name[billy bob, smith]" From 41538f6f01f7c43e33da0a78cdbde4a1bc87b868 Mon Sep 17 00:00:00 2001 From: Aaron Lee Date: Wed, 20 Nov 2013 15:23:46 -0600 Subject: [PATCH 044/813] TaskArgument responds to has_key? To make TaskArgument look more like a hash instead of failing silently when using has_key?. --- lib/rake/task_arguments.rb | 4 ++++ test/test_rake_task_arguments.rb | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index 1e40b3bbe..2405bc383 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -74,6 +74,10 @@ def inspect to_s end + def has_key?(key) + @hash.has_key?(key) + end + protected def lookup(name) diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 061178e23..369ecf6e5 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -19,6 +19,12 @@ def test_multiple_values_in_args assert_equal({:a => :one, :b => :two, :c => :three}, ta.to_hash) end + def test_has_key + ta = Rake::TaskArguments.new([:a], [:one]) + assert(ta.has_key?(:a)) + refute(ta.has_key?(:b)) + end + def test_to_s ta = Rake::TaskArguments.new([:a, :b, :c], [1, 2, 3]) assert_equal ta.to_hash.inspect, ta.to_s From bfafc3a034866f276dc9709a010f7fbc50237683 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Tue, 26 Nov 2013 23:40:56 -0500 Subject: [PATCH 045/813] Rename collect_tasks to collect_command_line_tasks --- lib/rake/application.rb | 4 ++-- test/test_rake_application_options.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index adb8be0d4..d9439429d 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -84,7 +84,7 @@ def init(app_name='rake') standard_exception_handling do @name = app_name handle_options - collect_tasks + collect_command_line_tasks end end @@ -685,7 +685,7 @@ def standard_system_dir #:nodoc: # Collect the list of tasks on the command line. If no tasks are # given, return a list containing only the default task. # Environmental assignments are processed at this time as well. - def collect_tasks + def collect_command_line_tasks @top_level_tasks = [] ARGV.each do |arg| if arg =~ /^(\w+)=(.*)$/m diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index f6c8ad326..a9ae4d9c0 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -458,7 +458,7 @@ def @app.exit(*args) end @app.instance_eval do handle_options - collect_tasks + collect_command_line_tasks end @tasks = @app.top_level_tasks @app.options From 4709e80e3ca4db09c2ed4be01cb3120a470d7556 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Sun, 1 Dec 2013 06:08:16 +0900 Subject: [PATCH 046/813] Fix doc typo s/prefered/preferred/ [ci skip] --- lib/rake/file_list.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index 0b60925f0..f32b8c62a 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -391,7 +391,7 @@ def [](*args) end # Get a sorted list of files matching the pattern. This method - # should be prefered to Dir[pattern] and Dir.glob(pattern) because + # should be preferred to Dir[pattern] and Dir.glob(pattern) because # the files returned are guaranteed to be sorted. def glob(pattern, *args) Dir.glob(pattern, *args).sort From 7fe224b95226c7e754e8c12dc60e0a027efa0393 Mon Sep 17 00:00:00 2001 From: Andrey Koleshko Date: Wed, 18 Dec 2013 20:45:28 +0300 Subject: [PATCH 047/813] Fix explanation of directory method in the rakefile.doc --- doc/rakefile.rdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index d5862085d..e4caa32d1 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -97,9 +97,9 @@ that creates the directory. For example, the following declaration is equivalent to ... - file "testdata" do |t| mkdir t.name end - file "testdata/examples" do |t| mkdir t.name end - file "testdata/examples/doc" do |t| mkdir t.name end + file "testdata" do |t| mkdir t.name end + file "testdata/examples" => ["testdata"] do |t| mkdir t.name end + file "testdata/examples/doc" => ["testdata/examples"] do |t| mkdir t.name end The +directory+ method does not accept prerequisites or actions, but both prerequisites and actions can be added later. For example ... From fe10ff81f05b6ee3cab21a865f7b9c91b55a2d6a Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 19 Dec 2013 23:57:42 -0500 Subject: [PATCH 048/813] Remove RubyForge links. Changed API docs to go to onestepback.org/software/rake --- README.rdoc | 8 ++++---- rakelib/publish.rake | 8 +++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.rdoc b/README.rdoc index 8e97e6232..33c3f9f33 100644 --- a/README.rdoc +++ b/README.rdoc @@ -109,7 +109,7 @@ Feature requests and bug reports can be made here * Rake Documentation Home: http://docs.rubyrake.org * Rake Project Page: http://github.com/jimweirich/rake -* Rake API Documents: http://rake.rubyforge.org +* Rake API Documents: http://onestepback.org/software/rake/ * Rake Source Code Repo: http://github.com/jimweirich/rake * Rake Git Repo Clone URL: git://github.com/jimweirich/rake.git * Rake Bug Reports: https://github.com/jimweirich/rake/issues @@ -132,7 +132,7 @@ other projects with similar (and not so similar) goals. * http://www.aromatic.com/tools/jam.txt -- JAM, Java Automated Make * http://ant.apache.org -- The Ant project * http://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System -* http://rant.rubyforge.org -- Rant, another Ruby make tool. +* http://rubydoc.info/gems/rant/0.5.7/frames -- Rant, another Ruby make tool. == Credits @@ -152,8 +152,8 @@ Rake is available under an MIT-style license. == Support -The Rake homepage is http://rake.rubyforge.org. You can find the Rake -RubyForge page at http://rubyforge.org/projects/rake. +The Rake homepage is http://onestepback.org/software/rake/. You can find the Rake +GitHub page at http://github.com/jimweirich/rake. Feel free to submit commits or feature requests. If you send a patch, remember to update the corresponding unit tests. In fact, I prefer diff --git a/rakelib/publish.rake b/rakelib/publish.rake index bb71c9aec..40474abab 100644 --- a/rakelib/publish.rake +++ b/rakelib/publish.rake @@ -4,18 +4,16 @@ begin require 'rake/contrib/sshpublisher' require 'rake/contrib/rubyforgepublisher' - publisher = Rake::CompositePublisher.new - publisher.add Rake::RubyForgePublisher.new('rake', 'jimweirich') - publisher.add Rake::SshFilePublisher.new( + publisher = Rake::SshDirPublisher.new( 'linode', 'htdocs/software/rake', - '.', - 'rake.blurb') + 'html') desc "Publish the Documentation to RubyForge." task :publish => [:rdoc] do publisher.upload end + rescue LoadError => ex puts "#{ex.message} (#{ex.class})" puts "No Publisher Task Available" From 7fe3a403e438635b206ee3a958e6cddc46fcf3bb Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Fri, 20 Dec 2013 00:28:45 -0500 Subject: [PATCH 049/813] Remove rubyforge references in gem spec --- Rakefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index d45c1a458..c3c7d106c 100644 --- a/Rakefile +++ b/Rakefile @@ -188,9 +188,9 @@ specified in standard Ruby syntax. s.rdoc_options = BASE_RDOC_OPTIONS s.author = "Jim Weirich" - s.email = "jim@weirichhouse.org" - s.homepage = "http://rake.rubyforge.org" - s.rubyforge_project = "rake" + s.email = "jim.weirich@gmail.com" + s.homepage = "http://github.com/jimweirich/rake +# s.rubyforge_project = "rake" end Gem::PackageTask.new(SPEC) do |pkg| From a785f1bc5650996f73ad940377f1e38243b409b9 Mon Sep 17 00:00:00 2001 From: Salimane Adjao Moustapha Date: Thu, 2 Jan 2014 11:22:53 +0100 Subject: [PATCH 050/813] Add Ruby 2.1.0 to .travis.yml --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7495ba901..619ef0072 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,4 +7,5 @@ rvm: - jruby # 2 failures - 1.9.3 - 2.0.0 -script: ruby -Ilib bin/rake \ No newline at end of file + - 2.1.0 +script: ruby -Ilib bin/rake From 19564ef50404c787feee2e12a64574b0b0f9e358 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 2 Jan 2014 14:14:32 -0500 Subject: [PATCH 051/813] Disable the minitest dependency Travis is having trouble finding the dependency, so let's try it without it. --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index ce87d9027..689bb24ea 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org' -gem 'minitest', '~> 4.3' +# gem 'minitest', '~> 4.3' From d91f9bb1061efb4c8f75fd0ed240f4a0ee22ef3e Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 2 Jan 2014 14:18:08 -0500 Subject: [PATCH 052/813] Only require minitest in Rubys prior to 2.0 --- Gemfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 689bb24ea..ec90ffe21 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ source 'https://rubygems.org' -# gem 'minitest', '~> 4.3' +if RUBY_VERSION < "2.0.0" + gem 'minitest', '~> 4.3' +end From 93c4491ca0716730097e08e44c7a50885b447cc3 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 2 Jan 2014 15:06:30 -0500 Subject: [PATCH 053/813] Dropping 1.8.7 from travis And changing the README to note we need Ruby 1.9 or better now. --- .travis.yml | 2 +- README.rdoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 619ef0072..40e5d20ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: ruby env: - CI=true rvm: - - 1.8.7 # Needs mini-test +# - 1.8.7 # Needs mini-test # - rbx-19mode # Time comparison fails - jruby # 2 failures - 1.9.3 diff --git a/README.rdoc b/README.rdoc index 33c3f9f33..93ed88fc6 100644 --- a/README.rdoc +++ b/README.rdoc @@ -168,7 +168,7 @@ jim dot weirich at gmail.com. = Other stuff Author:: Jim Weirich -Requires:: Ruby 1.8.7 or later +Requires:: Ruby 1.9 or later License:: Copyright 2003-2013 by Jim Weirich. Released under an MIT-style license. See the MIT-LICENSE file included in the distribution. From e02502621aa27b0d9d70a69f15c8961101657e0f Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Mon, 13 Jan 2014 14:28:26 +1300 Subject: [PATCH 054/813] Updated Gem::Specification to require Ruby >= 1.9 --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index c527d28bd..ca03e800f 100644 --- a/Rakefile +++ b/Rakefile @@ -169,7 +169,7 @@ Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax. EOF - s.required_ruby_version = '>= 1.8.6' + s.required_ruby_version = '>= 1.9' s.required_rubygems_version = '>= 1.3.2' s.add_development_dependency 'minitest', '~> 4' From 5e401c9a093de7b350c5245c19ee6540928e3b3d Mon Sep 17 00:00:00 2001 From: Matthew Nicholas Bradley Date: Sun, 19 Jan 2014 04:22:12 +0000 Subject: [PATCH 055/813] Remove unfinished portion of sentence --- doc/rakefile.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index d5862085d..b933951fd 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -474,7 +474,7 @@ For example: Referencing a task in a separate namespace can be achieved by prefixing the task name with the namespace and a colon (e.g. "main:build" refers to the :build task in the +main+ namespace). -Nested namespaces are supported, so +Nested namespaces are supported. Note that the name given in the +task+ command is always the unadorned task name without any namespace prefixes. The +task+ command always From 555f44581ec06bcc737d3d7c66df44e9940b9875 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 19 Jan 2014 14:50:51 +0900 Subject: [PATCH 056/813] fix typo at https://github.com/ruby/ruby/pull/500 --- lib/rake/file_list.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index 0b60925f0..f32b8c62a 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -391,7 +391,7 @@ def [](*args) end # Get a sorted list of files matching the pattern. This method - # should be prefered to Dir[pattern] and Dir.glob(pattern) because + # should be preferred to Dir[pattern] and Dir.glob(pattern) because # the files returned are guaranteed to be sorted. def glob(pattern, *args) Dir.glob(pattern, *args).sort From db5ebee97c5b808094a0e172c60a62575ee72dcc Mon Sep 17 00:00:00 2001 From: Marco Pfatschbacher Date: Tue, 28 Jan 2014 22:01:19 +0100 Subject: [PATCH 057/813] Clarify rake -f usage. Users that are used to make semantics might not expect, that parent directories are still being searched. --- lib/rake/application.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index d9439429d..8788790b4 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -451,8 +451,8 @@ def standard_rake_options "Do not log messages to standard output.", lambda { |value| Rake.verbose(false) } ], - ['--rakefile', '-f [FILE]', - "Use FILE as the rakefile.", + ['--rakefile', '-f [FILENAME]', + "Use FILENAME as the rakefile to search for.", lambda { |value| value ||= '' @rakefiles.clear From 90a27e554323235806a9eb9e66cd2a086d273fbc Mon Sep 17 00:00:00 2001 From: Andrew Gilbert Date: Wed, 5 Feb 2014 12:03:42 -0800 Subject: [PATCH 058/813] Add build_all capability. --- lib/rake/application.rb | 6 ++++++ lib/rake/file_task.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index d9439429d..07fb23b43 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -365,6 +365,12 @@ def standard_rake_options select_trace_output(options, 'backtrace', value) } ], + ['--build-all', '-B', + "Build all prerequisites, including those which are up-to-date.", + lambda { |value| + options.build_all = true + } + ], ['--comments', "Show commented tasks only", lambda { |value| diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index 3e717c24b..6505b6661 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -13,7 +13,7 @@ class FileTask < Task # Is this file task needed? Yes if it doesn't exist, or if its time stamp # is out of date. def needed? - ! File.exist?(name) || out_of_date?(timestamp) + ! File.exist?(name) || out_of_date?(timestamp) || @application.options.build_all end # Time stamp for file task. From 227037e5d78700e3aa19efb9f2fa1a9bd3ff843f Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 13 Feb 2014 15:07:54 -0500 Subject: [PATCH 059/813] Remove __thread__ method It's not used anywhere. --- lib/rake/thread_pool.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/rake/thread_pool.rb b/lib/rake/thread_pool.rb index 44bc7483e..07f36654b 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -152,10 +152,6 @@ def stat(event, data=nil) # :nodoc: def __queue__ # :nodoc: @queue end - - def __threads__ # :nodoc: - @threads.dup - end end end From 5ac9df09d6be3fbb7edb127f31aa0684db620cd3 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 13 Feb 2014 15:08:28 -0500 Subject: [PATCH 060/813] Fix race condition in thread pool. This was failing in JRuby, causing Travis to complain. --- lib/rake/thread_pool.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/rake/thread_pool.rb b/lib/rake/thread_pool.rb index 07f36654b..73fd104a9 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -109,13 +109,19 @@ def process_queue_item #:nodoc: false end + def safe_thread_count + @threads_mon.synchronize do + @threads.count + end + end + def start_thread # :nodoc: @threads_mon.synchronize do next unless @threads.count < @max_active_threads t = Thread.new do begin - while @threads.count <= @max_active_threads + while safe_thread_count <= @max_active_threads break unless process_queue_item end ensure @@ -126,6 +132,7 @@ def start_thread # :nodoc: end end end + @threads << t stat( :spawned, From fbb22e7f570fc573ad1bff9d5905df1ab1cbd475 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 13 Feb 2014 16:16:59 -0500 Subject: [PATCH 061/813] Add display of cause exception. Also fixed tests where assert_raises interacted badly with capture_io. --- lib/rake/application.rb | 14 +++++++++--- test/test_rake_application.rb | 43 +++++++++++++++++++++++++++-------- 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index d9439429d..43e6ecf60 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -184,15 +184,23 @@ def exit_because_of_exception(ex) # Display the error message that caused the exception. def display_error_message(ex) trace "#{name} aborted!" + display_exception_details(ex) + trace "Tasks: #{ex.chain}" if has_chain?(ex) + trace "(See full trace by running task with --trace)" unless + options.backtrace + end + + def display_exception_details(ex) trace ex.message if options.backtrace trace ex.backtrace.join("\n") else trace Backtrace.collapse(ex.backtrace).join("\n") end - trace "Tasks: #{ex.chain}" if has_chain?(ex) - trace "(See full trace by running task with --trace)" unless - options.backtrace + + if ex.respond_to?(:cause) && ex.cause + display_exception_details(ex.cause) + end end # Warn about deprecated usage. diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index aa5ed39f8..f0407edf2 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -391,10 +391,10 @@ def test_bad_run @app.intern(Rake::Task, "default").enhance { fail } ARGV.clear ARGV << '-f' << '-s' << '--rakelib=""' - assert_raises(SystemExit) { - _, err = capture_io { @app.run } - assert_match(/see full trace/, err) + _, err = capture_io { + assert_raises(SystemExit){ @app.run } } + assert_match(/see full trace/i, err) ensure ARGV.clear end @@ -403,10 +403,10 @@ def test_bad_run_with_trace @app.intern(Rake::Task, "default").enhance { fail } ARGV.clear ARGV << '-f' << '-s' << '-t' - assert_raises(SystemExit) { - _, err = capture_io { @app.run } - refute_match(/see full trace/, err) + _, err = capture_io { + assert_raises(SystemExit) { @app.run } } + refute_match(/see full trace/i, err) ensure ARGV.clear end @@ -415,10 +415,35 @@ def test_bad_run_with_backtrace @app.intern(Rake::Task, "default").enhance { fail } ARGV.clear ARGV << '-f' << '-s' << '--backtrace' - assert_raises(SystemExit) { - _, err = capture_io { @app.run } - refute_match(/see full trace/, err) + _, err = capture_io { + assert_raises(SystemExit) { + @app.run + } + } + refute_match(/see full trace/, err) + ensure + ARGV.clear + end + + def test_printing_original_exception_cause + custom_error = Class.new(StandardError) + @app.intern(Rake::Task, "default").enhance { + begin + raise custom_error, "Original Error" + rescue custom_error => ex + raise custom_error, "Secondary Error" + end + } + ARGV.clear + ARGV << '-f' << '-s' + _ ,err = capture_io { + assert_raises(SystemExit) { + @app.run + $stdout.puts "DBG: err=#{err.inspect}" + } } + assert_match(/Original Error/, err) + assert_match(/Secondary Error/, err) ensure ARGV.clear end From 000928efed806801f23117abd2eddfb1e8b6ec95 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 13 Feb 2014 16:21:41 -0500 Subject: [PATCH 062/813] Allow the exception/cause test to work with older Rubies. --- test/test_rake_application.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index f0407edf2..d961e2739 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -425,6 +425,11 @@ def test_bad_run_with_backtrace ARGV.clear end + def cause_supported? + ex = StandardError.new + ex.respond_to?(:cause) + end + def test_printing_original_exception_cause custom_error = Class.new(StandardError) @app.intern(Rake::Task, "default").enhance { @@ -442,7 +447,9 @@ def test_printing_original_exception_cause $stdout.puts "DBG: err=#{err.inspect}" } } - assert_match(/Original Error/, err) + if cause_supported? + assert_match(/Original Error/, err) + end assert_match(/Secondary Error/, err) ensure ARGV.clear From 6e50eab3bac8c5c529453a1c02f91c1aac7bf65a Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 13 Feb 2014 16:52:05 -0500 Subject: [PATCH 063/813] Don't display RuntimeError class names in error messages --- lib/rake/application.rb | 7 ++++++- test/test_rake_application.rb | 32 +++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 43e6ecf60..a6a6198d8 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -191,7 +191,12 @@ def display_error_message(ex) end def display_exception_details(ex) - trace ex.message + if ex.instance_of?(RuntimeError) + trace ex.message + else + trace "#{ex.class.name}: #{ex.message}" + end + if options.backtrace trace ex.backtrace.join("\n") else diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index d961e2739..4daa48c98 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -425,6 +425,37 @@ def test_bad_run_with_backtrace ARGV.clear end + CustomError = Class.new(RuntimeError) + + def test_bad_run_includes_exception_name + @app.intern(Rake::Task, "default").enhance { + raise CustomError, "intentional" + } + ARGV.clear + ARGV << '-f' << '-s' + _, err = capture_io { + assert_raises(SystemExit) { + @app.run + } + } + assert_match(/CustomError: intentional/, err) + end + + def test_rake_error_excludes_exception_name + @app.intern(Rake::Task, "default").enhance { + fail "intentional" + } + ARGV.clear + ARGV << '-f' << '-s' + _, err = capture_io { + assert_raises(SystemExit) { + @app.run + } + } + refute_match(/RuntimeError/, err) + assert_match(/intentional/, err) + end + def cause_supported? ex = StandardError.new ex.respond_to?(:cause) @@ -444,7 +475,6 @@ def test_printing_original_exception_cause _ ,err = capture_io { assert_raises(SystemExit) { @app.run - $stdout.puts "DBG: err=#{err.inspect}" } } if cause_supported? From fa694ecc852f2582016bbcc6522c0eb53d4ff116 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 13 Feb 2014 16:52:19 -0500 Subject: [PATCH 064/813] Fix unused variable warning --- test/test_rake_application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 4daa48c98..d4bf4957c 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -466,7 +466,7 @@ def test_printing_original_exception_cause @app.intern(Rake::Task, "default").enhance { begin raise custom_error, "Original Error" - rescue custom_error => ex + rescue custom_error raise custom_error, "Secondary Error" end } From a7c748e0d56f26689648c0ec3765e736e603c103 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 13 Feb 2014 16:57:08 -0500 Subject: [PATCH 065/813] Refactor: ExtractMethod on display_exception methods --- lib/rake/application.rb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index a6a6198d8..f27451293 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -191,21 +191,29 @@ def display_error_message(ex) end def display_exception_details(ex) + display_exception_message_details(ex) + display_exception_backtrace(ex) + display_exception_details(ex.cause) if has_cause?(ex) + end + + def has_cause?(ex) + ex.respond_to?(:cause) && ex.cause + end + + def display_exception_message_details(ex) if ex.instance_of?(RuntimeError) trace ex.message else trace "#{ex.class.name}: #{ex.message}" end + end + def display_exception_backtrace(ex) if options.backtrace trace ex.backtrace.join("\n") else trace Backtrace.collapse(ex.backtrace).join("\n") end - - if ex.respond_to?(:cause) && ex.cause - display_exception_details(ex.cause) - end end # Warn about deprecated usage. From 336559f28f55bce418e2ebcc0a57548dcbac4025 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 13 Feb 2014 17:08:19 -0500 Subject: [PATCH 066/813] Refactor ARGV setup into setup_command_line method. --- test/test_rake_application.rb | 52 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index d4bf4957c..7653b84a3 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -9,6 +9,13 @@ def setup @app.options.rakelib = [] end + def setup_command_line(*options) + ARGV.clear + options.each do |option| + ARGV << option + end + end + def test_display_tasks @app.options.show_tasks = :tasks @app.options.show_task_pattern = // @@ -193,6 +200,7 @@ def test_load_rakefile_doesnt_print_rakefile_directory_from_subdir_if_silent end def test_load_rakefile_not_found + ARGV.clear Dir.chdir @tempdir ENV['RAKE_SYSTEM'] = 'not_exist' @@ -201,8 +209,11 @@ def test_load_rakefile_not_found options.silent = true end + ex = assert_raises(RuntimeError) do - @app.instance_eval do raw_load_rakefile end + @app.instance_eval do + raw_load_rakefile + end end assert_match(/no rakefile found/i, ex.message) @@ -295,8 +306,7 @@ def test_handle_options_should_strip_options_from_argv assert !@app.options.trace valid_option = '--trace' - ARGV.clear - ARGV << valid_option + setup_command_line(valid_option) @app.handle_options @@ -305,8 +315,7 @@ def test_handle_options_should_strip_options_from_argv end def test_handle_options_trace_default_is_stderr - ARGV.clear - ARGV << "--trace" + setup_command_line("--trace") @app.handle_options @@ -315,8 +324,7 @@ def test_handle_options_trace_default_is_stderr end def test_handle_options_trace_overrides_to_stdout - ARGV.clear - ARGV << "--trace=stdout" + setup_command_line("--trace=stdout") @app.handle_options @@ -327,8 +335,7 @@ def test_handle_options_trace_overrides_to_stdout def test_handle_options_trace_does_not_eat_following_task_names assert !@app.options.trace - ARGV.clear - ARGV << "--trace" << "sometask" + setup_command_line("--trace", "sometask") @app.handle_options assert ARGV.include?("sometask") @@ -359,8 +366,7 @@ def test_good_run def test_display_task_run ran = false - ARGV.clear - ARGV << '-f' << '-s' << '--tasks' << '--rakelib=""' + setup_command_line('-f', '-s', '--tasks', '--rakelib=""') @app.last_description = "COMMENT" @app.define_task(Rake::Task, "default") out, = capture_io { @app.run } @@ -372,8 +378,7 @@ def test_display_task_run def test_display_prereqs ran = false - ARGV.clear - ARGV << '-f' << '-s' << '--prereqs' << '--rakelib=""' + setup_command_line('-f', '-s', '--prereqs', '--rakelib=""') @app.last_description = "COMMENT" t = @app.define_task(Rake::Task, "default") t.enhance([:a, :b]) @@ -389,8 +394,7 @@ def test_display_prereqs def test_bad_run @app.intern(Rake::Task, "default").enhance { fail } - ARGV.clear - ARGV << '-f' << '-s' << '--rakelib=""' + setup_command_line('-f', '-s', '--rakelib=""') _, err = capture_io { assert_raises(SystemExit){ @app.run } } @@ -401,8 +405,7 @@ def test_bad_run def test_bad_run_with_trace @app.intern(Rake::Task, "default").enhance { fail } - ARGV.clear - ARGV << '-f' << '-s' << '-t' + setup_command_line('-f', '-s', '-t') _, err = capture_io { assert_raises(SystemExit) { @app.run } } @@ -413,8 +416,7 @@ def test_bad_run_with_trace def test_bad_run_with_backtrace @app.intern(Rake::Task, "default").enhance { fail } - ARGV.clear - ARGV << '-f' << '-s' << '--backtrace' + setup_command_line('-f', '-s', '--backtrace') _, err = capture_io { assert_raises(SystemExit) { @app.run @@ -431,8 +433,7 @@ def test_bad_run_includes_exception_name @app.intern(Rake::Task, "default").enhance { raise CustomError, "intentional" } - ARGV.clear - ARGV << '-f' << '-s' + setup_command_line('-f', '-s') _, err = capture_io { assert_raises(SystemExit) { @app.run @@ -445,8 +446,7 @@ def test_rake_error_excludes_exception_name @app.intern(Rake::Task, "default").enhance { fail "intentional" } - ARGV.clear - ARGV << '-f' << '-s' + setup_command_line('-f', '-s') _, err = capture_io { assert_raises(SystemExit) { @app.run @@ -470,8 +470,7 @@ def test_printing_original_exception_cause raise custom_error, "Secondary Error" end } - ARGV.clear - ARGV << '-f' << '-s' + setup_command_line('-f', '-s') _ ,err = capture_io { assert_raises(SystemExit) { @app.run @@ -487,8 +486,7 @@ def test_printing_original_exception_cause def test_run_with_bad_options @app.intern(Rake::Task, "default").enhance { fail } - ARGV.clear - ARGV << '-f' << '-s' << '--xyzzy' + setup_command_line('-f', '-s', '--xyzzy') assert_raises(SystemExit) { capture_io { @app.run } } From e779cd44b823bb56c263494a9aa94f9f5d036e31 Mon Sep 17 00:00:00 2001 From: Valera Rozuvan Date: Thu, 20 Feb 2014 14:11:47 +0200 Subject: [PATCH 067/813] Update rakefile.rdoc --- doc/rakefile.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index 51dd9f12b..98eaa0731 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -183,7 +183,7 @@ argument string should be quoted. Something like this: (Quoting rules vary between operating systems and shells, so make sure you consult the proper docs for your OS/shell). -=== Tasks Arguments and the Environment +=== Task Arguments and the Environment Task argument values can also be picked up from the environment. For example, if the "release" task expected a parameter named From 6ff9675c1c2ab2d1bd38d358316e0c4e5c872d5f Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 14:19:51 -0700 Subject: [PATCH 068/813] Track future history in History.rdoc Mention #256 in History --- History.rdoc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 History.rdoc diff --git a/History.rdoc b/History.rdoc new file mode 100644 index 000000000..109255980 --- /dev/null +++ b/History.rdoc @@ -0,0 +1,6 @@ +=== 10.1.2 + +Bug fixes: + +* Fixed typo in rakefile.rdoc. Pull request #256 by Valera Rozuvan. + From 9553789c24583bebade96783e09cdbff02a7eb3e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 14:31:14 -0700 Subject: [PATCH 069/813] Add #252 to History --- History.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 109255980..8180b07ca 100644 --- a/History.rdoc +++ b/History.rdoc @@ -3,4 +3,4 @@ Bug fixes: * Fixed typo in rakefile.rdoc. Pull request #256 by Valera Rozuvan. - +* Clarified `rake -f` usage message. Pull request #252 by Marco Pfatschbacher. From 6315114cf6e01636c6131ba05bba2aa5ebed4f62 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 14:38:36 -0700 Subject: [PATCH 070/813] Add #251 to History --- History.rdoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/History.rdoc b/History.rdoc index 8180b07ca..fa94d7681 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,6 +1,11 @@ === 10.1.2 +Enhancements: + +* Rake now prints the exception class on errors. Patch #251 by David Cornu. + Bug fixes: * Fixed typo in rakefile.rdoc. Pull request #256 by Valera Rozuvan. * Clarified `rake -f` usage message. Pull request #252 by Marco Pfatschbacher. + From 334256ab331a5b60b3894220b892860b7287fca9 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 14:39:53 -0700 Subject: [PATCH 071/813] Add #250 to History --- History.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index fa94d7681..972f0d712 100644 --- a/History.rdoc +++ b/History.rdoc @@ -6,6 +6,6 @@ Enhancements: Bug fixes: -* Fixed typo in rakefile.rdoc. Pull request #256 by Valera Rozuvan. +* Fixed typos. Pull request #256 by Valera Rozuvan, #250 via Jake Worth. * Clarified `rake -f` usage message. Pull request #252 by Marco Pfatschbacher. From 8088ef9db409dbecbb69013976fd129613c29d2a Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 15:16:41 -0700 Subject: [PATCH 072/813] Add #247 to History --- History.rdoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/History.rdoc b/History.rdoc index 972f0d712..232657cb1 100644 --- a/History.rdoc +++ b/History.rdoc @@ -2,6 +2,9 @@ Enhancements: +* Rake now requires Ruby 1.9 or newer. For me, this is a breaking change, but + it seems that Jim planned to release it with Rake 2.1. See also pull + request #247 by Philip Arndt. * Rake now prints the exception class on errors. Patch #251 by David Cornu. Bug fixes: From 2b5ff238a98f171c1f1d41c0c3283ca06ea3b0e7 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 15:17:22 -0700 Subject: [PATCH 073/813] Add #235 to History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index 232657cb1..1b9b8a631 100644 --- a/History.rdoc +++ b/History.rdoc @@ -10,5 +10,7 @@ Enhancements: Bug fixes: * Fixed typos. Pull request #256 by Valera Rozuvan, #250 via Jake Worth. +* Fixed documentation for calling tasks with arguments. Pull request #235 by + John Varghese. * Clarified `rake -f` usage message. Pull request #252 by Marco Pfatschbacher. From 9aaadc84afda4896d63d9a61ce20cc607e4139ec Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 15:19:29 -0700 Subject: [PATCH 074/813] Add #252 to History --- History.rdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/History.rdoc b/History.rdoc index 1b9b8a631..cfd3e984f 100644 --- a/History.rdoc +++ b/History.rdoc @@ -5,6 +5,12 @@ Enhancements: * Rake now requires Ruby 1.9 or newer. For me, this is a breaking change, but it seems that Jim planned to release it with Rake 2.1. See also pull request #247 by Philip Arndt. +* Rake now allows you to declare tasks under a namespace like: + + task 'a:b' do ... end + + Pull request #232 by Judson Lester. + * Rake now prints the exception class on errors. Patch #251 by David Cornu. Bug fixes: From c7007d5abce36aa88e151f04e55aa61990dfea6d Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 15:20:37 -0700 Subject: [PATCH 075/813] Add #231 to History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index cfd3e984f..22b4af4f4 100644 --- a/History.rdoc +++ b/History.rdoc @@ -19,4 +19,5 @@ Bug fixes: * Fixed documentation for calling tasks with arguments. Pull request #235 by John Varghese. * Clarified `rake -f` usage message. Pull request #252 by Marco Pfatschbacher. +* Fixed a test failure on windows. Pull request #231 by Hiroshi Shirosaki. From 5586b6c830004d1c2775727f726114d74a3571e7 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 15:25:13 -0700 Subject: [PATCH 076/813] Added #225 to History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 22b4af4f4..81d826860 100644 --- a/History.rdoc +++ b/History.rdoc @@ -20,4 +20,5 @@ Bug fixes: John Varghese. * Clarified `rake -f` usage message. Pull request #252 by Marco Pfatschbacher. * Fixed a test failure on windows. Pull request #231 by Hiroshi Shirosaki. +* Fixed corrupted rake.1.gz. Pull request #225 by Michel Boaventura. From 8053d2863bb36ca729f74d85e36288eb2e12db06 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 15:35:46 -0700 Subject: [PATCH 077/813] Add #215 to History --- History.rdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 81d826860..abbbe43b8 100644 --- a/History.rdoc +++ b/History.rdoc @@ -10,7 +10,8 @@ Enhancements: task 'a:b' do ... end Pull request #232 by Judson Lester. - +* Task#source defaults to the first prerequisite in non-rule tasks. Pull + request #215 by Avdi Grimm. * Rake now prints the exception class on errors. Patch #251 by David Cornu. Bug fixes: From 7a84d67508f06698da004d38e047c2c5b154689b Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 15:46:42 -0700 Subject: [PATCH 078/813] Add #209 to History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index abbbe43b8..e02f0f1dc 100644 --- a/History.rdoc +++ b/History.rdoc @@ -12,6 +12,8 @@ Enhancements: Pull request #232 by Judson Lester. * Task#source defaults to the first prerequisite in non-rule tasks. Pull request #215 by Avdi Grimm. +* Rake now automatically rebuilds and reloads imported files. Pull request + #209 by Randy Coulman. * Rake now prints the exception class on errors. Patch #251 by David Cornu. Bug fixes: From 5b1059d84a57488dfaf22e5d081edfc5edc74d1d Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 16:00:55 -0700 Subject: [PATCH 079/813] Fix bug in can_detect_signals? The process used to detect signals was spawned incorrectly resulting in skipping of tests depending on signal detection. Now the dectection process is spawned directly so the tests will be run on linux. Patch by Alexey Borzenkov. Fixes #243 --- History.rdoc | 2 ++ test/test_rake_functional.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index e02f0f1dc..37ad11302 100644 --- a/History.rdoc +++ b/History.rdoc @@ -24,4 +24,6 @@ Bug fixes: * Clarified `rake -f` usage message. Pull request #252 by Marco Pfatschbacher. * Fixed a test failure on windows. Pull request #231 by Hiroshi Shirosaki. * Fixed corrupted rake.1.gz. Pull request #225 by Michel Boaventura. +* Fixed bug in can_detect_signals? in test. Patch from #243 by Alexey + Borzenkov. diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index 1c600a402..bf7ba92f7 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -430,7 +430,7 @@ def test_file_list_is_requirable_separately end def can_detect_signals? - system "ruby -e 'Process.kill \"TERM\", $$'" + system RUBY, '-e', 'Process.kill "TERM", $$' status = $? if @verbose puts " SIG status = #{$?.inspect}" From 45fb9e4c96ef4376c3a0f4b0901a80bab9202622 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 16:36:54 -0700 Subject: [PATCH 080/813] Remove require 'rubygems' as it's always available Rake requires Ruby 1.9 or newer which always has a RubyGems available. --- Rakefile | 73 ++++++++++++++++++++++++++------------------------------ 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/Rakefile b/Rakefile index ca03e800f..6c5b8dbcc 100644 --- a/Rakefile +++ b/Rakefile @@ -7,7 +7,6 @@ # MIT-LICENSE for details. require 'rbconfig' -require 'rubygems' system_rake = File.join RbConfig::CONFIG['rubylibdir'], 'rake.rb' @@ -156,56 +155,52 @@ PKG_FILES.exclude('doc/example/*.o') PKG_FILES.exclude('TAGS') PKG_FILES.exclude(%r{doc/example/main$}) -if ! defined?(Gem) - puts "Package Target requires RubyGems" -else - SPEC = Gem::Specification.new do |s| - s.name = 'rake' - s.version = $package_version - s.summary = "Ruby based make-like utility." - s.license = "MIT" - s.description = <<-EOF.delete "\n" +SPEC = Gem::Specification.new do |s| + s.name = 'rake' + s.version = $package_version + s.summary = "Ruby based make-like utility." + s.license = "MIT" + s.description = <<-EOF.delete "\n" Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax. - EOF - - s.required_ruby_version = '>= 1.9' - s.required_rubygems_version = '>= 1.3.2' - s.add_development_dependency 'minitest', '~> 4' + EOF - s.files = PKG_FILES.to_a + s.required_ruby_version = '>= 1.9' + s.required_rubygems_version = '>= 1.3.2' + s.add_development_dependency 'minitest', '~> 4' - s.executables = ["rake"] + s.files = PKG_FILES.to_a - s.extra_rdoc_files = FileList[ - 'README.rdoc', - 'MIT-LICENSE', - 'TODO', - 'CHANGES', - 'doc/**/*.rdoc' - ] + s.executables = ["rake"] - s.rdoc_options = BASE_RDOC_OPTIONS + s.extra_rdoc_files = FileList[ + 'README.rdoc', + 'MIT-LICENSE', + 'TODO', + 'CHANGES', + 'doc/**/*.rdoc' + ] - s.author = "Jim Weirich" - s.email = "jim.weirich@gmail.com" - s.homepage = "http://github.com/jimweirich/rake" - end + s.rdoc_options = BASE_RDOC_OPTIONS - Gem::PackageTask.new(SPEC) do |pkg| - pkg.need_zip = true - pkg.need_tar = true - end + s.author = "Jim Weirich" + s.email = "jim.weirich@gmail.com" + s.homepage = "http://github.com/jimweirich/rake" +end - file "rake.gemspec" => ["Rakefile", "lib/rake.rb"] do |t| - require 'yaml' - open(t.name, "w") { |f| f.puts SPEC.to_yaml } - end +Gem::PackageTask.new(SPEC) do |pkg| + pkg.need_zip = true + pkg.need_tar = true +end - desc "Create a stand-alone gemspec" - task :gemspec => "rake.gemspec" +file "rake.gemspec" => ["Rakefile", "lib/rake.rb"] do |t| + require 'yaml' + open(t.name, "w") { |f| f.puts SPEC.to_yaml } end +desc "Create a stand-alone gemspec" +task :gemspec => "rake.gemspec" + # Misc tasks ========================================================= def count_lines(filename) From 7c81dfe87780aecd67ebdba2c43d992f89db6c89 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 16:41:54 -0700 Subject: [PATCH 081/813] Remove rcov tasks rcov does not work on Ruby 1.9 or newer and I don't at present care about using simplecov. --- Rakefile | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/Rakefile b/Rakefile index 6c5b8dbcc..14b5d1878 100644 --- a/Rakefile +++ b/Rakefile @@ -29,7 +29,6 @@ end CLEAN.include('**/*.o', '*.dot', '**/*.rbc') CLOBBER.include('doc/example/main') CLOBBER.include('TAGS') -CLOBBER.include('coverage', 'rcov_aggregate') # Prevent OS X from including extended attribute junk in the tar output ENV['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true' @@ -65,44 +64,6 @@ Rake::TestTask.new do |t| t.warning = true end -begin - require 'rcov/rcovtask' - IGNORE_COVERAGE_IN = FileList[ - 'lib/rake/rdoctask.rb', - 'lib/rake/testtask.rb', - 'lib/rake/packagetask.rb', - 'lib/rake/clean.rb', - ] - - unless File::ALT_SEPARATOR - IGNORE_COVERAGE_IN.include( - 'lib/rake/alt_system.rb', - 'lib/rake/win32.rb') - end - - Rcov::RcovTask.new do |t| - t.libs << "test" - t.rcov_opts = [ - '-xRakefile', '-xrakefile', '-xpublish.rf', - '-xlib/rake/contrib', '-x/Library', '-x.rvm', - '--text-report', - '--sort coverage' - ] + FileList['rakelib/*.rake'].pathmap("-x%p") + - IGNORE_COVERAGE_IN.map { |fn| "-x#{fn}" } - t.test_files = FileList[ - 'test/lib/*_test.rb', - 'test/contrib/*_test.rb', - 'test/functional/*_test.rb' - ] - t.output_dir = 'coverage' - t.verbose = true - end -rescue LoadError - task :rcov do - puts "RCov is not available" - end -end - # CVS Tasks ---------------------------------------------------------- # Install rake using the standard install.rb script. From 1f4a6e4d2cd26a1a7571b62ad662645bab2cb9d6 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 16:44:44 -0700 Subject: [PATCH 082/813] Remove unused plugin method It seems to be for files I don't have or were in Jim's RUBY_LIB. --- Rakefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Rakefile b/Rakefile index 14b5d1878..e4f302c0f 100644 --- a/Rakefile +++ b/Rakefile @@ -220,12 +220,7 @@ task :rf => :rubyfiles # -------------------------------------------------------------------- # Creating a release -def plugin(plugin_name) - require "rake/plugins/#{plugin_name}" -end - task :noop -#plugin "release_manager" desc "Make a new release" task :release, [:rel, :reuse, :reltest] => [ From cfea0c420f7fc0127402e4d3689db6089c75c662 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 16:46:06 -0700 Subject: [PATCH 083/813] Remove where_am_i task I do not know what it is for --- Rakefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Rakefile b/Rakefile index e4f302c0f..11d5fb430 100644 --- a/Rakefile +++ b/Rakefile @@ -314,11 +314,6 @@ end load 'xforge.rf' if File.exist?('xforge.rf') -desc "Where is the current directory. This task displays the current rake directory" -task :where_am_i do - puts Rake.original_dir -end - task :failure => :really_fail task :really_fail do fail "oops" From 828162a0080d6ededf5bbaede27e189e750648d0 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 16:46:23 -0700 Subject: [PATCH 084/813] Remove failure, really_fail tasks I do not know what they are for --- Rakefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Rakefile b/Rakefile index 11d5fb430..0d0e6c971 100644 --- a/Rakefile +++ b/Rakefile @@ -314,7 +314,3 @@ end load 'xforge.rf' if File.exist?('xforge.rf') -task :failure => :really_fail -task :really_fail do - fail "oops" -end From 7387c6dbb9d6c8c5b9b07a4a0744f9785832ed86 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 16:46:47 -0700 Subject: [PATCH 085/813] Remove loading of publish and xforge rakefiles I think these only exist on Jim's computer. I will not need them once rake is using hoe for releases. --- Rakefile | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Rakefile b/Rakefile index 0d0e6c971..fa07c91a6 100644 --- a/Rakefile +++ b/Rakefile @@ -196,11 +196,6 @@ task :lines do show_line("TOTAL", total_lines, total_code) end -# Define an optional publish target in an external file. If the -# publish.rf file is not found, the publish targets won't be defined. - -load "publish.rf" if File.exist? "publish.rf" - # Support Tasks ------------------------------------------------------ RUBY_FILES = FileList['**/*.rb'].exclude('pkg') @@ -310,7 +305,3 @@ task :tag, [:rel, :reuse, :reltest] => [:prerelease] do |t, args| end end -# Require experimental XForge/Metaproject support. - -load 'xforge.rf' if File.exist?('xforge.rf') - From 076e3483390a6011e9f9d2c5bf1a4581eb397476 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 16:48:00 -0700 Subject: [PATCH 086/813] Remove unused noop task --- Rakefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Rakefile b/Rakefile index fa07c91a6..32c8fbb27 100644 --- a/Rakefile +++ b/Rakefile @@ -215,8 +215,6 @@ task :rf => :rubyfiles # -------------------------------------------------------------------- # Creating a release -task :noop - desc "Make a new release" task :release, [:rel, :reuse, :reltest] => [ :prerelease, From cf361fd93d30696e85b59774697e9536c0af0f75 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 16:48:53 -0700 Subject: [PATCH 087/813] Remove svn-specific release tasks rake has been on git for many years now. --- Rakefile | 91 -------------------------------------------------------- 1 file changed, 91 deletions(-) diff --git a/Rakefile b/Rakefile index 32c8fbb27..c4417ad7f 100644 --- a/Rakefile +++ b/Rakefile @@ -212,94 +212,3 @@ task :rubyfiles do end task :rf => :rubyfiles -# -------------------------------------------------------------------- -# Creating a release - -desc "Make a new release" -task :release, [:rel, :reuse, :reltest] => [ - :prerelease, - :clobber, - :test, - :update_version, - :package, - :tag - ] do - announce - announce "**************************************************************" - announce "* Release #{$package_version} Complete." - announce "* Packages ready to upload." - announce "**************************************************************" - announce -end - -# Validate that everything is ready to go for a release. -task :prerelease, :rel, :reuse, :reltest do |t, args| - $package_version = args.rel - announce - announce "**************************************************************" - announce "* Making RubyGem Release #{$package_version}" - announce "* (current version #{CURRENT_VERSION})" - announce "**************************************************************" - announce - - # Is a release number supplied? - unless args.rel - fail "Usage: rake release[X.Y.Z] [REUSE=tag_suffix]" - end - - # Is the release different than the current release. - # (or is REUSE set?) - if $package_version == CURRENT_VERSION && ! args.reuse - fail "Current version is #{$package_version}, must specify REUSE=tag_suffix to reuse version" - end - - # Are all source files checked in? - if args.reltest - announce "Release Task Testing, skipping checked-in file test" - else - announce "Checking for unchecked-in files..." - data = `svn st` - unless data =~ /^$/ - abort "svn status is not clean ... do you have unchecked-in files?" - end - announce "No outstanding checkins found ... OK" - end -end - -task :update_version, [:rel, :reuse, :reltest] => [:prerelease] do |t, args| - if args.rel == CURRENT_VERSION - announce "No version change ... skipping version update" - else - announce "Updating Rake version to #{args.rel}" - open("lib/rake.rb") do |rakein| - open("lib/rake.rb.new", "w") do |rakeout| - rakein.each do |line| - if line =~ /^RAKEVERSION\s*=\s*/ - rakeout.puts "RAKEVERSION = '#{args.rel}'" - else - rakeout.puts line - end - end - end - end - mv "lib/rake.rb.new", "lib/rake.rb" - if args.reltest - announce "Release Task Testing, skipping commiting of new version" - else - sh %{svn commit -m "Updated to version #{args.rel}" lib/rake.rb} # " - end - end -end - -desc "Tag all the CVS files with the latest release number (REL=x.y.z)" -task :tag, [:rel, :reuse, :reltest] => [:prerelease] do |t, args| - reltag = "REL_#{args.rel.gsub(/\./, '_')}" - reltag << args.reuse.gsub(/\./, '_') if args.reuse - announce "Tagging Repository with [#{reltag}]" - if args.reltest - announce "Release Task Testing, skipping CVS tagging" - else - sh %{svn copy svn+ssh://rubyforge.org/var/svn/rake/trunk svn+ssh://rubyforge.org/var/svn/rake/tags/#{reltag} -m 'Commiting release #{reltag}'} ###' - end -end - From 3f2e7639fb7ad255cdb6ceb7a389331b9e8834cc Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 16:50:49 -0700 Subject: [PATCH 088/813] Remove direct install capability I don't see a need for keeping this around. You should install via a gem nowadays. --- Rakefile | 7 ----- install.rb | 80 ------------------------------------------------------ 2 files changed, 87 deletions(-) delete mode 100644 install.rb diff --git a/Rakefile b/Rakefile index c4417ad7f..1e5dfbe91 100644 --- a/Rakefile +++ b/Rakefile @@ -66,13 +66,6 @@ end # CVS Tasks ---------------------------------------------------------- -# Install rake using the standard install.rb script. - -desc "Install the application" -task :install do - ruby "install.rb" -end - # Create a task to build the RDOC documentation tree. BASE_RDOC_OPTIONS = [ diff --git a/install.rb b/install.rb deleted file mode 100644 index 9f5faf09c..000000000 --- a/install.rb +++ /dev/null @@ -1,80 +0,0 @@ -require 'rbconfig' -require 'find' -require 'fileutils' -require 'tempfile' - -include RbConfig - -$ruby = CONFIG['ruby_install_name'] - -## -# Install a binary file. We patch in on the way through to -# insert a #! line. If this is a Unix install, we name -# the command (for example) 'rake' and let the shebang line -# handle running it. Under windows, we add a '.rb' extension -# and let file associations do their stuff -# - -def installBIN(from, opfile) - - tmp_file = Tempfile.new("_tmp") - - File.open(from) do |ip| - File.open(tmp_file, "w") do |op| - ruby = File.join($realbindir, $ruby) - op.puts "#!#{ruby} -w" - op.write ip.read - end - end - - opfile += ".rb" if CONFIG["target_os"] =~ /mswin/i - FileUtils.install(tmp_file, File.join($bindir, opfile), - {:mode => 0755, :verbose => true}) - tmp_file.unlink -end - -$sitedir = CONFIG["sitelibdir"] -unless $sitedir - version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"] - $libdir = File.join(CONFIG["libdir"], "ruby", version) - $sitedir = $:.find {|x| x =~ /site_ruby/} - if !$sitedir - $sitedir = File.join($libdir, "site_ruby") - elsif $sitedir !~ Regexp.quote(version) - $sitedir = File.join($sitedir, version) - end -end - -$bindir = CONFIG["bindir"] - -$realbindir = $bindir - -if (destdir = ENV['DESTDIR']) - $bindir = destdir + $bindir - $sitedir = destdir + $sitedir - - FileUtils.mkdir_p($bindir) - FileUtils.mkdir_p($sitedir) -end - -rake_dest = File.join($sitedir, "rake") -FileUtils.mkdir_p(rake_dest, {:verbose => true}) -File.chmod(0755, rake_dest) - -# The library files - -files = Dir.chdir('lib') { Dir['**/*.rb'].sort } - -for fn in files - fn_dir = File.dirname(fn) - target_dir = File.join($sitedir, fn_dir) - if ! File.exist?(target_dir) - FileUtils.mkdir_p(target_dir) - end - FileUtils.install(File.join('lib', fn), File.join($sitedir, fn), - {:mode => 0644, :verbose => true}) -end - -# and the executable - -installBIN("bin/rake", "rake") From 8d4a97831f9fdf325a27b5fd4ead095447122088 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 16:53:28 -0700 Subject: [PATCH 089/813] Remove rdoc existence checks Ruby 1.9+ (at least 1.9.3+) has a version of rdoc for which the checks are all true. --- Rakefile | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/Rakefile b/Rakefile index 1e5dfbe91..e2e506056 100644 --- a/Rakefile +++ b/Rakefile @@ -20,11 +20,8 @@ require 'rubygems/package_task' require 'rake/clean' require 'rake/testtask' -begin - gem 'rdoc' - require 'rdoc/task' -rescue Gem::LoadError -end +gem 'rdoc' +require 'rdoc/task' CLEAN.include('**/*.o', '*.dot', '**/*.rbc') CLOBBER.include('doc/example/main') @@ -74,18 +71,14 @@ BASE_RDOC_OPTIONS = [ '--title', 'Rake -- Ruby Make' ] -if defined?(RDoc::Task) then - RDoc::Task.new do |rdoc| - rdoc.rdoc_dir = 'html' - rdoc.title = "Rake -- Ruby Make" - rdoc.options = BASE_RDOC_OPTIONS.dup +RDoc::Task.new do |rdoc| + rdoc.rdoc_dir = 'html' + rdoc.title = "Rake -- Ruby Make" + rdoc.options = BASE_RDOC_OPTIONS.dup - rdoc.rdoc_files.include('README.rdoc', 'MIT-LICENSE', 'TODO', 'CHANGES') - rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc') - rdoc.rdoc_files.exclude(/\bcontrib\b/) - end -else - warn "RDoc 2.4.2+ is required to build documentation" + rdoc.rdoc_files.include('README.rdoc', 'MIT-LICENSE', 'TODO', 'CHANGES') + rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc') + rdoc.rdoc_files.exclude(/\bcontrib\b/) end # ==================================================================== From 83ced24fd984b39f541fb86951bb8f4935aaa024 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 16:56:04 -0700 Subject: [PATCH 090/813] There are no CVS tasks anymore --- Rakefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Rakefile b/Rakefile index e2e506056..9b15d18fc 100644 --- a/Rakefile +++ b/Rakefile @@ -61,8 +61,6 @@ Rake::TestTask.new do |t| t.warning = true end -# CVS Tasks ---------------------------------------------------------- - # Create a task to build the RDOC documentation tree. BASE_RDOC_OPTIONS = [ From 2909dc083f0f2b43718132a0d6cd1a9254f9becf Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 17:27:08 -0700 Subject: [PATCH 091/813] Switch to hoe This converts the major tasks (release and documentation generation, mainly) to using hoe. --- Manifest.txt | 166 +++++++++++++++++++++++++++++++++++++ README.rdoc | 9 +- Rakefile | 148 ++++++++------------------------- lib/rake.rb | 4 + lib/rake/contrib/.document | 0 lib/rake/version.rb | 2 - 6 files changed, 212 insertions(+), 117 deletions(-) create mode 100644 Manifest.txt create mode 100644 lib/rake/contrib/.document diff --git a/Manifest.txt b/Manifest.txt new file mode 100644 index 000000000..a014d9789 --- /dev/null +++ b/Manifest.txt @@ -0,0 +1,166 @@ +.gemtest +.rubocop.yml +.togglerc +CHANGES +Gemfile +History.rdoc +MIT-LICENSE +Manifest.txt +README.rdoc +Rakefile +TODO +bin/rake +doc/command_line_usage.rdoc +doc/example/Rakefile1 +doc/example/Rakefile2 +doc/example/a.c +doc/example/b.c +doc/example/main.c +doc/glossary.rdoc +doc/jamis.rb +doc/proto_rake.rdoc +doc/rake.1.gz +doc/rakefile.rdoc +doc/rational.rdoc +doc/release_notes/rake-0.4.14.rdoc +doc/release_notes/rake-0.4.15.rdoc +doc/release_notes/rake-0.5.0.rdoc +doc/release_notes/rake-0.5.3.rdoc +doc/release_notes/rake-0.5.4.rdoc +doc/release_notes/rake-0.6.0.rdoc +doc/release_notes/rake-0.7.0.rdoc +doc/release_notes/rake-0.7.1.rdoc +doc/release_notes/rake-0.7.2.rdoc +doc/release_notes/rake-0.7.3.rdoc +doc/release_notes/rake-0.8.0.rdoc +doc/release_notes/rake-0.8.2.rdoc +doc/release_notes/rake-0.8.3.rdoc +doc/release_notes/rake-0.8.4.rdoc +doc/release_notes/rake-0.8.5.rdoc +doc/release_notes/rake-0.8.6.rdoc +doc/release_notes/rake-0.8.7.rdoc +doc/release_notes/rake-0.9.0.rdoc +doc/release_notes/rake-0.9.1.rdoc +doc/release_notes/rake-0.9.2.2.rdoc +doc/release_notes/rake-0.9.2.rdoc +doc/release_notes/rake-0.9.3.rdoc +doc/release_notes/rake-0.9.4.rdoc +doc/release_notes/rake-0.9.5.rdoc +doc/release_notes/rake-0.9.6.rdoc +doc/release_notes/rake-10.0.0.rdoc +doc/release_notes/rake-10.0.1.rdoc +doc/release_notes/rake-10.0.2.rdoc +doc/release_notes/rake-10.0.3.rdoc +doc/release_notes/rake-10.1.0.rdoc +lib/rake.rb +lib/rake/alt_system.rb +lib/rake/application.rb +lib/rake/backtrace.rb +lib/rake/clean.rb +lib/rake/cloneable.rb +lib/rake/contrib/.document +lib/rake/contrib/compositepublisher.rb +lib/rake/contrib/ftptools.rb +lib/rake/contrib/publisher.rb +lib/rake/contrib/rubyforgepublisher.rb +lib/rake/contrib/sshpublisher.rb +lib/rake/contrib/sys.rb +lib/rake/cpu_counter.rb +lib/rake/default_loader.rb +lib/rake/dsl_definition.rb +lib/rake/early_time.rb +lib/rake/ext/core.rb +lib/rake/ext/module.rb +lib/rake/ext/string.rb +lib/rake/ext/time.rb +lib/rake/file_creation_task.rb +lib/rake/file_list.rb +lib/rake/file_task.rb +lib/rake/file_utils.rb +lib/rake/file_utils_ext.rb +lib/rake/gempackagetask.rb +lib/rake/invocation_chain.rb +lib/rake/invocation_exception_mixin.rb +lib/rake/linked_list.rb +lib/rake/loaders/makefile.rb +lib/rake/multi_task.rb +lib/rake/name_space.rb +lib/rake/packagetask.rb +lib/rake/pathmap.rb +lib/rake/phony.rb +lib/rake/private_reader.rb +lib/rake/promise.rb +lib/rake/pseudo_status.rb +lib/rake/rake_module.rb +lib/rake/rake_test_loader.rb +lib/rake/rdoctask.rb +lib/rake/ruby182_test_unit_fix.rb +lib/rake/rule_recursion_overflow_error.rb +lib/rake/runtest.rb +lib/rake/scope.rb +lib/rake/task.rb +lib/rake/task_argument_error.rb +lib/rake/task_arguments.rb +lib/rake/task_manager.rb +lib/rake/tasklib.rb +lib/rake/testtask.rb +lib/rake/thread_history_display.rb +lib/rake/thread_pool.rb +lib/rake/trace_output.rb +lib/rake/version.rb +lib/rake/win32.rb +rake.blurb +rakelib/metrics.rake +rakelib/publish.rake +rakelib/tags.rake +rakelib/test_times.rake +test/file_creation.rb +test/helper.rb +test/support/rakefile_definitions.rb +test/support/ruby_runner.rb +test/test_private_reader.rb +test/test_rake.rb +test/test_rake_application.rb +test/test_rake_application_options.rb +test/test_rake_backtrace.rb +test/test_rake_clean.rb +test/test_rake_definitions.rb +test/test_rake_directory_task.rb +test/test_rake_dsl.rb +test/test_rake_early_time.rb +test/test_rake_extension.rb +test/test_rake_file_creation_task.rb +test/test_rake_file_list.rb +test/test_rake_file_list_path_map.rb +test/test_rake_file_task.rb +test/test_rake_file_utils.rb +test/test_rake_ftp_file.rb +test/test_rake_functional.rb +test/test_rake_invocation_chain.rb +test/test_rake_linked_list.rb +test/test_rake_makefile_loader.rb +test/test_rake_multi_task.rb +test/test_rake_name_space.rb +test/test_rake_package_task.rb +test/test_rake_path_map.rb +test/test_rake_path_map_explode.rb +test/test_rake_path_map_partial.rb +test/test_rake_pseudo_status.rb +test/test_rake_rake_test_loader.rb +test/test_rake_reduce_compat.rb +test/test_rake_require.rb +test/test_rake_rules.rb +test/test_rake_scope.rb +test/test_rake_task.rb +test/test_rake_task_argument_parsing.rb +test/test_rake_task_arguments.rb +test/test_rake_task_lib.rb +test/test_rake_task_manager.rb +test/test_rake_task_manager_argument_resolution.rb +test/test_rake_task_with_arguments.rb +test/test_rake_test_task.rb +test/test_rake_thread_pool.rb +test/test_rake_top_level_functions.rb +test/test_rake_win32.rb +test/test_thread_history_display.rb +test/test_trace_output.rb diff --git a/README.rdoc b/README.rdoc index 93ed88fc6..7d3c1c0c7 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,7 +1,12 @@ = RAKE -- Ruby Make -This package contains Rake, a simple ruby build program with capabilities -similar to make. +home :: https://github.com/jimweirich/rake +bugs :: https://github.com/jimweirich/rake/issues + +== Description + +Rake is a Make-like program implemented in Ruby. Tasks and dependencies are +specified in standard Ruby syntax. Rake has the following features: diff --git a/Rakefile b/Rakefile index 9b15d18fc..657dd9a3d 100644 --- a/Rakefile +++ b/Rakefile @@ -15,136 +15,58 @@ if $".include? system_rake or $".grep(/rake\/name_space\.rb$/).empty? then exec Gem.ruby, '-Ilib', 'bin/rake', *ARGV end -require 'rubygems/package_task' +require 'hoe' -require 'rake/clean' -require 'rake/testtask' +hoe = Hoe.spec 'rake' do + developer 'Eric Hodel', 'drbrain@segment7.net' + developer 'Jim Weirich', '' -gem 'rdoc' -require 'rdoc/task' - -CLEAN.include('**/*.o', '*.dot', '**/*.rbc') -CLOBBER.include('doc/example/main') -CLOBBER.include('TAGS') - -# Prevent OS X from including extended attribute junk in the tar output -ENV['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true' - -def announce(msg='') - STDERR.puts msg -end - -# Determine the current version of the software - -if `ruby -Ilib ./bin/rake --version` =~ /rake, version ([0-9a-z.]+)$/ - CURRENT_VERSION = $1 -else - CURRENT_VERSION = "0.0.0" -end - -$package_version = CURRENT_VERSION - -SRC_RB = FileList['lib/**/*.rb'] - -# The default task is run if rake is given no explicit arguments. - -desc "Default Task" -task :default => :test - -# Test Tasks --------------------------------------------------------- + require_ruby_version '>= 1.9' + require_rubygems_version '>= 1.3.2' -Rake::TestTask.new do |t| - files = FileList['test/helper.rb', 'test/test_*.rb'] - t.loader = :rake - t.test_files = files - t.libs << "." - t.warning = true -end - -# Create a task to build the RDOC documentation tree. + dependency 'minitest', '~> 4.0', :developer -BASE_RDOC_OPTIONS = [ - '--line-numbers', '--show-hash', - '--main', 'README.rdoc', - '--title', 'Rake -- Ruby Make' -] + license "MIT" -RDoc::Task.new do |rdoc| - rdoc.rdoc_dir = 'html' - rdoc.title = "Rake -- Ruby Make" - rdoc.options = BASE_RDOC_OPTIONS.dup - - rdoc.rdoc_files.include('README.rdoc', 'MIT-LICENSE', 'TODO', 'CHANGES') - rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc') - rdoc.rdoc_files.exclude(/\bcontrib\b/) -end + self.readme_file = 'README.rdoc' + self.history_file = 'History.rdoc' -# ==================================================================== -# Create a task that will package the Rake software into distributable -# tar, zip and gem files. - -PKG_FILES = FileList[ - '.gemtest', - 'install.rb', - 'CHANGES', - 'MIT-LICENSE', - 'README.rdoc', - 'Rakefile', - 'TODO', - 'bin/rake', - 'lib/**/*.rb', - 'test/**/*.rb', - 'doc/**/*' -] -PKG_FILES.exclude('doc/example/*.o') -PKG_FILES.exclude('TAGS') -PKG_FILES.exclude(%r{doc/example/main$}) - -SPEC = Gem::Specification.new do |s| - s.name = 'rake' - s.version = $package_version - s.summary = "Ruby based make-like utility." - s.license = "MIT" - s.description = <<-EOF.delete "\n" -Rake is a Make-like program implemented in Ruby. Tasks and dependencies are -specified in standard Ruby syntax. - EOF - - s.required_ruby_version = '>= 1.9' - s.required_rubygems_version = '>= 1.3.2' - s.add_development_dependency 'minitest', '~> 4' - - s.files = PKG_FILES.to_a - - s.executables = ["rake"] - - s.extra_rdoc_files = FileList[ - 'README.rdoc', + self.extra_rdoc_files.concat FileList[ 'MIT-LICENSE', 'TODO', 'CHANGES', 'doc/**/*.rdoc' ] - s.rdoc_options = BASE_RDOC_OPTIONS - - s.author = "Jim Weirich" - s.email = "jim.weirich@gmail.com" - s.homepage = "http://github.com/jimweirich/rake" + self.clean_globs += [ + '**/*.o', + '**/*.rbc', + '*.dot', + 'TAGS', + 'doc/example/main', + ] end -Gem::PackageTask.new(SPEC) do |pkg| - pkg.need_zip = true - pkg.need_tar = true -end +# Use custom rdoc task due to existence of doc directory -file "rake.gemspec" => ["Rakefile", "lib/rake.rb"] do |t| - require 'yaml' - open(t.name, "w") { |f| f.puts SPEC.to_yaml } +Rake::Task['docs'].clear +Rake::Task['clobber_docs'].clear + +require 'rdoc/task' + +RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc| + doc.main = hoe.readme_file + doc.title = 'Rake -- Ruby Make' + + rdoc_files = Rake::FileList.new %w[lib History.rdoc MIT-LICENSE doc] + rdoc_files.add hoe.extra_rdoc_files + + doc.rdoc_files = rdoc_files + + doc.rdoc_dir = 'html' end -desc "Create a stand-alone gemspec" -task :gemspec => "rake.gemspec" +SRC_RB = FileList['lib/**/*.rb'] # Misc tasks ========================================================= diff --git a/lib/rake.rb b/lib/rake.rb index ecec28847..064efb0c2 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,6 +21,10 @@ # IN THE SOFTWARE. #++ +module Rake + VERSION = '10.2.0' +end + require 'rake/version' # :stopdoc: diff --git a/lib/rake/contrib/.document b/lib/rake/contrib/.document new file mode 100644 index 000000000..e69de29bb diff --git a/lib/rake/version.rb b/lib/rake/version.rb index b03fb74b8..b9b1b2d48 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,6 +1,4 @@ module Rake - VERSION = '10.1.1.beta.1' - module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split '.' From ff8a4016b9af1da5942830c2f64108436b159003 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 17:29:16 -0700 Subject: [PATCH 092/813] Remove support tasks I do not need to count lines in rake or see where TODOs are --- Rakefile | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/Rakefile b/Rakefile index 657dd9a3d..2a577a072 100644 --- a/Rakefile +++ b/Rakefile @@ -66,55 +66,3 @@ RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc| doc.rdoc_dir = 'html' end -SRC_RB = FileList['lib/**/*.rb'] - -# Misc tasks ========================================================= - -def count_lines(filename) - lines = 0 - codelines = 0 - open(filename) { |f| - f.each do |line| - lines += 1 - next if line =~ /^\s*$/ - next if line =~ /^\s*#/ - codelines += 1 - end - } - [lines, codelines] -end - -def show_line(msg, lines, loc) - printf "%6s %6s %s\n", lines.to_s, loc.to_s, msg -end - -desc "Count lines in the main rake file" -task :lines do - total_lines = 0 - total_code = 0 - show_line("File Name", "LINES", "LOC") - SRC_RB.each do |fn| - lines, codelines = count_lines(fn) - show_line(fn, lines, codelines) - total_lines += lines - total_code += codelines - end - show_line("TOTAL", total_lines, total_code) -end - -# Support Tasks ------------------------------------------------------ - -RUBY_FILES = FileList['**/*.rb'].exclude('pkg') - -desc "Look for TODO and FIXME tags in the code" -task :todo do - RUBY_FILES.egrep(/#.*(FIXME|TODO|TBD)/) -end - -desc "List all ruby files" -task :rubyfiles do - puts RUBY_FILES - puts FileList['bin/*'].exclude('bin/*.rb') -end -task :rf => :rubyfiles - From 0e80c36b7532549730c3b1f1aeb1096c1c2ca59f Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 17:33:14 -0700 Subject: [PATCH 093/813] Remove flog/flay tasks Hoe provides these already --- rakelib/metrics.rake | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 rakelib/metrics.rake diff --git a/rakelib/metrics.rake b/rakelib/metrics.rake deleted file mode 100644 index 8a1bc6a76..000000000 --- a/rakelib/metrics.rake +++ /dev/null @@ -1,10 +0,0 @@ -METRICS_FILES = FileList['lib/**/*.rb'] - -task :flog, [:all] do |t, args| - flags = args.all ? "--all" : "" - sh "flog -m #{flags} #{METRICS_FILES}" -end - -task :flay do - sh "flay #{METRICS_FILES}" -end From 907e5e82bb5395da6ab067a0dfb2db2aa1972980 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 17:33:47 -0700 Subject: [PATCH 094/813] Remove tags task The rdoc-tags gem provides this task via hoe --- rakelib/tags.rake | 55 ----------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 rakelib/tags.rake diff --git a/rakelib/tags.rake b/rakelib/tags.rake deleted file mode 100644 index 7541577b0..000000000 --- a/rakelib/tags.rake +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env ruby - -module Tags - extend Rake::DSL if defined?(Rake::DSL) - - PROG = ENV['TAGS'] || 'ctags' - - RAKEFILES = FileList['Rakefile', '**/*.rake'] - - FILES = FileList['**/*.rb', '**/*.js'] + RAKEFILES - FILES.exclude('pkg', 'dist') - - DIR_LIST = ['.'] - DIR_LIST << Gem.dir - DIRS = DIR_LIST.join(" ") - - module_function - - # Convert key_word to --key-word. - def keyword(key) - k = key.to_s.gsub(/_/, '-') - (k.length == 1) ? "-#{k}" : "--#{k}" - end - - # Run ctags command - def run(*args) - opts = { - :e => true, - :totals => true, - :recurse => true, - } - opts = opts.merge(args.pop) if args.last.is_a?(Hash) - command_args = opts.map { |k, v| - (v == true) ? keyword(k) : "#{keyword(k)}=#{v}" - }.join(" ") - sh %{#{Tags::PROG} #{command_args} #{args.join(' ')}} - end -end - -namespace "tags" do - desc "Generate an Emacs TAGS file" - task :emacs => Tags::FILES do - puts "Making Emacs TAGS file" - verbose(true) do - Tags.run(Tags::DIRS) - Tags.run(Tags::RAKEFILES, - :language_force => "ruby", - :append => true) - end - end -end - -desc "Generate the TAGS file" -task :tags => ["tags:emacs"] - From dadaeb578d42fba33c45c93373786883270c9a6a Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 17:34:42 -0700 Subject: [PATCH 095/813] Update manifest for rakelib removals --- Manifest.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Manifest.txt b/Manifest.txt index a014d9789..caee3294c 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -110,9 +110,7 @@ lib/rake/trace_output.rb lib/rake/version.rb lib/rake/win32.rb rake.blurb -rakelib/metrics.rake rakelib/publish.rake -rakelib/tags.rake rakelib/test_times.rake test/file_creation.rb test/helper.rb From 287276380d9dfce9adcee5693422d0bce189c85b Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 17:38:11 -0700 Subject: [PATCH 096/813] Remove rake.blurb because I don't know what it is --- Manifest.txt | 1 - rake.blurb | 19 ------------------- 2 files changed, 20 deletions(-) delete mode 100644 rake.blurb diff --git a/Manifest.txt b/Manifest.txt index caee3294c..21684f3e3 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -109,7 +109,6 @@ lib/rake/thread_pool.rb lib/rake/trace_output.rb lib/rake/version.rb lib/rake/win32.rb -rake.blurb rakelib/publish.rake rakelib/test_times.rake test/file_creation.rb diff --git a/rake.blurb b/rake.blurb deleted file mode 100644 index f1b70d807..000000000 --- a/rake.blurb +++ /dev/null @@ -1,19 +0,0 @@ -name: rake -document: http://rake.rubyforge.org -download: http://rubyforge.org/project/showfiles.php?group_id=50 -description: > -

This package contains Rake, a simple ruby build program with - capabilities similar to make.

- -

Rake has the following features:

- -
    -
  • Rakefiles (rake’s version of Makefiles) are completely - defined in standard Ruby syntax. No XML files to edit. No quirky - Makefile syntax to worry about (is that a tab or a space?)
  • -
  • Users can specify tasks with prerequisites.
  • -
  • Rake supports rule patterns to synthesize implicit tasks.
  • -
  • Rake is lightweight. It can be distributed with other - projects as a single file. Projects that depend upon rake do not - require that rake be installed on target systems.
  • -
From 120642aca273970dccdb950b270aec79907dfb1a Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 17:40:43 -0700 Subject: [PATCH 097/813] Remove ancient TODO Last touched in a meaningful manner in 2007. --- Manifest.txt | 1 - Rakefile | 1 - TODO | 21 --------------------- 3 files changed, 23 deletions(-) delete mode 100644 TODO diff --git a/Manifest.txt b/Manifest.txt index 21684f3e3..356965615 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -8,7 +8,6 @@ MIT-LICENSE Manifest.txt README.rdoc Rakefile -TODO bin/rake doc/command_line_usage.rdoc doc/example/Rakefile1 diff --git a/Rakefile b/Rakefile index 2a577a072..c68e8c536 100644 --- a/Rakefile +++ b/Rakefile @@ -33,7 +33,6 @@ hoe = Hoe.spec 'rake' do self.extra_rdoc_files.concat FileList[ 'MIT-LICENSE', - 'TODO', 'CHANGES', 'doc/**/*.rdoc' ] diff --git a/TODO b/TODO deleted file mode 100644 index 6893b9fe2..000000000 --- a/TODO +++ /dev/null @@ -1,21 +0,0 @@ -= Rake Project -- To Do List - -Send suggestions for this list to mailto:jim@weirichhouse.org or on -the rake-devel@rubyforge.org mailing list. - -=== To Do -* Need a nice API for accessing tasks in namespaces, namespaces in an app, etc. -* Provide a way to disable -w warning mode. -* Define a set of default rules that work in the absence of any Rakefile -* What about cyclic dependencies? -* Java support utilities -* Installation support utilities - * Check out installpkg.rb -* Autogenerate Dependencies -* Rules should apply to existing tasks if no actions are defined. -* How to create multiple package tasks without task name collision? -* Trap "ln -s" commands that fail and use "cp" instead (SMB mounted - drives have problems with "ln -s". - - -(moved DONE list to CHANGES file) From ba6e66d749c291b7eae3f0a3fbd4e40379a0a7c8 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 17:45:06 -0700 Subject: [PATCH 098/813] Move old CHANGES file to doc/ to avoid confusion CHANGES is out of date (up to 0.9.3). I'm unsure where the real release notes are, but I think they're in doc/release_notes but I don't want to merge them all into one file and break links. --- Manifest.txt | 2 +- Rakefile | 1 - CHANGES => doc/CHANGES.rdoc | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) rename CHANGES => doc/CHANGES.rdoc (99%) diff --git a/Manifest.txt b/Manifest.txt index 356965615..475410ed7 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -1,7 +1,6 @@ .gemtest .rubocop.yml .togglerc -CHANGES Gemfile History.rdoc MIT-LICENSE @@ -9,6 +8,7 @@ Manifest.txt README.rdoc Rakefile bin/rake +doc/CHANGES.rdoc doc/command_line_usage.rdoc doc/example/Rakefile1 doc/example/Rakefile2 diff --git a/Rakefile b/Rakefile index c68e8c536..b632d9acc 100644 --- a/Rakefile +++ b/Rakefile @@ -33,7 +33,6 @@ hoe = Hoe.spec 'rake' do self.extra_rdoc_files.concat FileList[ 'MIT-LICENSE', - 'CHANGES', 'doc/**/*.rdoc' ] diff --git a/CHANGES b/doc/CHANGES.rdoc similarity index 99% rename from CHANGES rename to doc/CHANGES.rdoc index 35f73d65a..4b42f02c0 100644 --- a/CHANGES +++ b/doc/CHANGES.rdoc @@ -1,3 +1,5 @@ +This changelog is out of date and has been replaced by History.rdoc. + = Rake Changelog NOTE: Refer to the individual release documents (in the From 60b1bd6605741df4c474ad42bce9ae8b667c6365 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 17:49:36 -0700 Subject: [PATCH 099/813] hoe automatically creates .gemtest in packages --- .gemtest | 0 Manifest.txt | 1 - 2 files changed, 1 deletion(-) delete mode 100644 .gemtest diff --git a/.gemtest b/.gemtest deleted file mode 100644 index e69de29bb..000000000 diff --git a/Manifest.txt b/Manifest.txt index 475410ed7..2f2f46e3e 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -1,4 +1,3 @@ -.gemtest .rubocop.yml .togglerc Gemfile From ceb06bf38bb095e65daf0f06adeb79e63e8ca3c8 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 17:50:45 -0700 Subject: [PATCH 100/813] Remove patch and xxx- files from .gitignore I would like to see these lying around unattended --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4d5ba9e3e..da235bfb0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ *.bak -*.patch *.rbc *.swp *~ @@ -12,4 +11,3 @@ /html /pkg Gemfile.lock -xxx-* From e3c1f6e193cf7aa48d8e12cb5061b3172438474b Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 17:52:12 -0700 Subject: [PATCH 101/813] Send travis notifications to me --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 40e5d20ac..21e55d85f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,9 @@ language: ruby env: - CI=true +notifications: + email: + - drbrain@segment7.net rvm: # - 1.8.7 # Needs mini-test # - rbx-19mode # Time comparison fails From 3c0cbfd94014f0daecedb7bc575eae9a9cecc3d3 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 10 Mar 2014 17:56:22 -0700 Subject: [PATCH 102/813] Use hoe-travis plugin for travis-ci --- .travis.yml | 10 ++++++---- Rakefile | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 21e55d85f..7cc42e241 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,14 @@ +--- +after_script: +- ruby -Ilib bin/rake travis:after -t +before_script: +- gem install hoe-travis --no-rdoc --no-ri +- ruby -Ilib bin/rake travis:before -t language: ruby -env: - - CI=true notifications: email: - drbrain@segment7.net rvm: -# - 1.8.7 # Needs mini-test -# - rbx-19mode # Time comparison fails - jruby # 2 failures - 1.9.3 - 2.0.0 diff --git a/Rakefile b/Rakefile index b632d9acc..4562c78f5 100644 --- a/Rakefile +++ b/Rakefile @@ -17,6 +17,9 @@ end require 'hoe' +Hoe.plugin :minitest +Hoe.plugin :travis + hoe = Hoe.spec 'rake' do developer 'Eric Hodel', 'drbrain@segment7.net' developer 'Jim Weirich', '' From a2dd2f8d78d9139a50038a783dbee7931729732a Mon Sep 17 00:00:00 2001 From: fhrbek Date: Tue, 11 Mar 2014 09:44:50 +0100 Subject: [PATCH 103/813] Code optimization --- lib/rake/application.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 811452978..f9f4c24ee 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -150,19 +150,21 @@ def invoke_task(task_string) end def parse_task_string(string) - @token_re ||= /((?:[^\\,]|\\.)*)(?:,(.*))?$/ if string =~ /^([^\[]+)(\[(.*)\])$/ name = $1 args = [] if $2 != '[]' - match_data = @token_re.match($3) - while !match_data.nil? - token, rest = match_data[1].strip, match_data[2] + # there's at least one non-empty argument + remaining_args = $3 + begin + # extract the first argument + match_data = /((?:[^\\,]|\\.)*)(?:,(.*))?$/.match(remaining_args) + token, remaining_args = match_data[1].strip, match_data[2] + + # strip backslashes and take the argument args << (token.gsub!(/\\(.)/, '\1') || token) - break if rest.nil? - match_data = @token_re.match(rest) - end + end until remaining_args.nil? end else name = string From 70f232fcb11cd1d872f5cc3fe0cf533823b3b3c1 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 12:24:45 -0700 Subject: [PATCH 104/813] Use the power of regexp to replace #strip Parsing rake task arguments used strip to remove whitespace from tokens but we can use the regular expression to avoid capturing the whitespace in the first place. --- lib/rake/application.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index d728cb7ba..fda231028 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -159,8 +159,8 @@ def parse_task_string(string) remaining_args = $3 begin # extract the first argument - match_data = /((?:[^\\,]|\\.)*)(?:,(.*))?$/.match(remaining_args) - token, remaining_args = match_data[1].strip, match_data[2] + match_data = /((?:[^\\,]|\\.)*?)\s*(?:,\s*(.*))?$/.match(remaining_args) + token, remaining_args = match_data[1], match_data[2] # strip backslashes and take the argument args << (token.gsub!(/\\(.)/, '\1') || token) From 5db0baea347e3df5131329f89606ca4584458859 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 12:27:09 -0700 Subject: [PATCH 105/813] Use regexp capture groups over matchdata Now we can assign directly to local variables since rake only supports ruby 1.9 and newer. This also reduces our line count. --- lib/rake/application.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index fda231028..de5d122bb 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -159,8 +159,7 @@ def parse_task_string(string) remaining_args = $3 begin # extract the first argument - match_data = /((?:[^\\,]|\\.)*?)\s*(?:,\s*(.*))?$/.match(remaining_args) - token, remaining_args = match_data[1], match_data[2] + /(?(?:[^\\,]|\\.)*?)\s*(?:,\s*(?.*))?$/ =~ remaining_args # strip backslashes and take the argument args << (token.gsub!(/\\(.)/, '\1') || token) From 9d47d2fee2b70afed9ed73128d9b55826015ded6 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 12:28:36 -0700 Subject: [PATCH 106/813] Use gsub properly Since the token is not reused elsewhere a plain gsub is preferred over gsub! with an ||. --- lib/rake/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index de5d122bb..70508dda9 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -162,7 +162,7 @@ def parse_task_string(string) /(?(?:[^\\,]|\\.)*?)\s*(?:,\s*(?.*))?$/ =~ remaining_args # strip backslashes and take the argument - args << (token.gsub!(/\\(.)/, '\1') || token) + args << token.gsub(/\\(.)/, '\1') end until remaining_args.nil? end else From 779fba3ef5d3f46917ec01b29eaaeb2b3d120f02 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 13:43:57 -0700 Subject: [PATCH 107/813] Use named captures for parsing task arguments This follows @5db0bae and reduces use of globals. The next refactor will flip the logic around to make it cleaner. --- lib/rake/application.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 70508dda9..6be24f1eb 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -150,13 +150,10 @@ def invoke_task(task_string) end def parse_task_string(string) - if string =~ /^([^\[]+)(\[(.*)\])$/ - name = $1 + if /^(?[^\[]+)(\[(?.*)\])$/ =~ string args = [] - if $2 != '[]' - # there's at least one non-empty argument - remaining_args = $3 + unless remaining_args.empty? begin # extract the first argument /(?(?:[^\\,]|\\.)*?)\s*(?:,\s*(?.*))?$/ =~ remaining_args From 695e5dc6176037285fcf4b4f85be0a75b93ec355 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 13:46:38 -0700 Subject: [PATCH 108/813] Fail early from parse_task_string This makes the method a little easier to follow. --- lib/rake/application.rb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 6be24f1eb..b0b9f27da 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -150,23 +150,23 @@ def invoke_task(task_string) end def parse_task_string(string) - if /^(?[^\[]+)(\[(?.*)\])$/ =~ string - args = [] + /^(?[^\[]+)(\[(?.*)\])$/ =~ string - unless remaining_args.empty? - begin - # extract the first argument - /(?(?:[^\\,]|\\.)*?)\s*(?:,\s*(?.*))?$/ =~ remaining_args + return string, [] unless name - # strip backslashes and take the argument - args << token.gsub(/\\(.)/, '\1') - end until remaining_args.nil? - end - else - name = string - args = [] + args = [] + + unless remaining_args.empty? + begin + # extract the first argument + /(?(?:[^\\,]|\\.)*?)\s*(?:,\s*(?.*))?$/ =~ remaining_args + + # strip backslashes and take the argument + args << token.gsub(/\\(.)/, '\1') + end until remaining_args.nil? end - [name, args] + + return name, args end # Provide standard exception handling for the given block. From 3564146aafa6506c26b68bfad4ac7f389b11cd18 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 13:49:51 -0700 Subject: [PATCH 109/813] Reduce work in parsing task arguments Flipping the conditional makes this easier to understand, too. --- lib/rake/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index b0b9f27da..32e725c44 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -163,7 +163,7 @@ def parse_task_string(string) # strip backslashes and take the argument args << token.gsub(/\\(.)/, '\1') - end until remaining_args.nil? + end while remaining_args end return name, args From 93be48dd45ce984b468dc679c8e6b8cb2fea9556 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 13:51:09 -0700 Subject: [PATCH 110/813] Fit to 80 columns and remove superfluous comments --- lib/rake/application.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 32e725c44..2c5e6d852 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -158,10 +158,9 @@ def parse_task_string(string) unless remaining_args.empty? begin - # extract the first argument - /(?(?:[^\\,]|\\.)*?)\s*(?:,\s*(?.*))?$/ =~ remaining_args + /(?(?:[^\\,]|\\.)*?)\s*(?:,\s*(?.*))?$/ =~ + remaining_args - # strip backslashes and take the argument args << token.gsub(/\\(.)/, '\1') end while remaining_args end From 6e0acb64464ca7adc8df17582e0eb2862d728b7e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 13:52:13 -0700 Subject: [PATCH 111/813] Fail early in task argument parsing (again) This reduces indentation for the begin end while loop. --- lib/rake/application.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 2c5e6d852..82686b078 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -153,17 +153,16 @@ def parse_task_string(string) /^(?[^\[]+)(\[(?.*)\])$/ =~ string return string, [] unless name + return name, [] if remaining_args.empty? args = [] - unless remaining_args.empty? - begin - /(?(?:[^\\,]|\\.)*?)\s*(?:,\s*(?.*))?$/ =~ - remaining_args + begin + /(?(?:[^\\,]|\\.)*?)\s*(?:,\s*(?.*))?$/ =~ + remaining_args - args << token.gsub(/\\(.)/, '\1') - end while remaining_args - end + args << token.gsub(/\\(.)/, '\1') + end while remaining_args return name, args end From 1bee06148a41af9c9eab9a185f6b24ba039de08e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 13:57:06 -0700 Subject: [PATCH 112/813] Add #214 to History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index 37ad11302..f45c5a9e2 100644 --- a/History.rdoc +++ b/History.rdoc @@ -14,6 +14,8 @@ Enhancements: request #215 by Avdi Grimm. * Rake now automatically rebuilds and reloads imported files. Pull request #209 by Randy Coulman. +* The rake task arguments can contain escaped commas. Pull request #214 by + Filip Hrbek. * Rake now prints the exception class on errors. Patch #251 by David Cornu. Bug fixes: From 3ade6f9ebc5f640ddac6a590a8d9529f77cb3413 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 14:00:00 -0700 Subject: [PATCH 113/813] Force use of minitest 4.x Minitest 5 does not exist in ruby trunk. --- Rakefile | 2 ++ test/helper.rb | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index 4562c78f5..9aab8167a 100644 --- a/Rakefile +++ b/Rakefile @@ -48,6 +48,8 @@ hoe = Hoe.spec 'rake' do ] end +hoe.test_prelude = 'gem "minitest", "~> 4.0"' + # Use custom rdoc task due to existence of doc directory Rake::Task['docs'].clear diff --git a/test/helper.rb b/test/helper.rb index 992c6bffa..07a45a6e0 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,10 +1,7 @@ require 'rubygems' $:.unshift File.expand_path('../../lib', __FILE__) -begin - gem 'minitest', '~> 4' -rescue Gem::LoadError -end +gem 'minitest', '~> 4' require 'minitest/autorun' require 'rake' From f68910e3669e4cefd8f915ce0164a308e972437a Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 16:32:52 -0700 Subject: [PATCH 114/813] Revert use of named captures in loop This causes a warning due to reassigning a local variable (even though it was previously created by a regexp). See: https://bugs.ruby-lang.org/issues/9623 --- lib/rake/application.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 82686b078..26e986d61 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -158,10 +158,10 @@ def parse_task_string(string) args = [] begin - /(?(?:[^\\,]|\\.)*?)\s*(?:,\s*(?.*))?$/ =~ - remaining_args + /((?:[^\\,]|\\.)*?)\s*(?:,\s*(.*))?$/ =~ remaining_args - args << token.gsub(/\\(.)/, '\1') + remaining_args = $2 + args << $1.gsub(/\\(.)/, '\1') end while remaining_args return name, args From 33a35263d8aa8e93f93898195a4982655aa03ad2 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 17:02:50 -0700 Subject: [PATCH 115/813] Deprecate Rake.run_tests Per #244 and #258 this is not the recommended way of running tests anymore. Instead use Rake::TestTask. --- lib/rake/runtest.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/rake/runtest.rb b/lib/rake/runtest.rb index 3f01b28ca..265079efb 100644 --- a/lib/rake/runtest.rb +++ b/lib/rake/runtest.rb @@ -5,7 +5,12 @@ module Rake include Test::Unit::Assertions - def run_tests(pattern='test/test*.rb', log_enabled=false) + ## + # Deprecated way of running tests in process, but only for Test::Unit. + # + # TODO: Remove in rake 11 + + def run_tests(pattern='test/test*.rb', log_enabled=false) # :nodoc: FileList.glob(pattern).each do |fn| $stderr.puts fn if log_enabled begin From 5b280cf06d93bc0ed48e873e0f38fe40ee95aca4 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 18:00:32 -0700 Subject: [PATCH 116/813] Test Rake::CpuCounter#in_path_command --- Manifest.txt | 1 + test/test_rake_cpu_counter.rb | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 test/test_rake_cpu_counter.rb diff --git a/Manifest.txt b/Manifest.txt index 2f2f46e3e..7a4eee994 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -119,6 +119,7 @@ test/test_rake_application.rb test/test_rake_application_options.rb test/test_rake_backtrace.rb test/test_rake_clean.rb +test/test_rake_cpu_counter.rb test/test_rake_definitions.rb test/test_rake_directory_task.rb test/test_rake_dsl.rb diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb new file mode 100644 index 000000000..0aa89071d --- /dev/null +++ b/test/test_rake_cpu_counter.rb @@ -0,0 +1,30 @@ +require_relative 'helper' + +class TestRakeCpuCounter < Rake::TestCase + + def setup + super + + @cpu_counter = Rake::CpuCounter.new + end + + def test_in_path_command + ruby = File.basename Gem.ruby + ruby_dir = File.dirname Gem.ruby + + begin + orig_path, ENV['PATH'] = + ENV['PATH'], [ruby_dir, *ENV['PATH']].join(File::PATH_SEPARATOR) + + assert_equal ruby, @cpu_counter.in_path_command(ruby) + ensure + ENV['PATH'] = orig_path + end + rescue Errno::ENOENT => e + raise unless e.message =~ /\bwhich\b/ + + skip 'cannot find which for this test' + end + +end + From 7d8f96bf76aec583961531639392a90ceaed28f8 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 18:01:01 -0700 Subject: [PATCH 117/813] Safely check for commands in the path CpuCounter#in_path_command used `` with interpolation which could be used to run arbitrary commands when called unsafely. Now the ARGV form of popen is used which will not run arbitrary commands. --- lib/rake/cpu_counter.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index b68b9b428..a2a33c413 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -94,7 +94,9 @@ def look_for_command(dir, command) end def in_path_command(command) - `which #{command}` != '' ? command : nil + IO.popen ['which', command] do |io| + io.eof? ? nil : command + end end end end From a8f90cf8aedeefbd79683037e9567f6088d0eebd Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 19:49:30 -0700 Subject: [PATCH 118/813] Test CpuCounter#run --- test/test_rake_cpu_counter.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb index 0aa89071d..77c370ce9 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -26,5 +26,19 @@ def test_in_path_command skip 'cannot find which for this test' end + def test_run + ruby = File.basename Gem.ruby + ruby_dir = File.dirname Gem.ruby + + begin + orig_path, ENV['PATH'] = + ENV['PATH'], [ruby_dir, *ENV['PATH']].join(File::PATH_SEPARATOR) + + assert_equal 7, @cpu_counter.run(ruby, '-e "puts 3 + 4"') + ensure + ENV['PATH'] = orig_path + end + end + end From ecc113ae92b1a92473aaf710ab958043e3893fef Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 19:52:54 -0700 Subject: [PATCH 119/813] Extract with_ruby_in_path in CpuCounter test --- test/test_rake_cpu_counter.rb | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb index 77c370ce9..112b7290c 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -9,16 +9,8 @@ def setup end def test_in_path_command - ruby = File.basename Gem.ruby - ruby_dir = File.dirname Gem.ruby - - begin - orig_path, ENV['PATH'] = - ENV['PATH'], [ruby_dir, *ENV['PATH']].join(File::PATH_SEPARATOR) - + with_ruby_in_path do |ruby| assert_equal ruby, @cpu_counter.in_path_command(ruby) - ensure - ENV['PATH'] = orig_path end rescue Errno::ENOENT => e raise unless e.message =~ /\bwhich\b/ @@ -27,6 +19,12 @@ def test_in_path_command end def test_run + with_ruby_in_path do |ruby| + assert_equal 7, @cpu_counter.run(ruby, '-e "puts 3 + 4"') + end + end + + def with_ruby_in_path ruby = File.basename Gem.ruby ruby_dir = File.dirname Gem.ruby @@ -34,7 +32,7 @@ def test_run orig_path, ENV['PATH'] = ENV['PATH'], [ruby_dir, *ENV['PATH']].join(File::PATH_SEPARATOR) - assert_equal 7, @cpu_counter.run(ruby, '-e "puts 3 + 4"') + yield ruby ensure ENV['PATH'] = orig_path end From 0d24bdccf0556d5f46befc0460e2a00adc2297ec Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 11 Mar 2014 20:38:37 -0700 Subject: [PATCH 120/813] Remove interpolation in `` in CpuCounter#run This makes things a tiny bit safer, but not much since you can specify arbitrary commands. --- lib/rake/cpu_counter.rb | 8 +++++--- test/test_rake_cpu_counter.rb | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index a2a33c413..c107d9f24 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -70,13 +70,15 @@ def count_via_hwprefs_cpu_count end def count_via_sysctl - run 'sysctl', '-n hw.ncpu' + run 'sysctl', '-n', 'hw.ncpu' end - def run(command, args) + def run(command, *args) cmd = resolve_command(command) if cmd - `#{cmd} #{args}`.to_i + IO.popen [cmd, *args] do |io| + io.read.to_i + end else nil end diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb index 112b7290c..cb5c1a0f2 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -20,7 +20,7 @@ def test_in_path_command def test_run with_ruby_in_path do |ruby| - assert_equal 7, @cpu_counter.run(ruby, '-e "puts 3 + 4"') + assert_equal 7, @cpu_counter.run(ruby, '-e', 'puts 3 + 4') end end From c251def664a92ce49ae0c1102e6f970f7ff5ef4b Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Wed, 12 Mar 2014 00:55:31 -0700 Subject: [PATCH 121/813] Jim planned to remove 1.8 support with Rake 10.2 --- History.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index f45c5a9e2..4db43d426 100644 --- a/History.rdoc +++ b/History.rdoc @@ -3,7 +3,7 @@ Enhancements: * Rake now requires Ruby 1.9 or newer. For me, this is a breaking change, but - it seems that Jim planned to release it with Rake 2.1. See also pull + it seems that Jim planned to release it with Rake 10.2. See also pull request #247 by Philip Arndt. * Rake now allows you to declare tasks under a namespace like: From 1648280d3533a328216d6a62f16bb3d48ec5d461 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 13:27:20 -0700 Subject: [PATCH 122/813] Add #260 to History --- History.rdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 4db43d426..6933c1c1b 100644 --- a/History.rdoc +++ b/History.rdoc @@ -20,7 +20,8 @@ Enhancements: Bug fixes: -* Fixed typos. Pull request #256 by Valera Rozuvan, #250 via Jake Worth. +* Fixed typos. Pull request #256 by Valera Rozuvan, #250 via Jake Worth, #260 + by Zachary Scott. * Fixed documentation for calling tasks with arguments. Pull request #235 by John Varghese. * Clarified `rake -f` usage message. Pull request #252 by Marco Pfatschbacher. From 6cc416f5360d2d02d203db1a56c93317467bc070 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 14:27:13 -0700 Subject: [PATCH 123/813] Ignore rdoc tags cache directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index da235bfb0..f0cd1f570 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ .DS_Store .idea .rbx +/.rdoc /TAGS /coverage /html From 0040e8cd890b1e66e7ab694a6296828f92a6a17c Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 14:59:08 -0700 Subject: [PATCH 124/813] Use newfangled hash syntax with %w[] This style involves minimal typing when declaring tasks and when changing tasks. --- doc/rakefile.rdoc | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index 3f4b09b04..040e71241 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -1,4 +1,4 @@ -= Rakefile Format (as of version 0.8.7) += Rakefile Format First of all, there is no special format for a Rakefile. A Rakefile contains executable Ruby code. Anything legal in a ruby script is @@ -30,7 +30,7 @@ parameter that is the name of the task. Any prerequisites are given as a list (enclosed in square brackets) following the name and an arrow (=>). - task :name => [:prereq1, :prereq2] + task name: [:prereq1, :prereq2] NOTE: Although this syntax looks a little funky, it is legal Ruby. We are constructing a hash where the key is :name and the value @@ -41,13 +41,27 @@ following ... hash[:name] = [:prereq1, :prereq2] task(hash) +You can also use strings for task names and prerequisites, rake doesn't care. +This is the same task definition: + + task 'name' => %w[prereq1 prereq2] + +As is this: + + task name: %w[prereq1 prereq2] + +We'll prefer this style for regular tasks with prerequisites throughout the +rest of the document. Using an array of strings for the prerequisites means +you will need to make fewer changes if you need to move tasks into namespaces +or perform other refactorings. + === Tasks with Actions Actions are defined by passing a block to the +task+ method. Any Ruby code can be placed in the block. The block may reference the task object via the block parameter. - task :name => [:prereq1, :prereq2] do |t| + task name: [:prereq1, :prereq2] do |t| # actions (may reference t) end @@ -62,8 +76,8 @@ For example, the following is equivalent to the single task specification given above. task :name - task :name => [:prereq1] - task :name => [:prereq2] + task name: :prereq1 + task name: %w[prereq2] task :name do |t| # actions end @@ -114,7 +128,7 @@ both prerequisites and actions can be added later. For example ... Rake allows parallel execution of prerequisites using the following syntax: - multitask :copy_files => [:copy_src, :copy_doc, :copy_bin] do + multitask copy_files: %w[copy_src copy_doc copy_bin] do puts "All Copies Complete" end @@ -133,9 +147,9 @@ until the common prerequisites have been run. For example, if the copy_xxx tasks have the following prerequisites: - task :copy_src => [:prep_for_copy] - task :copy_bin => [:prep_for_copy] - task :copy_doc => [:prep_for_copy] + task copy_src: :prep_for_copy + task copy_bin: :prep_for_copy + task copy_doc: :prep_for_copy Then the +prep_for_copy+ task is run before starting all the copies in parallel. Once +prep_for_copy+ is complete, +copy_src+, +copy_bin+, @@ -421,7 +435,7 @@ then you need to use the +desc+ command to describe the task. === Example: desc "Create a distribution package" - task :package => [ ... ] do ... end + task package: %w[ ... ] do ... end The "-T" switch (or "--tasks" if you like to spell things out) will display a list of tasks that have a description. If you use +desc+ to @@ -469,7 +483,7 @@ For example: end end - task :build => ["main:build", "samples:build"] + task build: %w[main:build samples:build] Referencing a task in a separate namespace can be achieved by prefixing the task name with the namespace and a colon From 007494ee6581d745e3225a7eda87fac383266893 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 15:43:30 -0700 Subject: [PATCH 125/813] Reduce use of HTML-style markup --- doc/rakefile.rdoc | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index 040e71241..c4e492605 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -32,7 +32,7 @@ following the name and an arrow (=>). task name: [:prereq1, :prereq2] -NOTE: Although this syntax looks a little funky, it is legal +*NOTE:* Although this syntax looks a little funky, it is legal Ruby. We are constructing a hash where the key is :name and the value for that key is the list of prerequisites. It is equivalent to the following ... @@ -93,8 +93,8 @@ method). In addition, file tasks are usually named with a string rather than a symbol. The following file task creates a executable program (named +prog+) -given two object files named a.o and b.o. The tasks -for creating a.o and b.o are not shown. +given two object files named +a.o+ and +b.o+. The tasks +for creating +a.o+ and +b.o+ are not shown. file "prog" => ["a.o", "b.o"] do |t| sh "cc -o #{t.name} #{t.prerequisites.join(' ')}" @@ -217,7 +217,7 @@ will work. Environment variable names must either match the task parameter exactly, or match an all-uppercase version of the task parameter. -NOTE: A variable declared within a rake command will +*NOTE:* A variable declared within a rake command will not persist in the environment: $ export VALUE=old @@ -308,8 +308,7 @@ versions of rake. == Accessing Task Programmatically Sometimes it is useful to manipulate tasks programmatically in a -Rakefile. To find a task object, use the :[] operator on the -Rake::Task. +Rakefile. To find a task object use Rake::Task.[]. === Programmatic Task Example @@ -378,7 +377,7 @@ The following rule is equivalent to the example above. sh "cc #{t.source} -c -o #{t.name}" end -NOTE: Because of a _quirk_ in Ruby syntax, parenthesis are +*NOTE:* Because of a _quirk_ in Ruby syntax, parenthesis are required on *rule* when the first argument is a regular expression. The following rule might be used for Java files ... @@ -389,7 +388,7 @@ The following rule might be used for Java files ... java_compile(t.source, t.name) end -NOTE: +java_compile+ is a hypothetical method that invokes the +*NOTE:* +java_compile+ is a hypothetical method that invokes the java compiler. == Importing Dependencies @@ -592,11 +591,11 @@ This is the proper way to specify the task ... == Rakefile Path -When issuing the rake command in a terminal, Rake will look +When issuing the +rake+ command in a terminal, Rake will look for a Rakefile in the current directory. If a Rakefile is not found, it will search parent directories until one is found. -For example, if a Rakefile resides in the project/ directory, +For example, if a Rakefile resides in the +project/+ directory, moving deeper into the project's directory tree will not have an adverse effect on rake tasks: @@ -616,12 +615,12 @@ which the Rakefile resides. === Multiple Rake Files Not all tasks need to be included in a single Rakefile. Additional -rake files (with the file extension ".rake") may be placed in -rakelib directory located at the top level of a project (i.e. -the same directory that contains the main Rakefile). +rake files (with the file extension "+.rake+") may be placed in ++rakelib+ directory located at the top level of a project (i.e. +the same directory that contains the main +Rakefile+). Also, rails projects may include additional rake files in the -lib/tasks directory. ++lib/tasks+ directory. ---- From f5edebc1d327413f3de6f1b745c9fd3a1dc78365 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 15:58:22 -0700 Subject: [PATCH 126/813] Mark Rake::AltSystem for deprecation Also, hide it from documentation because nobody should be looking at it or using it. --- lib/rake/alt_system.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/rake/alt_system.rb b/lib/rake/alt_system.rb index a42597bf0..aa7b7791b 100644 --- a/lib/rake/alt_system.rb +++ b/lib/rake/alt_system.rb @@ -24,11 +24,13 @@ require 'rbconfig' -# +## # Alternate implementations of system() and backticks `` on Windows # for ruby-1.8 and earlier. -# -module Rake::AltSystem +#-- +# TODO: Remove in Rake 11 + +module Rake::AltSystem # :nodoc: all WINDOWS = RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw|[Ww]indows)! From f3a6f6bf411936e74657d0c506f4e51e6a04f6b5 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 16:05:46 -0700 Subject: [PATCH 127/813] Hide internal methods in Rake::Application --- lib/rake/application.rb | 87 +++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 26e986d61..2f56e75fc 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -12,10 +12,10 @@ module Rake CommandLineOptionError = Class.new(StandardError) - ###################################################################### + ## # Rake main application object. When invoking +rake+ from the # command line, a Rake::Application object is created and run. - # + class Application include TaskManager include TraceOutput @@ -141,15 +141,16 @@ def thread_pool # :nodoc: @thread_pool ||= ThreadPool.new(options.thread_pool_size || Rake.suggested_thread_count-1) end - # private ---------------------------------------------------------------- + # internal ---------------------------------------------------------------- - def invoke_task(task_string) + # Invokes a task with arguments that are extracted from +task_string+ + def invoke_task(task_string) # :nodoc: name, args = parse_task_string(task_string) t = self[name] t.invoke(*args) end - def parse_task_string(string) + def parse_task_string(string) # :nodoc: /^(?[^\[]+)(\[(?.*)\])$/ =~ string return string, [] unless name @@ -168,7 +169,7 @@ def parse_task_string(string) end # Provide standard exception handling for the given block. - def standard_exception_handling + def standard_exception_handling # :nodoc: yield rescue SystemExit # Exit silently with current status @@ -184,12 +185,12 @@ def standard_exception_handling # Exit the program because of an unhandle exception. # (may be overridden by subclasses) - def exit_because_of_exception(ex) + def exit_because_of_exception(ex) # :nodoc: exit(false) end # Display the error message that caused the exception. - def display_error_message(ex) + def display_error_message(ex) # :nodoc: trace "#{name} aborted!" display_exception_details(ex) trace "Tasks: #{ex.chain}" if has_chain?(ex) @@ -197,17 +198,17 @@ def display_error_message(ex) options.backtrace end - def display_exception_details(ex) + def display_exception_details(ex) # :nodoc: display_exception_message_details(ex) display_exception_backtrace(ex) display_exception_details(ex.cause) if has_cause?(ex) end - def has_cause?(ex) + def has_cause?(ex) # :nodoc: ex.respond_to?(:cause) && ex.cause end - def display_exception_message_details(ex) + def display_exception_message_details(ex) # :nodoc: if ex.instance_of?(RuntimeError) trace ex.message else @@ -215,7 +216,7 @@ def display_exception_message_details(ex) end end - def display_exception_backtrace(ex) + def display_exception_backtrace(ex) # :nodoc: if options.backtrace trace ex.backtrace.join("\n") else @@ -228,7 +229,7 @@ def display_exception_backtrace(ex) # Example: # Rake.application.deprecate("import", "Rake.import", caller.first) # - def deprecate(old_usage, new_usage, call_site) + def deprecate(old_usage, new_usage, call_site) # :nodoc: unless options.ignore_deprecate $stderr.puts "WARNING: '#{old_usage}' is deprecated. " + "Please use '#{new_usage}' instead.\n" + @@ -237,14 +238,14 @@ def deprecate(old_usage, new_usage, call_site) end # Does the exception have a task invocation chain? - def has_chain?(exception) + def has_chain?(exception) # :nodoc: exception.respond_to?(:chain) && exception.chain end private :has_chain? # True if one of the files in RAKEFILES is in the current directory. # If a match is found, it is copied into @rakefile. - def have_rakefile + def have_rakefile # :nodoc: @rakefiles.each do |fn| if File.exist?(fn) others = FileList.glob(fn, File::FNM_CASEFOLD) @@ -257,23 +258,23 @@ def have_rakefile end # True if we are outputting to TTY, false otherwise - def tty_output? + def tty_output? # :nodoc: @tty_output end # Override the detected TTY output state (mostly for testing) - def tty_output=(tty_output_state) + def tty_output=(tty_output_state) # :nodoc: @tty_output = tty_output_state end # We will truncate output if we are outputting to a TTY or if we've been # given an explicit column width to honor - def truncate_output? + def truncate_output? # :nodoc: tty_output? || @terminal_columns.nonzero? end # Display the tasks and comments. - def display_tasks_and_comments + def display_tasks_and_comments # :nodoc: displayable_tasks = tasks.select { |t| (options.show_all_tasks || t.comment) && t.name =~ options.show_task_pattern @@ -312,7 +313,7 @@ def display_tasks_and_comments end end - def terminal_width + def terminal_width # :nodoc: if @terminal_columns.nonzero? result = @terminal_columns else @@ -324,28 +325,28 @@ def terminal_width end # Calculate the dynamic width of the - def dynamic_width + def dynamic_width # :nodoc: @dynamic_width ||= (dynamic_width_stty.nonzero? || dynamic_width_tput) end - def dynamic_width_stty + def dynamic_width_stty # :nodoc: %x{stty size 2>/dev/null}.split[1].to_i end - def dynamic_width_tput + def dynamic_width_tput # :nodoc: %x{tput cols 2>/dev/null}.to_i end - def unix? + def unix? # :nodoc: RbConfig::CONFIG['host_os'] =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i end - def windows? + def windows? # :nodoc: Win32.windows? end - def truncate(string, width) + def truncate(string, width) # :nodoc: if string.nil? "" elsif string.length <= width @@ -356,19 +357,19 @@ def truncate(string, width) end # Display the tasks and prerequisites - def display_prerequisites + def display_prerequisites # :nodoc: tasks.each do |t| puts "#{name} #{t.name}" t.prerequisites.each { |pre| puts " #{pre}" } end end - def trace(*strings) + def trace(*strings) # :nodoc: options.trace_output ||= $stderr trace_on(options.trace_output, *strings) end - def sort_options(options) + def sort_options(options) # :nodoc: options.sort_by { |opt| opt.select { |o| o =~ /^-/ }.map { |o| o.downcase }.sort.reverse } @@ -377,7 +378,7 @@ def sort_options(options) # A list of all the standard options used in rake, suitable for # passing to OptionParser. - def standard_rake_options + def standard_rake_options # :nodoc: sort_options( [ ['--all', '-A', @@ -581,14 +582,14 @@ def standard_rake_options ]) end - def select_tasks_to_show(options, show_tasks, value) + def select_tasks_to_show(options, show_tasks, value) # :nodoc: options.show_tasks = show_tasks options.show_task_pattern = Regexp.new(value || '') Rake::TaskManager.record_task_metadata = true end private :select_tasks_to_show - def select_trace_output(options, trace_option, value) + def select_trace_output(options, trace_option, value) # :nodoc: value = value.strip unless value.nil? case value when 'stdout' @@ -603,7 +604,7 @@ def select_trace_output(options, trace_option, value) private :select_trace_output # Read and handle the command line options. - def handle_options + def handle_options # :nodoc: options.rakelib = ['rakelib'] options.trace_output = $stderr @@ -624,7 +625,7 @@ def handle_options # Similar to the regular Ruby +require+ command, but will check # for *.rake files in addition to *.rb files. - def rake_require(file_name, paths=$LOAD_PATH, loaded=$") + def rake_require(file_name, paths=$LOAD_PATH, loaded=$") # :nodoc: fn = file_name + ".rake" return false if loaded.include?(fn) paths.each do |path| @@ -638,7 +639,7 @@ def rake_require(file_name, paths=$LOAD_PATH, loaded=$") fail LoadError, "Can't find #{file_name}" end - def find_rakefile_location + def find_rakefile_location # :nodoc: here = Dir.pwd until (fn = have_rakefile) Dir.chdir("..") @@ -650,7 +651,7 @@ def find_rakefile_location Dir.chdir(Rake.original_dir) end - def print_rakefile_directory(location) + def print_rakefile_directory(location) # :nodoc: $stderr.puts "(in #{Dir.pwd})" unless options.silent or original_dir == location end @@ -681,13 +682,13 @@ def raw_load_rakefile # :nodoc: load_imports end - def glob(path, &block) + def glob(path, &block) # :nodoc: FileList.glob(path.gsub("\\", '/')).each(&block) end private :glob # The directory path containing the system wide rakefiles. - def system_dir + def system_dir # :nodoc: @system_dir ||= begin if ENV['RAKE_SYSTEM'] @@ -713,7 +714,7 @@ def standard_system_dir #:nodoc: # Collect the list of tasks on the command line. If no tasks are # given, return a list containing only the default task. # Environmental assignments are processed at this time as well. - def collect_command_line_tasks + def collect_command_line_tasks # :nodoc: @top_level_tasks = [] ARGV.each do |arg| if arg =~ /^(\w+)=(.*)$/m @@ -727,17 +728,17 @@ def collect_command_line_tasks # Default task name ("default"). # (May be overridden by subclasses) - def default_task_name + def default_task_name # :nodoc: "default" end # Add a file to the list of files to be imported. - def add_import(fn) + def add_import(fn) # :nodoc: @pending_imports << fn end # Load the pending list of imported files. - def load_imports + def load_imports # :nodoc: while fn = @pending_imports.shift next if @imported.member?(fn) fn_task = lookup(fn) and fn_task.invoke @@ -753,7 +754,7 @@ def load_imports end end - def rakefile_location(backtrace=caller) + def rakefile_location(backtrace=caller) # :nodoc: backtrace.map { |t| t[/([^:]+):/, 1] } re = /^#{@rakefile}$/ From 9e744105d09ee070432cabda8194ff0463cbdb66 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 16:08:14 -0700 Subject: [PATCH 128/813] Use Ruby 2 hash syntax in task examples --- lib/rake/dsl_definition.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index 8552e9885..c568e041e 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -26,9 +26,9 @@ module DSL # :call-seq: # task task_name - # task task_name => dependencies + # task task_name: dependencies # task task_name, arguments => dependencies - # task task_name, argument[, argument ...], :needs => dependencies + # task task_name, argument[, argument ...], :needs: dependencies # # Declare a basic task. The +task_name+ is always the first argument. If # the task name contains a ":" it is defined in that namespace. @@ -42,7 +42,7 @@ module DSL # # A task with a single dependency: # - # task :clobber => [:clean] do + # task clobber: %w[clean] do # rm_rf "html" # end # @@ -58,7 +58,7 @@ module DSL # # Alternate definition: # - # task :package, :version, :needs => :test do |t, args| + # task :package, :version, needs: :test do |t, args| # # ... # end # @@ -112,7 +112,7 @@ def directory(*args, &block) # :doc: # about it) # # Example: - # multitask :deploy => [:deploy_gem, :deploy_rdoc] + # multitask deploy: %w[deploy_gem deploy_rdoc] # def multitask(*args, &block) # :doc: Rake::MultiTask.define_task(*args, &block) @@ -161,7 +161,7 @@ def rule(*args, &block) # :doc: # # Example: # desc "Run the Unit Tests" - # task :test => [:build] + # task test: [:build] # runtests # end # From c62e48022b5e52df4a9ded3251581bf3f93e6e59 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 16:09:07 -0700 Subject: [PATCH 129/813] Do not mention deprecated runtests --- lib/rake/dsl_definition.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index c568e041e..8420de7ee 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -162,7 +162,7 @@ def rule(*args, &block) # :doc: # Example: # desc "Run the Unit Tests" # task test: [:build] - # runtests + # # ... run tests # end # def desc(description) # :doc: From 44b19f617df51221c612947070e3177c8bf07211 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 16:10:44 -0700 Subject: [PATCH 130/813] Document Rake::EarlyTime methods --- lib/rake/early_time.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/rake/early_time.rb b/lib/rake/early_time.rb index 8c0e7d333..abcb1872b 100644 --- a/lib/rake/early_time.rb +++ b/lib/rake/early_time.rb @@ -5,11 +5,14 @@ class EarlyTime include Comparable include Singleton + ## + # The EarlyTime always comes before +other+! + def <=>(other) -1 end - def to_s + def to_s # :nodoc: "" end end From 1aa8d439af7b5705aec9bf91f72312f325c2ae3b Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 16:12:54 -0700 Subject: [PATCH 131/813] Hide Module#rake_extension from rdoc Users should not know about this or call it --- lib/rake/ext/core.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/rake/ext/core.rb b/lib/rake/ext/core.rb index c924c7eab..7575df15a 100644 --- a/lib/rake/ext/core.rb +++ b/lib/rake/ext/core.rb @@ -1,8 +1,5 @@ -###################################################################### -# Core extension library -# class Module - # Check for an existing method in the current class before extending. IF + # Check for an existing method in the current class before extending. If # the method already exists, then a warning is printed and the extension is # not added. Otherwise the block is yielded and any definitions in the # block will take effect. @@ -17,7 +14,7 @@ class Module # end # end # - def rake_extension(method) + def rake_extension(method) # :nodoc: if method_defined?(method) $stderr.puts "WARNING: Possible conflict with Rake extension: " + "#{self}##{method} already exists" From e76f368e1fec7434772c45d72105e21b3de02f5e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 16:13:58 -0700 Subject: [PATCH 132/813] Mark rake/ext/module.rb for removal --- lib/rake/ext/module.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rake/ext/module.rb b/lib/rake/ext/module.rb index e69de29bb..34c83b0ea 100644 --- a/lib/rake/ext/module.rb +++ b/lib/rake/ext/module.rb @@ -0,0 +1 @@ +# TODO: remove in Rake 11 From 76cf38df683d60ccb1d645bc221b9a592e4923e7 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 16:27:50 -0700 Subject: [PATCH 133/813] Clean up Rake string extension documentation Mark these extensions as coming from Rake --- lib/rake/ext/string.rb | 59 +++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb index 2a0a85bb1..34ee328f7 100644 --- a/lib/rake/ext/string.rb +++ b/lib/rake/ext/string.rb @@ -1,8 +1,5 @@ require 'rake/ext/core' -###################################################################### -# Rake extension methods for String. -# class String rake_extension("ext") do @@ -11,6 +8,8 @@ class String # is not given, or is the empty string, remove any existing extension. # # +ext+ is a user added method for the String class. + # + # This String extension comes from Rake def ext(newext='') return self.dup if ['.', '..'].include? self newext = (newext =~ /^\./) ? newext : ("." + newext) if newext != '' @@ -20,6 +19,8 @@ def ext(newext='') rake_extension("pathmap") do # Explode a path into individual components. Used by +pathmap+. + # + # This String extension comes from Rake def pathmap_explode head, tail = File.split(self) return [self] if head == self @@ -32,6 +33,8 @@ def pathmap_explode # Extract a partial path from the path. Include +n+ directories from the # front end (left hand side) if +n+ is positive. Include |+n+| # directories from the back end (right hand side) if +n+ is negative. + # + # This String extension comes from Rake def pathmap_partial(n) dirs = File.dirname(self).pathmap_explode partial_dirs = @@ -48,6 +51,8 @@ def pathmap_partial(n) # Preform the pathmap replacement operations on the given path. The # patterns take the form 'pat1,rep1;pat2,rep2...'. + # + # This String extension comes from Rake def pathmap_replace(patterns, &block) result = self patterns.split(';').each do |pair| @@ -69,35 +74,36 @@ def pathmap_replace(patterns, &block) # controls the details of the mapping. The following special patterns are # recognized: # - # * %p -- The complete path. - # * %f -- The base file name of the path, with its file extension, - # but without any directories. - # * %n -- The file name of the path without its file extension. - # * %d -- The directory list of the path. - # * %x -- The file extension of the path. An empty string if there - # is no extension. - # * %X -- Everything *but* the file extension. - # * %s -- The alternate file separator if defined, otherwise use - # the standard file separator. - # * %% -- A percent sign. - # - # The %d specifier can also have a numeric prefix (e.g. '%2d'). If the - # number is positive, only return (up to) +n+ directories in the path, - # starting from the left hand side. If +n+ is negative, return (up to) - # |+n+| directories from the right hand side of the path. + # %p :: The complete path. + # %f :: The base file name of the path, with its file extension, + # but without any directories. + # %n :: The file name of the path without its file extension. + # %d :: The directory list of the path. + # %x :: The file extension of the path. An empty string if there + # is no extension. + # %X :: Everything *but* the file extension. + # %s :: The alternate file separator if defined, otherwise use # + # the standard file separator. + # %% :: A percent sign. + # + # The %d specifier can also have a numeric prefix (e.g. '%2d'). + # If the number is positive, only return (up to) +n+ directories in the + # path, starting from the left hand side. If +n+ is negative, return (up + # to) +n+ directories from the right hand side of the path. # # Examples: # # 'a/b/c/d/file.txt'.pathmap("%2d") => 'a/b' # 'a/b/c/d/file.txt'.pathmap("%-2d") => 'c/d' # - # Also the %d, %p, %f, %n, %x, and %X operators can take a - # pattern/replacement argument to perform simple string substitutions on a - # particular part of the path. The pattern and replacement are separated - # by a comma and are enclosed by curly braces. The replacement spec comes - # after the % character but before the operator letter. (e.g. - # "%{old,new}d"). Multiple replacement specs should be separated by - # semi-colons (e.g. "%{old,new;src,bin}d"). + # Also the %d, %p, %f, %n, + # %x, and %X operators can take a pattern/replacement + # argument to perform simple string substitutions on a particular part of + # the path. The pattern and replacement are separated by a comma and are + # enclosed by curly braces. The replacement spec comes after the % + # character but before the operator letter. (e.g. "%{old,new}d"). + # Multiple replacement specs should be separated by semi-colons (e.g. + # "%{old,new;src,bin}d"). # # Regular expressions may be used for the pattern, and back refs may be # used in the replacement text. Curly braces, commas and semi-colons are @@ -125,6 +131,7 @@ def pathmap_replace(patterns, &block) # # "/path/to/file.txt" # + # This String extension comes from Rake def pathmap(spec=nil, &block) return self if spec.nil? result = '' From 4ee119a1b6e8b8f76e613d72c9693ab07a2f6dab Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 16:36:42 -0700 Subject: [PATCH 134/813] Ignore Time extensions in documentation --- lib/rake/ext/time.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/ext/time.rb b/lib/rake/ext/time.rb index ea8b037e3..c058649b7 100644 --- a/lib/rake/ext/time.rb +++ b/lib/rake/ext/time.rb @@ -3,7 +3,7 @@ require 'rake/early_time' -class Time +class Time # :nodoc: all alias rake_original_time_compare :<=> def <=>(other) if Rake::EarlyTime === other From 3c0d0692ede71b49c8c1197ef182bec966507646 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 17:15:07 -0700 Subject: [PATCH 135/813] Improve Rake::FileList documentation --- lib/rake/file_list.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index f32b8c62a..b01dbbb34 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -2,10 +2,10 @@ require 'rake/file_utils_ext' require 'rake/pathmap' -###################################################################### + module Rake - # ######################################################################### + ## # A FileList is essentially an array with a few helper methods defined to # make file manipulation a bit easier. # @@ -156,7 +156,6 @@ def exclude(*patterns, &block) self end - # Clear all the exclude patterns so that we exclude nothing. def clear_exclude @exclude_patterns = [] @@ -164,7 +163,7 @@ def clear_exclude self end - # Define equality. + # A FileList is equal through array equality. def ==(array) to_ary == array end @@ -208,7 +207,7 @@ def resolve self end - def resolve_add(fn) + def resolve_add(fn) # :nodoc: case fn when %r{[*?\[\{]} add_matching(fn) @@ -218,7 +217,7 @@ def resolve_add(fn) end private :resolve_add - def resolve_exclude + def resolve_exclude # :nodoc: reject! { |fn| excluded_from_list?(fn) } self end @@ -276,7 +275,6 @@ def ext(newext='') collect { |fn| fn.ext(newext) } end - # Grep each of the files in the filelist using the given pattern. If a # block is given, call the block on each matching line, passing the file # name, line number, and the matching line of text. If no block is given, @@ -377,7 +375,7 @@ def excluded_from_list?(fn) proc { |fn| fn =~ /(^|[\/\\])core$/ && ! File.directory?(fn) } ] - def import(array) + def import(array) # :nodoc: @items = array self end From 3e7c8d19660c809aa3283da3a3ba882df2d16a11 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 17:16:29 -0700 Subject: [PATCH 136/813] Improve FileTask documentation formatting --- lib/rake/file_task.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index 3e717c24b..497e14e3e 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -2,7 +2,7 @@ require 'rake/early_time' module Rake - # ######################################################################### + # A FileTask is a task that includes time based dependencies. If any of a # FileTask's prerequisites have a timestamp that is later than the file # represented by this task, then the file must be rebuilt (using the From 3a28037e827b5213fc4ddc688c54054ccce193f5 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 17:20:24 -0700 Subject: [PATCH 137/813] Marke rake/gempackagetask for removal in Rake 11 --- lib/rake/gempackagetask.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rake/gempackagetask.rb b/lib/rake/gempackagetask.rb index b7c68213d..16e7ce042 100644 --- a/lib/rake/gempackagetask.rb +++ b/lib/rake/gempackagetask.rb @@ -1,2 +1,4 @@ +# TODO: Remove in Rake 11 + fail "ERROR: 'rake/gempackagetask' is obsolete and no longer supported. " + "Use 'rubygems/package_task' instead." From 83bc28fb6ae860ba4680fc44e622c40086edf0ac Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 17:21:42 -0700 Subject: [PATCH 138/813] Clean up formatting of InvocationChain documentation --- lib/rake/invocation_chain.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/rake/invocation_chain.rb b/lib/rake/invocation_chain.rb index dae9a3591..690435169 100644 --- a/lib/rake/invocation_chain.rb +++ b/lib/rake/invocation_chain.rb @@ -1,6 +1,5 @@ module Rake - #################################################################### # InvocationChain tracks the chain of task invocations to detect # circular dependencies. class InvocationChain < LinkedList From 3dd8987971197238b63f0f09720ac2518713b214 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 12 Mar 2014 17:28:28 -0700 Subject: [PATCH 139/813] Improve documentation of Rake::PackageTask --- lib/rake/packagetask.rb | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index 029caa6d4..0c0678b35 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -11,27 +11,27 @@ module Rake # # The PackageTask will create the following targets: # - # [:package] + # +:package+ :: # Create all the requested package files. # - # [:clobber_package] + # +:clobber_package+ :: # Delete all the package files. This target is automatically # added to the main clobber target. # - # [:repackage] + # +:repackage+ :: # Rebuild the package files from scratch, even if they are not out # of date. # - # ["package_dir/name-version.tgz"] + # "package_dir/name-version.tgz" :: # Create a gzipped tar package (if need_tar is true). # - # ["package_dir/name-version.tar.gz"] + # "package_dir/name-version.tar.gz" :: # Create a gzipped tar package (if need_tar_gz is true). # - # ["package_dir/name-version.tar.bz2"] + # "package_dir/name-version.tar.bz2" :: # Create a bzip2'd tar package (if need_tar_bz2 is true). # - # ["package_dir/name-version.zip"] + # "package_dir/name-version.zip" :: # Create a zip package archive (if need_zip is true). # # Example: @@ -162,26 +162,38 @@ def define self end + # The name of this package + def package_name @version ? "#{@name}-#{@version}" : @name end + # The directory this package will be built in + def package_dir_path "#{package_dir}/#{package_name}" end + # The package name with .tgz added + def tgz_file "#{package_name}.tgz" end + # The package name with .tar.gz added + def tar_gz_file "#{package_name}.tar.gz" end + # The package name with .tar.bz2 added + def tar_bz2_file "#{package_name}.tar.bz2" end + # The package name with .zip added + def zip_file "#{package_name}.zip" end From 15f236a4bc4ee59b4752f93e892cafea971a1d5d Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 14:51:28 -0700 Subject: [PATCH 140/813] Remove headings from examples --- doc/rakefile.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index c4e492605..5b0ae50f8 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -410,7 +410,7 @@ explicit task, that task is invoked before loading the file. This allows dependency files to be generated and used in a single rake command invocation. -=== Example: +Example: require 'rake/loaders/makefile' @@ -431,7 +431,7 @@ legal in Ruby source code, including comments for tasks and rules. However, if you wish a task to be described using the "-T" switch, then you need to use the +desc+ command to describe the task. -=== Example: +Example: desc "Create a distribution package" task package: %w[ ... ] do ... end From f804fc2b56558100f840d2341823e74f25fc1e4a Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 14:55:38 -0700 Subject: [PATCH 141/813] Mark rake/pathmap for removal in Rake 11 --- lib/rake/pathmap.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rake/pathmap.rb b/lib/rake/pathmap.rb index 227572434..9a840cda2 100644 --- a/lib/rake/pathmap.rb +++ b/lib/rake/pathmap.rb @@ -1 +1,3 @@ +# TODO: Remove in Rake 11 + require 'rake/ext/string' From 3520b83e7be6eb474b63c15ae21a49e905bca4f7 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 14:56:29 -0700 Subject: [PATCH 142/813] Document rake/phony in doc/rakefile.rdoc --- doc/rakefile.rdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index 5b0ae50f8..8a331dff2 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -622,6 +622,12 @@ the same directory that contains the main +Rakefile+). Also, rails projects may include additional rake files in the +lib/tasks+ directory. +=== Phony Task + +The phony task can be used as a dependency to allow file-based tasks to use +non-file-based-tasks as prerequisites without forcing them to rebuild. You +can require 'rake/phony' to add the +phony+ task. + ---- == See From a47179f0dc53ff90062d95fdcab1d4b45eff35a1 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 14:57:35 -0700 Subject: [PATCH 143/813] Hide Rake::Win32 from documentation --- lib/rake.rb | 1 - lib/rake/win32.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/rake.rb b/lib/rake.rb index 064efb0c2..8a7bc98be 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -1,5 +1,4 @@ #-- - # Copyright 2003-2010 by Jim Weirich (jim.weirich@gmail.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/lib/rake/win32.rb b/lib/rake/win32.rb index edb33938b..6b4873da2 100644 --- a/lib/rake/win32.rb +++ b/lib/rake/win32.rb @@ -4,7 +4,7 @@ module Rake # Win 32 interface methods for Rake. Windows specific functionality # will be placed here to collect that knowledge in one spot. - module Win32 + module Win32 # :nodoc: all # Error indicating a problem in locating the home directory on a # Win32 system. From 38e66f3b66dcedc7967dc467b9444318187d0004 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 14:58:32 -0700 Subject: [PATCH 144/813] Hide Rake::TraceOutput from documentation --- lib/rake/trace_output.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/trace_output.rb b/lib/rake/trace_output.rb index 1cd19451c..396096d4d 100644 --- a/lib/rake/trace_output.rb +++ b/lib/rake/trace_output.rb @@ -1,5 +1,5 @@ module Rake - module TraceOutput + module TraceOutput # :nodoc: all # Write trace output to output stream +out+. # From 05b1891b4a83b2068e7910ba7c9772ab52901f62 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 14:59:37 -0700 Subject: [PATCH 145/813] Hide Rake::ThreadPool from documentation --- lib/rake/thread_pool.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/rake/thread_pool.rb b/lib/rake/thread_pool.rb index 73fd104a9..d2ac6e7ac 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -5,10 +5,10 @@ module Rake - class ThreadPool # :nodoc: all + class ThreadPool # :nodoc: all - # Creates a ThreadPool object. - # The parameter is the size of the pool. + # Creates a ThreadPool object. The +thread_count+ parameter is the size + # of the pool. def initialize(thread_count) @max_active_threads = [thread_count, 0].max @threads = Set.new @@ -25,9 +25,9 @@ def initialize(thread_count) # Creates a future executed by the +ThreadPool+. # # The args are passed to the block when executing (similarly to - # Thread#new) The return value is an object representing + # Thread#new) The return value is an object representing # a future which has been created and added to the queue in the - # pool. Sending #value to the object will sleep the + # pool. Sending #value to the object will sleep the # current thread until the future is finished and will return the # result (or raise an exception thrown from the future) def future(*args, &block) From 0f772c4679628eb5650a9a543d621d0f968f9157 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:06:16 -0700 Subject: [PATCH 146/813] Hide some TestTask methods from documentation --- lib/rake/testtask.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 43e700f9b..2daa58963 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -1,5 +1,3 @@ -# Define a task library for running unit tests. - require 'rake' require 'rake/tasklib' @@ -125,18 +123,18 @@ def option_list # :nodoc: "") end - def ruby_opts_string + def ruby_opts_string # :nodoc: opts = @ruby_opts.dup opts.unshift("-I\"#{lib_path}\"") unless @libs.empty? opts.unshift("-w") if @warning opts.join(" ") end - def lib_path + def lib_path # :nodoc: @libs.join(File::PATH_SEPARATOR) end - def file_list_string + def file_list_string # :nodoc: file_list.map { |fn| "\"#{fn}\"" }.join(' ') end @@ -160,11 +158,11 @@ def fix # :nodoc: end || '' end - def ruby_version + def ruby_version # :nodoc: RUBY_VERSION end - def run_code + def run_code # :nodoc: case @loader when :direct "-e \"ARGV.each{|f| require f}\"" From aade11693afb3dbe4b7488d36a62dac231b819c8 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:08:49 -0700 Subject: [PATCH 147/813] Mark TaskLib#paste for removal in Rake 11 --- lib/rake/tasklib.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rake/tasklib.rb b/lib/rake/tasklib.rb index 48d27df9e..6203d9402 100644 --- a/lib/rake/tasklib.rb +++ b/lib/rake/tasklib.rb @@ -14,6 +14,8 @@ class TaskLib # libraries depend on this so I can't remove it without breaking # other people's code. So for now it stays for backwards # compatibility. BUT DON'T USE IT. + #-- + # TODO: Remove in Rake 11 def paste(a, b) # :nodoc: (a.to_s + b.to_s).intern end From b250e28e222e407717c9e747aef8865fcea69fdf Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:16:27 -0700 Subject: [PATCH 148/813] Hide methods in TaskManager from documentation --- lib/rake/task_manager.rb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index b52ae72c9..c5348190d 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -4,9 +4,12 @@ module Rake module TaskManager # Track the last comment made in the Rakefile. attr_accessor :last_description - alias :last_comment :last_description # Backwards compatibility - def initialize + # TODO: Remove in Rake 11 + + alias :last_comment :last_description # :nodoc: Backwards compatibility + + def initialize # :nodoc: super @tasks = Hash.new @rules = Array.new @@ -14,13 +17,13 @@ def initialize @last_description = nil end - def create_rule(*args, &block) + def create_rule(*args, &block) # :nodoc: pattern, args, deps = resolve_args(args) pattern = Regexp.new(Regexp.quote(pattern) + '$') if String === pattern @rules << [pattern, args, deps, block] end - def define_task(task_class, *args, &block) + def define_task(task_class, *args, &block) # :nodoc: task_name, arg_names, deps = resolve_args(args) original_scope = @scope @@ -58,7 +61,7 @@ def [](task_name, scopes=nil) fail "Don't know how to build task '#{task_name}'" end - def synthesize_file_task(task_name) + def synthesize_file_task(task_name) # :nodoc: return nil unless File.exist?(task_name) define_task(Rake::FileTask, task_name) end @@ -235,7 +238,7 @@ def generate_name "_anon_#{@seed}" end - def trace_rule(level, message) + def trace_rule(level, message) # :nodoc: options.trace_output.puts "#{" " * level}#{message}" if Rake.application.options.trace_rules end @@ -298,7 +301,7 @@ def get_description(task) end class << self - attr_accessor :record_task_metadata + attr_accessor :record_task_metadata # :nodoc: TaskManager.record_task_metadata = false end end From cd0afe3b7b8d5d3912394db71a085f053f278739 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:35:25 -0700 Subject: [PATCH 149/813] Improve TaskArguments documentation --- lib/rake/task_arguments.rb | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index 2405bc383..fc0d65727 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -1,16 +1,16 @@ module Rake - #################################################################### + ## # TaskArguments manage the arguments passed to a task. # class TaskArguments include Enumerable + # Argument names attr_reader :names - # Create a TaskArgument object with a list of named arguments - # (given by :names) and a set of associated values (given by - # :values). :parent is the parent argument object. + # Create a TaskArgument object with a list of argument +names+ and a set + # of associated +values+. +parent+ is the parent argument object. def initialize(names, values, parent=nil) @names = names @parent = parent @@ -50,37 +50,42 @@ def with_defaults(defaults) @hash = defaults.merge(@hash) end + # Enumerates the arguments and their values def each(&block) @hash.each(&block) end + # Extracts the argument values at +keys+ def values_at(*keys) keys.map { |k| lookup(k) } end + # Returns the value of the given argument via method_missing def method_missing(sym, *args) lookup(sym.to_sym) end + # Returns a Hash of arguments and their values def to_hash @hash end - def to_s + def to_s # :nodoc: @hash.inspect end - def inspect + def inspect # :nodoc: to_s end + # Returns true if +key+ is one of the arguments def has_key?(key) @hash.has_key?(key) end protected - def lookup(name) + def lookup(name) # :nodoc: if @hash.has_key?(name) @hash[name] elsif @parent @@ -89,5 +94,5 @@ def lookup(name) end end - EMPTY_TASK_ARGS = TaskArguments.new([], []) + EMPTY_TASK_ARGS = TaskArguments.new([], []) # :nodoc: end From 5266bfe5168ad2340c498e56f6e220386620a735 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:38:08 -0700 Subject: [PATCH 150/813] Hide Task methods from documentation --- lib/rake/task.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 2ce4ebc59..9bcf72552 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -2,7 +2,7 @@ module Rake - # ######################################################################### + ## # A Task is the basic unit of work in a Rakefile. Tasks have associated # actions (possibly more than one) and a list of prerequisites. When # invoked, a task will first ensure that all of its prerequisites have an @@ -34,7 +34,7 @@ def to_s name end - def inspect + def inspect # :nodoc: "<#{self.class} #{name} => [#{prerequisites.join(', ')}]>" end @@ -53,7 +53,7 @@ def prerequisite_tasks prerequisites.map { |pre| lookup_prerequisite(pre) } end - def lookup_prerequisite(prerequisite_name) + def lookup_prerequisite(prerequisite_name) # :nodoc: application[prerequisite_name, @scope] end private :lookup_prerequisite @@ -67,7 +67,7 @@ def all_prerequisite_tasks seen.values end - def collect_prerequisites(seen) + def collect_prerequisites(seen) # :nodoc: prerequisite_tasks.each do |pre| next if seen[pre.name] seen[pre.name] = pre @@ -184,7 +184,7 @@ def invoke_with_call_chain(task_args, invocation_chain) # :nodoc: end protected :invoke_with_call_chain - def add_chain_to(exception, new_chain) + def add_chain_to(exception, new_chain) # :nodoc: exception.extend(InvocationExceptionMixin) unless exception.respond_to?(:chain) exception.chain = new_chain if exception.chain.nil? @@ -261,11 +261,11 @@ def add_description(description) add_comment(comment) if comment && ! comment.empty? end - def comment=(comment) + def comment=(comment) # :nodoc: add_comment(comment) end - def add_comment(comment) + def add_comment(comment) # :nodoc: return if comment.nil? @comments << comment unless @comments.include?(comment) end From 01b24d97fe6a7497e06894f90417284acd0e9f2e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:40:55 -0700 Subject: [PATCH 151/813] Hide Rake::Backtrace from documentation --- lib/rake/backtrace.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/backtrace.rb b/lib/rake/backtrace.rb index 9b2ba6157..63d253221 100644 --- a/lib/rake/backtrace.rb +++ b/lib/rake/backtrace.rb @@ -1,5 +1,5 @@ module Rake - module Backtrace + module Backtrace # :nodoc: all SYS_KEYS = RbConfig::CONFIG.keys.grep(/(prefix|libdir)/) SYS_PATHS = RbConfig::CONFIG.values_at(*SYS_KEYS).uniq + [ File.join(File.dirname(__FILE__), "..") ] From 5e59bccecaf480d1de565ab34fd15e54ff667660 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:41:28 -0700 Subject: [PATCH 152/813] Hide Scope from documentation --- lib/rake/scope.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/scope.rb b/lib/rake/scope.rb index 33e1c08e7..dbefcea46 100644 --- a/lib/rake/scope.rb +++ b/lib/rake/scope.rb @@ -1,5 +1,5 @@ module Rake - class Scope < LinkedList + class Scope < LinkedList # :nodoc: all # Path for the scope. def path From e25f9f5c0bb143913c8465278b953f627df27788 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:41:59 -0700 Subject: [PATCH 153/813] Hide TODO in Rake.run_tests --- lib/rake/runtest.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/runtest.rb b/lib/rake/runtest.rb index 265079efb..4774b0e26 100644 --- a/lib/rake/runtest.rb +++ b/lib/rake/runtest.rb @@ -7,7 +7,7 @@ module Rake ## # Deprecated way of running tests in process, but only for Test::Unit. - # + #-- # TODO: Remove in rake 11 def run_tests(pattern='test/test*.rb', log_enabled=false) # :nodoc: From 3615021943a20db1c6ef112bc478fa0f0d43a2e2 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:44:00 -0700 Subject: [PATCH 154/813] Mark the 1.8.2 test/unit fix for removal in Rake 11 --- lib/rake/ruby182_test_unit_fix.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rake/ruby182_test_unit_fix.rb b/lib/rake/ruby182_test_unit_fix.rb index e47feeb09..40b30a6fd 100644 --- a/lib/rake/ruby182_test_unit_fix.rb +++ b/lib/rake/ruby182_test_unit_fix.rb @@ -1,3 +1,5 @@ +# TODO: Remove in rake 11 + # Local Rake override to fix bug in Ruby 0.8.2 module Test # :nodoc: # Local Rake override to fix bug in Ruby 0.8.2 From 9916fa9e4856b33ccc46303dab5615d28e503962 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:44:16 -0700 Subject: [PATCH 155/813] Mark rake/rdoctask for removal in Rake 11 --- lib/rake/rdoctask.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rake/rdoctask.rb b/lib/rake/rdoctask.rb index 50b7e269d..8d7df4f12 100644 --- a/lib/rake/rdoctask.rb +++ b/lib/rake/rdoctask.rb @@ -1,2 +1,4 @@ +# TODO: Remove in Rake 11 + fail "ERROR: 'rake/rdoctask' is obsolete and no longer supported. " + "Use 'rdoc/task' (available in RDoc 2.4.2+) instead." From ef8c32b99fe659aa779c9c2e33fe20accbfdc8e8 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:44:53 -0700 Subject: [PATCH 156/813] Improve Rake module function documentation --- lib/rake/rake_module.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/rake/rake_module.rb b/lib/rake/rake_module.rb index a7e972c56..369275343 100644 --- a/lib/rake/rake_module.rb +++ b/lib/rake/rake_module.rb @@ -2,8 +2,6 @@ module Rake - # Rake module singleton methods. - # class << self # Current Rake Application def application @@ -15,7 +13,7 @@ def application=(app) @application = app end - def suggested_thread_count + def suggested_thread_count # :nodoc: @cpu_count ||= Rake::CpuCounter.count @cpu_count + 4 end From 027ee1b5bdeb80e1358112846e68a34934ba634a Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:45:25 -0700 Subject: [PATCH 157/813] Hide PseudoStatus from documentation --- lib/rake/pseudo_status.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/pseudo_status.rb b/lib/rake/pseudo_status.rb index 09d5c88c7..16e1903bd 100644 --- a/lib/rake/pseudo_status.rb +++ b/lib/rake/pseudo_status.rb @@ -1,8 +1,8 @@ module Rake - #################################################################### + ## # Exit status class for times the system just gives us a nil. - class PseudoStatus + class PseudoStatus # :nodoc: all attr_reader :exitstatus def initialize(code=0) From dfb8976b1029b7e087226f28a433dd6627c7cae2 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:46:05 -0700 Subject: [PATCH 158/813] Improve DefaultLoader documentation --- lib/rake/default_loader.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/rake/default_loader.rb b/lib/rake/default_loader.rb index 5dd3c0561..6154408f4 100644 --- a/lib/rake/default_loader.rb +++ b/lib/rake/default_loader.rb @@ -2,6 +2,10 @@ module Rake # Default Rakefile loader used by +import+. class DefaultLoader + + ## + # Loads a rakefile into the current application from +fn+ + def load(fn) Rake.load_rakefile(File.expand_path(fn)) end From e650b898193eb10775100367144c68808e6dc7d3 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:46:31 -0700 Subject: [PATCH 159/813] Hide CpuCounter from documentation --- lib/rake/cpu_counter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index c107d9f24..e4df996d8 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -4,7 +4,7 @@ module Rake # Based on a script at: # http://stackoverflow.com/questions/891537/ruby-detect-number-of-cpus-installed - class CpuCounter + class CpuCounter # :nodoc: all def self.count new.count_with_default end From 54812dc0cc94e27d2965fe1110d2ef7bf937ee2d Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:46:51 -0700 Subject: [PATCH 160/813] Mark rake/contrib/sys for removal in Rake 11 --- lib/rake/contrib/sys.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rake/contrib/sys.rb b/lib/rake/contrib/sys.rb index a3a9f69e2..8d4c73543 100644 --- a/lib/rake/contrib/sys.rb +++ b/lib/rake/contrib/sys.rb @@ -1,2 +1,4 @@ +# TODO: Remove in Rake 11 + fail "ERROR: 'rake/contrib/sys' is obsolete and no longer supported. " + "Use 'FileUtils' instead." From cb0853a67d47bfe48769a1d5213a9fe486fc59f4 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:50:51 -0700 Subject: [PATCH 161/813] Mark RubyForgePublisher for removal in Rake 11 Hide RubyForgePublisher from documentation Rubyforge is going away shortly --- lib/rake/contrib/rubyforgepublisher.rb | 4 +++- lib/rake/contrib/sshpublisher.rb | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/rake/contrib/rubyforgepublisher.rb b/lib/rake/contrib/rubyforgepublisher.rb index a4b96936c..00889ad7b 100644 --- a/lib/rake/contrib/rubyforgepublisher.rb +++ b/lib/rake/contrib/rubyforgepublisher.rb @@ -1,8 +1,10 @@ +# TODO: Remove in Rake 11 + require 'rake/contrib/sshpublisher' module Rake - class RubyForgePublisher < SshDirPublisher + class RubyForgePublisher < SshDirPublisher # :nodoc: all attr_reader :project, :proj_id, :user def initialize(projname, user) diff --git a/lib/rake/contrib/sshpublisher.rb b/lib/rake/contrib/sshpublisher.rb index bd6adc127..44bb8c530 100644 --- a/lib/rake/contrib/sshpublisher.rb +++ b/lib/rake/contrib/sshpublisher.rb @@ -8,12 +8,17 @@ module Rake class SshDirPublisher include Rake::DSL + # Creates an SSH publisher which will scp all files in +local_dir+ to + # +remote_dir+ on +host+ + def initialize(host, remote_dir, local_dir) @host = host @remote_dir = remote_dir @local_dir = local_dir end + # Uploads the files + def upload sh %{scp -rq #{@local_dir}/* #{@host}:#{@remote_dir}} end @@ -21,6 +26,9 @@ def upload # Publish an entire directory to a fresh remote directory using SSH. class SshFreshDirPublisher < SshDirPublisher + + # Uploads the files after removing the existing remote directory. + def upload sh %{ssh #{@host} rm -rf #{@remote_dir}} rescue nil sh %{ssh #{@host} mkdir #{@remote_dir}} @@ -32,7 +40,9 @@ def upload class SshFilePublisher include Rake::DSL - # Create a publisher using the give host information. + # Creates an SSH publisher which will scp all +files+ in +local_dir+ to + # +remote_dir+ on +host+. + def initialize(host, remote_dir, local_dir, *files) @host = host @remote_dir = remote_dir @@ -40,7 +50,8 @@ def initialize(host, remote_dir, local_dir, *files) @files = files end - # Upload the local directory to the remote directory. + # Uploads the files + def upload @files.each do |fn| sh %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}} From 81a9cd5803860f9d54ce2887149f9c1ec3e9d684 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 15:59:47 -0700 Subject: [PATCH 162/813] Document the clean and clobber tasks in rakefile.rdoc --- doc/rakefile.rdoc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index 8a331dff2..fd652c741 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -622,6 +622,24 @@ the same directory that contains the main +Rakefile+). Also, rails projects may include additional rake files in the +lib/tasks+ directory. +=== Clean and Clobber Tasks + +Through require 'rake/clean' Rake provides +clean+ and +clobber+ +tasks: + ++clean+ :: + Clean up the project by deleting scratch files and backup files. Add files + to the +CLEAN+ FileList to have the +clean+ target handle them. + ++clobber+ :: + Clobber all generated and non-source files in a project. The task depends + on +clean+, so all the +CLEAN+ files will be deleted as well as files in the + +CLOBBER+ FileList. The intent of this task is to return a project to its + pristine, just unpacked state. + +You can add file names or glob patterns to both the +CLEAN+ and +CLOBBER+ +lists. + === Phony Task The phony task can be used as a dependency to allow file-based tasks to use From 3e8bc14e6646a2bdfbfb45ad69e406e3119c8ea1 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 16:00:37 -0700 Subject: [PATCH 163/813] Hide Cloneable from documentation --- lib/rake/cloneable.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rake/cloneable.rb b/lib/rake/cloneable.rb index ac6747123..cd19cd373 100644 --- a/lib/rake/cloneable.rb +++ b/lib/rake/cloneable.rb @@ -1,8 +1,8 @@ module Rake - # ########################################################################## + ## # Mixin for creating easily cloned objects. - # - module Cloneable + + module Cloneable # :nodoc: # The hook that invoked by 'clone' and 'dup' methods. def initialize_copy(source) super From ad56de05c2dd769c3e5e9afb0397104dee58ddd3 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 16:01:55 -0700 Subject: [PATCH 164/813] Hide FTP upload tools from documentation --- lib/rake/contrib/ftptools.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/rake/contrib/ftptools.rb b/lib/rake/contrib/ftptools.rb index 0dd50fdc8..b178523bc 100644 --- a/lib/rake/contrib/ftptools.rb +++ b/lib/rake/contrib/ftptools.rb @@ -9,9 +9,7 @@ module Rake # :nodoc: - #################################################################### - # Note: Not released for general use. - class FtpFile + class FtpFile # :nodoc: all attr_reader :name, :size, :owner, :group, :time def self.date @@ -68,9 +66,9 @@ def determine_time(d1, d2, d3) end end - #################################################################### + ## # Manage the uploading of files to an FTP account. - class FtpUploader + class FtpUploader # :nodoc: # Log uploads to standard output when true. attr_accessor :verbose From 0b553d5702e615cece944498131652fcf7753be9 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 13 Mar 2014 16:08:10 -0700 Subject: [PATCH 165/813] Hide duplication in contrib/publisher from documentation --- lib/rake/contrib/publisher.rb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/rake/contrib/publisher.rb b/lib/rake/contrib/publisher.rb index 8b11edb59..f4ee1abf8 100644 --- a/lib/rake/contrib/publisher.rb +++ b/lib/rake/contrib/publisher.rb @@ -14,8 +14,10 @@ # :startdoc: +# TODO: Move to contrib/sshpublisher +#-- # Manage several publishers as a single entity. -class CompositePublisher +class CompositePublisher # :nodoc: def initialize @publishers = [] end @@ -31,9 +33,11 @@ def upload end end +# TODO: Remove in Rake 11, duplicated +#-- # Publish an entire directory to an existing remote directory using # SSH. -class SshDirPublisher +class SshDirPublisher # :nodoc: all def initialize(host, remote_dir, local_dir) @host = host @remote_dir = remote_dir @@ -45,8 +49,10 @@ def upload end end +# TODO: Remove in Rake 11, duplicated +#-- # Publish an entire directory to a fresh remote directory using SSH. -class SshFreshDirPublisher < SshDirPublisher +class SshFreshDirPublisher < SshDirPublisher # :nodoc: all def upload run %{ssh #{@host} rm -rf #{@remote_dir}} rescue nil run %{ssh #{@host} mkdir #{@remote_dir}} @@ -54,8 +60,10 @@ def upload end end +# TODO: Remove in Rake 11, duplicated +#-- # Publish a list of files to an existing remote directory. -class SshFilePublisher +class SshFilePublisher # :nodoc: all # Create a publisher using the give host information. def initialize(host, remote_dir, local_dir, *files) @host = host From bbdb38cd08ee5bf1c26544a7ec7373769369453c Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 14 Mar 2014 14:27:29 -0700 Subject: [PATCH 166/813] Remove non-0.9.6 entries Part of #218 --- doc/release_notes/rake-0.9.6.rdoc | 63 ------------------------------- 1 file changed, 63 deletions(-) diff --git a/doc/release_notes/rake-0.9.6.rdoc b/doc/release_notes/rake-0.9.6.rdoc index e1c5f88ca..fb247e794 100644 --- a/doc/release_notes/rake-0.9.6.rdoc +++ b/doc/release_notes/rake-0.9.6.rdoc @@ -5,69 +5,6 @@ Rake into the Ruby source tree and fixing tests. == Changes -=== New Features (in 0.9.3) - -* Multitask tasks now use a thread pool. Use -j to limit the number of - available threads. - -* Use -m to turn regular tasks into multitasks (use at your own risk). - -* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to - programatically add rake task libraries. - -* You can specific backtrace suppression patterns (see - --supress-backtrace) - -* Directory tasks can now take prerequisites and actions - -* Use --backtrace to request a full backtrace without the task trace. - -* You can say "--backtrace=stdout" and "--trace=stdout" to route trace - output to standard output rather than standard error. - -* Optional 'phony' target (enable with 'require 'rake/phony'") for - special purpose builds. - -* Task#clear now clears task comments as well as actions and - prerequisites. Task#clear_comment will specifically target comments. - -* The --all option will force -T and -D to consider all the tasks, - with and without descriptions. - -=== Bug Fixes (0.9.3) - -* Semi-colons in windows rakefile paths now work. - -* Improved Control-C support when invoking multiple test suites. - -* egrep method now reads files in text mode (better support for - Windows) - -* Better deprecation line number reporting. - -* The -W option now works with all tasks, whether they have a - description or not. - -* File globs in rake should not be sorted alphabetically, independent - of file system and platform. - -* Numerous internal improvements. - -* Documentation typos and fixes. - -=== Bug Fixes (0.9.4) - -* Exit status with failing tests is not correctly set to non-zero. - -* Simplified syntax for phony task (for older versions of RDoc). - -* Stand alone FileList usage gets glob function (without loading in - extra dependencies) - -=== Bug Fixes (0.9.5) - -* --trace and --backtrace no longer swallow following task names. - === Bug Fixes (0.9.6) * Better trace output when using a multi-threaded Rakefile. From 8894d849aa3ef85efc75b6f14a6c22ce3a08d1ae Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 14 Mar 2014 14:27:53 -0700 Subject: [PATCH 167/813] Remove non-0.9.5 entries Part of #218 --- doc/release_notes/rake-0.9.5.rdoc | 59 ------------------------------- 1 file changed, 59 deletions(-) diff --git a/doc/release_notes/rake-0.9.5.rdoc b/doc/release_notes/rake-0.9.5.rdoc index 88e2d7cf3..40c35ee69 100644 --- a/doc/release_notes/rake-0.9.5.rdoc +++ b/doc/release_notes/rake-0.9.5.rdoc @@ -4,65 +4,6 @@ Rake version 0.9.5 contains a number of bug fixes. == Changes -=== New Features (in 0.9.3) - -* Multitask tasks now use a thread pool. Use -j to limit the number of - available threads. - -* Use -m to turn regular tasks into multitasks (use at your own risk). - -* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to - programatically add rake task libraries. - -* You can specific backtrace suppression patterns (see - --supress-backtrace) - -* Directory tasks can now take prerequisites and actions - -* Use --backtrace to request a full backtrace without the task trace. - -* You can say "--backtrace=stdout" and "--trace=stdout" to route trace - output to standard output rather than standard error. - -* Optional 'phony' target (enable with 'require 'rake/phony'") for - special purpose builds. - -* Task#clear now clears task comments as well as actions and - prerequisites. Task#clear_comment will specifically target comments. - -* The --all option will force -T and -D to consider all the tasks, - with and without descriptions. - -=== Bug Fixes (0.9.3) - -* Semi-colons in windows rakefile paths now work. - -* Improved Control-C support when invoking multiple test suites. - -* egrep method now reads files in text mode (better support for - Windows) - -* Better deprecation line number reporting. - -* The -W option now works with all tasks, whether they have a - description or not. - -* File globs in rake should not be sorted alphabetically, independent - of file system and platform. - -* Numerous internal improvements. - -* Documentation typos and fixes. - -=== Bug Fixes (0.9.4) - -* Exit status with failing tests is not correctly set to non-zero. - -* Simplified syntax for phony task (for older versions of RDoc). - -* Stand alone FileList usage gets glob function (without loading in - extra dependencies) - === Bug Fixes (0.9.5) * --trace and --backtrace no longer swallow following task names. From ddfe16b710cf53adb57a266a60e455e938409556 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 14 Mar 2014 14:28:04 -0700 Subject: [PATCH 168/813] Remove non-0.9.4 entries Part of #218 --- doc/release_notes/rake-0.9.4.rdoc | 50 ------------------------------- 1 file changed, 50 deletions(-) diff --git a/doc/release_notes/rake-0.9.4.rdoc b/doc/release_notes/rake-0.9.4.rdoc index e5d45b46a..099ebc91b 100644 --- a/doc/release_notes/rake-0.9.4.rdoc +++ b/doc/release_notes/rake-0.9.4.rdoc @@ -4,56 +4,6 @@ Rake version 0.9.4 contains a number of bug fixes. == Changes -=== New Features (in 0.9.3) - -* Multitask tasks now use a thread pool. Use -j to limit the number of - available threads. - -* Use -m to turn regular tasks into multitasks (use at your own risk). - -* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to - programatically add rake task libraries. - -* You can specific backtrace suppression patterns (see - --supress-backtrace) - -* Directory tasks can now take prerequisites and actions - -* Use --backtrace to request a full backtrace without the task trace. - -* You can say "--backtrace=stdout" and "--trace=stdout" to route trace - output to standard output rather than standard error. - -* Optional 'phony' target (enable with 'require 'rake/phony'") for - special purpose builds. - -* Task#clear now clears task comments as well as actions and - prerequisites. Task#clear_comment will specifically target comments. - -* The --all option will force -T and -D to consider all the tasks, - with and without descriptions. - -=== Bug Fixes (0.9.3) - -* Semi-colons in windows rakefile paths now work. - -* Improved Control-C support when invoking multiple test suites. - -* egrep method now reads files in text mode (better support for - Windows) - -* Better deprecation line number reporting. - -* The -W option now works with all tasks, whether they have a - description or not. - -* File globs in rake should not be sorted alphabetically, independent - of file system and platform. - -* Numerous internal improvements. - -* Documentation typos and fixes. - === Bug Fixes (0.9.4) * Exit status with failing tests is not correctly set to non-zero. From d18a6de734e4ff8aa113e721ca105d812a75b9ed Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 14 Mar 2014 14:29:53 -0700 Subject: [PATCH 169/813] Fix version for 0.9.2.2 release notes --- doc/release_notes/rake-0.9.2.2.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/release_notes/rake-0.9.2.2.rdoc b/doc/release_notes/rake-0.9.2.2.rdoc index d804aba81..d848f227b 100644 --- a/doc/release_notes/rake-0.9.2.2.rdoc +++ b/doc/release_notes/rake-0.9.2.2.rdoc @@ -1,6 +1,6 @@ -= Rake 0.9.3 Released += Rake 0.9.2.2 Released -Rake version 0.9.3 is mainly bug fixes. +Rake version 0.9.2.2 is mainly bug fixes. == Changes From 2f57bb9571c666799e3bc00f41d2186ac3c42361 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 14 Mar 2014 14:32:03 -0700 Subject: [PATCH 170/813] Remove non-0.8.5 entries Part of #218 --- doc/release_notes/rake-0.8.6.rdoc | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/doc/release_notes/rake-0.8.6.rdoc b/doc/release_notes/rake-0.8.6.rdoc index 476446077..54782ed02 100644 --- a/doc/release_notes/rake-0.8.6.rdoc +++ b/doc/release_notes/rake-0.8.6.rdoc @@ -4,25 +4,7 @@ Rake version 0.8.5 introduced greatly improved support for executing commands on Windows. The "sh" command now has the same semantics on Windows that it has on Unix based platforms. -Rake version 0.8.6 includes minor fixes the the RDoc generation. - -== Changes - -=== New Features / Enhancements in Version 0.8.5 - -* Improved implementation of the Rake system command for Windows. - (patch from James M. Lawrence/quix) - -* Support for Ruby 1.9's improved system command. (patch from James - M. Lawrence/quix) - -* Rake now includes the configured extension when invoking an - executable (Config::CONFIG['EXEEXT]) - -=== Bug Fixes in Version 0.8.5 - -* Environment variable keys are now correctly cased (it matters in - some implementations). +Rake version 0.8.5 includes minor fixes the the RDoc generation. == What is Rake From 30762117bfc6362db225a33321723b4c68913921 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 14 Mar 2014 14:40:35 -0700 Subject: [PATCH 171/813] Fix version in 0.5.4 release notes --- doc/release_notes/rake-0.5.4.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release_notes/rake-0.5.4.rdoc b/doc/release_notes/rake-0.5.4.rdoc index 38dfbdda3..112587fb9 100644 --- a/doc/release_notes/rake-0.5.4.rdoc +++ b/doc/release_notes/rake-0.5.4.rdoc @@ -4,7 +4,7 @@ Time for some minor bug fixes and small enhancements == Changes -Here are the changes for version 0.5.3 ... +Here are the changes for version 0.5.4 ... * Added double quotes to the test runner. This allows the location of the tests (and runner) to be in a directory path that contains From e51fcc5217e1a5d5a707e4d7ba13b77f13da5eca Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 14 Mar 2014 14:40:54 -0700 Subject: [PATCH 172/813] Fix version in 0.5.3 release notes --- doc/release_notes/rake-0.5.3.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release_notes/rake-0.5.3.rdoc b/doc/release_notes/rake-0.5.3.rdoc index be2919f54..451da4a0a 100644 --- a/doc/release_notes/rake-0.5.3.rdoc +++ b/doc/release_notes/rake-0.5.3.rdoc @@ -1,4 +1,4 @@ -= Rake 0.5.0 Released += Rake 0.5.3 Released Although it has only been two weeks since the last release, we have enough updates to the Rake program to make it time for another From f5a2cc2b392afd3bb1c753e56e5898a8b8770fe7 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 14 Mar 2014 14:44:23 -0700 Subject: [PATCH 173/813] Remove non-10.0.2 entries Part of #218 --- doc/release_notes/rake-10.0.1.rdoc | 133 +-------------------------- doc/release_notes/rake-10.0.2.rdoc | 142 +---------------------------- 2 files changed, 4 insertions(+), 271 deletions(-) diff --git a/doc/release_notes/rake-10.0.1.rdoc b/doc/release_notes/rake-10.0.1.rdoc index 75aa926aa..152af25a5 100644 --- a/doc/release_notes/rake-10.0.1.rdoc +++ b/doc/release_notes/rake-10.0.1.rdoc @@ -1,137 +1,8 @@ = Rake 10.0.1 Released - "Jim, when will Rake reach version 1.0?" +== Changes in 10.0.1 -Over the past several years I've been asked that question at -conferences, panels and over twitter. Due to historical reasons (or -maybe just plain laziness) Rake has (incorrectly) been treating the -second digit of the version as the major release number. So in my head -Rake was already at version 9. - -Well, it's time to fix things. This next version of Rake drops old, -crufty, backwards compatibility hacks such as top level constants, DSL -methods defined in Object and numerous other features that are just no -longer desired. It's also time to drop the leading zero from the -version number as well and call this new version of rake what it -really is: Version 10. - -So, welcome to Rake 10.0! - -Rake 10 is actually feature identical to the latest version of Rake 9 -(that would be the version spelled 0.9.3), *except* that Rake 10 drops -all the sundry deprecated features that have accumulated over the years. - -If your Rakefile is up to date and current with all the new features -of Rake 10, you are ready to go. If your Rakefile still uses a few -deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same -feature set. Just be aware that future features will be in Rake 10 -family line. - -== Changes in 10.0 - -As mentioned above, there are no new features in Rake 10. However, -there are a number of features missing: - -* Classic namespaces are now gone. Rake is no longer able to reflect - the options settings in the global variables ($rakefile, $show_tasks, - $show_prereqs, $trace, $dryrun and $silent). The - --classic-namespace option is no longer supported. - -* Global constants are no longer supported. This includes - Task, FileTask, FileCreationTask and - RakeApp). The constant missing hook to warn about using - global rake constants has been removed. - -* The Rake DSL methods (task, file, directory, etc) are in their own - module (Rake::DSL). The stub versions of these methods (that printed - warnings) in Object have been removed. However, the DSL methods are - added to the top-level main object. Since main is - not in the inheritance tree, the presence of the DSL methods in main - should be low impact on other libraries. - - If you want to use the Rake DSL commands from your own code, just - include Rake::DSL into your own classes and modules. - -* The deprecated syntax for task arguments (the one using - :needs) has been removed. - -* The --reduce-compat flag has been removed (it's not needed - anymore). - -* The deprecated rake/sys.rb library has been removed. - -* The deprecated rake/rdoctask.rb library has been removed. - RDoc supplies its own rake task now. - -* The deprecated rake/gempackagetask.rb library has been - removed. Gem supplies its own package task now. - -There is one small behavioral change: - -* Non-file tasks now always report the current time as their time - stamp. This is different from the previous behavior where non-file - tasks reported current time only if there were no prerequisites, and - the max prerequisite timestamp otherwise. This lead to inconsistent - and surprising behavior when adding prerequisites to tasks that in - turn were prequisites to file tasks. The new behavior is more - consistent and predictable. - -== Changes (from 0.9.3 & 0.9.4) - -Since Rake 10 includes the changes from the last version of Rake 9, -we'll repeat the changes for version 0.9.3 here. - -=== New Features (in 0.9.3) - -* Multitask tasks now use a thread pool. Use -j to limit the number of - available threads. - -* Use -m to turn regular tasks into multitasks (use at your own risk). - -* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to - programatically add rake task libraries. - -* You can specific backtrace suppression patterns (see - --supress-backtrace) - -* Directory tasks can now take prerequisites and actions - -* Use --backtrace to request a full backtrace without the task trace. - -* You can say "--backtrace=stdout" and "--trace=stdout" to route trace - output to standard output rather than standard error. - -* Optional 'phony' target (enable with 'require 'rake/phony'") for - special purpose builds. - -* Task#clear now clears task comments as well as actions and - prerequisites. Task#clear_comment will specifically target comments. - -* The --all option will force -T and -D to consider all the tasks, - with and without descriptions. - -=== Bug Fixes (in 0.9.3) - -* Semi-colons in windows rakefile paths now work. - -* Improved Control-C support when invoking multiple test suites. - -* egrep method now reads files in text mode (better support for - Windows) - -* Better deprecation line number reporting. - -* The -W option now works with all tasks, whether they have a - description or not. - -* File globs in rake should not be sorted alphabetically, independent - of file system and platform. - -* Numerous internal improvements. - -* Documentation typos and fixes. - -=== Bug Fixes (in 0.9.4) +=== Bug Fixes * Exit status with failing tests is not correctly set to non-zero. diff --git a/doc/release_notes/rake-10.0.2.rdoc b/doc/release_notes/rake-10.0.2.rdoc index b9ef26787..bb6bda874 100644 --- a/doc/release_notes/rake-10.0.2.rdoc +++ b/doc/release_notes/rake-10.0.2.rdoc @@ -1,146 +1,8 @@ = Rake 10.0.2 Released - "Jim, when will Rake reach version 1.0?" +== Changes in Rake 10.0.2 -Over the past several years I've been asked that question at -conferences, panels and over twitter. Due to historical reasons (or -maybe just plain laziness) Rake has (incorrectly) been treating the -second digit of the version as the major release number. So in my head -Rake was already at version 9. - -Well, it's time to fix things. This next version of Rake drops old, -crufty, backwards compatibility hacks such as top level constants, DSL -methods defined in Object and numerous other features that are just no -longer desired. It's also time to drop the leading zero from the -version number as well and call this new version of rake what it -really is: Version 10. - -So, welcome to Rake 10.0! - -Rake 10 is actually feature identical to the latest version of Rake 9 -(that would be the version spelled 0.9.3), *except* that Rake 10 drops -all the sundry deprecated features that have accumulated over the years. - -If your Rakefile is up to date and current with all the new features -of Rake 10, you are ready to go. If your Rakefile still uses a few -deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same -feature set. Just be aware that future features will be in Rake 10 -family line. - -== Changes in Version 10 - -As mentioned above, there are no new features in Rake 10. However, -there are a number of features missing: - -* Classic namespaces are now gone. Rake is no longer able to reflect - the options settings in the global variables ($rakefile, $show_tasks, - $show_prereqs, $trace, $dryrun and $silent). The - --classic-namespace option is no longer supported. - -* Global constants are no longer supported. This includes - Task, FileTask, FileCreationTask and - RakeApp). The constant missing hook to warn about using - global rake constants has been removed. - -* The Rake DSL methods (task, file, directory, etc) are in their own - module (Rake::DSL). The stub versions of these methods (that printed - warnings) in Object have been removed. However, the DSL methods are - added to the top-level main object. Since main is - not in the inheritance tree, the presence of the DSL methods in main - should be low impact on other libraries. - - If you want to use the Rake DSL commands from your own code, just - include Rake::DSL into your own classes and modules. - -* The deprecated syntax for task arguments (the one using - :needs) has been removed. - -* The --reduce-compat flag has been removed (it's not needed - anymore). - -* The deprecated rake/sys.rb library has been removed. - -* The deprecated rake/rdoctask.rb library has been removed. - RDoc supplies its own rake task now. - -* The deprecated rake/gempackagetask.rb library has been - removed. Gem supplies its own package task now. - -There is one small behavioral change: - -* Non-file tasks now always report the current time as their time - stamp. This is different from the previous behavior where non-file - tasks reported current time only if there were no prerequisites, and - the max prerequisite timestamp otherwise. This lead to inconsistent - and surprising behavior when adding prerequisites to tasks that in - turn were prequisites to file tasks. The new behavior is more - consistent and predictable. - -== Changes (from 0.9.3, 0.9.4, 0.9.5) - -Since Rake 10 includes the changes from the last version of Rake 9, -we'll repeat the changes for versions 0.9.3 through 0.9.5 here. - -=== New Features (in 0.9.3) - -* Multitask tasks now use a thread pool. Use -j to limit the number of - available threads. - -* Use -m to turn regular tasks into multitasks (use at your own risk). - -* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to - programatically add rake task libraries. - -* You can specific backtrace suppression patterns (see - --supress-backtrace) - -* Directory tasks can now take prerequisites and actions - -* Use --backtrace to request a full backtrace without the task trace. - -* You can say "--backtrace=stdout" and "--trace=stdout" to route trace - output to standard output rather than standard error. - -* Optional 'phony' target (enable with 'require 'rake/phony'") for - special purpose builds. - -* Task#clear now clears task comments as well as actions and - prerequisites. Task#clear_comment will specifically target comments. - -* The --all option will force -T and -D to consider all the tasks, - with and without descriptions. - -=== Bug Fixes (in 0.9.3) - -* Semi-colons in windows rakefile paths now work. - -* Improved Control-C support when invoking multiple test suites. - -* egrep method now reads files in text mode (better support for - Windows) - -* Better deprecation line number reporting. - -* The -W option now works with all tasks, whether they have a - description or not. - -* File globs in rake should not be sorted alphabetically, independent - of file system and platform. - -* Numerous internal improvements. - -* Documentation typos and fixes. - -=== Bug Fixes (in 0.9.4) - -* Exit status with failing tests is not correctly set to non-zero. - -* Simplified syntax for phony task (for older versions of RDoc). - -* Stand alone FileList usage gets glob function (without loading in - extra dependencies) - -=== Bug Fixes (in 0.9.5) +=== Bug Fixes * --trace and --backtrace no longer swallow following task names. From 6047e61434fc2477ad8b19264a149f6db14f035f Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 14 Mar 2014 14:48:25 -0700 Subject: [PATCH 174/813] Improve consistency of headings --- doc/release_notes/rake-10.1.0.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/release_notes/rake-10.1.0.rdoc b/doc/release_notes/rake-10.1.0.rdoc index 3c3d78a4f..a9f4bb396 100644 --- a/doc/release_notes/rake-10.1.0.rdoc +++ b/doc/release_notes/rake-10.1.0.rdoc @@ -2,7 +2,7 @@ == Changes in Version 10.1 -Here are new features in this version of Rake: +=== New Features * Add support for variable length task argument lists. If more actual arguments are supplied than named arguments, then the extra @@ -12,7 +12,7 @@ Here are new features in this version of Rake: "rake" was hardcoded, now rake-based applications can display their own names). -=== Bug Fixes (in 10.1) +=== Bug Fixes Bug fixes include: From 87731bf7a6672eca1b4c61dacfdaf5c34d789c86 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 14 Mar 2014 15:15:51 -0700 Subject: [PATCH 175/813] Merge CHANGES.rdoc and History.rdoc --- History.rdoc | 528 ++++++++++++++++++++++++++++++++++++++++++++++ doc/CHANGES.rdoc | 532 ----------------------------------------------- 2 files changed, 528 insertions(+), 532 deletions(-) delete mode 100644 doc/CHANGES.rdoc diff --git a/History.rdoc b/History.rdoc index 6933c1c1b..b13045afc 100644 --- a/History.rdoc +++ b/History.rdoc @@ -30,3 +30,531 @@ Bug fixes: * Fixed bug in can_detect_signals? in test. Patch from #243 by Alexey Borzenkov. +=== 10.1.1 and earlier + +Additions to the old CHANGES file were not made consistently so some +versions are missing from this file. These changes are usually described in +the individual release notes files. + +=== 0.9.3 + +* The rake test loader now removes arguments it has processed. Issue #51 +* Rake::TaskArguments now responds to #values_at +* RakeFileUtils.verbose_flag = nil silences output the same as 0.8.7 +* Rake tests are now directory-independent +* Rake tests are no longer require flexmock +* Commands constant is no longer polluting top level namespace. +* Show only the interesting portion of the backtrace by default (James M. Lawrence). +* Added --reduce-compat optiont to remove backward compatible DSL hacks (James M. Lawrence). +* lib/rake/file_list.rb (Rake::FileList#egrep): there is no need to + open files in binary mode. (NAKAMURA Usaku) + +=== 0.9.2 + +* Unknown + +=== 0.9.1 + +* Added deprecation warnings to the Rake DSL methods. + +=== 0.9.0 + +* *Incompatible* *change*: Rake DSL commands ('task', 'file', etc.) are + no longer private methods in Object. If you need to call 'task :xzy' inside + your class, include Rake::DSL into the class. The DSL is still available at + the top level scope (via the top level object which extends Rake::DSL). + +* Rake now warns when the deprecated :needs syntax used. + +* Rake history is now UTF-8 encoded. + +* Rake now uses case-insensitive comparisons to find the Rakefile on Windows. + Based on patch by Roger Pack. + +* Rake now requires (instead of loads) files in the test task. Patch by Cezary + Baginski. + +* Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow. + +* Rake now prints the Rakefile directory only when it's different from the + current directory. Patch by Alex Chaffee. + +* Improved rakefile_location discovery on Windows. Patch by James Tucker. + +* Rake now recognizes "Windows Server" as a windows system. Patch by Matthias + Lüdtke + +* Rake::RDocTask is deprecated. Use RDoc::Task from RDoc 2.4.2+ (require + 'rdoc/task') + +* Rake::GemPackageTask is deprecated. Use Gem::PackageTask (require + 'rubygems/package_task') + +* Rake now outputs various messages to $stderr instead of $stdout. + +* Rake no longer emits warnings for Config. Patch by Santiago Pastorino. + +* Split rake.rb into individual files. + +* Support for the --where (-W) flag for showing where a task is defined. + +* Fixed quoting in test task. + (http://onestepback.org/redmine/issues/show/44, + http://www.pivotaltracker.com/story/show/1223138) + +* Fixed the silent option parsing problem. + (http://onestepback.org/redmine/issues/show/47) + +* Fixed :verbose=>false flag on sh and ruby commands. + +* Rake command line options may be given by default in a RAKEOPT + environment variable. + +* Errors in Rake will now display the task invocation chain in effect + at the time of the error. + +* Accepted change by warnickr to not expand test patterns in shell + (allowing more files in the test suite). + +* Fixed that file tasks did not perform prereq lookups in scope + (Redmine #57). + +=== 0.8.7 + +* Fixed EXEEXT for JRuby on windows. + +=== 0.8.6 + +* Minor fixes to the RDoc generation (removed dependency on darkfish + and removed inline source option). + +* Now allow # comments to comment a task definition. + +=== 0.8.5 + +* Better support for the system command on Windows. + +=== 0.8.4 + +* Preserve case when locating rakefiles (patch from James + M. Lawrence/quix) + +* Better support for windows paths in the test task (patch from Simon + Chiang/bahuvrihi) + +* Windows system dir search order is now: HOME, HOMEDRIVE + HOMEPATH, + APPDATA, USERPROFILE (patch from Luis Lavena) + +* MingGW is now recognized as a windows platform. (patch from Luis + Lavena) + +* Numerous fixes to the windows test suite (patch from Luis Lavena). + +* Improved Rakefile case insensitivity testing (patch from Luis + Lavena). + +* Fixed stray ARGV option problem that was interfering with + Test::Unit::Runner. + +* Fixed default verbose mode (was accidently changed to false). + +* Removed reference to manage_gem to fix the warning produced by the + gem package task. + +=== 0.8.3 + +* Enhanced the system directory detection in windows. We now check + HOMEDRIVE/HOMEPATH and USERPROFILE if APPDATA isn't found. (Patch + supplied by James Tucker). Rake no long aborts if it can't find the + directory. + +* Added fix to handle ruby installations in directories with spaces in + their name. + +=== 0.8.2 + +* Fixed bug in package task so that it will include the subdir + directory in the package for testing. (Bug found by Adam Majer) + +* Added ENV var to rakefile to prevent OS X from including extended + attribute junk in a tar file. (Bug found by Adam Majer) + +* Fixed filename dependency order bug in test_inspect_pending and + test_to_s_pending. (Bug found by Adam Majer) + +* Fixed check for file utils options to make them immune to the + symbol/string differences. (Patch supplied by Edwin Pratomo) + +* Fixed bug with rules involving multiple source (Patch supplied by + Emanuel Indermühle) + +* Switched from getoptlong to optparse (patches supplied by Edwin + Pratomo) + +* The -T option will now attempt to dynamically sense the size of the + terminal. RAKE_COLUMNS will override any dynamic sensing. + +* FileList#clone and FileList#dup have better sematics w.r.t. taint + and freeze. + +* Added ability clear prerequisites, and/or actions from an existing + task. + +* Added the ability to reenable a task to be invoked a second time. + +* Changed RDoc test task to have no default template. This makes it + easier for the tempate to pick up the template from the environment. + +* Changed from using Mutex to Monitor. Evidently Mutex causes thread + join errors when Ruby is compiled with -disable-pthreads. (Patch + supplied by Ittay Dror) + +* Fixed bug in makefile parser that had problems with extra spaces in + file task names. (Patch supplied by Ittay Dror) + +* Added a performance patch for reading large makefile dependency + files. (Patch supplied by Ittay Dror) + +* Default values for task arguments can easily be specified with the + :with_defaults method. (Idea for default argument merging supplied + by (Adam Q. Salter) + +* The -T output will only self-truncate if the output is a tty. + However, if RAKE_COLUMNS is explicitly set, it will be honored in + any case. (Patch provided by Gavin Stark). + +* Numerous fixes for running under windows. A big thanks to Bheeshmar + Redheendran for spending a good part of the afternoon at the + Lonestar Ruby Conference to help me work out these issues. + +=== 0.8.1 + +* Removed requires on parsedate.rb (in Ftptools) +* Removed ftools from rake.rb. Made it options in sys.rb + +=== 0.8.0 + +* Added task parameters (e.g. "rake build[version7]") +* Made task parameters passable to prerequisites. +* Comments are limited to 80 columns or so (suggested by Jamis Buck). +* Added -D to display full comments (suggested by Jamis Buck). +* The rake program will set the status value used in any explicit + exit(n) calls. (patch provided by Stephen Touset) +* Fixed error in functional tests that were not including session (and + silently skipping the functionl tests. +* Removed --usage and make -h the same as -H. +* Make a prettier inspect for tasks. + +=== 0.7.3 + +* Added existing and existing! methods to FileList +* FileLists now claim to be Arrays (via is_a?) to get better support + from the FileUtil module. +* Added init and top_level for custom rake applications. + +=== 0.7.2 + +* Error messages are now send to stderr rather than stdout (from + Payton Quackenbush). +* Better error handling on invalid command line arguments (from Payton + Quackenbush). +* Added rcov task and updated unit testing for better code coverage. +* Fixed some bugs where the application object was going to the global + appliation instead of using its own data. +* Added square and curly bracket patterns to FileList#include (Tilman + Sauerbeck). +* Added plain filename support to rule dependents (suggested by Nobu + Nakada). +* Added pathmap support to rule dependents. +* Added a 'tasks' method to a namespace to get a list of tasks + associated with the namespace. +* Fixed the method name leak from FileUtils (bug found by Glenn + Vanderburg). +* Added rake_extension to handle detection of extension collisions. +* Added test for noop, bad_option and verbose flags to sh command. +* Removed dependency on internal fu_xxx functions from FileUtils. +* Added a 'shame' task to the Rakefile. +* Added tar_command and zip_command options to the Package task. +* Added a description to the gem task in GemPackageTask. +* Fixed a bug when rules have multiple prerequisites (patch by Joel + VanderWerf) +* Added a protected 'require "rubygems"' to test/test_application to + unbreak cruisecontrol.rb. +* Added the handful of RakeFileUtils to the private method as well. +* Added block based exclusion. +* The clean task will no longer delete 'core' if it is a directory. +* Removed rake_dup. Now we just simply rescue a bad dup. +* Refactored the FileList reject logic to remove duplication. +* Removed if __FILE__ at the end of the rake.rb file. + +=== 0.7.1 + +* Added optional filter parameter to the --tasks command line option. +* Added flatten to allow rule transform procs to return lists of + prereqs (Joel VanderWerf provided patch). +* Added pathmap to String and FileList. +* The -r option will now load .rake files (but a straight require + doesn't yet). NOTE: This is experimental ... it may be + discontinued. +* The -f option without a value will disable the search for a + Rakefile. The assumption is that the -r files are adequate. +* Fixed the safe_ln function to fall back to cp in more error + scenarios. + +=== 0.7.0 + +* Added Rake.original_dir to return the original starting directory of + the rake application. +* Added safe_ln support for openAFS (from Ludvig Omholt). +* Added --trace reminder on short exception messages (David Heinemeier + Hansson suggestion). +* Added multitask declaration that executes prerequisites in + parallel. (Doug Young providied an initial implementation). +* Fixed missing_const hack to be compatible with Rails. (Jamis Buck + supplied test case). +* Made the RDoc task default to internal (in-process) RDoc formatting. + The old behavior is still available by setting the +external+ flag + to true. +* Rakefiles are now loaded with the expanded path to prevent + accidental polution from the Ruby load path. +* The +namespace+ command now returns a NameSpace object that can be + used to lookup tasks defined in that namespace. This allows for + better anonymous namespace behavior. +* Task objects my now be used in prerequisite lists directly. + +=== 0.6.1 + +* Rebuilt 0.6.0 gem without signing. + +=== 0.6.0 + +* Fixed file creation bug in the unit tests (caused infinite loop on + windows). +* Fixed bug where session based functional tests were run under + windows. +* Fixed bug in directory tasks so that updating a directory will not + retrigger file tasks depending on the directory (see + FileCreationTask and EarlyTime). +* Added egrep to FileList +* ruby command now runs same ruby version as rake. +* Added investigation to task object. (suggested by Martin Fowler) +* Added ruby_opts to the test task to allow arbitrary ruby options to + be passed to the test script. (Greg Fast) +* Fixed the test loader to ignore options. (Greg Fast) +* Moved Task, FileTask, FileCreationTask and RakeApp into the Rake + module namespace. Old style namespace behavior can be invoked via + the --classic-namespace option. (requested by Kelly Felkins). +* GemTask is now sensitive to the gem platform (Masao Mutoh). +* A non-existing file prerequisite will no longer cause an exception + (Philipp Neubeck). +* Multiple prerequisites on Rake rules now allowed (initial patch + supplied by Stuart Jansen). + +=== 0.5.4 + +* Added double quotes to the test runner. +* Added .svn to default ignore list. +* Updated FileList#include to support nested arrays and filelists. + +=== 0.5.3 + +* Added support for importing Rakefile and other dependencies. +* Fixed bug so that now rules can chain off of existing tasks as well + as existing files. +* Fixed verbose flag bug in the testing task. Shortened some failure + messages. +* Make FileUtils methods private at the top level module to avoid + accidental method leaking into other objects. +* Added test loader option to test task. "testrb" is no longer the + default test loader. It is now eating syntax errors that should + halt the unit tests. +* Revamped FileList so that it works more like and array (addressed + flatten bug). Added many tests around file list. +* Added +ext+ method to both String and FileList. + +=== 0.5.0 + +* Fixed documentation that was lacking the Rake module name (Tilman + Sauerbeck). +* Added tar.gz and tar.bz2 support to package task (Tilman Sauerbeck). +* Recursive rules are now supported (Tilman Sauerbeck). +* Added warning option for the Test Task (requested by Eric Hodel). +* The jamis rdoc template is only used if it exists. +* Added fix for Ruby 1.8.2 test/unit and rails problem. +* Added contributed rake man file (Jani Monoses). +* Added Brian Candler's fix for problems in --trace and --dry-run + mode. + +=== 0.4.15 + +* Fixed a bug that prevented the TESTOPTS flag from working with the + revised for 1.8.2 test task. +* Updated the docs on --trace to indicate that it also enables a full + backtrace on errors. + +=== 0.4.14 + +* Modified the TestTask to workaround the Ruby 1.8.2 change in + autoexecuting unit tests. + +=== 0.4.13 + +* Fixed the dry-run flag so it is operating again. +* Multiple arguments to sh and ruby commands will not be interpreted + by the shell (patch provided by Jonathan Paisley). + +=== 0.4.12 + +* Added --silent (-s) to suppress the (in directory) rake message. + +=== 0.4.11 + +* Changed the "don't know how to rake" message (finally) +* Changes references to a literal "Rakefile" to reference the global + variable $rakefile (which contains the actual name of the rakefile). + +=== 0.4.10 + +* Added block support to the "sh" command, allowing users to take + special actions on the result of the system call. E.g. + + sh "shell_command" do |ok, res| + puts "Program returned #{res.exitstatus}" if ! ok + end + +=== 0.4.9 + +* Switched to Jamis Buck's RDoc template. +* Removed autorequire from Rake's gem spec. This prevents the Rake + libraries from loading while using rails. + +=== 0.4.8 + +* Added support for .rb versions of Rakefile. +* Removed \\\n's from test task. +* Fixed Ruby 1.9 compatibility issue with FileList. + +=== 0.4.7 + +* Fixed problem in FileList that caused Ruby 1.9 to go into infinite + recursion. Since to_a was removed from Object, it does not need to + added back into the list of methods to rewrite in FileList. (Thanks + to Kent Sibilev for pointing this out). + +=== 0.4.6 +* Removed test version of ln in FileUtils that prevented safe_ln from + using ln. + +=== 0.4.5 +* Upgraded comments in TestTask. +* FileList to_s and inspect now automatically resolve pending changes. +* FileList#exclude properly returns the FileList. + +=== 0.4.4 +* Fixed initialization problem with @comment. +* Now using multi -r technique in TestTask. Switch Rakefile back to + using the built-in test task macros because the rake runtime is no + longer needed. +* Added 'TEST=filename' and 'TESTOPTS=options' to the Test Task + macros. +* Allow a +test_files+ attribute in test tasks. This allows more + flexibility in specifying test files. + +=== 0.4.3 +* Fixed Comment leakage. + +=== 0.4.2 +* Added safe_ln that falls back to a copy if a file link is not supported. +* Package builder now uses safe_ln. + +=== 0.4.1 +* Task comments are now additive, combined with "/". +* Works with (soon to be released) rubygems 0.6.2 (or 0.7.0) + +=== 0.4.0 +* FileList now uses deferred loading. The file system is not searched + until the first call that needs the file names. +* VAR=VALUE options are now accepted on the command line and are + treated like environment variables. The values may be tested in a + Rakefile by referencing ENV['VAR']. +* File.mtime is now used (instead of File.new().mtime). + +=== 0.3.2.x + +* Removed some hidden dependencies on rubygems. Tests now will test + gems only if they are installed. +* Removed Sys from some example files. I believe that is that last + reference to Sys outside of the contrib area. +* Updated all copyright notices to include 2004. + +=== 0.3.2 + +* GEM Installation now works with the application stub. + +=== 0.3.1 + +* FileLists now automatically ignore CVS, .bak, ! +* GEM Installation now works. + +=== 0.3.0 + +Promoted 0.2.10. + +=== 0.2.10 +General + +* Added title to Rake's rdocs +* Contrib packages are no longer included in the documentation. + +RDoc Issues + +* Removed default for the '--main' option +* Fixed rendering of the rdoc options +* Fixed clean/clobber confusion with rerdoc +* 'title' attribute added + +Package Task Library Issues + +* Version (or explicit :noversion) is required. +* +package_file+ attribute is now writable + +FileList Issues + +* Dropped bang version of exclude. Now using ant-like include/exclude semantics. +* Enabled the "yield self" idiom in FileList#initialize. + +=== 0.2.9 + +This version contains numerous changes as the RubyConf.new(2003) +presentation was being prepared. The changes include: + +* The monolithic rubyapp task library is in the process of being + dropped in favor of lighter weight task libraries. + +=== 0.2.7 + +* Added "desc" for task descriptions. +* -T will now display tasks with descriptions. +* -P will display tasks and prerequisites. +* Dropped the Sys module in favor of the 1.8.x FileUtils module. Sys + is still supported in the contrib area. + +=== 0.2.6 + +* Moved to RubyForge + +=== 0.2.5 + +* Switched to standard ruby app builder. +* Added no_match option to file matcher. + +=== 0.2.4 + +* Fixed indir, which neglected to actually change directories. + +=== 0.2.3 + +* Added rake module for a help target +* Added 'for_files' to Sys +* Added a $rakefile constant +* Added test for selecting proper rule with multiple targets. diff --git a/doc/CHANGES.rdoc b/doc/CHANGES.rdoc deleted file mode 100644 index 4b42f02c0..000000000 --- a/doc/CHANGES.rdoc +++ /dev/null @@ -1,532 +0,0 @@ -This changelog is out of date and has been replaced by History.rdoc. - -= Rake Changelog - -NOTE: Refer to the individual release documents (in the - doc/release_notes directory) for changes after in version 0.9.4 - and later. - -== Master (for 0.9.3) - -* The rake test loader now removes arguments it has processed. Issue #51 -* Rake::TaskArguments now responds to #values_at -* RakeFileUtils.verbose_flag = nil silences output the same as 0.8.7 -* Rake tests are now directory-independent -* Rake tests are no longer require flexmock -* Commands constant is no longer polluting top level namespace. -* Show only the interesting portion of the backtrace by default (James M. Lawrence). -* Added --reduce-compat optiont to remove backward compatible DSL hacks (James M. Lawrence). -* lib/rake/file_list.rb (Rake::FileList#egrep): there is no need to - open files in binary mode. (NAKAMURA Usaku) - -== Version 0.9.2 - -* Unknown - -== Version 0.9.1 - -* Added deprecation warnings to the Rake DSL methods. - -== Version 0.9.0 - -* *Incompatible* *change*: Rake DSL commands ('task', 'file', etc.) are - no longer private methods in Object. If you need to call 'task :xzy' inside - your class, include Rake::DSL into the class. The DSL is still available at - the top level scope (via the top level object which extends Rake::DSL). - -* Rake now warns when the deprecated :needs syntax used. - -* Rake history is now UTF-8 encoded. - -* Rake now uses case-insensitive comparisons to find the Rakefile on Windows. - Based on patch by Roger Pack. - -* Rake now requires (instead of loads) files in the test task. Patch by Cezary - Baginski. - -* Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow. - -* Rake now prints the Rakefile directory only when it's different from the - current directory. Patch by Alex Chaffee. - -* Improved rakefile_location discovery on Windows. Patch by James Tucker. - -* Rake now recognizes "Windows Server" as a windows system. Patch by Matthias - Lüdtke - -* Rake::RDocTask is deprecated. Use RDoc::Task from RDoc 2.4.2+ (require - 'rdoc/task') - -* Rake::GemPackageTask is deprecated. Use Gem::PackageTask (require - 'rubygems/package_task') - -* Rake now outputs various messages to $stderr instead of $stdout. - -* Rake no longer emits warnings for Config. Patch by Santiago Pastorino. - -* Split rake.rb into individual files. - -* Support for the --where (-W) flag for showing where a task is defined. - -* Fixed quoting in test task. - (http://onestepback.org/redmine/issues/show/44, - http://www.pivotaltracker.com/story/show/1223138) - -* Fixed the silent option parsing problem. - (http://onestepback.org/redmine/issues/show/47) - -* Fixed :verbose=>false flag on sh and ruby commands. - -* Rake command line options may be given by default in a RAKEOPT - environment variable. - -* Errors in Rake will now display the task invocation chain in effect - at the time of the error. - -* Accepted change by warnickr to not expand test patterns in shell - (allowing more files in the test suite). - -* Fixed that file tasks did not perform prereq lookups in scope - (Redmine #57). - -== Version 0.8.7 - -* Fixed EXEEXT for JRuby on windows. - -== Version 0.8.6 - -* Minor fixes to the RDoc generation (removed dependency on darkfish - and removed inline source option). - -== PreVersion 0.8.6 - -* Now allow # comments to comment a task definition. - -== Version 0.8.5 - -* Better support for the system command on Windows. - -== Version 0.8.4 - -* Preserve case when locating rakefiles (patch from James - M. Lawrence/quix) - -* Better support for windows paths in the test task (patch from Simon - Chiang/bahuvrihi) - -* Windows system dir search order is now: HOME, HOMEDRIVE + HOMEPATH, - APPDATA, USERPROFILE (patch from Luis Lavena) - -* MingGW is now recognized as a windows platform. (patch from Luis - Lavena) - -* Numerous fixes to the windows test suite (patch from Luis Lavena). - -* Improved Rakefile case insensitivity testing (patch from Luis - Lavena). - -* Fixed stray ARGV option problem that was interfering with - Test::Unit::Runner. - -* Fixed default verbose mode (was accidently changed to false). - -* Removed reference to manage_gem to fix the warning produced by the - gem package task. - -== Version 0.8.3 - -* Enhanced the system directory detection in windows. We now check - HOMEDRIVE/HOMEPATH and USERPROFILE if APPDATA isn't found. (Patch - supplied by James Tucker). Rake no long aborts if it can't find the - directory. - -* Added fix to handle ruby installations in directories with spaces in - their name. - -== Version 0.8.2 - -* Fixed bug in package task so that it will include the subdir - directory in the package for testing. (Bug found by Adam Majer) - -* Added ENV var to rakefile to prevent OS X from including extended - attribute junk in a tar file. (Bug found by Adam Majer) - -* Fixed filename dependency order bug in test_inspect_pending and - test_to_s_pending. (Bug found by Adam Majer) - -* Fixed check for file utils options to make them immune to the - symbol/string differences. (Patch supplied by Edwin Pratomo) - -* Fixed bug with rules involving multiple source (Patch supplied by - Emanuel Indermühle) - -* Switched from getoptlong to optparse (patches supplied by Edwin - Pratomo) - -* The -T option will now attempt to dynamically sense the size of the - terminal. RAKE_COLUMNS will override any dynamic sensing. - -* FileList#clone and FileList#dup have better sematics w.r.t. taint - and freeze. - -* Added ability clear prerequisites, and/or actions from an existing - task. - -* Added the ability to reenable a task to be invoked a second time. - -* Changed RDoc test task to have no default template. This makes it - easier for the tempate to pick up the template from the environment. - -* Changed from using Mutex to Monitor. Evidently Mutex causes thread - join errors when Ruby is compiled with -disable-pthreads. (Patch - supplied by Ittay Dror) - -* Fixed bug in makefile parser that had problems with extra spaces in - file task names. (Patch supplied by Ittay Dror) - -* Added a performance patch for reading large makefile dependency - files. (Patch supplied by Ittay Dror) - -* Default values for task arguments can easily be specified with the - :with_defaults method. (Idea for default argument merging supplied - by (Adam Q. Salter) - -* The -T output will only self-truncate if the output is a tty. - However, if RAKE_COLUMNS is explicitly set, it will be honored in - any case. (Patch provided by Gavin Stark). - -* Numerous fixes for running under windows. A big thanks to Bheeshmar - Redheendran for spending a good part of the afternoon at the - Lonestar Ruby Conference to help me work out these issues. - -== Version 0.8.1 - -* Removed requires on parsedate.rb (in Ftptools) -* Removed ftools from rake.rb. Made it options in sys.rb - -== Version 0.8.0 - -* Added task parameters (e.g. "rake build[version7]") -* Made task parameters passable to prerequisites. -* Comments are limited to 80 columns or so (suggested by Jamis Buck). -* Added -D to display full comments (suggested by Jamis Buck). -* The rake program will set the status value used in any explicit - exit(n) calls. (patch provided by Stephen Touset) -* Fixed error in functional tests that were not including session (and - silently skipping the functionl tests. -* Removed --usage and make -h the same as -H. -* Make a prettier inspect for tasks. - -== Version 0.7.3 - -* Added existing and existing! methods to FileList -* FileLists now claim to be Arrays (via is_a?) to get better support - from the FileUtil module. -* Added init and top_level for custom rake applications. - -== Version 0.7.2 - -* Error messages are now send to stderr rather than stdout (from - Payton Quackenbush). -* Better error handling on invalid command line arguments (from Payton - Quackenbush). -* Added rcov task and updated unit testing for better code coverage. -* Fixed some bugs where the application object was going to the global - appliation instead of using its own data. -* Added square and curly bracket patterns to FileList#include (Tilman - Sauerbeck). -* Added plain filename support to rule dependents (suggested by Nobu - Nakada). -* Added pathmap support to rule dependents. -* Added a 'tasks' method to a namespace to get a list of tasks - associated with the namespace. -* Fixed the method name leak from FileUtils (bug found by Glenn - Vanderburg). -* Added rake_extension to handle detection of extension collisions. -* Added test for noop, bad_option and verbose flags to sh command. -* Removed dependency on internal fu_xxx functions from FileUtils. -* Added a 'shame' task to the Rakefile. -* Added tar_command and zip_command options to the Package task. -* Added a description to the gem task in GemPackageTask. -* Fixed a bug when rules have multiple prerequisites (patch by Joel - VanderWerf) -* Added a protected 'require "rubygems"' to test/test_application to - unbreak cruisecontrol.rb. -* Added the handful of RakeFileUtils to the private method as well. -* Added block based exclusion. -* The clean task will no longer delete 'core' if it is a directory. -* Removed rake_dup. Now we just simply rescue a bad dup. -* Refactored the FileList reject logic to remove duplication. -* Removed if __FILE__ at the end of the rake.rb file. - -== Version 0.7.1 - -* Added optional filter parameter to the --tasks command line option. -* Added flatten to allow rule transform procs to return lists of - prereqs (Joel VanderWerf provided patch). -* Added pathmap to String and FileList. -* The -r option will now load .rake files (but a straight require - doesn't yet). NOTE: This is experimental ... it may be - discontinued. -* The -f option without a value will disable the search for a - Rakefile. The assumption is that the -r files are adequate. -* Fixed the safe_ln function to fall back to cp in more error - scenarios. - -== Version 0.7.0 - -* Added Rake.original_dir to return the original starting directory of - the rake application. -* Added safe_ln support for openAFS (from Ludvig Omholt). -* Added --trace reminder on short exception messages (David Heinemeier - Hansson suggestion). -* Added multitask declaration that executes prerequisites in - parallel. (Doug Young providied an initial implementation). -* Fixed missing_const hack to be compatible with Rails. (Jamis Buck - supplied test case). -* Made the RDoc task default to internal (in-process) RDoc formatting. - The old behavior is still available by setting the +external+ flag - to true. -* Rakefiles are now loaded with the expanded path to prevent - accidental polution from the Ruby load path. -* The +namespace+ command now returns a NameSpace object that can be - used to lookup tasks defined in that namespace. This allows for - better anonymous namespace behavior. -* Task objects my now be used in prerequisite lists directly. - -== Version 0.6.1 - -* Rebuilt 0.6.0 gem without signing. - -== Version 0.6.0 - -* Fixed file creation bug in the unit tests (caused infinite loop on - windows). -* Fixed bug where session based functional tests were run under - windows. -* Fixed bug in directory tasks so that updating a directory will not - retrigger file tasks depending on the directory (see - FileCreationTask and EarlyTime). -* Added egrep to FileList -* ruby command now runs same ruby version as rake. -* Added investigation to task object. (suggested by Martin Fowler) -* Added ruby_opts to the test task to allow arbitrary ruby options to - be passed to the test script. (Greg Fast) -* Fixed the test loader to ignore options. (Greg Fast) -* Moved Task, FileTask, FileCreationTask and RakeApp into the Rake - module namespace. Old style namespace behavior can be invoked via - the --classic-namespace option. (requested by Kelly Felkins). -* GemTask is now sensitive to the gem platform (Masao Mutoh). -* A non-existing file prerequisite will no longer cause an exception - (Philipp Neubeck). -* Multiple prerequisites on Rake rules now allowed (initial patch - supplied by Stuart Jansen). - -== Version 0.5.4 - -* Added double quotes to the test runner. -* Added .svn to default ignore list. -* Updated FileList#include to support nested arrays and filelists. - -== Version 0.5.3 - -* Added support for importing Rakefile and other dependencies. -* Fixed bug so that now rules can chain off of existing tasks as well - as existing files. -* Fixed verbose flag bug in the testing task. Shortened some failure - messages. -* Make FileUtils methods private at the top level module to avoid - accidental method leaking into other objects. -* Added test loader option to test task. "testrb" is no longer the - default test loader. It is now eating syntax errors that should - halt the unit tests. -* Revamped FileList so that it works more like and array (addressed - flatten bug). Added many tests around file list. -* Added +ext+ method to both String and FileList. - -== Version 0.5.0 - -* Fixed documentation that was lacking the Rake module name (Tilman - Sauerbeck). -* Added tar.gz and tar.bz2 support to package task (Tilman Sauerbeck). -* Recursive rules are now supported (Tilman Sauerbeck). -* Added warning option for the Test Task (requested by Eric Hodel). -* The jamis rdoc template is only used if it exists. -* Added fix for Ruby 1.8.2 test/unit and rails problem. -* Added contributed rake man file (Jani Monoses). -* Added Brian Candler's fix for problems in --trace and --dry-run - mode. - -== Version 0.4.15 - -* Fixed a bug that prevented the TESTOPTS flag from working with the - revised for 1.8.2 test task. -* Updated the docs on --trace to indicate that it also enables a full - backtrace on errors. - -== Version 0.4.14 - -* Modified the TestTask to workaround the Ruby 1.8.2 change in - autoexecuting unit tests. - -== Version 0.4.13 - -* Fixed the dry-run flag so it is operating again. -* Multiple arguments to sh and ruby commands will not be interpreted - by the shell (patch provided by Jonathan Paisley). - -== Version 0.4.12 - -* Added --silent (-s) to suppress the (in directory) rake message. - -== Version 0.4.11 - -* Changed the "don't know how to rake" message (finally) -* Changes references to a literal "Rakefile" to reference the global - variable $rakefile (which contains the actual name of the rakefile). - -== Version 0.4.10 - -* Added block support to the "sh" command, allowing users to take - special actions on the result of the system call. E.g. - - sh "shell_command" do |ok, res| - puts "Program returned #{res.exitstatus}" if ! ok - end - -== Version 0.4.9 - -* Switched to Jamis Buck's RDoc template. -* Removed autorequire from Rake's gem spec. This prevents the Rake - libraries from loading while using rails. - -== Version 0.4.8 - -* Added support for .rb versions of Rakefile. -* Removed \\\n's from test task. -* Fixed Ruby 1.9 compatibility issue with FileList. - -== Version 0.4.7 - -* Fixed problem in FileList that caused Ruby 1.9 to go into infinite - recursion. Since to_a was removed from Object, it does not need to - added back into the list of methods to rewrite in FileList. (Thanks - to Kent Sibilev for pointing this out). - -== Version 0.4.6 -* Removed test version of ln in FileUtils that prevented safe_ln from - using ln. - -== Version 0.4.5 -* Upgraded comments in TestTask. -* FileList to_s and inspect now automatically resolve pending changes. -* FileList#exclude properly returns the FileList. - -== Version 0.4.4 -* Fixed initialization problem with @comment. -* Now using multi -r technique in TestTask. Switch Rakefile back to - using the built-in test task macros because the rake runtime is no - longer needed. -* Added 'TEST=filename' and 'TESTOPTS=options' to the Test Task - macros. -* Allow a +test_files+ attribute in test tasks. This allows more - flexibility in specifying test files. - -== Version 0.4.3 -* Fixed Comment leakage. - -== Version 0.4.2 -* Added safe_ln that falls back to a copy if a file link is not supported. -* Package builder now uses safe_ln. - -== Version 0.4.1 -* Task comments are now additive, combined with "/". -* Works with (soon to be released) rubygems 0.6.2 (or 0.7.0) - -== Version 0.4.0 -* FileList now uses deferred loading. The file system is not searched - until the first call that needs the file names. -* VAR=VALUE options are now accepted on the command line and are - treated like environment variables. The values may be tested in a - Rakefile by referencing ENV['VAR']. -* File.mtime is now used (instead of File.new().mtime). - -== Version 0.3.2.x - -* Removed some hidden dependencies on rubygems. Tests now will test - gems only if they are installed. -* Removed Sys from some example files. I believe that is that last - reference to Sys outside of the contrib area. -* Updated all copyright notices to include 2004. - -== Version 0.3.2 - -* GEM Installation now works with the application stub. - -== Version 0.3.1 - -* FileLists now automatically ignore CVS, .bak, ! -* GEM Installation now works. - -== Version 0.3.0 - -Promoted 0.2.10. - -== Version 0.2.10 -General - -* Added title to Rake's rdocs -* Contrib packages are no longer included in the documentation. - -RDoc Issues - -* Removed default for the '--main' option -* Fixed rendering of the rdoc options -* Fixed clean/clobber confusion with rerdoc -* 'title' attribute added - -Package Task Library Issues - -* Version (or explicit :noversion) is required. -* +package_file+ attribute is now writable - -FileList Issues - -* Dropped bang version of exclude. Now using ant-like include/exclude semantics. -* Enabled the "yield self" idiom in FileList#initialize. - -== Version 0.2.9 - -This version contains numerous changes as the RubyConf.new(2003) -presentation was being prepared. The changes include: - -* The monolithic rubyapp task library is in the process of being - dropped in favor of lighter weight task libraries. - -== Version 0.2.7 - -* Added "desc" for task descriptions. -* -T will now display tasks with descriptions. -* -P will display tasks and prerequisites. -* Dropped the Sys module in favor of the 1.8.x FileUtils module. Sys - is still supported in the contrib area. - -== Version 0.2.6 - -* Moved to RubyForge - -== Version 0.2.5 - -* Switched to standard ruby app builder. -* Added no_match option to file matcher. - -== Version 0.2.4 - -* Fixed indir, which neglected to actually change directories. - -== Version 0.2.3 - -* Added rake module for a help target -* Added 'for_files' to Sys -* Added a $rakefile constant -* Added test for selecting proper rule with multiple targets. From fec34a6de80a496873afdc086aa2506885c9d002 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Mar 2014 14:03:16 -0700 Subject: [PATCH 176/813] Update Manifest for CHANGES.rdoc removal --- Manifest.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Manifest.txt b/Manifest.txt index 7a4eee994..faa491597 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -7,7 +7,6 @@ Manifest.txt README.rdoc Rakefile bin/rake -doc/CHANGES.rdoc doc/command_line_usage.rdoc doc/example/Rakefile1 doc/example/Rakefile2 From 2800ea8fa8d8299720ecb2666f0faec0edc52eed Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Mar 2014 14:04:58 -0700 Subject: [PATCH 177/813] Mark RAKEVERSION for deletion --- lib/rake.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rake.rb b/lib/rake.rb index 8a7bc98be..1452861f7 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -27,6 +27,7 @@ module Rake require 'rake/version' # :stopdoc: +# TODO: Remove in Rake 11 RAKEVERSION = Rake::VERSION # :startdoc: From ff1b45c2616764b93ae089c80b313b19276e51d5 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Mar 2014 14:05:40 -0700 Subject: [PATCH 178/813] Set release date --- History.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index b13045afc..7974df61f 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 10.1.2 +=== 10.1.2 / 2014-03-24 Enhancements: From d59ddae8e127a8403ab637e9c4a605adccfaffe5 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Mar 2014 14:29:40 -0700 Subject: [PATCH 179/813] Publish rake docs to seattlerb.org for now I don't have permission to push them to Jim's documentation websites yet, so this will have to do. --- Rakefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Rakefile b/Rakefile index 9aab8167a..2126347d2 100644 --- a/Rakefile +++ b/Rakefile @@ -39,6 +39,10 @@ hoe = Hoe.spec 'rake' do 'doc/**/*.rdoc' ] + self.local_rdoc_dir = 'html' + self.rsync_args = '-avz --delete' + rdoc_locations << 'docs.seattlerb.org:/data/www/docs.seattlerb.org/rake/' + self.clean_globs += [ '**/*.o', '**/*.rbc', From 02e328f402b0552bd500acfa9e6228800706ba4b Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Mar 2014 15:16:18 -0700 Subject: [PATCH 180/813] Include README.rdoc in rdoc files list --- Rakefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 2126347d2..bccb86e3e 100644 --- a/Rakefile +++ b/Rakefile @@ -36,7 +36,8 @@ hoe = Hoe.spec 'rake' do self.extra_rdoc_files.concat FileList[ 'MIT-LICENSE', - 'doc/**/*.rdoc' + 'doc/**/*.rdoc', + '*.rdoc', ] self.local_rdoc_dir = 'html' From 0fc59143dbd909a64096fe2cf059f3e1fa57e098 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Mar 2014 15:43:53 -0700 Subject: [PATCH 181/813] Fix version in History Reported by @davidcelis --- History.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 7974df61f..4290a26ab 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 10.1.2 / 2014-03-24 +=== 10.2.0 / 2014-03-24 Enhancements: From 1a6489b71550e60e537e2a1ab94a6c5de241d10c Mon Sep 17 00:00:00 2001 From: joshua stein Date: Tue, 25 Mar 2014 00:14:19 -0500 Subject: [PATCH 182/813] CpuCounter: use count_via_sysctl for all bsd's FreeBSD, NetBSD, and OpenBSD and all forks that retain "bsd" in the os name most likely have `sysctl hw.ncpu`, so try count_via_sysctl first --- lib/rake/cpu_counter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index e4df996d8..0afb0e34b 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -26,7 +26,7 @@ def count count_via_hwprefs_thread_count || count_via_sysctl when /linux/ count_via_cpuinfo - when /freebsd/ + when /bsd/ count_via_sysctl when /mswin|mingw/ count_via_win32 From 86bce3afc48a8f2c59d4a5953a2c928d26c41d5a Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 25 Mar 2014 14:26:12 -0700 Subject: [PATCH 183/813] Add #261 to History --- History.rdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/History.rdoc b/History.rdoc index 4290a26ab..9d23b6515 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,9 @@ +=== 10.2.1 + +Bug fixes: + +* Use sysctl for CPU count for all BSDs. Pull request #261 by Joshua Stein. + === 10.2.0 / 2014-03-24 Enhancements: From 3a5b4c24690a34031ed9862b21e788108bb05168 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 25 Mar 2014 14:30:14 -0700 Subject: [PATCH 184/813] Add .autotest for legacy minitest To start tests correctly only minitest 4.x is allowed, so disable testlib --- .autotest | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .autotest diff --git a/.autotest b/.autotest new file mode 100644 index 000000000..0988b12a8 --- /dev/null +++ b/.autotest @@ -0,0 +1,7 @@ +require 'autotest/restart' + +Autotest.add_hook :initialize do |at| + at.testlib = '' + at.add_exception '.git' +end + From 5ea79c08432f7a5740f410c9225a2991e4f9fc04 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 25 Mar 2014 14:38:37 -0700 Subject: [PATCH 185/813] Keep file tasks with ':' at top level With #232 you can now create tasks with namespaces from the task name alone. This did not take into account that file tasks can contain a ':' which meant file tasks would not exist at top-level. This was likely missed due to a test that only ran on windows. Now the namespace check is only performed for non-file tasks. Fixes #262 --- History.rdoc | 2 ++ lib/rake/task_manager.rb | 3 ++- test/test_rake_directory_task.rb | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 9d23b6515..8906c73b7 100644 --- a/History.rdoc +++ b/History.rdoc @@ -3,6 +3,8 @@ Bug fixes: * Use sysctl for CPU count for all BSDs. Pull request #261 by Joshua Stein. +* File tasks including a ':' are now top-level tasks again. Issue #262 by + Josh Holtrop. === 10.2.0 / 2014-03-24 diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index c5348190d..af53e3f58 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -27,7 +27,8 @@ def define_task(task_class, *args, &block) # :nodoc: task_name, arg_names, deps = resolve_args(args) original_scope = @scope - if(task_name.is_a? String) + if String === task_name and + not task_class.ancestors.include? Rake::FileTask then task_name, *definition_scope = *(task_name.split(":").reverse) @scope = Scope.make(*(definition_scope + @scope.to_a)) end diff --git a/test/test_rake_directory_task.rb b/test/test_rake_directory_task.rb index 8ae7537b5..c8275e6d1 100644 --- a/test/test_rake_directory_task.rb +++ b/test/test_rake_directory_task.rb @@ -25,6 +25,12 @@ def test_directory refute File.exist?("a/b/c") end + def test_directory_colon + directory "a:b" + + assert_equal FileCreationTask, Task['a:b'].class + end unless Rake::Win32.windows? + if Rake::Win32.windows? def test_directory_win32 desc "WIN32 DESC" From 02a5801d7edf575a42fd75d0b29b49f212fa443f Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 25 Mar 2014 14:46:06 -0700 Subject: [PATCH 186/813] Fix count_via_win32 on non-win32 When rake does not recognize your platform in CpuCounter it tries all known methods. If your platform is not a windows platform you will not have win32ole so a LoadError was raised but not rescued. Now the LoadError is rescued so rake can try alternate mechanisms. See #261 --- lib/rake/cpu_counter.rb | 2 +- test/test_rake_cpu_counter.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index 0afb0e34b..6cabbf732 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -51,7 +51,7 @@ def count_via_win32 wmi = WIN32OLE.connect("winmgmts://") cpu = wmi.ExecQuery("select NumberOfCores from Win32_Processor") # TODO count hyper-threaded in this cpu.to_enum.first.NumberOfCores - rescue StandardError + rescue StandardError, LoadError nil end diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb index cb5c1a0f2..d9f8b2073 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -8,6 +8,14 @@ def setup @cpu_counter = Rake::CpuCounter.new end + def test_count_via_win32 + if Rake::Win32.windows? then + assert_kind_of Numeric, @cpu_counter.count_via_win32 + else + assert_nil @cpu_counter.count_via_win32 + end + end + def test_in_path_command with_ruby_in_path do |ruby| assert_equal ruby, @cpu_counter.in_path_command(ruby) From 77e4b5139df207fc3557574ebbdec877992de44d Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 25 Mar 2014 15:01:24 -0700 Subject: [PATCH 187/813] Note that CPU detection is fixed for other unknowns --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 8906c73b7..22dd42c6d 100644 --- a/History.rdoc +++ b/History.rdoc @@ -3,6 +3,7 @@ Bug fixes: * Use sysctl for CPU count for all BSDs. Pull request #261 by Joshua Stein. +* Fixed CPU detection for unknown platforms. * File tasks including a ':' are now top-level tasks again. Issue #262 by Josh Holtrop. From 699db45147d3211585a4138b74a4f30ecdf46e6c Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 25 Mar 2014 15:01:39 -0700 Subject: [PATCH 188/813] Reorder history by importance --- History.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index 22dd42c6d..e82780ac3 100644 --- a/History.rdoc +++ b/History.rdoc @@ -2,10 +2,10 @@ Bug fixes: -* Use sysctl for CPU count for all BSDs. Pull request #261 by Joshua Stein. -* Fixed CPU detection for unknown platforms. * File tasks including a ':' are now top-level tasks again. Issue #262 by Josh Holtrop. +* Use sysctl for CPU count for all BSDs. Pull request #261 by Joshua Stein. +* Fixed CPU detection for unknown platforms. === 10.2.0 / 2014-03-24 From ffb434ba4c5a7cdf87f3a9dfa0267c8b4a42db4e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 25 Mar 2014 15:02:04 -0700 Subject: [PATCH 189/813] Set release version and date --- History.rdoc | 2 +- lib/rake.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index e82780ac3..5ef8ee1e5 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 10.2.1 +=== 10.2.1 / 2014-03-25 Bug fixes: diff --git a/lib/rake.rb b/lib/rake.rb index 1452861f7..6f85ff4d6 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '10.2.0' + VERSION = '10.2.1' end require 'rake/version' From 2b1a8b085f0475833b6d1972f39c5e0325e313b9 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 27 Mar 2014 14:10:41 -0700 Subject: [PATCH 190/813] Use 1.8-compatible way of loading helper --- test/test_rake_cpu_counter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb index d9f8b2073..ccf21d8ba 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -1,4 +1,4 @@ -require_relative 'helper' +require File.expand_path('../helper', __FILE__) class TestRakeCpuCounter < Rake::TestCase From 8955158ec026b027bea7b2f0b7621da6f8fe2b2e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 27 Mar 2014 14:18:34 -0700 Subject: [PATCH 191/813] Use 1.8-compatible regexp --- lib/rake/application.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 2f56e75fc..8047277fc 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -151,7 +151,10 @@ def invoke_task(task_string) # :nodoc: end def parse_task_string(string) # :nodoc: - /^(?[^\[]+)(\[(?.*)\])$/ =~ string + /^([^\[]+)(?:\[(.*)\])$/ =~ string + + name = $1 + remaining_args = $2 return string, [] unless name return name, [] if remaining_args.empty? From 8d765f8921ee859d6cc600fd3269ea86081e29fb Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 27 Mar 2014 14:28:34 -0700 Subject: [PATCH 192/813] Use Open3 for 1.8 compatibility --- lib/rake/cpu_counter.rb | 11 +++++++---- test/test_rake_backtrace.rb | 6 ++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index 6cabbf732..a30a8f6c9 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -1,5 +1,8 @@ require 'rbconfig' +# TODO: replace with IO.popen using array-style arguments in Rake 11 +require 'open3' + module Rake # Based on a script at: @@ -76,8 +79,8 @@ def count_via_sysctl def run(command, *args) cmd = resolve_command(command) if cmd - IO.popen [cmd, *args] do |io| - io.read.to_i + Open3.popen3 cmd, *args do |_, out| + out.read.to_i end else nil @@ -96,8 +99,8 @@ def look_for_command(dir, command) end def in_path_command(command) - IO.popen ['which', command] do |io| - io.eof? ? nil : command + Open3.popen3 'which', command do |_, out,| + out.eof? ? nil : command end end end diff --git a/test/test_rake_backtrace.rb b/test/test_rake_backtrace.rb index 3f9bce063..a60f251cc 100644 --- a/test/test_rake_backtrace.rb +++ b/test/test_rake_backtrace.rb @@ -11,8 +11,9 @@ def test_bin_rake_suppressed end def test_system_dir_suppressed - path = File.expand_path(RbConfig::CONFIG['rubylibprefix']) + path = RbConfig::CONFIG['rubylibprefix'] skip if path.nil? + path = File.expand_path path paths = [path + ":12"] @@ -22,8 +23,9 @@ def test_system_dir_suppressed end def test_near_system_dir_isnt_suppressed - path = File.expand_path(RbConfig::CONFIG['rubylibprefix']) + path = RbConfig::CONFIG['rubylibprefix'] skip if path.nil? + path = File.expand_path path paths = [" " + path + ":12"] From 5fc420bdd60fe88453f3a529a8bb2080d08d17e2 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 27 Mar 2014 14:41:50 -0700 Subject: [PATCH 193/813] Force parse task string to a string Ruby 1.8 doesn't allow regular expressions to match symbols. This restores 1.8 compatibility --- lib/rake/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 8047277fc..09d2eca89 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -151,7 +151,7 @@ def invoke_task(task_string) # :nodoc: end def parse_task_string(string) # :nodoc: - /^([^\[]+)(?:\[(.*)\])$/ =~ string + /^([^\[]+)(?:\[(.*)\])$/ =~ string.to_s name = $1 remaining_args = $2 From 0b545e0ba88c31a2d47b71a28475ae419abd35cb Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 27 Mar 2014 14:48:42 -0700 Subject: [PATCH 194/813] Re-enable 1.8.7 on travis as the tests pass now --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 7cc42e241..d8cfbbc58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ notifications: - drbrain@segment7.net rvm: - jruby # 2 failures + - 1.8.7 - 1.9.3 - 2.0.0 - 2.1.0 From d18c31e1bb96ed0d3e28df4cdb84ac7f1f2b9955 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 27 Mar 2014 14:50:37 -0700 Subject: [PATCH 195/813] JRuby does not fail on travis now --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d8cfbbc58..c8a1f9d9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,9 @@ notifications: email: - drbrain@segment7.net rvm: - - jruby # 2 failures - 1.8.7 - 1.9.3 - 2.0.0 - 2.1.0 + - jruby script: ruby -Ilib bin/rake From 3cbf1868b679ad9f0353bc86ce7ffb1cea7a99ba Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 27 Mar 2014 15:06:52 -0700 Subject: [PATCH 196/813] Remove redundant Gemfile. Use `rake newb` --- Gemfile | 5 ----- Rakefile | 20 ++++++++++++-------- 2 files changed, 12 insertions(+), 13 deletions(-) delete mode 100644 Gemfile diff --git a/Gemfile b/Gemfile deleted file mode 100644 index ec90ffe21..000000000 --- a/Gemfile +++ /dev/null @@ -1,5 +0,0 @@ -source 'https://rubygems.org' - -if RUBY_VERSION < "2.0.0" - gem 'minitest', '~> 4.3' -end diff --git a/Rakefile b/Rakefile index bccb86e3e..a801ca5d4 100644 --- a/Rakefile +++ b/Rakefile @@ -60,17 +60,21 @@ hoe.test_prelude = 'gem "minitest", "~> 4.0"' Rake::Task['docs'].clear Rake::Task['clobber_docs'].clear -require 'rdoc/task' +begin + require 'rdoc/task' -RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc| - doc.main = hoe.readme_file - doc.title = 'Rake -- Ruby Make' + RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc| + doc.main = hoe.readme_file + doc.title = 'Rake -- Ruby Make' - rdoc_files = Rake::FileList.new %w[lib History.rdoc MIT-LICENSE doc] - rdoc_files.add hoe.extra_rdoc_files + rdoc_files = Rake::FileList.new %w[lib History.rdoc MIT-LICENSE doc] + rdoc_files.add hoe.extra_rdoc_files - doc.rdoc_files = rdoc_files + doc.rdoc_files = rdoc_files - doc.rdoc_dir = 'html' + doc.rdoc_dir = 'html' + end +rescue LoadError + warn 'run `rake newb` to install rdoc' end From e745e3f2f8cafc26be39a983080d78f4540ca377 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 27 Mar 2014 15:43:36 -0700 Subject: [PATCH 197/813] Force-install minitest --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c8a1f9d9c..46718cc07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ after_script: - ruby -Ilib bin/rake travis:after -t before_script: - gem install hoe-travis --no-rdoc --no-ri +- gem install minitest -v '~> 4.0' --no-rdoc --no-ri - ruby -Ilib bin/rake travis:before -t language: ruby notifications: From 61eb0a24b4283275359b414e3dfd978c533df445 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 27 Mar 2014 15:52:02 -0700 Subject: [PATCH 198/813] Restore 1.8.7 compatibility in gemspec --- History.rdoc | 6 ++++++ Rakefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 5ef8ee1e5..486ba92a3 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,9 @@ +=== 10.2.2 / 2014-03-27 + +Bug fixes: + +* Restored Ruby 1.8.7 compatibility + === 10.2.1 / 2014-03-25 Bug fixes: diff --git a/Rakefile b/Rakefile index a801ca5d4..51f15d9d2 100644 --- a/Rakefile +++ b/Rakefile @@ -24,7 +24,7 @@ hoe = Hoe.spec 'rake' do developer 'Eric Hodel', 'drbrain@segment7.net' developer 'Jim Weirich', '' - require_ruby_version '>= 1.9' + require_ruby_version '>= 1.8.7' require_rubygems_version '>= 1.3.2' dependency 'minitest', '~> 4.0', :developer From f7b4147c7459d677d6790f54504033d3b39e0afe Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 27 Mar 2014 15:52:37 -0700 Subject: [PATCH 199/813] Set release version --- lib/rake.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake.rb b/lib/rake.rb index 6f85ff4d6..df48b9bc9 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '10.2.1' + VERSION = '10.2.2' end require 'rake/version' From cf68db177b9b89a62dc9fb863bdebb52ec031c0d Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 27 Mar 2014 16:06:19 -0700 Subject: [PATCH 200/813] Remove Gemfile from Manifest --- Manifest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Manifest.txt b/Manifest.txt index faa491597..ff71d9e88 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -1,6 +1,6 @@ +.autotest .rubocop.yml .togglerc -Gemfile History.rdoc MIT-LICENSE Manifest.txt From 0c375dbdfc6f942ec45065ad1d3cccfbf17d772d Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 27 Mar 2014 16:07:49 -0700 Subject: [PATCH 201/813] Add git plugin for tag signing --- Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Rakefile b/Rakefile index 51f15d9d2..d92b2d4e4 100644 --- a/Rakefile +++ b/Rakefile @@ -17,6 +17,7 @@ end require 'hoe' +Hoe.plugin :git Hoe.plugin :minitest Hoe.plugin :travis From 393148dbbab06ff0b9b1cc23238b7405bef493f2 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 1 Apr 2014 14:41:48 -0700 Subject: [PATCH 202/813] Add Rake::NameSpace#scope. Fixes #263 --- History.rdoc | 6 ++++++ lib/rake/name_space.rb | 7 +++++++ test/test_rake_name_space.rb | 14 ++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/History.rdoc b/History.rdoc index 486ba92a3..19ba0accf 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,9 @@ +=== 10.3 + +Enhancements: + +* Added Rake::NameSpace#scope. Issue #263 by Jon San Miguel. + === 10.2.2 / 2014-03-27 Bug fixes: diff --git a/lib/rake/name_space.rb b/lib/rake/name_space.rb index e1cc0940b..19fd0eaea 100644 --- a/lib/rake/name_space.rb +++ b/lib/rake/name_space.rb @@ -17,6 +17,13 @@ def [](name) @task_manager.lookup(name, @scope) end + ## + # The scope of the namespace (a LinkedList) + + def scope + @scope.dup + end + # Return the list of tasks defined in this and nested namespaces. def tasks @task_manager.tasks_in_scope(@scope) diff --git a/test/test_rake_name_space.rb b/test/test_rake_name_space.rb index 3ab977d01..d35e70e17 100644 --- a/test/test_rake_name_space.rb +++ b/test/test_rake_name_space.rb @@ -40,4 +40,18 @@ def test_namespace_reports_tasks_it_owns ns.tasks.map { |tsk| tsk.name } assert_equal ["n:nn:z"], nns.tasks.map { |t| t.name } end + + def test_scope + mgr = TM.new + + scope = Rake::LinkedList.new 'b' + scope = scope.conj 'a' + + ns = Rake::NameSpace.new mgr, scope + + assert_equal scope, ns.scope + + refute_same scope, ns.scope + end + end From 9f1346328e282962a08bc82a62c9baba9e187848 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 1 Apr 2014 14:43:45 -0700 Subject: [PATCH 203/813] Clean up documentation and a typo --- lib/rake/name_space.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/rake/name_space.rb b/lib/rake/name_space.rb index 19fd0eaea..0b28f833f 100644 --- a/lib/rake/name_space.rb +++ b/lib/rake/name_space.rb @@ -1,18 +1,23 @@ module Rake - # The NameSpace class will lookup task names in the the scope - # defined by a +namespace+ command. - # + ## + # The NameSpace class will lookup task names in the scope defined by a + # +namespace+ command. + class NameSpace + ## # Create a namespace lookup object using the given task manager # and the list of scopes. + def initialize(task_manager, scope_list) @task_manager = task_manager @scope = scope_list.dup end + ## # Lookup a task named +name+ in the namespace. + def [](name) @task_manager.lookup(name, @scope) end @@ -24,7 +29,9 @@ def scope @scope.dup end + ## # Return the list of tasks defined in this and nested namespaces. + def tasks @task_manager.tasks_in_scope(@scope) end From 104058e4ba416c39ac5fd69808ef6489489c4487 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 1 Apr 2014 14:44:22 -0700 Subject: [PATCH 204/813] Undent rake/name_space.rb --- lib/rake/name_space.rb | 55 +++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/lib/rake/name_space.rb b/lib/rake/name_space.rb index 0b28f833f..58f911e43 100644 --- a/lib/rake/name_space.rb +++ b/lib/rake/name_space.rb @@ -1,39 +1,38 @@ -module Rake +## +# The NameSpace class will lookup task names in the scope defined by a +# +namespace+ command. - ## - # The NameSpace class will lookup task names in the scope defined by a - # +namespace+ command. - - class NameSpace +class Rake::NameSpace - ## - # Create a namespace lookup object using the given task manager - # and the list of scopes. + ## + # Create a namespace lookup object using the given task manager + # and the list of scopes. - def initialize(task_manager, scope_list) - @task_manager = task_manager - @scope = scope_list.dup - end + def initialize(task_manager, scope_list) + @task_manager = task_manager + @scope = scope_list.dup + end - ## - # Lookup a task named +name+ in the namespace. + ## + # Lookup a task named +name+ in the namespace. - def [](name) - @task_manager.lookup(name, @scope) - end + def [](name) + @task_manager.lookup(name, @scope) + end - ## - # The scope of the namespace (a LinkedList) + ## + # The scope of the namespace (a LinkedList) - def scope - @scope.dup - end + def scope + @scope.dup + end - ## - # Return the list of tasks defined in this and nested namespaces. + ## + # Return the list of tasks defined in this and nested namespaces. - def tasks - @task_manager.tasks_in_scope(@scope) - end + def tasks + @task_manager.tasks_in_scope(@scope) end + end + From bef5808743538694a60d7ce9e544feac642a85ee Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 1 Apr 2014 14:54:42 -0700 Subject: [PATCH 205/813] Add focused FileTask#needed? tests --- test/test_rake_file_task.rb | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index f75122956..44b3b9f33 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -98,6 +98,44 @@ def test_existing_file_depends_on_non_existing_file assert @ran end + def test_needed_eh_dependency + create_file 'a', Time.now + create_file 'b', Time.now - 60 + + create_file 'c', Time.now + create_file 'd', Time.now - 60 + + file 'b' => 'a' + + b_task = Task['b'] + + assert b_task.needed? + + file 'c' => 'd' + + c_task = Task['c'] + + refute c_task.needed? + ensure + delete_file 'old' + delete_file 'new' + end + + def test_needed_eh_exists + name = "dummy" + file name + + ftask = Task[name] + + assert ftask.needed? + + create_file name + + refute ftask.needed? + ensure + delete_file name + end + def test_source_is_first_prerequisite t = file :f => ["preqA", "preqB"] assert_equal "preqA", t.source From d7bf4eb8840929ab11a15aa538eed9fc2bf790b7 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 1 Apr 2014 14:56:49 -0700 Subject: [PATCH 206/813] Add test for #254 --- test/test_rake_file_task.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index 44b3b9f33..ae828c9ba 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -98,6 +98,22 @@ def test_existing_file_depends_on_non_existing_file assert @ran end + def test_needed_eh_build_all + create_file 'a' + + file 'a' + + a_task = Task['a'] + + refute a_task.needed? + + Rake.application.options.build_all = true + + assert a_task.needed? + ensure + delete_file 'a' + end + def test_needed_eh_dependency create_file 'a', Time.now create_file 'b', Time.now - 60 From e47621db813612d96e71accb217e34ed9b446e90 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 1 Apr 2014 14:58:16 -0700 Subject: [PATCH 207/813] Add #254 to History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index 19ba0accf..4a1742c11 100644 --- a/History.rdoc +++ b/History.rdoc @@ -2,6 +2,8 @@ Enhancements: +* Added --build-all option to rake which treats all file prerequisites as + out-of-date. Pull request #254 by Andrew Gilbert. * Added Rake::NameSpace#scope. Issue #263 by Jon San Miguel. === 10.2.2 / 2014-03-27 From bb75fec8958e984f173e6bfed1445682861cdcf2 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 1 Apr 2014 15:51:59 -0700 Subject: [PATCH 208/813] Suppress org.ruby package files for JRuby This is equivalent to suppressing ruby core files in rake. Fixes #213 --- History.rdoc | 5 +++++ lib/rake/backtrace.rb | 3 +++ 2 files changed, 8 insertions(+) diff --git a/History.rdoc b/History.rdoc index 4a1742c11..2b8631376 100644 --- a/History.rdoc +++ b/History.rdoc @@ -6,6 +6,11 @@ Enhancements: out-of-date. Pull request #254 by Andrew Gilbert. * Added Rake::NameSpace#scope. Issue #263 by Jon San Miguel. +Bug fixes: + +* Suppress org.jruby package files in rake error messages for JRuby users. + Issue #213 by Charles Nutter. + === 10.2.2 / 2014-03-27 Bug fixes: diff --git a/lib/rake/backtrace.rb b/lib/rake/backtrace.rb index 63d253221..439255d78 100644 --- a/lib/rake/backtrace.rb +++ b/lib/rake/backtrace.rb @@ -9,6 +9,9 @@ module Backtrace # :nodoc: all map { |f| File.expand_path(f) }. reject { |s| s.nil? || s =~ /^ *$/ } SUPPRESSED_PATHS_RE = SUPPRESSED_PATHS.map { |f| Regexp.quote(f) }.join("|") + SUPPRESSED_PATHS_RE << "|^org\\/jruby\\/\\w+\\.java" if + Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby' + SUPPRESS_PATTERN = %r!(\A(#{SUPPRESSED_PATHS_RE})|bin/rake:\d+)!i def self.collapse(backtrace) From dae4dcf2b879070cb10b84002a39ae3ae310dd2d Mon Sep 17 00:00:00 2001 From: Randy Coulman Date: Tue, 8 Apr 2014 06:58:52 -0700 Subject: [PATCH 209/813] Don't report an error when cleaning missing files When doing a `rake clean` or `rake clobber`, it is often the case that some of the files don't exist. The desired end state of the clean or clobber task is that the specified files no longer be present at the end of the task; if they weren't there in the first place, the post-condition is still satisfied. Without this change, running a `rake clean` or `rake clobber` is too noisy, and yet silently failing to delete a file is not a good solution either. This may not be the best fix for this. I tried two options: 1) Add a second rescue block for `Errno::ENOENT`. This fails `test_cleanup` in JRuby, because JRuby raises `Errno::ENOENT` for that case. 2) Use `File.exist?` as I've done. In order to make this work, I had to modify the permissions used in `create_undeletable_file`, because `File.exist?` returns false for a file in an unreadable directory. With either of these solutions, there are corner cases where one or more Ruby implementations will silently fail to delete a file. My opinion is that those corner cases are rare enough that this PR makes sense for the far more common case. --- lib/rake/clean.rb | 2 +- test/test_rake_clean.rb | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index 8001ce569..6c1f0250a 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -29,7 +29,7 @@ def cleanup_files(file_names) def cleanup(file_name, opts={}) begin - rm_r file_name, opts + rm_r file_name, opts if File.exist? file_name rescue StandardError => ex puts "Failed to remove #{file_name}: #{ex}" end diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index 1dc79748f..8912447f0 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -23,6 +23,15 @@ def test_cleanup remove_undeletable_file end + def test_cleanup_ignores_missing_files + file_name = File.join(@tempdir, "missing_directory" "no_such_file") + + out, _ = capture_io do + Rake::Cleaner.cleanup(file_name, :verbose => false) + end + refute_match(/failed to remove/i, out) + end + private def create_undeletable_file @@ -30,8 +39,8 @@ def create_undeletable_file file_name = File.join(dir_name, "deleteme") FileUtils.mkdir(dir_name) FileUtils.touch(file_name) - FileUtils.chmod(0, file_name) - FileUtils.chmod(0, dir_name) + FileUtils.chmod(0400, file_name) + FileUtils.chmod(0500, dir_name) file_name end From 9d8428ae99be14eadfd9ebd7ab4d9a8b4351bc8f Mon Sep 17 00:00:00 2001 From: Randy Coulman Date: Thu, 10 Apr 2014 08:38:02 -0700 Subject: [PATCH 210/813] Be smarter about determining whether the file is already gone Per @drbrain's suggestion, this version only prints the failure message if the file exists or if it has an unreadable or unexecutable parent directory. --- lib/rake/clean.rb | 17 +++++++++++++++-- test/test_rake_clean.rb | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index 6c1f0250a..21cd0efbd 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -29,11 +29,24 @@ def cleanup_files(file_names) def cleanup(file_name, opts={}) begin - rm_r file_name, opts if File.exist? file_name + rm_r file_name, opts rescue StandardError => ex - puts "Failed to remove #{file_name}: #{ex}" + puts "Failed to remove #{file_name}: #{ex}" unless file_already_gone?(file_name) end end + + private + + def self.file_already_gone?(file_name) + return false if File.exist?(file_name) + + path = file_name + while path = File.dirname(path) + return false unless File.readable?(path) && File.executable?(path) + break if ["/", "."].include?(path) + end + true + end end end diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index 8912447f0..8cbd5f933 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -39,8 +39,8 @@ def create_undeletable_file file_name = File.join(dir_name, "deleteme") FileUtils.mkdir(dir_name) FileUtils.touch(file_name) - FileUtils.chmod(0400, file_name) - FileUtils.chmod(0500, dir_name) + FileUtils.chmod(0, file_name) + FileUtils.chmod(0, dir_name) file_name end From 101cfd69078f2b76b5d656bcdf2a851366c38354 Mon Sep 17 00:00:00 2001 From: Randy Coulman Date: Thu, 10 Apr 2014 15:28:23 -0700 Subject: [PATCH 211/813] Use `private_class_method` instead of private --- lib/rake/clean.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index 21cd0efbd..0827b17d3 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -35,9 +35,7 @@ def cleanup(file_name, opts={}) end end - private - - def self.file_already_gone?(file_name) + def file_already_gone?(file_name) return false if File.exist?(file_name) path = file_name @@ -47,6 +45,7 @@ def self.file_already_gone?(file_name) end true end + private_class_method :file_already_gone? end end From 0c8b2d0d4d9cc74ac25496b16cffa37c52f6efed Mon Sep 17 00:00:00 2001 From: Hsing-Hui Hsu Date: Sat, 12 Apr 2014 00:59:51 -0700 Subject: [PATCH 212/813] fix typo in comment --- lib/rake/linked_list.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/linked_list.rb b/lib/rake/linked_list.rb index 7369e83ac..b5ab79780 100644 --- a/lib/rake/linked_list.rb +++ b/lib/rake/linked_list.rb @@ -13,7 +13,7 @@ def initialize(head, tail=EMPTY) end # Polymorphically add a new element to the head of a list. The - # type of head node will be the same list type has the tail. + # type of head node will be the same list type as the tail. def conj(item) self.class.cons(item, self) end From 0f1afaf2bf017239e5f84664b152e176cb79286f Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 15 Apr 2014 13:22:16 -0700 Subject: [PATCH 213/813] Add #267 to History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 2b8631376..e09358638 100644 --- a/History.rdoc +++ b/History.rdoc @@ -10,6 +10,7 @@ Bug fixes: * Suppress org.jruby package files in rake error messages for JRuby users. Issue #213 by Charles Nutter. +* Fixed typo, removed extra "h". Pull request #267 by Hsing-Hui Hsu. === 10.2.2 / 2014-03-27 From 7875647137760577ac8a7ca417a9d71ca728e770 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 15 Apr 2014 14:30:55 -0700 Subject: [PATCH 214/813] Add #266 to History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index e09358638..1b53893f1 100644 --- a/History.rdoc +++ b/History.rdoc @@ -11,6 +11,8 @@ Bug fixes: * Suppress org.jruby package files in rake error messages for JRuby users. Issue #213 by Charles Nutter. * Fixed typo, removed extra "h". Pull request #267 by Hsing-Hui Hsu. +* Rake no longer reports an error when cleaning already-deleted files. Pull + request #266 by Randy Coulman. === 10.2.2 / 2014-03-27 From 3b71b9666f2274d9e266092564360b0536a5c0a5 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 15 Apr 2014 15:33:08 -0700 Subject: [PATCH 215/813] Read stderr from cpu count command to avoid hang Leaving stderr unread causes hangs. I don't remember why, though, the documentation somewhere probably says. See #268 --- History.rdoc | 2 ++ lib/rake/cpu_counter.rb | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 1b53893f1..4aa458c56 100644 --- a/History.rdoc +++ b/History.rdoc @@ -13,6 +13,8 @@ Bug fixes: * Fixed typo, removed extra "h". Pull request #267 by Hsing-Hui Hsu. * Rake no longer reports an error when cleaning already-deleted files. Pull request #266 by Randy Coulman. +* Consume stderr while determining CPU count to avoid hang. Issue #268 by + Albert Sun. === 10.2.2 / 2014-03-27 diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index a30a8f6c9..c05b69b7a 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -79,7 +79,9 @@ def count_via_sysctl def run(command, *args) cmd = resolve_command(command) if cmd - Open3.popen3 cmd, *args do |_, out| + Open3.popen3 cmd, *args do |inn, out, err,| + inn.close + err.read out.read.to_i end else From 79bfa0f446ed63514ef9b87dd22d8b654160b2ae Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 15 Apr 2014 16:03:24 -0700 Subject: [PATCH 216/813] Set release version and date --- History.rdoc | 2 +- lib/rake.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index 4aa458c56..72d7f417c 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 10.3 +=== 10.3 / 2014-04-15 Enhancements: diff --git a/lib/rake.rb b/lib/rake.rb index df48b9bc9..ea9583ce7 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '10.2.2' + VERSION = '10.2.3' end require 'rake/version' From ae8accb311d89ab46acfbb482eaf05b000cd561f Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 15 Apr 2014 16:03:50 -0700 Subject: [PATCH 217/813] Set release version to 10.3 due to new features --- lib/rake.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake.rb b/lib/rake.rb index ea9583ce7..3db13e5a1 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '10.2.3' + VERSION = '10.3.0' end require 'rake/version' From 355c6045f1d967355c56803f8bd5b80090b6124f Mon Sep 17 00:00:00 2001 From: Randy Coulman Date: Wed, 16 Apr 2014 07:46:23 -0700 Subject: [PATCH 218/813] _Really_ don't report an error when cleaning already-deleted files. My earlier #266 had a missing comma in the test that was giving false results, so the code didn't actually work right. Mea culpa. --- lib/rake/clean.rb | 7 ++++++- test/test_rake_clean.rb | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index 0827b17d3..4e227b59d 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -40,12 +40,17 @@ def file_already_gone?(file_name) path = file_name while path = File.dirname(path) - return false unless File.readable?(path) && File.executable?(path) + return false if cant_be_deleted?(path) break if ["/", "."].include?(path) end true end private_class_method :file_already_gone? + + def cant_be_deleted?(path_name) + File.exist?(path_name) && + (!File.readable?(path_name) || !File.executable?(path_name)) + end end end diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index 8cbd5f933..1e8eb499c 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -24,7 +24,7 @@ def test_cleanup end def test_cleanup_ignores_missing_files - file_name = File.join(@tempdir, "missing_directory" "no_such_file") + file_name = File.join(@tempdir, "missing_directory", "no_such_file") out, _ = capture_io do Rake::Cleaner.cleanup(file_name, :verbose => false) From 9c13b1593f58c5c55d4c13fb7256ffde2565cdd6 Mon Sep 17 00:00:00 2001 From: Randy Coulman Date: Wed, 16 Apr 2014 09:22:36 -0700 Subject: [PATCH 219/813] Mark `cant_be_deleted?` as a private class method --- lib/rake/clean.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index 4e227b59d..9c1bade50 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -51,6 +51,7 @@ def cant_be_deleted?(path_name) File.exist?(path_name) && (!File.readable?(path_name) || !File.executable?(path_name)) end + private_class_method :cant_be_deleted? end end From ddfe2e38d17399a3acaad9b22ea7adf609247be6 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 17 Apr 2014 15:53:51 -0700 Subject: [PATCH 220/813] Add #269 to History --- History.rdoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/History.rdoc b/History.rdoc index 72d7f417c..5be35f62b 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,10 @@ +=== 10.3.1 + +Bug fixes: + +* Really stop reporting an error when cleaning already-deleted files. Pull + request #269 by Randy Coulman + === 10.3 / 2014-04-15 Enhancements: From c2d9edcb1c83a1fecddd7f7088e85a2b15422bfe Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 17 Apr 2014 16:22:18 -0700 Subject: [PATCH 221/813] Fix infinite loop when cleaning files on windows When checking if nonexistent file was deleted on windows the tree-walking loop did not terminate properly. Instead of checking for no change for the path it looked for "." or "/", the latter of which will not match a windows drive letter. Now if the previous path is seen again the loop stops. --- History.rdoc | 1 + lib/rake/clean.rb | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 5be35f62b..60c43d833 100644 --- a/History.rdoc +++ b/History.rdoc @@ -4,6 +4,7 @@ Bug fixes: * Really stop reporting an error when cleaning already-deleted files. Pull request #269 by Randy Coulman +* Fixed infinite loop when cleaning already-deleted files on windows. === 10.3 / 2014-04-15 diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index 9c1bade50..a49cd4416 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -39,9 +39,12 @@ def file_already_gone?(file_name) return false if File.exist?(file_name) path = file_name + prev = nil + while path = File.dirname(path) return false if cant_be_deleted?(path) - break if ["/", "."].include?(path) + break if [prev, "."].include?(path) + prev = path end true end From f4524d5db95fab8652d7e6dd458efe9f2264e0f1 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 17 Apr 2014 16:24:36 -0700 Subject: [PATCH 222/813] Update version for release --- History.rdoc | 2 +- lib/rake.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index 60c43d833..6be889a38 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 10.3.1 +=== 10.3.1 / 2014-04-17 Bug fixes: diff --git a/lib/rake.rb b/lib/rake.rb index 3db13e5a1..71ddfc293 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '10.3.0' + VERSION = '10.3.1' end require 'rake/version' From 164ae0f05770a05730e41727e5af070541956b7d Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 24 Apr 2014 14:08:15 -0700 Subject: [PATCH 223/813] Cleanup README and split out CONTRIBUTING --- CONTRIBUTING.rdoc | 29 +++++++++++++++++++++ Manifest.txt | 1 + README.rdoc | 64 +++++++++-------------------------------------- 3 files changed, 42 insertions(+), 52 deletions(-) create mode 100644 CONTRIBUTING.rdoc diff --git a/CONTRIBUTING.rdoc b/CONTRIBUTING.rdoc new file mode 100644 index 000000000..1fcf0579d --- /dev/null +++ b/CONTRIBUTING.rdoc @@ -0,0 +1,29 @@ += Source Repository + +Rake is currently hosted at github. The github web page is +http://github.com/jimweirich/rake . The public git clone URL is + + git://github.com/jimweirich/rake.git + += Running the Rake Test Suite + +If you wish to run the unit and functional tests that come with Rake: + +* CD into the top project directory of rake. +* Type one of the following: + + rake newb # If you have never run rake's tests + rake # If you have run rake's tests + += Issues and Bug Reports + +Feel free to submit commits or feature requests. If you send a patch, +remember to update the corresponding unit tests. In fact, I prefer +new feature to be submitted in the form of new unit tests. + +For other information, feel free to ask on the ruby-talk mailing list. + +If you have found a bug in rake please try with the latest version of rake +before filing an issue. Also check History.rdoc for bug fixes that may have +addressed your issue. + diff --git a/Manifest.txt b/Manifest.txt index ff71d9e88..53ae991f6 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -1,6 +1,7 @@ .autotest .rubocop.yml .togglerc +CONTRIBUTING.rdoc History.rdoc MIT-LICENSE Manifest.txt diff --git a/README.rdoc b/README.rdoc index 7d3c1c0c7..df178a6df 100644 --- a/README.rdoc +++ b/README.rdoc @@ -2,6 +2,7 @@ home :: https://github.com/jimweirich/rake bugs :: https://github.com/jimweirich/rake/issues +docs :: http://docs.seattlerb.org/rake == Description @@ -34,7 +35,7 @@ Rake has the following features: Download and install rake with the following. - gem install rake + gem install rake == Usage @@ -43,7 +44,7 @@ Download and install rake with the following. First, you must write a "Rakefile" file which contains the build rules. Here's a simple example: - task :default => [:test] + task default: %w[test] task :test do ruby "test/unittest.rb" @@ -51,8 +52,8 @@ a simple example: This Rakefile has two tasks: -* A task named "test", which - upon invocation - will run a unit test file in - Ruby. +* A task named "test", which -- upon invocation -- will run a unit test file + in Ruby. * A task named "default". This task does nothing by itself, but it has exactly one dependency, namely the "test" task. Invoking the "default" task will cause Rake to invoke the "test" task as well. @@ -69,7 +70,6 @@ Running the "rake" command without any options will cause it to run the Type "rake --help" for all available options. - === More Information * For details on Rake's command-line invocation, read @@ -81,33 +81,6 @@ Type "rake --help" for all available options. * For a glossary of terms, see doc/glossary.rdoc[https://github.com/jimweirich/rake/blob/master/doc/glossary.rdoc]. -== Development - -=== Source Repository - -Rake is currently hosted at github. The github web page is -http://github.com/jimweirich/rake . The public git clone URL is - -* git://github.com/jimweirich/rake.git - -=== Running the Rake Test Suite - -If you wish to run the unit and functional tests that come with Rake: - -* Install the 'flexmock' gem -* Install the 'session' gem in order to run the functional tests. -* CD into the top project directory of rake. -* Type one of the following: - - rake # If you have a version of rake installed - ruby -Ilib bin/rake # If you do not have a version of rake installed. - -=== Issues and Bug Reports - -Feature requests and bug reports can be made here - -* https://github.com/jimweirich/rake/issues - == Online Resources === Rake References @@ -126,7 +99,7 @@ Feature requests and bug reports can be made here http://onestepback.org/articles/buildingwithrake/ * Martin Fowler's article on Rake: http://martinfowler.com/articles/rake.html -== Other Make Reinvisionings ... +== Other Make Re-envisionings ... Rake is a late entry in the make replacement field. Here are links to other projects with similar (and not so similar) goals. @@ -155,32 +128,19 @@ Rake is available under an MIT-style license. :include: MIT-LICENSE -== Support - -The Rake homepage is http://onestepback.org/software/rake/. You can find the Rake -GitHub page at http://github.com/jimweirich/rake. - -Feel free to submit commits or feature requests. If you send a patch, -remember to update the corresponding unit tests. In fact, I prefer -new feature to be submitted in the form of new unit tests. - -For other information, feel free to ask on the ruby-talk mailing list -(which is mirrored to comp.lang.ruby) or contact -jim dot weirich at gmail.com. - --- = Other stuff Author:: Jim Weirich -Requires:: Ruby 1.9 or later -License:: Copyright 2003-2013 by Jim Weirich. +Requires:: Ruby 1.8.7 or later +License:: Copyright by Jim Weirich. Released under an MIT-style license. See the MIT-LICENSE file included in the distribution. == Warranty -This software is provided "as is" and without any express or -implied warranties, including, without limitation, the implied -warranties of merchantibility and fitness for a particular -purpose. +This software is provided "as is" and without any express or implied +warranties, including, without limitation, the implied warranties of +merchantability and fitness for a particular purpose. + From 68248bed1b4886c38f786236c7bd8b97b67adf95 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 24 Apr 2014 14:12:04 -0700 Subject: [PATCH 224/813] Add Avdi Grimm's rake series to README --- README.rdoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.rdoc b/README.rdoc index df178a6df..0fea8a714 100644 --- a/README.rdoc +++ b/README.rdoc @@ -95,6 +95,11 @@ Type "rake --help" for all available options. === Presentations and Articles about Rake +* Avdi Grimm's rake series: + 1. {Rake Basics}[http://devblog.avdi.org/2014/04/21/rake-part-1-basics/] + 2. {Rake File Lists}[http://devblog.avdi.org/2014/04/22/rake-part-2-file-lists/] + 3. {Rake Rules}[http://devblog.avdi.org/2014/04/23/rake-part-3-rules/] + 4. {Rake Pathmap}[http://devblog.avdi.org/2014/04/24/rake-part-4-pathmap/] * Jim Weirich's 2003 RubyConf presentation: http://onestepback.org/articles/buildingwithrake/ * Martin Fowler's article on Rake: http://martinfowler.com/articles/rake.html From 4af98fe241ac01a37355023b5c2cb341579b92a9 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 24 Apr 2014 14:17:06 -0700 Subject: [PATCH 225/813] Add travis-ci link to CONTRIBUTING --- CONTRIBUTING.rdoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CONTRIBUTING.rdoc b/CONTRIBUTING.rdoc index 1fcf0579d..0a962e062 100644 --- a/CONTRIBUTING.rdoc +++ b/CONTRIBUTING.rdoc @@ -27,3 +27,8 @@ If you have found a bug in rake please try with the latest version of rake before filing an issue. Also check History.rdoc for bug fixes that may have addressed your issue. +When submitting pull requests please check the rake Travis-CI page for test +failures: + + https://travis-ci.org/jimweirich/rake + From cf50f419a56a8908e0ad0db9c543e37df0ac6bd0 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 24 Apr 2014 14:17:15 -0700 Subject: [PATCH 226/813] Cleanup README links --- README.rdoc | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/README.rdoc b/README.rdoc index 0fea8a714..9979678cc 100644 --- a/README.rdoc +++ b/README.rdoc @@ -72,26 +72,12 @@ Type "rake --help" for all available options. === More Information -* For details on Rake's command-line invocation, read - doc/command_line_usage.rdoc[https://github.com/jimweirich/rake/blob/master/doc/command_line_usage.rdoc] -* For details on writing Rakefiles, see - doc/rakefile.rdoc[https://github.com/jimweirich/rake/blob/master/doc/rakefile.rdoc]. -* For the original announcement of Rake, see - doc/rational.rdoc[https://github.com/jimweirich/rake/blob/master/doc/rational.rdoc]. -* For a glossary of terms, see - doc/glossary.rdoc[https://github.com/jimweirich/rake/blob/master/doc/glossary.rdoc]. - -== Online Resources - -=== Rake References - -* Rake Documentation Home: http://docs.rubyrake.org -* Rake Project Page: http://github.com/jimweirich/rake -* Rake API Documents: http://onestepback.org/software/rake/ -* Rake Source Code Repo: http://github.com/jimweirich/rake -* Rake Git Repo Clone URL: git://github.com/jimweirich/rake.git -* Rake Bug Reports: https://github.com/jimweirich/rake/issues -* Rake Continuous Build Server: https://travis-ci.org/#!/jimweirich/rake +* {Rake command-line}[rdoc-ref:doc/command_line_usage.rdoc] +* {Writing Rakefiles}[rdoc-ref:doc/rakefile.rdoc]. +* The original {Rake announcement}[rdoc-ref:doc/rational.rdoc]. +* Rake {glossary}[rdoc-ref:doc/glossary.rdoc]. + +== Resources === Presentations and Articles about Rake From 59fa734aca77ccb572979f62438f7c590b82e58e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 24 Apr 2014 14:25:19 -0700 Subject: [PATCH 227/813] Reorder --- doc/glossary.rdoc | 88 +++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 48 deletions(-) diff --git a/doc/glossary.rdoc b/doc/glossary.rdoc index a81176409..bdbccb4e0 100644 --- a/doc/glossary.rdoc +++ b/doc/glossary.rdoc @@ -1,51 +1,43 @@ = Glossary -[action] - Code to be executed in order to perform a task. Actions in a - rakefile are specified in a code block (usually delimited by - +do+/+end+ pairs. - -[execute] - When a task is executed, all of its actions are performed, in - the order they were defined. Note that unlike - invoke, execute always executes the actions - (without invoking or executing the prerequisites). - -[file task (FileTask)] - A file task is a task whose purpose is to create a file - (which has the same name as the task). When invoked, a file - task will only execute if one or more of the following - conditions are true. - - 1. The associated file does not exist. - 2. A prerequisite has a later time stamp than the existing file. - - Because normal Tasks always have the current time as - timestamp, a FileTask that has a normal Task prerequisite - will always execute. - -[invoke] - When a task is invoked, first we check to see if it has been - invoked before. if it has been, then nothing else is done. - If this is the first time its been invoked, then we invoke - each of its prerequisites. Finally, we check to see if we - need to execute the actions of this task by calling - needed?. Finally, if the task is needed, we execute - its actions. - - NOTE: Currently prerequisites are invoked even if the task is - not needed. This may change in the future. - -[prerequisites] - Every task has a set (possibly empty) of prerequisites. A - prerequisite P to Task T is itself a task that must be invoked - before Task T. - -[rule] - A rule is a recipe for synthesizing a task when no task is - explicitly defined. Rules generally synthesize file tasks. - -[task (Task)] - Basic unit of work in a rakefile. A task has a name, a set of - prerequisites and a list of actions to be performed. +action :: + Code to be executed in order to perform a task. Actions in a rakefile are + specified in a code block (usually delimited by +do+/+end+ pairs. + +execute :: + When a task is executed, all of its actions are performed, in the order they + were defined. Note that unlike invoke, execute always + executes the actions (without invoking or executing the prerequisites). + +file task (Rake::FileTask) :: + A file task is a task whose purpose is to create a file (which has the same + name as the task). When invoked, a file task will only execute if one or + more of the following conditions are true. + + 1. The associated file does not exist. + 2. A prerequisite has a later time stamp than the existing file. + + Because normal Tasks always have the current time as timestamp, a FileTask + that has a normal Task prerequisite will always execute. + +invoke :: + When a task is invoked, first we check to see if it has been invoked before. + If it has been, then nothing else is done. If this is the first time its + been invoked, then we invoke each of its prerequisites. Finally, we check + to see if we need to execute the actions of this task by calling + Rake::Task#needed?. Finally, if the task is needed, we execute its actions. + + NOTE: Prerequisites are invoked even if the task is not needed. + +prerequisites :: + Every task has a set (possibly empty) of prerequisites. A prerequisite P to + Task T is itself a task that must be invoked before Task T. + +rule :: + A rule is a recipe for synthesizing a task when no task is explicitly + defined. Rules generally synthesize file tasks. + +task (Rake::Task) :: + Basic unit of work in a rakefile. A task has a name, a set of prerequisites + and a list of actions to be performed. From 8398cd8d8afeafb3c307f70ff9bbfa7b821497ac Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 24 Apr 2014 14:31:54 -0700 Subject: [PATCH 228/813] Move More Information to Resources --- README.rdoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.rdoc b/README.rdoc index 9979678cc..72ca2bee9 100644 --- a/README.rdoc +++ b/README.rdoc @@ -70,14 +70,14 @@ Running the "rake" command without any options will cause it to run the Type "rake --help" for all available options. -=== More Information +== Resources -* {Rake command-line}[rdoc-ref:doc/command_line_usage.rdoc] -* {Writing Rakefiles}[rdoc-ref:doc/rakefile.rdoc]. -* The original {Rake announcement}[rdoc-ref:doc/rational.rdoc]. -* Rake {glossary}[rdoc-ref:doc/glossary.rdoc]. +=== Rake Information -== Resources +* {Rake command-line}[rdoc-ref:doc/command_line_usage.rdoc] +* {Writing Rakefiles}[rdoc-ref:doc/rakefile.rdoc] +* The original {Rake announcement}[rdoc-ref:doc/rational.rdoc] +* Rake {glossary}[rdoc-ref:doc/glossary.rdoc] === Presentations and Articles about Rake @@ -125,7 +125,7 @@ Rake is available under an MIT-style license. Author:: Jim Weirich Requires:: Ruby 1.8.7 or later -License:: Copyright by Jim Weirich. +License:: Copyright Jim Weirich. Released under an MIT-style license. See the MIT-LICENSE file included in the distribution. From fddc5e97adaa6fc824dfb31b9f8ef0787da07bff Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 24 Apr 2014 14:46:48 -0700 Subject: [PATCH 229/813] Allow travis to fail on jruby Sometimes it does randomly --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 46718cc07..88c951a73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,3 +16,6 @@ rvm: - 2.1.0 - jruby script: ruby -Ilib bin/rake +matrix: + allow_failures: + - rvm: jruby From 67018c753b1642d2901fa313ec93d578743dd534 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 24 Apr 2014 14:56:05 -0700 Subject: [PATCH 230/813] Remove copyright dates from license --- MIT-LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MIT-LICENSE b/MIT-LICENSE index 727347539..4292f3b3c 100644 --- a/MIT-LICENSE +++ b/MIT-LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2003, 2004 Jim Weirich +Copyright (c) Jim Weirich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the From 9eef57a8e75b179b4b86713c2553ce1ed8a12c52 Mon Sep 17 00:00:00 2001 From: Randy Coulman Date: Fri, 25 Apr 2014 08:28:47 -0700 Subject: [PATCH 231/813] Allow transparent use of Pathnames Pathnames can now be used: * In `file` and `directory` tasks * As prerequisites of tasks * In FileLists, as `include` and `exclude` patterns, and also with the `<<` operator There is a new method on the Rake module called `from_pathname` (better name?) that calls either `to_path` or `to_str` on its argument; if neither of those methods are defined, it just returns the argument directly. `to_path` should be sufficient, but `to_path` was only implemented in Ruby 1.9, so `to_str` is there for 1.8.7 compatiblity. The `from_pathname` method uses a similar mechanism to that used by `File.open`, as described by Avdi Grimm in his excellent book, [Confident Ruby](http://www.confidentruby.com/). --- lib/rake/dsl_definition.rb | 1 + lib/rake/file_list.rb | 20 +++++++++++++++++--- lib/rake/file_task.rb | 2 +- lib/rake/task_manager.rb | 2 +- test/test_rake_directory_task.rb | 13 +++++++++++++ test/test_rake_file_list.rb | 28 ++++++++++++++++++++++++++++ test/test_rake_file_task.rb | 15 +++++++++++++++ 7 files changed, 76 insertions(+), 5 deletions(-) diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index 8420de7ee..0b2c65fcb 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -98,6 +98,7 @@ def file_create(*args, &block) def directory(*args, &block) # :doc: result = file_create(*args, &block) dir, _ = *Rake.application.resolve_args(args) + dir = Rake.from_pathname(dir) Rake.each_dir_parent(dir) do |d| file_create d do |t| mkdir_p t.name unless File.exist?(t.name) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index b01dbbb34..f72044ed3 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -49,7 +49,7 @@ class FileList # List of methods that should not be delegated here (we define special # versions of them explicitly below). - MUST_NOT_DEFINE = %w[to_a to_ary partition *] + MUST_NOT_DEFINE = %w[to_a to_ary partition * <<] # List of delegated methods that return new array values which need # wrapping. @@ -119,7 +119,7 @@ def include(*filenames) if fn.respond_to? :to_ary include(*fn.to_ary) else - @pending_add << fn + @pending_add << Rake.from_pathname(fn) end end @pending = true @@ -149,7 +149,7 @@ def include(*filenames) # def exclude(*patterns, &block) patterns.each do |pat| - @exclude_patterns << pat + @exclude_patterns << Rake.from_pathname(pat) end @exclude_procs << block if block_given? resolve_exclude unless @pending @@ -196,6 +196,12 @@ def *(other) end end + def <<(obj) + resolve + @items << Rake.from_pathname(obj) + self + end + # Resolve all the pending adds now. def resolve if @pending @@ -410,5 +416,13 @@ def each_dir_parent(dir) # :nodoc: dir = File.dirname(dir) end end + + # Convert Pathname and Pathname-like objects to strings; + # leave everything else alone + def from_pathname(path) # :nodoc: + path = path.to_path if path.respond_to?(:to_path) + path = path.to_str if path.respond_to?(:to_str) + path + end end end # module Rake diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index 03e26d967..11823bbe4 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -39,7 +39,7 @@ class << self # Apply the scope to the task name according to the rules for this kind # of task. File based tasks ignore the scope when creating the name. def scope_name(scope, task_name) - task_name + Rake.from_pathname(task_name) end end end diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index af53e3f58..221c68cec 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -35,7 +35,7 @@ def define_task(task_class, *args, &block) # :nodoc: task_name = task_class.scope_name(@scope, task_name) deps = [deps] unless deps.respond_to?(:to_ary) - deps = deps.map { |d| d.to_s } + deps = deps.map { |d| Rake.from_pathname(d).to_s } task = intern(task_class, task_name) task.set_arg_names(arg_names) unless arg_names.empty? if Rake::TaskManager.record_task_metadata diff --git a/test/test_rake_directory_task.rb b/test/test_rake_directory_task.rb index c8275e6d1..0014d1c15 100644 --- a/test/test_rake_directory_task.rb +++ b/test/test_rake_directory_task.rb @@ -1,5 +1,6 @@ require File.expand_path('../helper', __FILE__) require 'fileutils' +require 'pathname' class TestRakeDirectoryTask < Rake::TestCase include Rake @@ -60,4 +61,16 @@ def test_can_use_blocks assert_equal ["t2", "a/b/c"], runlist assert File.directory?("a/b/c") end + + def test_can_use_pathname + directory Pathname.new "a/b/c" + + assert_equal FileCreationTask, Task["a/b/c"].class + + verbose(false) { + Task['a/b/c'].invoke + } + + assert File.directory?("a/b/c") + end end diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 899f3bc50..c1b4c9208 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -1,4 +1,5 @@ require File.expand_path('../helper', __FILE__) +require 'pathname' class TestRakeFileList < Rake::TestCase FileList = Rake::FileList @@ -46,6 +47,12 @@ def test_create_with_args fl.sort end + def test_create_with_pathname + fl = FileList.new(Pathname.new("*.c")) + assert_equal ["abc.c", "x.c", "xyz.c"].sort, + fl.sort + end + def test_create_with_block fl = FileList.new { |f| f.include("x") } assert_equal ["x"], fl.resolve @@ -74,12 +81,24 @@ def test_include_with_another_filelist fl.sort end + def test_include_with_pathname + fl = FileList.new.include(Pathname.new("*.c")) + assert_equal ["abc.c", "x.c", "xyz.c"].sort, + fl.sort + end + def test_append fl = FileList.new fl << "a.rb" << "b.rb" assert_equal ['a.rb', 'b.rb'], fl end + def test_append_pathname + fl = FileList.new + fl << Pathname.new("a.rb") + assert_equal ['a.rb'], fl + end + def test_add_many fl = FileList.new fl.include %w(a d c) @@ -163,6 +182,15 @@ def test_exclude assert_equal [], fl end + def test_exclude_pathname + fl = FileList['x.c', 'abc.c', 'other'] + fl.each { |fn| touch fn, :verbose => false } + + fl.exclude(Pathname.new('*.c')) + + assert_equal ['other'], fl + end + def test_excluding_via_block fl = FileList['a.c', 'b.c', 'xyz.c'] fl.exclude { |fn| fn.pathmap('%n') == 'xyz' } diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index ae828c9ba..a6a9fa2c5 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -1,5 +1,6 @@ require File.expand_path('../helper', __FILE__) require 'fileutils' +require 'pathname' class TestRakeFileTask < Rake::TestCase include Rake @@ -162,6 +163,20 @@ def test_sources_is_all_prerequisites assert_equal ["preqA", "preqB"], t.sources end + def test_task_can_be_pathname + name = "dummy" + file Pathname.new name + + ftask = Task[name] + + assert_equal name.to_s, ftask.name + end + + def test_prerequisite_can_be_pathname + t = file :f => Pathname.new("preq") + assert_equal "preq", t.source + end + # I have currently disabled this test. I'm not convinced that # deleting the file target on failure is always the proper thing to # do. I'm willing to hear input on this topic. From ebf1f925fd03756e43795bd7c8d3a77859c40791 Mon Sep 17 00:00:00 2001 From: Randy Coulman Date: Mon, 28 Apr 2014 06:57:27 -0700 Subject: [PATCH 232/813] Support the `ext` and `pathmap` extensions on Pathnames. These extensions are not loaded automatically, because they require 'pathname' to be loaded, and I don't want to force that upon Rake users. Ideally, there would be a way to automatically define Pathname extension methods after the Pathname class has been defined, but I couldn't find a reasonable way to do that. So, in order to use Rake's extension methods on Pathnames, the client code must require 'rake/ext/pathname' explicitly. --- lib/rake/ext/pathname.rb | 25 +++++++++++++++++++++++++ test/test_rake_pathname_extensions.rb | 15 +++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 lib/rake/ext/pathname.rb create mode 100644 test/test_rake_pathname_extensions.rb diff --git a/lib/rake/ext/pathname.rb b/lib/rake/ext/pathname.rb new file mode 100644 index 000000000..49e2cd47a --- /dev/null +++ b/lib/rake/ext/pathname.rb @@ -0,0 +1,25 @@ +require 'rake/ext/core' +require 'pathname' + +class Pathname + + rake_extension("ext") do + # Return a new Pathname with String#ext applied to it. + # + # This Pathname extension comes from Rake + def ext(newext='') + Pathname.new(Rake.from_pathname(self).ext(newext)) + end + end + + rake_extension("pathmap") do + # Apply the pathmap spec to the Pathname, returning a + # new Pathname with the modified paths. (See String#pathmap for + # details.) + # + # This Pathname extension comes from Rake + def pathmap(spec=nil, &block) + Pathname.new(Rake.from_pathname(self).pathmap(spec, &block)) + end + end +end diff --git a/test/test_rake_pathname_extensions.rb b/test/test_rake_pathname_extensions.rb new file mode 100644 index 000000000..7da702d0c --- /dev/null +++ b/test/test_rake_pathname_extensions.rb @@ -0,0 +1,15 @@ +require File.expand_path('../helper', __FILE__) +require 'rake/ext/pathname' + +class TestRakePathnameExtensions < Rake::TestCase + def test_ext_works_on_pathnames + pathname = Pathname.new("abc.foo") + assert_equal Pathname.new("abc.bar"), pathname.ext("bar") + end + + def test_path_map_works_on_pathnames + pathname = Pathname.new("this/is/a/dir/abc.rb") + assert_equal Pathname.new("abc.rb"), pathname.pathmap("%f") + assert_equal Pathname.new("this/is/a/dir"), pathname.pathmap("%d") + end +end From 3e19ef87cc467f1a7689586f21414bbf99702c90 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sun, 4 May 2014 10:20:49 +0530 Subject: [PATCH 233/813] Ignore falsey dependencies When creating Rake tasks programatically, it could so happen that the prerequisites reach the point of creation as an argument. This change teaches the Rake DSL to ignore falsey (`nil' or `false') values when they are specified as the dependencies; this way, programmatic creation does not have to deal with a special case. --- lib/rake/task_manager.rb | 2 +- test/test_rake_definitions.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index af53e3f58..652250086 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -111,7 +111,7 @@ def resolve_args_with_dependencies(args, hash) # :nodoc: if args.empty? task_name = key arg_names = [] - deps = value + deps = value || [] else task_name = args.shift arg_names = key diff --git a/test/test_rake_definitions.rb b/test/test_rake_definitions.rb index 4b2de9d1d..ee474cb7c 100644 --- a/test/test_rake_definitions.rb +++ b/test/test_rake_definitions.rb @@ -59,6 +59,11 @@ def test_missing_dependencies assert_raises(RuntimeError) { Task[:x].invoke } end + def test_falsey_dependencies + task :x => nil + assert_equal [], Task[:x].prerequisites + end + def test_implicit_file_dependencies runs = [] create_existing_file From 92f449271bcd6cedddb06e024c9cf742f8d4a185 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 13 May 2014 15:22:09 -0700 Subject: [PATCH 234/813] Test display_exception_details Part of #272 --- test/test_rake_application.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index e639980df..8255083ce 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -16,6 +16,22 @@ def setup_command_line(*options) end end + def test_display_exception_details + begin + raise 'test' + rescue => ex + end + + out, err = capture_io do + @app.display_error_message ex + end + + assert_empty out + + assert_match 'rake aborted!', err + assert_match __method__.to_s, err + end + def test_display_tasks @app.options.show_tasks = :tasks @app.options.show_task_pattern = // From 3a8f06f76bfb17af35da2a07b16e475e54db5776 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 13 May 2014 15:27:05 -0700 Subject: [PATCH 235/813] Test display_exception_details with causes Part of #272 --- test/test_rake_application.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 8255083ce..e4397d0e4 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -32,6 +32,29 @@ def test_display_exception_details assert_match __method__.to_s, err end + def test_display_exception_details_cause + skip 'Exception#cause not implemented' unless + Exception.method_defined? :cause + + begin + raise 'cause a' + rescue + begin + raise 'cause b' + rescue => ex + end + end + + out, err = capture_io do + @app.display_error_message ex + end + + assert_empty out + + assert_match 'cause a', err + assert_match 'cause b', err + end + def test_display_tasks @app.options.show_tasks = :tasks @app.options.show_task_pattern = // From 57c932cea12ef3201fcaeaf80ba6f4f545390269 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 13 May 2014 15:36:53 -0700 Subject: [PATCH 236/813] Prevent infinite recursion via Exception#cause It is possible the causes of two exceptions to refer to each other. When displaying the causes to the user rake would raise a SystemStackError trying to show the causes repeatedly. Now rake looks for seen causes and stops when it sees the same cause a second time. Fixes #272 --- History.rdoc | 7 +++++++ lib/rake/application.rb | 4 ++++ test/test_rake_application.rb | 27 +++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/History.rdoc b/History.rdoc index 6be889a38..17aaea8a2 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,10 @@ +=== 10.3.2 + +Bug fixes: + +* Rake no longer infinitely loops when showing exception causes that refer to + each other. Bug #272 by Chris Bandy. + === 10.3.1 / 2014-04-17 Bug fixes: diff --git a/lib/rake/application.rb b/lib/rake/application.rb index e819f3ad9..795b4685d 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -202,6 +202,10 @@ def display_error_message(ex) # :nodoc: end def display_exception_details(ex) # :nodoc: + seen = Thread.current[:rake_display_exception_details_seen] ||= [] + return if seen.include? ex + seen << ex + display_exception_message_details(ex) display_exception_backtrace(ex) display_exception_details(ex.cause) if has_cause?(ex) diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index e4397d0e4..1532be1c9 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -55,6 +55,33 @@ def test_display_exception_details_cause assert_match 'cause b', err end + def test_display_exception_details_cause_loop + skip 'Exception#cause not implemented' unless + Exception.method_defined? :cause + + begin + begin + raise 'cause a' + rescue => a + begin + raise 'cause b' + rescue + raise a + end + end + rescue => ex + end + + out, err = capture_io do + @app.display_error_message ex + end + + assert_empty out + + assert_match 'cause a', err + assert_match 'cause b', err + end + def test_display_tasks @app.options.show_tasks = :tasks @app.options.show_task_pattern = // From 242a8c2bdf42db4193fb9e6df9d73cb0baef70c2 Mon Sep 17 00:00:00 2001 From: Jake Date: Wed, 14 May 2014 14:49:28 -0500 Subject: [PATCH 237/813] Fix some typos --- doc/command_line_usage.rdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/command_line_usage.rdoc b/doc/command_line_usage.rdoc index 4d13370ec..105d6c8e9 100644 --- a/doc/command_line_usage.rdoc +++ b/doc/command_line_usage.rdoc @@ -20,7 +20,7 @@ Options are: tracing details). The _output_ parameter is optional, but if specified it controls where the backtrace output is sent. If _output_ is stdout, then backtrace output is directed to - stardard output. If _output_ is stderr, or if it is + standard output. If _output_ is stderr, or if it is missing, then the backtrace output is sent to standard error. [--comments] @@ -49,7 +49,7 @@ Options are: [--jobs _number_ (-j)] - Specifies the maximun number of concurrent threads allowed. Rake + Specifies the maximum number of concurrent threads allowed. Rake will allocate threads as needed up to this maximum number. If omitted, Rake will attempt to estimate the number of CPUs on @@ -135,7 +135,7 @@ Options are: Turn on invoke/execute tracing. Also enable full backtrace on errors. The _output_ parameter is optional, but if specified it controls where the trace output is sent. If _output_ is - stdout, then trace output is directed to stardard output. + stdout, then trace output is directed to standard output. If _output_ is stderr, or if it is missing, then trace output is sent to standard error. From 6ccd20cd6e5d2b8fca66ee5978e4a94526e6f18e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 14 May 2014 13:27:36 -0700 Subject: [PATCH 238/813] Add #275 to History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 17aaea8a2..ecd07faad 100644 --- a/History.rdoc +++ b/History.rdoc @@ -4,6 +4,7 @@ Bug fixes: * Rake no longer infinitely loops when showing exception causes that refer to each other. Bug #272 by Chris Bandy. +* Fixed documentation typos. Bug #275 by Jake Worth. === 10.3.1 / 2014-04-17 From 92dfb1e3b8081161790f21f3de613abe280f98b8 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 15 May 2014 21:11:44 -0700 Subject: [PATCH 239/813] Set release version and date --- History.rdoc | 2 +- lib/rake.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index ecd07faad..7ffdb0673 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 10.3.2 +=== 10.3.2 / 2014-05-15 Bug fixes: diff --git a/lib/rake.rb b/lib/rake.rb index 71ddfc293..47cce1706 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '10.3.1' + VERSION = '10.3.2' end require 'rake/version' From 56dd2243bc4e055183d567441746b086640a4467 Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Thu, 29 May 2014 10:11:37 -0700 Subject: [PATCH 240/813] Point to github/ruby/rake --- CONTRIBUTING.rdoc | 6 +++--- README.rdoc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.rdoc b/CONTRIBUTING.rdoc index 0a962e062..243cfe84e 100644 --- a/CONTRIBUTING.rdoc +++ b/CONTRIBUTING.rdoc @@ -1,9 +1,9 @@ = Source Repository Rake is currently hosted at github. The github web page is -http://github.com/jimweirich/rake . The public git clone URL is +http://github.com/ruby/rake . The public git clone URL is - git://github.com/jimweirich/rake.git + git://github.com/ruby/rake.git = Running the Rake Test Suite @@ -30,5 +30,5 @@ addressed your issue. When submitting pull requests please check the rake Travis-CI page for test failures: - https://travis-ci.org/jimweirich/rake + https://travis-ci.org/ruby/rake diff --git a/README.rdoc b/README.rdoc index 72ca2bee9..01fce8d45 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,7 +1,7 @@ = RAKE -- Ruby Make -home :: https://github.com/jimweirich/rake -bugs :: https://github.com/jimweirich/rake/issues +home :: https://github.com/ruby/rake +bugs :: https://github.com/ruby/rake/issues docs :: http://docs.seattlerb.org/rake == Description From c1718ed77ef9c9645d330e091a5c420d6bd4684e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 29 May 2014 17:35:32 -0700 Subject: [PATCH 241/813] =?UTF-8?q?Add=20Avdi=20Grimm's=20rake=20episodes?= =?UTF-8?q?=205=E2=80=937=20to=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.rdoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rdoc b/README.rdoc index 72ca2bee9..9b2951515 100644 --- a/README.rdoc +++ b/README.rdoc @@ -86,6 +86,9 @@ Type "rake --help" for all available options. 2. {Rake File Lists}[http://devblog.avdi.org/2014/04/22/rake-part-2-file-lists/] 3. {Rake Rules}[http://devblog.avdi.org/2014/04/23/rake-part-3-rules/] 4. {Rake Pathmap}[http://devblog.avdi.org/2014/04/24/rake-part-4-pathmap/] + 5. {File Operations}[http://devblog.avdi.org/2014/04/25/rake-part-5-file-operations/] + 6. {Clean and Clobber}[http://devblog.avdi.org/2014/04/28/rake-part-6-clean-and-clobber/] + 7. {MultiTask}[http://devblog.avdi.org/2014/04/29/rake-part-7-multitask/] * Jim Weirich's 2003 RubyConf presentation: http://onestepback.org/articles/buildingwithrake/ * Martin Fowler's article on Rake: http://martinfowler.com/articles/rake.html From 989f618d704229337f8d790fe5288c82dd82a8c5 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 5 Jun 2014 16:57:05 +0900 Subject: [PATCH 242/813] backport from ruby/ruby --- test/support/ruby_runner.rb | 11 ++++++----- test/test_rake_clean.rb | 8 +++++++- test/test_rake_multi_task.rb | 6 ++++++ test/test_rake_task.rb | 3 ++- test/test_rake_task_with_arguments.rb | 1 + test/test_rake_thread_pool.rb | 4 ++++ 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/test/support/ruby_runner.rb b/test/support/ruby_runner.rb index 404e61a66..d51dd24b8 100644 --- a/test/support/ruby_runner.rb +++ b/test/support/ruby_runner.rb @@ -18,12 +18,13 @@ def rake(*rake_options) def run_ruby(option_list) puts "COMMAND: [#{RUBY} #{option_list.join ' '}]" if @verbose - inn, out, err, wait = Open3.popen3(RUBY, *option_list) - inn.close + Open3.popen3(RUBY, *option_list) {|inn, out, err, wait| + inn.close - @exit = wait ? wait.value : $? - @out = out.read - @err = err.read + @exit = wait ? wait.value : $? + @out = out.read + @err = err.read + } puts "OUTPUT: [#{@out}]" if @verbose puts "ERROR: [#{@err}]" if @verbose diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index 1e8eb499c..0bce7bc0b 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -41,7 +41,13 @@ def create_undeletable_file FileUtils.touch(file_name) FileUtils.chmod(0, file_name) FileUtils.chmod(0, dir_name) - file_name + begin + FileUtils.chmod(0644, file_name) + rescue + file_name + else + skip "Permission to delete files is different on thie system" + end end def remove_undeletable_file diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index fe10caf1d..9f8fed6d5 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -13,6 +13,12 @@ def setup @mutex = Mutex.new end + def teardown + Rake.application.thread_pool.join + + super + end + def add_run(obj) @mutex.synchronize do @runs << obj diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index c6edaad86..d7f14efcd 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -13,6 +13,7 @@ def setup def teardown Rake::TaskManager.record_task_metadata = false + Rake.application.thread_pool.join super end @@ -270,7 +271,7 @@ def test_always_multitask result = [] t_a = task(:a) do |t| - sleep 0.02 + sleep 0.2 mx.synchronize { result << t.name } end diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index 9d56ffbe8..8646fc041 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -12,6 +12,7 @@ def setup def teardown Rake::TaskManager.record_task_metadata = false + Rake.application.thread_pool.join super end diff --git a/test/test_rake_thread_pool.rb b/test/test_rake_thread_pool.rb index 93f32fb35..421c38d90 100644 --- a/test/test_rake_thread_pool.rb +++ b/test/test_rake_thread_pool.rb @@ -33,6 +33,8 @@ def test_pool_executes_in_two_other_threads_for_pool_of_size_two refute_equal threads[0], threads[1] refute_equal Thread.current, threads[0] refute_equal Thread.current, threads[1] + ensure + pool.join end def test_pool_creates_the_correct_number_of_threads @@ -95,6 +97,8 @@ def test_exceptions assert_raises(CustomError) do pool.future(2, &deep_exception_block).value end + ensure + pool.join end def test_pool_prevents_deadlock From f2ecec8d625bf900c5a33edb5f61e1ae80b1c17e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 13 Jun 2014 14:08:57 -0700 Subject: [PATCH 243/813] Use array-form sh arguments in PackageTask --- lib/rake/packagetask.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index 0c0678b35..e862952c0 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -127,7 +127,7 @@ def define file "#{package_dir}/#{file}" => [package_dir_path] + package_files do chdir(package_dir) do - sh %{#{@tar_command} #{flag}cvf #{file} #{package_name}} + sh @tar_command, "#{flag}cvf", file, package_name end end end @@ -138,7 +138,7 @@ def define file "#{package_dir}/#{zip_file}" => [package_dir_path] + package_files do chdir(package_dir) do - sh %{#{@zip_command} -r #{zip_file} #{package_name}} + sh @zip_command, "-r", zip_file, package_name end end end From c9429a7856f91d8325c8017e54dcd4d4e95f9281 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 13 Jun 2014 14:19:58 -0700 Subject: [PATCH 244/813] Use array-form sh arguments in SshPublisher --- lib/rake/contrib/sshpublisher.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rake/contrib/sshpublisher.rb b/lib/rake/contrib/sshpublisher.rb index 44bb8c530..64f577017 100644 --- a/lib/rake/contrib/sshpublisher.rb +++ b/lib/rake/contrib/sshpublisher.rb @@ -20,7 +20,7 @@ def initialize(host, remote_dir, local_dir) # Uploads the files def upload - sh %{scp -rq #{@local_dir}/* #{@host}:#{@remote_dir}} + sh "scp", "-rq", "#{@local_dir}/*", "#{@host}:#{@remote_dir}" end end @@ -30,8 +30,8 @@ class SshFreshDirPublisher < SshDirPublisher # Uploads the files after removing the existing remote directory. def upload - sh %{ssh #{@host} rm -rf #{@remote_dir}} rescue nil - sh %{ssh #{@host} mkdir #{@remote_dir}} + sh "ssh", @host, "rm", "-rf", @remote_dir rescue nil + sh "ssh", @host, "mkdir", @remote_dir super end end @@ -54,7 +54,7 @@ def initialize(host, remote_dir, local_dir, *files) def upload @files.each do |fn| - sh %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}} + sh "scp", "-q", "#{@local_dir}/#{fn}", "#{@host}:#{@remote_dir}" end end end From 803c6528d7f85c6515a6c21d9de6a560985d1509 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 13 Jun 2014 14:44:21 -0700 Subject: [PATCH 245/813] Use array-form sh arguments in DSL documentation --- lib/rake/dsl_definition.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index 8420de7ee..28e9631c3 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -150,7 +150,7 @@ def namespace(name=nil, &block) # :doc: # # Example: # rule '.o' => '.c' do |t| - # sh %{cc -o #{t.name} #{t.source}} + # sh 'cc', '-o', t.name, t.source # end # def rule(*args, &block) # :doc: From 752839c59f37dc447d9756e74a754956a823b21e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 13 Jun 2014 15:56:45 -0700 Subject: [PATCH 246/813] Improve FileUtils#sh documentation --- lib/rake/file_utils.rb | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index 0f7f459d8..27f4e2e1d 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -14,12 +14,24 @@ module FileUtils OPT_TABLE['sh'] = %w(noop verbose) OPT_TABLE['ruby'] = %w(noop verbose) - # Run the system command +cmd+. If multiple arguments are given the command - # is not run with the shell (same semantics as Kernel::exec and + # Run the system command +cmd+. If multiple arguments are given the command + # is run directly (without the shell, same semantics as Kernel::exec and # Kernel::system). # - # Example: - # sh %{ls -ltr} + # It is recommended you use the multiple argument form over interpolating + # user input for both usability and security reasons. With the multiple + # argument form you can easily process files with spaces or other shell + # reserved characters in them. With the multiple argument form your rake + # tasks are not vulnerable to users providing an argument like + # ; rm # -rf /. + # + # If a block is given, upon command completion the block is called with an + # OK flag (true on a zero exit status) and a Process::Status object. + # Without a block a RuntimeError is raised when the command exits non-zero. + # + # Examples: + # + # sh 'ls -ltr' # # sh 'ls', 'file with spaces' # From 11a4d02eb3294244fe81cfe1d6139554d88d2d69 Mon Sep 17 00:00:00 2001 From: Jed Northridge Date: Sun, 29 Jun 2014 22:43:02 -0400 Subject: [PATCH 247/813] Fix some typos --- lib/rake/cloneable.rb | 2 +- lib/rake/ext/string.rb | 2 +- lib/rake/file_list.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rake/cloneable.rb b/lib/rake/cloneable.rb index cd19cd373..d53645f2f 100644 --- a/lib/rake/cloneable.rb +++ b/lib/rake/cloneable.rb @@ -3,7 +3,7 @@ module Rake # Mixin for creating easily cloned objects. module Cloneable # :nodoc: - # The hook that invoked by 'clone' and 'dup' methods. + # The hook that is invoked by 'clone' and 'dup' methods. def initialize_copy(source) super source.instance_variables.each do |var| diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb index 34ee328f7..b47b055a7 100644 --- a/lib/rake/ext/string.rb +++ b/lib/rake/ext/string.rb @@ -49,7 +49,7 @@ def pathmap_partial(n) end protected :pathmap_partial - # Preform the pathmap replacement operations on the given path. The + # Perform the pathmap replacement operations on the given path. The # patterns take the form 'pat1,rep1;pat2,rep2...'. # # This String extension comes from Rake diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index b01dbbb34..b70cbdda7 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -346,7 +346,7 @@ def add_matching(pattern) # Should the given file name be excluded from the list? # - # NOTE: This method was formally named "exclude?", but Rails + # NOTE: This method was formerly named "exclude?", but Rails # introduced an exclude? method as an array method and setup a # conflict with file list. We renamed the method to avoid # confusion. If you were using "FileList#exclude?" in your user From 1131cc4151d48a45b983c4eb741d839656682d5a Mon Sep 17 00:00:00 2001 From: Edouard B Date: Thu, 3 Jul 2014 10:43:11 +0200 Subject: [PATCH 248/813] Update cpu_counter.rb Adding count_via_cpuinfo if RbConfig::CONFIG['host_os'] matches nothing --- lib/rake/cpu_counter.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index c05b69b7a..d7c92a6cb 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -38,7 +38,8 @@ def count count_via_win32 || count_via_sysctl || count_via_hwprefs_thread_count || - count_via_hwprefs_cpu_count + count_via_hwprefs_cpu_count || + count_via_cpuinfo end end end From 0d6dcd7a9b6c869c2ee9bfc5c8293d4b0924a23d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 8 Jul 2014 12:07:50 +0900 Subject: [PATCH 249/813] backport r43265 from ruby/ruby --- lib/rake/ext/module.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rake/ext/module.rb b/lib/rake/ext/module.rb index 34c83b0ea..3ee155ff6 100644 --- a/lib/rake/ext/module.rb +++ b/lib/rake/ext/module.rb @@ -1 +1,2 @@ + # TODO: remove in Rake 11 From 196c943261e322803ccab0fa30f41e1fdb3f0ea0 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 14 Jul 2014 13:01:47 -0700 Subject: [PATCH 250/813] Add #280 to History --- History.rdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/History.rdoc b/History.rdoc index 7ffdb0673..99b96de91 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,9 @@ +=== 10.3.3 + +Bug fixes: + +* Fixed some typos. Pull request #280 by Jed Northridge. + === 10.3.2 / 2014-05-15 Bug fixes: From f374191fdeca537c57472bb2b469f4b5faa8ed7f Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 14 Jul 2014 16:52:44 -0700 Subject: [PATCH 251/813] Add #282 to History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index 99b96de91..f3932db7f 100644 --- a/History.rdoc +++ b/History.rdoc @@ -3,6 +3,8 @@ Bug fixes: * Fixed some typos. Pull request #280 by Jed Northridge. +* Also try counting CPUs via cpuinfo if host_os was not matched. Pull request + #282 by Edouard B. === 10.3.2 / 2014-05-15 From 3a2943e30be6cfa7be974afefa8ebcb9d6449116 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 21 Jul 2014 18:48:13 +0200 Subject: [PATCH 252/813] backport r46890 from ruby/ruby trunk --- test/test_rake_application.rb | 4 +++- test/test_rake_test_task.rb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 1532be1c9..f52040471 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -17,8 +17,10 @@ def setup_command_line(*options) end def test_display_exception_details + obj = Object.new + obj.instance_eval("def #{__method__}; raise 'test'; end", "ruby") begin - raise 'test' + obj.__send__(__method__) rescue => ex end diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 9b500dc04..80fe9a28b 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -105,7 +105,7 @@ def test_run_code_rake_default_gem t.loader = :rake end - assert_match(/\A ".*?"\Z/, test_task.run_code) + assert_match(/\A(-I".*?" *)* ".*?"\Z/, test_task.run_code) ensure Gem.loaded_specs['rake'] = rake end From f3f53f3c8b7de8d11ea8028cd4cc889763d6482e Mon Sep 17 00:00:00 2001 From: David Grayson Date: Wed, 30 Jul 2014 22:27:10 -0700 Subject: [PATCH 253/813] FileTask: Return a late timestamp instead of an early timestamp if the file does not exist. This should fix issue #286. --- lib/rake.rb | 1 + lib/rake/file_task.rb | 2 +- lib/rake/late_time.rb | 17 +++++++++++++++++ test/test_rake_file_task.rb | 12 ++++-------- test/test_rake_late_time.rb | 18 ++++++++++++++++++ 5 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 lib/rake/late_time.rb create mode 100644 test/test_rake_late_time.rb diff --git a/lib/rake.rb b/lib/rake.rb index 47cce1706..a170c6fdd 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -63,6 +63,7 @@ module Rake require 'rake/file_list' require 'rake/default_loader' require 'rake/early_time' +require 'rake/late_time' require 'rake/name_space' require 'rake/task_manager' require 'rake/application' diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index 03e26d967..3f10f095a 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -21,7 +21,7 @@ def timestamp if File.exist?(name) File.mtime(name.to_s) else - Rake::EARLY + Rake::LATE end end diff --git a/lib/rake/late_time.rb b/lib/rake/late_time.rb new file mode 100644 index 000000000..d959a7821 --- /dev/null +++ b/lib/rake/late_time.rb @@ -0,0 +1,17 @@ +module Rake + # LateTime is a fake timestamp that occurs _after_ any other time value. + class LateTime + include Comparable + include Singleton + + def <=>(other) + 1 + end + + def to_s + '' + end + end + + LATE = LateTime.instance +end diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index ae828c9ba..40c135d1a 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -23,6 +23,7 @@ def test_file_need File.delete(ftask.name) rescue nil assert ftask.needed?, "file should be needed" + assert_equal Rake::LATE, ftask.timestamp open(ftask.name, "w") { |f| f.puts "HI" } @@ -83,19 +84,14 @@ def test_file_depends_on_task_depend_on_file end def test_existing_file_depends_on_non_existing_file - @ran = false - create_file(OLDFILE) delete_file(NEWFILE) - file NEWFILE do - @ran = true - end - - file OLDFILE => NEWFILE + file NEWFILE do |t| @runs << t.name end + file OLDFILE => NEWFILE do |t| @runs << t.name end Task[OLDFILE].invoke - assert @ran + assert_equal [NEWFILE, OLDFILE], @runs end def test_needed_eh_build_all diff --git a/test/test_rake_late_time.rb b/test/test_rake_late_time.rb new file mode 100644 index 000000000..4b910a708 --- /dev/null +++ b/test/test_rake_late_time.rb @@ -0,0 +1,18 @@ +require File.expand_path('../helper', __FILE__) + +class TestRakeLateTime < Rake::TestCase + def test_late_time_comparisons + late = Rake::LATE + assert_equal late, late + assert late >= Time.now + assert late > Time.now + assert late != Time.now + assert Time.now < late + assert Time.now <= late + assert Time.now != late + end + + def test_to_s + assert_equal '', Rake::LATE.to_s + end +end From 6f62942d63e9cc7bcee539ace31074fcbd3dd66d Mon Sep 17 00:00:00 2001 From: David Grayson Date: Thu, 31 Jul 2014 20:17:07 -0700 Subject: [PATCH 254/813] Update our monkey patch of Time#<=> to consider Rake::LateTime. This makes the tests pass on Ruby 1.8.7. --- lib/rake/ext/time.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rake/ext/time.rb b/lib/rake/ext/time.rb index c058649b7..d3b8cf9dc 100644 --- a/lib/rake/ext/time.rb +++ b/lib/rake/ext/time.rb @@ -1,12 +1,13 @@ #-- -# Extensions to time to allow comparisons with an early time class. +# Extensions to time to allow comparisons with early and late time classes. require 'rake/early_time' +require 'rake/late_time' class Time # :nodoc: all alias rake_original_time_compare :<=> def <=>(other) - if Rake::EarlyTime === other + if Rake::EarlyTime === other || Rake::LateTime === other - other.<=>(self) else rake_original_time_compare(other) From b6854e6429f2badcf9b65187f820534beb9c9461 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 16 Aug 2014 18:50:27 +0900 Subject: [PATCH 255/813] backport r47199 from ruby/ruby trunk. --- lib/rake/backtrace.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/backtrace.rb b/lib/rake/backtrace.rb index 439255d78..c9b0a7c08 100644 --- a/lib/rake/backtrace.rb +++ b/lib/rake/backtrace.rb @@ -1,6 +1,6 @@ module Rake module Backtrace # :nodoc: all - SYS_KEYS = RbConfig::CONFIG.keys.grep(/(prefix|libdir)/) + SYS_KEYS = RbConfig::CONFIG.keys.grep(/(?:prefix|libdir)\z/) SYS_PATHS = RbConfig::CONFIG.values_at(*SYS_KEYS).uniq + [ File.join(File.dirname(__FILE__), "..") ] From bc3bde9b8bf2bed65469960e1cd3a8ac05ae9d90 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 16 Aug 2014 18:51:45 +0900 Subject: [PATCH 256/813] backport r47200 from ruby/ruby trunk. --- lib/rake/backtrace.rb | 2 +- test/test_rake_backtrace.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/backtrace.rb b/lib/rake/backtrace.rb index c9b0a7c08..dc1877343 100644 --- a/lib/rake/backtrace.rb +++ b/lib/rake/backtrace.rb @@ -1,6 +1,6 @@ module Rake module Backtrace # :nodoc: all - SYS_KEYS = RbConfig::CONFIG.keys.grep(/(?:prefix|libdir)\z/) + SYS_KEYS = RbConfig::CONFIG.keys.grep(/(?:[a-z]prefix|libdir)\z/) SYS_PATHS = RbConfig::CONFIG.values_at(*SYS_KEYS).uniq + [ File.join(File.dirname(__FILE__), "..") ] diff --git a/test/test_rake_backtrace.rb b/test/test_rake_backtrace.rb index a60f251cc..78eaa8d52 100644 --- a/test/test_rake_backtrace.rb +++ b/test/test_rake_backtrace.rb @@ -42,7 +42,7 @@ def setup super skip 'tmpdir is suppressed in backtrace' if - Dir.pwd =~ Rake::Backtrace::SUPPRESS_PATTERN + Rake::Backtrace::SUPPRESS_PATTERN =~ Dir.pwd end def invoke(*args) From db8cceed6926cb823b3eba6fa85196cb56db21fd Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 27 Aug 2014 21:24:57 +0900 Subject: [PATCH 257/813] backport r47299 from ruby/ruby trunk. --- lib/rake/invocation_chain.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/invocation_chain.rb b/lib/rake/invocation_chain.rb index 690435169..540628957 100644 --- a/lib/rake/invocation_chain.rb +++ b/lib/rake/invocation_chain.rb @@ -31,7 +31,7 @@ def self.append(invocation, chain) private def prefix - "#{tail.to_s} => " + "#{tail} => " end # Null object for an empty chain. From c136ebd340ddea674164dda1e308a2893cd9817b Mon Sep 17 00:00:00 2001 From: skittleys Date: Thu, 28 Aug 2014 11:37:15 -0400 Subject: [PATCH 258/813] better manpage --- doc/rake.1 | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 doc/rake.1 diff --git a/doc/rake.1 b/doc/rake.1 new file mode 100644 index 000000000..b63ed49ed --- /dev/null +++ b/doc/rake.1 @@ -0,0 +1,141 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH RAKE 1 "August 27, 2014" "rake 10.3.2" "Rake User Commands" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +rake \- a make-like build utility for Ruby +.SH SYNOPSIS +\fBrake\fR [\fI\-f rakefile\fR] {\fIOPTIONS\fR} \fITARGETS...\fR +.br +.SH DESCRIPTION +.B rake +is a make-like build utility for Ruby. Tasks and dependencies are specified in +standard Ruby syntax. +.SH OPTIONS +.TP +\fB\-m\fR, \fB\-\-multitask\fR +Treat all tasks as multitasks. +.TP +\fB\-B\fR, \fB\-\-build\-all\fR +Build all prerequisites, including those which are up\-to\-date. + +.TP +\fB\-j\fR, \fB\-\-jobs\fR [\fINUMBER\fR] +Specifies the maximum number of tasks to execute in parallel (default is number of CPU cores + 4). + +.SS Modules +.TP +\fB\-I\fR, \fB\-\-libdir\fR \fILIBDIR\fR +Include \fILIBDIR\fR in the search path for required modules. +.TP +\fB\-r\fR, \fB\-\-require\fR \fIMODULE\fR +Require \fIMODULE\fR before executing rakefile. + +.SS Rakefile location +.TP +\fB\-f\fR, \fB\-\-rakefile\fR [\fIFILENAME\fR] +Use \fIFILENAME\fR as the rakefile to search for. +.TP +\fB\-N\fR, \fB\-\-no\-search\fR, \fB\-\-nosearch\fR +Do not search parent directories for the Rakefile. +.TP +\fB\-G\fR, \fB\-\-no\-system\fR, \fB\-\-nosystem\fR +Use standard project Rakefile search paths, ignore system wide rakefiles. +.TP +\fB\-R\fR, \fB\-\-rakelibdir\fR \fIRAKELIBDIR\fR +Auto\-import any .rake files in \fIRAKELIBDIR\fR (default is 'rakelib') +.HP +\fB\-\-rakelib\fR +.TP +\fB\-g\fR, \fB\-\-system\fR +Using system wide (global) rakefiles (usually '\fI~/.rake/*.rake\fR'). + +.SS Debugging +.TP +\fB\-\-backtrace\fR=\fI\,[OUT]\/\fR +Enable full backtrace. \fIOUT\fR can be stderr (default) or stdout. +.TP +\fB\-t\fR, \fB\-\-trace\fR=\fI\,[OUT]\/\fR +Turn on invoke/execute tracing, enable full backtrace. \fIOUT\fR can be stderr (default) or stdout. +.TP +\fB\-\-suppress\-backtrace\fR \fIPATTERN\fR +Suppress backtrace lines matching regexp \fIPATTERN\fR. Ignored if \fI\-\-trace\fR is on. +.TP +\fB\-\-rules\fR +Trace the rules resolution. + +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Do a dry run without executing actions. +.TP +\fB\-T\fR, \fB\-\-tasks\fR [\fIPATTERN\fR] +Display the tasks (matching optional \fIPATTERN\fR) with descriptions, then exit. +.TP +\fB\-D\fR, \fB\-\-describe\fR [\fIPATTERN\fR] +Describe the tasks (matching optional \fIPATTERN\fR), then exit. +.TP +\fB\-W\fR, \fB\-\-where\fR [\fIPATTERN\fR] +Describe the tasks (matching optional \fIPATTERN\fR), then exit. +.TP +\fB\-P\fR, \fB\-\-prereqs\fR +Display the tasks and dependencies, then exit. + +.TP +\fB\-e\fR, \fB\-\-execute\fR \fICODE\fR +Execute some Ruby code and exit. +.TP +\fB\-p\fR, \fB\-\-execute\-print\fR \fICODE\fR +Execute some Ruby code, print the result, then exit. +.TP +\fB\-E\fR, \fB\-\-execute\-continue\fR \fICODE\fR +Execute some Ruby code, then continue with normal task processing. + +.SS Information +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Log message to standard output. +.TP +\fB\-q\fR, \fB\-\-quiet\fR +Do not log messages to standard output. +.TP +\fB\-s\fR, \fB\-\-silent\fR +Like \fB\-\-quiet\fR, but also suppresses the 'in directory' announcement. +.TP +\fB\-X\fR, \fB\-\-no\-deprecation\-warnings\fR +Disable the deprecation warnings. +.TP +\fB\-\-comments\fR +Show commented tasks only +.TP +\fB\-A\fR, \fB\-\-all\fR +Show all tasks, even uncommented ones (in combination with \fB\-T\fR or \fB\-D\fR) +.TP +\fB\-\-job\-stats\fR [\fILEVEL\fR] +Display job statistics. \fILEVEL=history\fR displays a complete job list +.TP +\fB\-V\fR, \fB\-\-version\fR +Display the program version. +.TP +\fB\-h\fR, \fB\-H\fR, \fB\-\-help\fR +Display a help message. + +.SH SEE ALSO +The complete documentation for \fBrake\fR has been installed at \fI/usr/share/doc/rake-doc/html/index.html\fR. It is also available online at \fIhttp://docs.seattlerb.org/rake\fR. +.SH AUTHOR +.B rake +was written by Jim Weirich +.PP +This manual was created by Caitlin Matos for the Debian project (but may be used by others). It was inspired by the manual by Jani Monoses for the Ubuntu project. From 727c63788f35a413ae260cb2b211a2947162d60b Mon Sep 17 00:00:00 2001 From: skittleys Date: Thu, 28 Aug 2014 11:39:19 -0400 Subject: [PATCH 259/813] removed old manpage --- doc/rake.1.gz | Bin 1369 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 doc/rake.1.gz diff --git a/doc/rake.1.gz b/doc/rake.1.gz deleted file mode 100644 index d323267771560806afe32240a5393773a714a90e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1369 zcmV-f1*ZBRiwFqkr(jY519D+&WiBxQomSg!+eQ$5=T{8!5~-EwxImG@NZdHF0;}~! zkmNQ&-G?PPG&iPpnY~zHzrJUeq$~@0C~6qCyfb@d=FFK{r*|*tKYd+rJE7Ut*@x8$ zO@Ek@GP*3orz8c$M`^61Mi{YS$7Vv;XIHZc*-HDmpo~e>HRYnQ(R;i*iYW870 zzq#JOaXkHHLL1TIsuiLO4XPSn(sm8Ge*js(aWX zek1NV4OhFO^oA*tvJtt_c0#2NcS<&_az2Spsj3D-3u#4GGgWPa0Ag2KTD5}Uq9Be~x)ajms`tg`})3`Reb~yyLdQzvh;arw7-%htx@Vl`hS>3cHqa5<;HNH>95OMfS* zBs!kYRv(u0MNs76OO>#(@1+hZ3o0mCIB(dVB*_o7gbzqzOQYca(h?M7flIoitHC&q zI?Z)R*m2!bfpf(Lcu9z?LwAHJXz8<-Y^$93mJ(fS`gCowSmG#roE$)47m$*pPa}DL<_Qw$obcC$ot8v%i$+VnY$PrlMeMc zBQx*7Netf)y3t=S{TOq6hcdx`r$WZ{#bAv!7ThpI?i+9)J6C8@+EJ_m><1@6L=z%H zkq(Ok@!;<;6YNleb-W1~r;9}t=bAr}k2GN;g=-t#H4>_IaUx>2K_GYK`!`#}2rJ|C zu3UtXix_w1{JDWGHX^7*Vqrr>_N02$1rpQHa)}PbftAQm<`{#B1IaaE6+S{hY1HdY zlqz(+UL@0LVcMzjYJYi;rfQs=YqT9k3dWFbkOqI_+`AxW5w|Of?ocYOn}a7{G`#?d zv`q~T;(m-y8@9IFgz;i6vqGA;m-F}M^W|`HK2GK;uRTiZ4N^t6EDMuYK|oc%FJqSq z5L`f6yL6Q9J@?bOjzxv$?qINMAps!dP8$hM184{|4CnyZ>DoT8Z?Rt=_hS$`(1{9N z0^}sv6qv&p_F%{vvN<5@>n^)m-w!NxBQgv+I?(tXis@5)`*D6b8&Jw|g88I))UP0O zP)g6)+pC-N+y3HcYR1X3SA2h-aT!GW)bT?ci_gj(RAI--rNpT8MNY71u}5mF;|hQl zEq7VHL`MhW+m~QXX%AIz067Hc_&f-({-2yX6UO5J%#D+^H!93>n4||j>dFN!+)?yo z_kwx+N0N#BA>s_6KJ@4iw0g?W?<*a1oI#e)ogcy1Q@g*@Z5mwUv&3NPAhMrW6+o8+_hafRYFDR%G6u>Nu%nh^hg2oFt)={xe)9N7xvas>O4 z8J@_q+x5lGvU^&$klWTsY<8^XmVT2P`je%Rn6o!uHTpCe#`!k$%K718 bpixj|znYOw5kTV8VZrjh-^fVx Date: Fri, 6 Jun 2014 12:09:16 -0700 Subject: [PATCH 260/813] Document argument parsing change in test --- test/test_rake_task_argument_parsing.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test_rake_task_argument_parsing.rb b/test/test_rake_task_argument_parsing.rb index 0294a9fb2..3cb5d9cfe 100644 --- a/test/test_rake_task_argument_parsing.rb +++ b/test/test_rake_task_argument_parsing.rb @@ -49,6 +49,16 @@ def test_can_handle_commas_in_args assert_equal ["one", "two", "three_a, three_b", "four"], args end + def test_treat_blank_arg_as_empty_string + name, args = @app.parse_task_string("name[one,]") + assert_equal "name", name + assert_equal ["one", ""], args + + name, args = @app.parse_task_string("name[one,,two]") + assert_equal "name", name + assert_equal ["one", "", "two"], args + end + def test_terminal_width_using_env app = Rake::Application.new app.terminal_columns = 1234 From 91af6938586545f46fda26e51d9833c833304788 Mon Sep 17 00:00:00 2001 From: Randy Coulman Date: Fri, 25 Apr 2014 08:28:47 -0700 Subject: [PATCH 261/813] Allow transparent use of Pathnames Pathnames can now be used: * In `file` and `directory` tasks * As prerequisites of tasks * In FileLists, as `include` and `exclude` patterns, and also with the `<<` operator There is a new method on the Rake module called `from_pathname` (better name?) that calls either `to_path` or `to_str` on its argument; if neither of those methods are defined, it just returns the argument directly. `to_path` should be sufficient, but `to_path` was only implemented in Ruby 1.9, so `to_str` is there for 1.8.7 compatiblity. The `from_pathname` method uses a similar mechanism to that used by `File.open`, as described by Avdi Grimm in his excellent book, [Confident Ruby](http://www.confidentruby.com/). --- lib/rake/dsl_definition.rb | 1 + lib/rake/file_list.rb | 20 +++++++++++++++++--- lib/rake/file_task.rb | 2 +- lib/rake/task_manager.rb | 2 +- test/test_rake_directory_task.rb | 13 +++++++++++++ test/test_rake_file_list.rb | 28 ++++++++++++++++++++++++++++ test/test_rake_file_task.rb | 15 +++++++++++++++ 7 files changed, 76 insertions(+), 5 deletions(-) diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index 28e9631c3..b521b7dc5 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -98,6 +98,7 @@ def file_create(*args, &block) def directory(*args, &block) # :doc: result = file_create(*args, &block) dir, _ = *Rake.application.resolve_args(args) + dir = Rake.from_pathname(dir) Rake.each_dir_parent(dir) do |d| file_create d do |t| mkdir_p t.name unless File.exist?(t.name) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index b70cbdda7..006ec7703 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -49,7 +49,7 @@ class FileList # List of methods that should not be delegated here (we define special # versions of them explicitly below). - MUST_NOT_DEFINE = %w[to_a to_ary partition *] + MUST_NOT_DEFINE = %w[to_a to_ary partition * <<] # List of delegated methods that return new array values which need # wrapping. @@ -119,7 +119,7 @@ def include(*filenames) if fn.respond_to? :to_ary include(*fn.to_ary) else - @pending_add << fn + @pending_add << Rake.from_pathname(fn) end end @pending = true @@ -149,7 +149,7 @@ def include(*filenames) # def exclude(*patterns, &block) patterns.each do |pat| - @exclude_patterns << pat + @exclude_patterns << Rake.from_pathname(pat) end @exclude_procs << block if block_given? resolve_exclude unless @pending @@ -196,6 +196,12 @@ def *(other) end end + def <<(obj) + resolve + @items << Rake.from_pathname(obj) + self + end + # Resolve all the pending adds now. def resolve if @pending @@ -410,5 +416,13 @@ def each_dir_parent(dir) # :nodoc: dir = File.dirname(dir) end end + + # Convert Pathname and Pathname-like objects to strings; + # leave everything else alone + def from_pathname(path) # :nodoc: + path = path.to_path if path.respond_to?(:to_path) + path = path.to_str if path.respond_to?(:to_str) + path + end end end # module Rake diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index 03e26d967..11823bbe4 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -39,7 +39,7 @@ class << self # Apply the scope to the task name according to the rules for this kind # of task. File based tasks ignore the scope when creating the name. def scope_name(scope, task_name) - task_name + Rake.from_pathname(task_name) end end end diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index af53e3f58..221c68cec 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -35,7 +35,7 @@ def define_task(task_class, *args, &block) # :nodoc: task_name = task_class.scope_name(@scope, task_name) deps = [deps] unless deps.respond_to?(:to_ary) - deps = deps.map { |d| d.to_s } + deps = deps.map { |d| Rake.from_pathname(d).to_s } task = intern(task_class, task_name) task.set_arg_names(arg_names) unless arg_names.empty? if Rake::TaskManager.record_task_metadata diff --git a/test/test_rake_directory_task.rb b/test/test_rake_directory_task.rb index c8275e6d1..0014d1c15 100644 --- a/test/test_rake_directory_task.rb +++ b/test/test_rake_directory_task.rb @@ -1,5 +1,6 @@ require File.expand_path('../helper', __FILE__) require 'fileutils' +require 'pathname' class TestRakeDirectoryTask < Rake::TestCase include Rake @@ -60,4 +61,16 @@ def test_can_use_blocks assert_equal ["t2", "a/b/c"], runlist assert File.directory?("a/b/c") end + + def test_can_use_pathname + directory Pathname.new "a/b/c" + + assert_equal FileCreationTask, Task["a/b/c"].class + + verbose(false) { + Task['a/b/c'].invoke + } + + assert File.directory?("a/b/c") + end end diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 899f3bc50..c1b4c9208 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -1,4 +1,5 @@ require File.expand_path('../helper', __FILE__) +require 'pathname' class TestRakeFileList < Rake::TestCase FileList = Rake::FileList @@ -46,6 +47,12 @@ def test_create_with_args fl.sort end + def test_create_with_pathname + fl = FileList.new(Pathname.new("*.c")) + assert_equal ["abc.c", "x.c", "xyz.c"].sort, + fl.sort + end + def test_create_with_block fl = FileList.new { |f| f.include("x") } assert_equal ["x"], fl.resolve @@ -74,12 +81,24 @@ def test_include_with_another_filelist fl.sort end + def test_include_with_pathname + fl = FileList.new.include(Pathname.new("*.c")) + assert_equal ["abc.c", "x.c", "xyz.c"].sort, + fl.sort + end + def test_append fl = FileList.new fl << "a.rb" << "b.rb" assert_equal ['a.rb', 'b.rb'], fl end + def test_append_pathname + fl = FileList.new + fl << Pathname.new("a.rb") + assert_equal ['a.rb'], fl + end + def test_add_many fl = FileList.new fl.include %w(a d c) @@ -163,6 +182,15 @@ def test_exclude assert_equal [], fl end + def test_exclude_pathname + fl = FileList['x.c', 'abc.c', 'other'] + fl.each { |fn| touch fn, :verbose => false } + + fl.exclude(Pathname.new('*.c')) + + assert_equal ['other'], fl + end + def test_excluding_via_block fl = FileList['a.c', 'b.c', 'xyz.c'] fl.exclude { |fn| fn.pathmap('%n') == 'xyz' } diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index ae828c9ba..a6a9fa2c5 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -1,5 +1,6 @@ require File.expand_path('../helper', __FILE__) require 'fileutils' +require 'pathname' class TestRakeFileTask < Rake::TestCase include Rake @@ -162,6 +163,20 @@ def test_sources_is_all_prerequisites assert_equal ["preqA", "preqB"], t.sources end + def test_task_can_be_pathname + name = "dummy" + file Pathname.new name + + ftask = Task[name] + + assert_equal name.to_s, ftask.name + end + + def test_prerequisite_can_be_pathname + t = file :f => Pathname.new("preq") + assert_equal "preq", t.source + end + # I have currently disabled this test. I'm not convinced that # deleting the file target on failure is always the proper thing to # do. I'm willing to hear input on this topic. From 66e495a1fed576b7201520fcd3b9804d53fc93b3 Mon Sep 17 00:00:00 2001 From: Randy Coulman Date: Mon, 28 Apr 2014 06:57:27 -0700 Subject: [PATCH 262/813] Support the `ext` and `pathmap` extensions on Pathnames. These extensions are not loaded automatically, because they require 'pathname' to be loaded, and I don't want to force that upon Rake users. Ideally, there would be a way to automatically define Pathname extension methods after the Pathname class has been defined, but I couldn't find a reasonable way to do that. So, in order to use Rake's extension methods on Pathnames, the client code must require 'rake/ext/pathname' explicitly. --- lib/rake/ext/pathname.rb | 25 +++++++++++++++++++++++++ test/test_rake_pathname_extensions.rb | 15 +++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 lib/rake/ext/pathname.rb create mode 100644 test/test_rake_pathname_extensions.rb diff --git a/lib/rake/ext/pathname.rb b/lib/rake/ext/pathname.rb new file mode 100644 index 000000000..49e2cd47a --- /dev/null +++ b/lib/rake/ext/pathname.rb @@ -0,0 +1,25 @@ +require 'rake/ext/core' +require 'pathname' + +class Pathname + + rake_extension("ext") do + # Return a new Pathname with String#ext applied to it. + # + # This Pathname extension comes from Rake + def ext(newext='') + Pathname.new(Rake.from_pathname(self).ext(newext)) + end + end + + rake_extension("pathmap") do + # Apply the pathmap spec to the Pathname, returning a + # new Pathname with the modified paths. (See String#pathmap for + # details.) + # + # This Pathname extension comes from Rake + def pathmap(spec=nil, &block) + Pathname.new(Rake.from_pathname(self).pathmap(spec, &block)) + end + end +end diff --git a/test/test_rake_pathname_extensions.rb b/test/test_rake_pathname_extensions.rb new file mode 100644 index 000000000..7da702d0c --- /dev/null +++ b/test/test_rake_pathname_extensions.rb @@ -0,0 +1,15 @@ +require File.expand_path('../helper', __FILE__) +require 'rake/ext/pathname' + +class TestRakePathnameExtensions < Rake::TestCase + def test_ext_works_on_pathnames + pathname = Pathname.new("abc.foo") + assert_equal Pathname.new("abc.bar"), pathname.ext("bar") + end + + def test_path_map_works_on_pathnames + pathname = Pathname.new("this/is/a/dir/abc.rb") + assert_equal Pathname.new("abc.rb"), pathname.pathmap("%f") + assert_equal Pathname.new("this/is/a/dir"), pathname.pathmap("%d") + end +end From e47d02344c4a869e9102324691947f28da4021a0 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 6 Sep 2014 18:28:48 +0900 Subject: [PATCH 263/813] handled load failure for minitest4, backport from ruby/ruby trunk. --- test/helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index 07a45a6e0..992c6bffa 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,7 +1,10 @@ require 'rubygems' $:.unshift File.expand_path('../../lib', __FILE__) -gem 'minitest', '~> 4' +begin + gem 'minitest', '~> 4' +rescue Gem::LoadError +end require 'minitest/autorun' require 'rake' From 5fc3fe004c30afac45678085a9335f5856d556fc Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 6 Sep 2014 18:41:25 +0900 Subject: [PATCH 264/813] Add #271 to History --- History.rdoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/History.rdoc b/History.rdoc index f3932db7f..73dca9ddc 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,5 +1,9 @@ === 10.3.3 +Enhancements: + +* Added to use Pathnames when working with Rake. Pull request #271 by Randy Coulman. + Bug fixes: * Fixed some typos. Pull request #280 by Jed Northridge. From b76941753d7d7f506e526c852ec6d892a5ff455c Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 25 Oct 2014 18:34:46 +0900 Subject: [PATCH 265/813] backport r48127 from ruby/ruby trunk. --- lib/rake/cpu_counter.rb | 12 ++++++ test/test_rake_cpu_counter.rb | 74 ++++++++++++++++++++++------------- 2 files changed, 58 insertions(+), 28 deletions(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index d7c92a6cb..6d0b878b1 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -44,6 +44,18 @@ def count end end + begin + require 'etc' + rescue LoadError + else + if Etc.respond_to?(:nprocessors) + undef count + def count + return Etc.nprocessors + end + end + end + def count_via_java_runtime Java::Java.lang.Runtime.getRuntime.availableProcessors rescue StandardError diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb index ccf21d8ba..87d0601c6 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -8,43 +8,61 @@ def setup @cpu_counter = Rake::CpuCounter.new end - def test_count_via_win32 - if Rake::Win32.windows? then - assert_kind_of Numeric, @cpu_counter.count_via_win32 - else - assert_nil @cpu_counter.count_via_win32 - end + def test_count + num = @cpu_counter.count + skip 'cannot count CPU' if num == nil + assert_kind_of Numeric, num + assert_operator num, :>=, 1 end - def test_in_path_command - with_ruby_in_path do |ruby| - assert_equal ruby, @cpu_counter.in_path_command(ruby) - end - rescue Errno::ENOENT => e - raise unless e.message =~ /\bwhich\b/ + def test_count_with_default_nil + def @cpu_counter.count; nil; end + assert_equal(8, @cpu_counter.count_with_default(8)) + assert_equal(4, @cpu_counter.count_with_default) + end - skip 'cannot find which for this test' + def test_count_with_default_raise + def @cpu_counter.count; raise; end + assert_equal(8, @cpu_counter.count_with_default(8)) + assert_equal(4, @cpu_counter.count_with_default) end - def test_run - with_ruby_in_path do |ruby| - assert_equal 7, @cpu_counter.run(ruby, '-e', 'puts 3 + 4') + class TestClassMethod < Rake::TestCase + def setup + super + + @klass = Class.new(Rake::CpuCounter) end - end - def with_ruby_in_path - ruby = File.basename Gem.ruby - ruby_dir = File.dirname Gem.ruby + def test_count + @klass.class_eval do + def count; 8; end + end + assert_equal(8, @klass.count) + end - begin - orig_path, ENV['PATH'] = - ENV['PATH'], [ruby_dir, *ENV['PATH']].join(File::PATH_SEPARATOR) + def test_count_nil + counted = false + @klass.class_eval do + define_method(:count) do + counted = true + nil + end + end + assert_equal(4, @klass.count) + assert_equal(true, counted) + end - yield ruby - ensure - ENV['PATH'] = orig_path + def test_count_raise + counted = false + @klass.class_eval do + define_method(:count) do + counted = true + raise + end + end + assert_equal(4, @klass.count) + assert_equal(true, counted) end end - end - From ba3028370c70fb83b00e122a01e2811758202298 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 25 Oct 2014 18:36:53 +0900 Subject: [PATCH 266/813] add b76941 to History. --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 73dca9ddc..5e27ebcb8 100644 --- a/History.rdoc +++ b/History.rdoc @@ -3,6 +3,7 @@ Enhancements: * Added to use Pathnames when working with Rake. Pull request #271 by Randy Coulman. +* Use Etc.nprocessors for counting to cpu numbers. Bug fixes: From 087e0c1c45bec474b128863d82950c6e4926c6f3 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 10 Nov 2014 15:42:58 +0900 Subject: [PATCH 267/813] backport r48279 from ruby/ruby trunk --- lib/rake/cpu_counter.rb | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index 6d0b878b1..f29778ed5 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -1,8 +1,3 @@ -require 'rbconfig' - -# TODO: replace with IO.popen using array-style arguments in Rake 11 -require 'open3' - module Rake # Based on a script at: @@ -18,6 +13,26 @@ def count_with_default(default=4) default end + begin + require 'etc' + rescue LoadError + else + if Etc.respond_to?(:nprocessors) + def count + return Etc.nprocessors + end + end + end + end +end + +unless Rake::CpuCounter.method_defined?(:count) + Rake::CpuCounter.class_eval <<-'end;', __FILE__, __LINE__+1 + require 'rbconfig' + + # TODO: replace with IO.popen using array-style arguments in Rake 11 + require 'open3' + def count if defined?(Java::Java) count_via_java_runtime @@ -44,18 +59,6 @@ def count end end - begin - require 'etc' - rescue LoadError - else - if Etc.respond_to?(:nprocessors) - undef count - def count - return Etc.nprocessors - end - end - end - def count_via_java_runtime Java::Java.lang.Runtime.getRuntime.availableProcessors rescue StandardError @@ -118,5 +121,5 @@ def in_path_command(command) out.eof? ? nil : command end end - end + end; end From f0a96a708982ad977bdb463b5899c0cb61c0623a Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Nov 2014 14:48:09 -0800 Subject: [PATCH 268/813] Add #291 to History --- History.rdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/History.rdoc b/History.rdoc index 5e27ebcb8..3294ead44 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,9 @@ +=== 10.4 + +Bug fixes: + +* Updated rake manpage. Pull request #291 by skittleys. + === 10.3.3 Enhancements: From 019b10d0de20b5ebefe5c5afe2cd9c1e1bddf61c Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Nov 2014 14:52:52 -0800 Subject: [PATCH 269/813] Add #286, #287 to History Fixes #286 --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index 3294ead44..f4ee9f0da 100644 --- a/History.rdoc +++ b/History.rdoc @@ -3,6 +3,8 @@ Bug fixes: * Updated rake manpage. Pull request #291 by skittleys. +* Add Rake::LATE to allow rebuilding of files that depend on deleted files. + Bug #286, pull request #287 by David Grayson. === 10.3.3 From a57262e82f97a41c5c7e2633dcf51dcb2fcd6551 Mon Sep 17 00:00:00 2001 From: Teo Ljungberg Date: Sun, 14 Sep 2014 20:01:59 +0200 Subject: [PATCH 270/813] Upgrade minitest --- .travis.yml | 2 +- Rakefile | 4 ++-- test/helper.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 88c951a73..6472f2cc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ after_script: - ruby -Ilib bin/rake travis:after -t before_script: - gem install hoe-travis --no-rdoc --no-ri -- gem install minitest -v '~> 4.0' --no-rdoc --no-ri +- gem install minitest -v '~> 5.0' --no-rdoc --no-ri - ruby -Ilib bin/rake travis:before -t language: ruby notifications: diff --git a/Rakefile b/Rakefile index d92b2d4e4..375ca8805 100644 --- a/Rakefile +++ b/Rakefile @@ -28,7 +28,7 @@ hoe = Hoe.spec 'rake' do require_ruby_version '>= 1.8.7' require_rubygems_version '>= 1.3.2' - dependency 'minitest', '~> 4.0', :developer + dependency 'minitest', '~> 5.0', :developer license "MIT" @@ -54,7 +54,7 @@ hoe = Hoe.spec 'rake' do ] end -hoe.test_prelude = 'gem "minitest", "~> 4.0"' +hoe.test_prelude = 'gem "minitest", "~> 5.0"' # Use custom rdoc task due to existence of doc directory diff --git a/test/helper.rb b/test/helper.rb index 992c6bffa..497d33730 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -2,7 +2,7 @@ $:.unshift File.expand_path('../../lib', __FILE__) begin - gem 'minitest', '~> 4' + gem 'minitest', '~> 5' rescue Gem::LoadError end From f6ff5dff6453a5eaf3b71864c4dd1e721dfaf5d4 Mon Sep 17 00:00:00 2001 From: Teo Ljungberg Date: Sun, 14 Sep 2014 20:02:22 +0200 Subject: [PATCH 271/813] Replace `MiniTest::Unit::TestCase` with `Minitest::Test` --- test/helper.rb | 2 +- test/support/rakefile_definitions.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index 497d33730..2ff599e61 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -22,7 +22,7 @@ require 'test/support/rakefile_definitions' end -class Rake::TestCase < MiniTest::Unit::TestCase +class Rake::TestCase < Minitest::Test include FileCreation include Rake::DSL diff --git a/test/support/rakefile_definitions.rb b/test/support/rakefile_definitions.rb index d4311425f..a637c7e94 100644 --- a/test/support/rakefile_definitions.rb +++ b/test/support/rakefile_definitions.rb @@ -460,7 +460,7 @@ def rakefile_failing_test_task TEST_TASK open 'a_test.rb', 'w' do |io| io << "require 'minitest/autorun'\n" - io << "class ExitTaskTest < MiniTest::Unit::TestCase\n" + io << "class ExitTaskTest < Minitest::Test\n" io << " def test_exit\n" io << " assert false, 'this should fail'\n" io << " end\n" From 32d4497e23a7491f4658a28329d1905801c69c78 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Nov 2014 15:07:13 -0800 Subject: [PATCH 272/813] Add #292 to History --- History.rdoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/History.rdoc b/History.rdoc index f4ee9f0da..7c7453ee9 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,5 +1,9 @@ === 10.4 +Enhancements: + +* Upgraded to minitest 5. Pull request #292 by Teo Ljungberg. + Bug fixes: * Updated rake manpage. Pull request #291 by skittleys. From 94c2b2c77ecc41c84e61cee09b7138a833a8bdae Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Nov 2014 15:10:39 -0800 Subject: [PATCH 273/813] Add #271 to History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index 7c7453ee9..ea8260824 100644 --- a/History.rdoc +++ b/History.rdoc @@ -3,6 +3,8 @@ Enhancements: * Upgraded to minitest 5. Pull request #292 by Teo Ljungberg. +* Added support for Pathname in rake tasks. Pull request #271 by Randy + Coulman. Bug fixes: From 19e3d52e709b8ee4092918892f224b5d3d1a93be Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Nov 2014 15:23:09 -0800 Subject: [PATCH 274/813] Add #273 to History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index ea8260824..5f6f3ab33 100644 --- a/History.rdoc +++ b/History.rdoc @@ -5,6 +5,8 @@ Enhancements: * Upgraded to minitest 5. Pull request #292 by Teo Ljungberg. * Added support for Pathname in rake tasks. Pull request #271 by Randy Coulman. +* Rake now ignores falsy dependencies which allows for easier programmatic + creation of tasks. Pull request #273 by Manav. Bug fixes: From f63bf26bb69f98298be98a2a1fdeeef91d7482a3 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Nov 2014 15:41:38 -0800 Subject: [PATCH 275/813] Update Manifest --- Manifest.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Manifest.txt b/Manifest.txt index 53ae991f6..a7829c97b 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -17,7 +17,7 @@ doc/example/main.c doc/glossary.rdoc doc/jamis.rb doc/proto_rake.rdoc -doc/rake.1.gz +doc/rake.1 doc/rakefile.rdoc doc/rational.rdoc doc/release_notes/rake-0.4.14.rdoc @@ -69,6 +69,7 @@ lib/rake/dsl_definition.rb lib/rake/early_time.rb lib/rake/ext/core.rb lib/rake/ext/module.rb +lib/rake/ext/pathname.rb lib/rake/ext/string.rb lib/rake/ext/time.rb lib/rake/file_creation_task.rb @@ -79,6 +80,7 @@ lib/rake/file_utils_ext.rb lib/rake/gempackagetask.rb lib/rake/invocation_chain.rb lib/rake/invocation_exception_mixin.rb +lib/rake/late_time.rb lib/rake/linked_list.rb lib/rake/loaders/makefile.rb lib/rake/multi_task.rb @@ -133,6 +135,7 @@ test/test_rake_file_utils.rb test/test_rake_ftp_file.rb test/test_rake_functional.rb test/test_rake_invocation_chain.rb +test/test_rake_late_time.rb test/test_rake_linked_list.rb test/test_rake_makefile_loader.rb test/test_rake_multi_task.rb @@ -141,6 +144,7 @@ test/test_rake_package_task.rb test/test_rake_path_map.rb test/test_rake_path_map_explode.rb test/test_rake_path_map_partial.rb +test/test_rake_pathname_extensions.rb test/test_rake_pseudo_status.rb test/test_rake_rake_test_loader.rb test/test_rake_reduce_compat.rb From ffda9d6251ab9bc1cd163f0ef1dcdc4fde9e40f9 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Nov 2014 15:46:30 -0800 Subject: [PATCH 276/813] Prevent useless relinking when packaging Previously rake would relink everything in the package directory even when no file had changed. This occurred because rake was told the package directory was a file so it would attempt to recreate it by linking all the files. Now Rake knows the package directory is a directory and will not attempt to recreated it unless the package file list changes. Fixes #276 --- History.rdoc | 1 + lib/rake/packagetask.rb | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/History.rdoc b/History.rdoc index 5f6f3ab33..2f4e94a0f 100644 --- a/History.rdoc +++ b/History.rdoc @@ -13,6 +13,7 @@ Bug fixes: * Updated rake manpage. Pull request #291 by skittleys. * Add Rake::LATE to allow rebuilding of files that depend on deleted files. Bug #286, pull request #287 by David Grayson. +* Fix relinking of files when repackaging. Bug #276 by Muenze. === 10.3.3 diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index e862952c0..249ee72b1 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -143,10 +143,7 @@ def define end end - directory package_dir - - file package_dir_path => @package_files do - mkdir_p package_dir rescue nil + directory package_dir_path => @package_files do @package_files.each do |fn| f = File.join(package_dir_path, fn) fdir = File.dirname(f) From a36505d33f873f8f475a28dc4fc48a913b82e8eb Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Nov 2014 16:07:58 -0800 Subject: [PATCH 277/813] Stop editing ARGV Previously ARGV was edited by rake when it processed arguments. This made it difficult to re-exec rake within itself as the arguments were gone when rake started. Now rake duplicates ARGV and modifies only the duplicate. Fixes #277 --- History.rdoc | 2 ++ lib/rake/application.rb | 10 ++++++++-- test/test_rake_application.rb | 22 +++++++++++----------- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/History.rdoc b/History.rdoc index 2f4e94a0f..cbeb76af5 100644 --- a/History.rdoc +++ b/History.rdoc @@ -7,6 +7,8 @@ Enhancements: Coulman. * Rake now ignores falsy dependencies which allows for easier programmatic creation of tasks. Pull request #273 by Manav. +* Rake no longer edits ARGV. This allows you to re-exec rake from a rake + task. Issue #277 by Matt Palmer. Bug fixes: diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 795b4685d..96f907b07 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -20,6 +20,9 @@ class Application include TaskManager include TraceOutput + # The command-line arguments rake is using (defaults to ARGV) + attr_reader :argv # :nodoc: + # The name of the application (typically 'rake') attr_reader :name @@ -45,6 +48,7 @@ class Application # Initialize a Rake::Application object. def initialize super + @argv = ARGV.dup @name = 'rake' @rakefiles = DEFAULT_RAKEFILES.dup @rakefile = nil @@ -73,6 +77,8 @@ def initialize # call +top_level+ to run your top level tasks. def run standard_exception_handling do + @argv = argv + init load_rakefile top_level @@ -633,7 +639,7 @@ def handle_options # :nodoc: standard_rake_options.each { |args| opts.on(*args) } opts.environment('RAKEOPT') - end.parse! + end.parse! @argv end # Similar to the regular Ruby +require+ command, but will check @@ -729,7 +735,7 @@ def standard_system_dir #:nodoc: # Environmental assignments are processed at this time as well. def collect_command_line_tasks # :nodoc: @top_level_tasks = [] - ARGV.each do |arg| + @argv.each do |arg| if arg =~ /^(\w+)=(.*)$/m ENV[$1] = $2 else diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index f52040471..19e500598 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -10,9 +10,9 @@ def setup end def setup_command_line(*options) - ARGV.clear + @app.argv.clear options.each do |option| - ARGV << option + @app.argv << option end end @@ -268,7 +268,7 @@ def test_load_rakefile_doesnt_print_rakefile_directory_from_subdir_if_silent end def test_load_rakefile_not_found - ARGV.clear + @app.argv.clear Dir.chdir @tempdir ENV['RAKE_SYSTEM'] = 'not_exist' @@ -378,7 +378,7 @@ def test_handle_options_should_strip_options_from_argv @app.handle_options - assert !ARGV.include?(valid_option) + assert !@app.argv.include?(valid_option) assert @app.options.trace end @@ -406,14 +406,14 @@ def test_handle_options_trace_does_not_eat_following_task_names setup_command_line("--trace", "sometask") @app.handle_options - assert ARGV.include?("sometask") + assert @app.argv.include?("sometask") assert @app.options.trace end def test_good_run ran = false - ARGV << '--rakelib=""' + @app.argv << '--rakelib=""' @app.options.silent = true @@ -468,7 +468,7 @@ def test_bad_run } assert_match(/see full trace/i, err) ensure - ARGV.clear + @app.argv.clear end def test_bad_run_with_trace @@ -479,7 +479,7 @@ def test_bad_run_with_trace } refute_match(/see full trace/i, err) ensure - ARGV.clear + @app.argv.clear end def test_bad_run_with_backtrace @@ -492,7 +492,7 @@ def test_bad_run_with_backtrace } refute_match(/see full trace/, err) ensure - ARGV.clear + @app.argv.clear end CustomError = Class.new(RuntimeError) @@ -549,7 +549,7 @@ def test_printing_original_exception_cause end assert_match(/Secondary Error/, err) ensure - ARGV.clear + @app.argv.clear end def test_run_with_bad_options @@ -559,7 +559,7 @@ def test_run_with_bad_options capture_io { @app.run } } ensure - ARGV.clear + @app.argv.clear end def test_standard_exception_handling_invalid_option From 7d4c51714a04159f07e970efdc0bd91a0abc3b63 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Nov 2014 16:52:55 -0800 Subject: [PATCH 278/813] Add #283 to History --- History.rdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index cbeb76af5..a2ee0dbac 100644 --- a/History.rdoc +++ b/History.rdoc @@ -12,7 +12,8 @@ Enhancements: Bug fixes: -* Updated rake manpage. Pull request #291 by skittleys. +* Updated rake manpage. Issue #283 by Nathan Long, pull request #291 by + skittleys. * Add Rake::LATE to allow rebuilding of files that depend on deleted files. Bug #286, pull request #287 by David Grayson. * Fix relinking of files when repackaging. Bug #276 by Muenze. From fbae1c2b6d29ac5bfac473b1872539ff4458ba06 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Nov 2014 21:55:11 -0800 Subject: [PATCH 279/813] Test rake against ruby 2.2 and head --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6472f2cc7..71ec6b270 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,8 @@ rvm: - 1.9.3 - 2.0.0 - 2.1.0 + - 2.2.0 + - ruby-head - jruby script: ruby -Ilib bin/rake matrix: From 9c0b6bb903da8e72184c7ebf8e63df58709323f5 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Nov 2014 22:03:19 -0800 Subject: [PATCH 280/813] Remove bogus require test/unit/assertions was never used by this file --- test/test_rake_thread_pool.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test_rake_thread_pool.rb b/test/test_rake_thread_pool.rb index 421c38d90..35a1fe9d1 100644 --- a/test/test_rake_thread_pool.rb +++ b/test/test_rake_thread_pool.rb @@ -1,6 +1,5 @@ require File.expand_path('../helper', __FILE__) require 'rake/thread_pool' -require 'test/unit/assertions' class TestRakeTestThreadPool < Rake::TestCase include Rake From 55e43d3da2e0c48ccc4dc5d09b999b0afb2467a5 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Nov 2014 22:09:20 -0800 Subject: [PATCH 281/813] Update VERSION and History for release --- History.rdoc | 15 +++------------ lib/rake.rb | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/History.rdoc b/History.rdoc index a2ee0dbac..ebd0061f5 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 10.4 +=== 10.4.0 Enhancements: @@ -9,6 +9,7 @@ Enhancements: creation of tasks. Pull request #273 by Manav. * Rake no longer edits ARGV. This allows you to re-exec rake from a rake task. Issue #277 by Matt Palmer. +* Etc.nprocessors is used for counting the number of CPUs. Bug fixes: @@ -17,18 +18,8 @@ Bug fixes: * Add Rake::LATE to allow rebuilding of files that depend on deleted files. Bug #286, pull request #287 by David Grayson. * Fix relinking of files when repackaging. Bug #276 by Muenze. - -=== 10.3.3 - -Enhancements: - -* Added to use Pathnames when working with Rake. Pull request #271 by Randy Coulman. -* Use Etc.nprocessors for counting to cpu numbers. - -Bug fixes: - * Fixed some typos. Pull request #280 by Jed Northridge. -* Also try counting CPUs via cpuinfo if host_os was not matched. Pull request +* Try counting CPUs via cpuinfo if host_os was not matched. Pull request #282 by Edouard B. === 10.3.2 / 2014-05-15 diff --git a/lib/rake.rb b/lib/rake.rb index a170c6fdd..ab04a7f38 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '10.3.2' + VERSION = '10.4.0' end require 'rake/version' From 99ca610e3d166991e110bdf6d1c52bfdd8aae5ff Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 24 Nov 2014 23:11:11 -0800 Subject: [PATCH 282/813] Add newline to reduce nobu commits to ruby --- lib/rake/contrib/.document | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rake/contrib/.document b/lib/rake/contrib/.document index e69de29bb..8b1378917 100644 --- a/lib/rake/contrib/.document +++ b/lib/rake/contrib/.document @@ -0,0 +1 @@ + From 3a18e55d0d154f40ad57f40b6bc04c30831a601c Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Sat, 29 Nov 2014 13:12:05 -0800 Subject: [PATCH 283/813] Set release date --- History.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index ebd0061f5..fadb17a0d 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 10.4.0 +=== 10.4.0 / 2014-11-22 Enhancements: From 86af0ef6d793b85068a44fb3407b23c9c9b09bc7 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 1 Dec 2014 21:35:22 -0800 Subject: [PATCH 284/813] Revert "Stop editing ARGV" This reverts commit a36505d33f873f8f475a28dc4fc48a913b82e8eb. This caused issues with tools that used rake across fork boundaries. Fixes rails/spring#366 Possibly also #4 --- History.rdoc | 9 +++++++++ lib/rake/application.rb | 10 ++-------- test/test_rake_application.rb | 22 +++++++++++----------- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/History.rdoc b/History.rdoc index fadb17a0d..c0a8be05c 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,10 @@ +=== 10.4.1 + +Bug fixes: + +* Reverted fix for #277 as it caused numerous issues for rake users. + rails/spring issue #366 by Gustavo Dutra. + === 10.4.0 / 2014-11-22 Enhancements: @@ -10,6 +17,8 @@ Enhancements: * Rake no longer edits ARGV. This allows you to re-exec rake from a rake task. Issue #277 by Matt Palmer. * Etc.nprocessors is used for counting the number of CPUs. +* Rake no longer edits ARGV. This allows you to re-exec rake from a rake + task. Issue #277 by Matt Palmer. Bug fixes: diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 96f907b07..795b4685d 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -20,9 +20,6 @@ class Application include TaskManager include TraceOutput - # The command-line arguments rake is using (defaults to ARGV) - attr_reader :argv # :nodoc: - # The name of the application (typically 'rake') attr_reader :name @@ -48,7 +45,6 @@ class Application # Initialize a Rake::Application object. def initialize super - @argv = ARGV.dup @name = 'rake' @rakefiles = DEFAULT_RAKEFILES.dup @rakefile = nil @@ -77,8 +73,6 @@ def initialize # call +top_level+ to run your top level tasks. def run standard_exception_handling do - @argv = argv - init load_rakefile top_level @@ -639,7 +633,7 @@ def handle_options # :nodoc: standard_rake_options.each { |args| opts.on(*args) } opts.environment('RAKEOPT') - end.parse! @argv + end.parse! end # Similar to the regular Ruby +require+ command, but will check @@ -735,7 +729,7 @@ def standard_system_dir #:nodoc: # Environmental assignments are processed at this time as well. def collect_command_line_tasks # :nodoc: @top_level_tasks = [] - @argv.each do |arg| + ARGV.each do |arg| if arg =~ /^(\w+)=(.*)$/m ENV[$1] = $2 else diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 19e500598..f52040471 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -10,9 +10,9 @@ def setup end def setup_command_line(*options) - @app.argv.clear + ARGV.clear options.each do |option| - @app.argv << option + ARGV << option end end @@ -268,7 +268,7 @@ def test_load_rakefile_doesnt_print_rakefile_directory_from_subdir_if_silent end def test_load_rakefile_not_found - @app.argv.clear + ARGV.clear Dir.chdir @tempdir ENV['RAKE_SYSTEM'] = 'not_exist' @@ -378,7 +378,7 @@ def test_handle_options_should_strip_options_from_argv @app.handle_options - assert !@app.argv.include?(valid_option) + assert !ARGV.include?(valid_option) assert @app.options.trace end @@ -406,14 +406,14 @@ def test_handle_options_trace_does_not_eat_following_task_names setup_command_line("--trace", "sometask") @app.handle_options - assert @app.argv.include?("sometask") + assert ARGV.include?("sometask") assert @app.options.trace end def test_good_run ran = false - @app.argv << '--rakelib=""' + ARGV << '--rakelib=""' @app.options.silent = true @@ -468,7 +468,7 @@ def test_bad_run } assert_match(/see full trace/i, err) ensure - @app.argv.clear + ARGV.clear end def test_bad_run_with_trace @@ -479,7 +479,7 @@ def test_bad_run_with_trace } refute_match(/see full trace/i, err) ensure - @app.argv.clear + ARGV.clear end def test_bad_run_with_backtrace @@ -492,7 +492,7 @@ def test_bad_run_with_backtrace } refute_match(/see full trace/, err) ensure - @app.argv.clear + ARGV.clear end CustomError = Class.new(RuntimeError) @@ -549,7 +549,7 @@ def test_printing_original_exception_cause end assert_match(/Secondary Error/, err) ensure - @app.argv.clear + ARGV.clear end def test_run_with_bad_options @@ -559,7 +559,7 @@ def test_run_with_bad_options capture_io { @app.run } } ensure - @app.argv.clear + ARGV.clear end def test_standard_exception_handling_invalid_option From d2b6d7d2e46623aa7f7636afb96800380b49caa7 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Mon, 1 Dec 2014 21:38:32 -0800 Subject: [PATCH 285/813] Set release version and date --- History.rdoc | 2 +- lib/rake.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index c0a8be05c..774e05596 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 10.4.1 +=== 10.4.1 / 2014-12-01 Bug fixes: diff --git a/lib/rake.rb b/lib/rake.rb index ab04a7f38..eb7ce6914 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '10.4.0' + VERSION = '10.4.1' end require 'rake/version' From 95326988452d4e40a7cca23107aefcf5751ffa29 Mon Sep 17 00:00:00 2001 From: Matt Palmer Date: Wed, 3 Dec 2014 12:15:42 +1100 Subject: [PATCH 286/813] Don't eat my ARGV! Change the way that OptionParser.parse! is called, so that it doesn't directly sink its teeth into ARGV. This necessitated changing the way that collect_command_line_tasks get the list of command-line arguments to examine to get tasks and environment variable definitions, but that's a relatively minor thing. --- lib/rake/application.rb | 19 +++++++++++++------ test/test_rake_application.rb | 4 ++-- test/test_rake_application_options.rb | 4 ++-- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 795b4685d..bd72a2efa 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -83,8 +83,8 @@ def run def init(app_name='rake') standard_exception_handling do @name = app_name - handle_options - collect_command_line_tasks + args = handle_options + collect_command_line_tasks(args) end end @@ -616,7 +616,9 @@ def select_trace_output(options, trace_option, value) # :nodoc: end private :select_trace_output - # Read and handle the command line options. + # Read and handle the command line options. Returns the command line + # arguments that we didn't understand, which should (in theory) be just + # task names and env vars. def handle_options # :nodoc: options.rakelib = ['rakelib'] options.trace_output = $stderr @@ -633,7 +635,7 @@ def handle_options # :nodoc: standard_rake_options.each { |args| opts.on(*args) } opts.environment('RAKEOPT') - end.parse! + end.parse(ARGV) end # Similar to the regular Ruby +require+ command, but will check @@ -727,9 +729,14 @@ def standard_system_dir #:nodoc: # Collect the list of tasks on the command line. If no tasks are # given, return a list containing only the default task. # Environmental assignments are processed at this time as well. - def collect_command_line_tasks # :nodoc: + # + # `args` is the list of arguments to peruse to get the list of tasks. + # It should be the command line that was given to rake, less any + # recognised command-line options, which OptionParser.parse will + # have taken care of already. + def collect_command_line_tasks(args) # :nodoc: @top_level_tasks = [] - ARGV.each do |arg| + args.each do |arg| if arg =~ /^(\w+)=(.*)$/m ENV[$1] = $2 else diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index f52040471..c01088917 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -370,7 +370,7 @@ def test_building_imported_files_on_demand # HACK no assertions end - def test_handle_options_should_strip_options_from_argv + def test_handle_options_should_not_strip_options_from_argv assert !@app.options.trace valid_option = '--trace' @@ -378,7 +378,7 @@ def test_handle_options_should_strip_options_from_argv @app.handle_options - assert !ARGV.include?(valid_option) + assert ARGV.include?(valid_option) assert @app.options.trace end diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index a9ae4d9c0..37adfacd7 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -457,8 +457,8 @@ def @app.exit(*args) throw :system_exit, :exit end @app.instance_eval do - handle_options - collect_command_line_tasks + args = handle_options + collect_command_line_tasks(args) end @tasks = @app.top_level_tasks @app.options From c154c06c68a153c877365e401e152598d1efd8ea Mon Sep 17 00:00:00 2001 From: Yuji Yamamoto Date: Wed, 3 Dec 2014 11:07:48 +0900 Subject: [PATCH 287/813] delete duplicated changelog line. --- History.rdoc | 2 -- 1 file changed, 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index 774e05596..1fd55de57 100644 --- a/History.rdoc +++ b/History.rdoc @@ -17,8 +17,6 @@ Enhancements: * Rake no longer edits ARGV. This allows you to re-exec rake from a rake task. Issue #277 by Matt Palmer. * Etc.nprocessors is used for counting the number of CPUs. -* Rake no longer edits ARGV. This allows you to re-exec rake from a rake - task. Issue #277 by Matt Palmer. Bug fixes: From 09925fcc8a2f97c220a0815bf2004ccd777d95c1 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 2 Dec 2014 22:42:07 -0800 Subject: [PATCH 288/813] Add #9 to History --- History.rdoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/History.rdoc b/History.rdoc index 1fd55de57..26887bfae 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,10 @@ +=== 10.4.2 + +Bug fixes: + +* Rake no longer edits ARGV. This allows you to re-exec rake from a rake + task. Pull requset #9 by Matt Palmer. + === 10.4.1 / 2014-12-01 Bug fixes: From 47c0059172ee675090e29ccf144a9742ce9542b4 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 2 Dec 2014 22:43:36 -0800 Subject: [PATCH 289/813] Add #10 to History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 26887bfae..d5cf0e002 100644 --- a/History.rdoc +++ b/History.rdoc @@ -4,6 +4,7 @@ Bug fixes: * Rake no longer edits ARGV. This allows you to re-exec rake from a rake task. Pull requset #9 by Matt Palmer. +* Deleted duplicated History entry. Pull request #10 by Yuji Yamamoto. === 10.4.1 / 2014-12-01 From fa980b6d085cdb24b238a7e0f61d0f335a84d1d9 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 2 Dec 2014 22:54:12 -0800 Subject: [PATCH 290/813] Document handling of sentences in descriptions Rake displays only up to the first sentence for `rake -T` and the entire description for `rake -D` but this was not documented at Rake::DSL#desc. Fixes #7 --- History.rdoc | 2 ++ lib/rake/dsl_definition.rb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/History.rdoc b/History.rdoc index d5cf0e002..6ff328a3e 100644 --- a/History.rdoc +++ b/History.rdoc @@ -4,6 +4,8 @@ Bug fixes: * Rake no longer edits ARGV. This allows you to re-exec rake from a rake task. Pull requset #9 by Matt Palmer. +* Documented how Rake::DSL#desc handles sentences in task descriptions. + Issue #7 by Raza Sayed. * Deleted duplicated History entry. Pull request #10 by Yuji Yamamoto. === 10.4.1 / 2014-12-01 diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index b521b7dc5..26f4ca828 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -159,6 +159,8 @@ def rule(*args, &block) # :doc: end # Describes the next rake task. Duplicate descriptions are discarded. + # Descriptions are shown with rake -T (up to the first + # sentence) and rake -D (the entire description). # # Example: # desc "Run the Unit Tests" From fbbfdadd603d8e87d698c15455e79497c9cd1195 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 2 Dec 2014 23:14:22 -0800 Subject: [PATCH 291/813] Skip testing default gems on rubies without them Ruby 1.9.3 and earlier do not have default gems but Rake tests tried to use them leading to an error. Now the test using default gems is skipped when default gems are not present. Fixes #8 --- History.rdoc | 1 + test/test_rake_test_task.rb | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/History.rdoc b/History.rdoc index 6ff328a3e..78aa1f285 100644 --- a/History.rdoc +++ b/History.rdoc @@ -6,6 +6,7 @@ Bug fixes: task. Pull requset #9 by Matt Palmer. * Documented how Rake::DSL#desc handles sentences in task descriptions. Issue #7 by Raza Sayed. +* Fixed test error on 1.9.3 with legacy RubyGems. Issue #8 by Matt Palmer. * Deleted duplicated History entry. Pull request #10 by Yuji Yamamoto. === 10.4.1 / 2014-12-01 diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 80fe9a28b..5c4be797c 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -97,17 +97,22 @@ def test_run_code_rake end def test_run_code_rake_default_gem + skip 'this ruby does not have default gems' unless + Gem::Specification.method_defined? :default_specifications_dir + default_spec = Gem::Specification.new 'rake', 0 default_spec.loaded_from = File.join Gem::Specification.default_specifications_dir, 'rake-0.gemspec' - rake, Gem.loaded_specs['rake'] = Gem.loaded_specs['rake'], default_spec + begin + rake, Gem.loaded_specs['rake'] = Gem.loaded_specs['rake'], default_spec - test_task = Rake::TestTask.new do |t| - t.loader = :rake - end + test_task = Rake::TestTask.new do |t| + t.loader = :rake + end - assert_match(/\A(-I".*?" *)* ".*?"\Z/, test_task.run_code) - ensure - Gem.loaded_specs['rake'] = rake + assert_match(/\A(-I".*?" *)* ".*?"\Z/, test_task.run_code) + ensure + Gem.loaded_specs['rake'] = rake + end end def test_run_code_testrb_ruby_1_8_2 From ae0db2118989a21516da3e332c9ef807ff3ccbdb Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 2 Dec 2014 23:27:06 -0800 Subject: [PATCH 292/813] Set release version and date --- History.rdoc | 2 +- lib/rake.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index 78aa1f285..e50d23704 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 10.4.2 +=== 10.4.2 / 2014-12-02 Bug fixes: diff --git a/lib/rake.rb b/lib/rake.rb index eb7ce6914..7366862ad 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '10.4.1' + VERSION = '10.4.2' end require 'rake/version' From c01e7602a913c74b3d6f5b4e54c09e8223a04bd9 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 6 Dec 2014 09:20:01 +0900 Subject: [PATCH 293/813] backport r48409 from ruby trunk --- test/helper.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index 2ff599e61..ac1205a64 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -13,7 +13,6 @@ begin - require_relative '../ruby/envutil' require_relative 'support/ruby_runner' require_relative 'support/rakefile_definitions' rescue NoMethodError, LoadError From 59bb3056a88d6081001aa1332115f48853a3d4ce Mon Sep 17 00:00:00 2001 From: Chris Keathley Date: Wed, 17 Dec 2014 20:32:36 -0500 Subject: [PATCH 294/813] Add fetch to task arguments. This allows TaskArguments to respond to fetch in the same way that a hash would. This is in line with the to_s, inspect, and has_key? methods. It simply delegates the fetch method to the internal hash. --- lib/rake/task_arguments.rb | 4 ++++ test/test_rake_task_arguments.rb | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index fc0d65727..043be3f79 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -83,6 +83,10 @@ def has_key?(key) @hash.has_key?(key) end + def fetch(key, &block) + @hash.fetch(key, &block) + end + protected def lookup(name) # :nodoc: diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 369ecf6e5..abd41ebea 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -25,6 +25,13 @@ def test_has_key refute(ta.has_key?(:b)) end + def test_fetch + ta = Rake::TaskArguments.new([:one], [1]) + assert_equal 1, ta.fetch(:one) + assert_equal 2, ta.fetch(:two) { 2 } + assert_raises(KeyError) { ta.fetch(:three) } + end + def test_to_s ta = Rake::TaskArguments.new([:a, :b, :c], [1, 2, 3]) assert_equal ta.to_hash.inspect, ta.to_s From 7149d82fda9a20559d0b49188286b9e63e86779a Mon Sep 17 00:00:00 2001 From: Chris Keathley Date: Wed, 17 Dec 2014 21:51:04 -0500 Subject: [PATCH 295/813] Skip failing test on older version of Ruby The exception raised for fetch changed after 1.8.7. I'm not sure of a way to assert a type of error is raised so I'm skipping that assertion for older versions of Ruby. --- test/test_rake_task_arguments.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index abd41ebea..1da01fc34 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -29,7 +29,7 @@ def test_fetch ta = Rake::TaskArguments.new([:one], [1]) assert_equal 1, ta.fetch(:one) assert_equal 2, ta.fetch(:two) { 2 } - assert_raises(KeyError) { ta.fetch(:three) } + assert_raises(KeyError) { ta.fetch(:three) } unless older_ruby? end def test_to_s @@ -131,4 +131,10 @@ def test_extra_args_with_less_than_named_arguments assert_equal [], ta.extras end + private + + def older_ruby? + RUBY_VERSION == '1.8.7' + end + end From 442dc24a866661fcc5036462d76af53f9516fcd2 Mon Sep 17 00:00:00 2001 From: evverx Date: Sun, 21 Dec 2014 22:34:23 +0300 Subject: [PATCH 296/813] Update link to Jim Weirich's presentation onestepback.org is offline --- README.rdoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.rdoc b/README.rdoc index 683e0c0e8..4b3cf0936 100644 --- a/README.rdoc +++ b/README.rdoc @@ -89,8 +89,7 @@ Type "rake --help" for all available options. 5. {File Operations}[http://devblog.avdi.org/2014/04/25/rake-part-5-file-operations/] 6. {Clean and Clobber}[http://devblog.avdi.org/2014/04/28/rake-part-6-clean-and-clobber/] 7. {MultiTask}[http://devblog.avdi.org/2014/04/29/rake-part-7-multitask/] -* Jim Weirich's 2003 RubyConf presentation: - http://onestepback.org/articles/buildingwithrake/ +* {Jim Weirich's 2003 RubyConf presentation}[http://web.archive.org/web/20140221123354/http://onestepback.org/articles/buildingwithrake/] * Martin Fowler's article on Rake: http://martinfowler.com/articles/rake.html == Other Make Re-envisionings ... From e3208c03d5a9318bb8c096f3d689db8fafa812a7 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Wed, 24 Dec 2014 13:20:02 +0100 Subject: [PATCH 297/813] [TASK] Configure Travis for better build performance Set sudo: false so Travis can use their new container-based infrastructure. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 71ec6b270..426691c5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ before_script: - gem install minitest -v '~> 5.0' --no-rdoc --no-ri - ruby -Ilib bin/rake travis:before -t language: ruby +sudo: false notifications: email: - drbrain@segment7.net From 259291569e362da7eae1f117f86f29dabb34b356 Mon Sep 17 00:00:00 2001 From: hakeda Date: Mon, 29 Dec 2014 12:58:43 +0000 Subject: [PATCH 298/813] Fix typos and misspellings --- lib/rake/dsl_definition.rb | 2 +- lib/rake/testtask.rb | 2 +- test/test_rake_application_options.rb | 2 +- test/test_rake_linked_list.rb | 4 ++-- test/test_rake_path_map.rb | 8 ++++---- test/test_rake_task.rb | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index 26f4ca828..4c57c1eb9 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -7,7 +7,7 @@ module Rake # DSL is a module that provides #task, #desc, #namespace, etc. Use this # when you'd like to use rake outside the top level scope. # - # For a Rakefile you run from the comamnd line this module is automatically + # For a Rakefile you run from the command line this module is automatically # included. module DSL diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 2daa58963..02fbe5e92 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -62,7 +62,7 @@ class TestTask < TaskLib # attr_accessor :loader - # Array of commandline options to pass to ruby when running test loader. + # Array of command line options to pass to ruby when running test loader. attr_accessor :ruby_opts # Description of the test task. (default is 'Run tests') diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index 37adfacd7..191424059 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -198,7 +198,7 @@ def test_prereqs def test_quiet Rake::FileUtilsExt.verbose_flag = true flags('--quiet', '-q') do |opts| - assert ! Rake::FileUtilsExt.verbose_flag, "verbose flag shoud be false" + assert ! Rake::FileUtilsExt.verbose_flag, "verbose flag should be false" assert ! opts.silent, "should not be silent" end end diff --git a/test/test_rake_linked_list.rb b/test/test_rake_linked_list.rb index 10957fba6..32d730626 100644 --- a/test/test_rake_linked_list.rb +++ b/test/test_rake_linked_list.rb @@ -57,13 +57,13 @@ def test_lists_are_structurally_equivalent refute_equal short, list end - def test_converstion_to_string + def test_conversion_to_string list = LinkedList.make(:one, :two, :three) assert_equal "LL(one, two, three)", list.to_s assert_equal "LL()", LinkedList.make().to_s end - def test_converstion_with_inspect + def test_conversion_with_inspect list = LinkedList.make(:one, :two, :three) assert_equal "LL(:one, :two, :three)", list.inspect assert_equal "LL()", LinkedList.make().inspect diff --git a/test/test_rake_path_map.rb b/test/test_rake_path_map.rb index 038ba1f9a..98e8df062 100644 --- a/test/test_rake_path_map.rb +++ b/test/test_rake_path_map.rb @@ -152,11 +152,11 @@ def test_complex_patterns "Your file extension is '.rb'", "dir/abc.rb".pathmap("Your file extension is '%x'")) assert_equal( - "bin/org/onstepback/proj/A.class", - "src/org/onstepback/proj/A.java".pathmap("%{src,bin}d/%n.class")) + "bin/org/onestepback/proj/A.class", + "src/org/onestepback/proj/A.java".pathmap("%{src,bin}d/%n.class")) assert_equal( - "src_work/bin/org/onstepback/proj/A.class", - "src_work/src/org/onstepback/proj/A.java". + "src_work/bin/org/onestepback/proj/A.class", + "src_work/src/org/onestepback/proj/A.java". pathmap('%{\bsrc\b,bin}X.class')) assert_equal( ".depends.bak", diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index d7f14efcd..0416dfa8d 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -195,14 +195,14 @@ def test_filelists_can_be_prerequisites assert_equal ["b", "c"], Task[:a].prerequisites end - def test_prerequiste_tasks_returns_tasks_not_strings + def test_prerequisite_tasks_returns_tasks_not_strings a = task :a => ["b", "c"] b = task :b c = task :c assert_equal [b, c], a.prerequisite_tasks end - def test_prerequiste_tasks_fails_if_prerequisites_are_undefined + def test_prerequisite_tasks_fails_if_prerequisites_are_undefined a = task :a => ["b", "c"] task :b assert_raises(RuntimeError) do @@ -210,7 +210,7 @@ def test_prerequiste_tasks_fails_if_prerequisites_are_undefined end end - def test_prerequiste_tasks_honors_namespaces + def test_prerequisite_tasks_honors_namespaces a = b = nil namespace "X" do a = task :a => ["b", "c"] From 3e26c34c624663078d153ea50450f92df5ab369f Mon Sep 17 00:00:00 2001 From: Andrew Cantino Date: Mon, 12 Jan 2015 21:53:51 -0800 Subject: [PATCH 299/813] fix unclosed parens and other minor grammatical issues --- doc/glossary.rdoc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/doc/glossary.rdoc b/doc/glossary.rdoc index bdbccb4e0..0639f222d 100644 --- a/doc/glossary.rdoc +++ b/doc/glossary.rdoc @@ -1,12 +1,12 @@ = Glossary action :: - Code to be executed in order to perform a task. Actions in a rakefile are - specified in a code block (usually delimited by +do+/+end+ pairs. + Code to be executed in order to perform a task. Actions in a Rakefile are + specified in a code block. (Usually delimited by +do+/+end+ pairs.) execute :: - When a task is executed, all of its actions are performed, in the order they - were defined. Note that unlike invoke, execute always + When a task is executed, all of its actions are performed in the order they + were defined. Note that, unlike invoke, execute always executes the actions (without invoking or executing the prerequisites). file task (Rake::FileTask) :: @@ -22,15 +22,15 @@ file task (Rake::FileTask) :: invoke :: When a task is invoked, first we check to see if it has been invoked before. - If it has been, then nothing else is done. If this is the first time its + If it has been, then nothing else is done. If this is the first time it has been invoked, then we invoke each of its prerequisites. Finally, we check to see if we need to execute the actions of this task by calling - Rake::Task#needed?. Finally, if the task is needed, we execute its actions. + Rake::Task#needed?. If the task is needed, we execute its actions. - NOTE: Prerequisites are invoked even if the task is not needed. + NOTE: Prerequisites are still invoked even if the task is not needed. prerequisites :: - Every task has a set (possibly empty) of prerequisites. A prerequisite P to + Every task has a (possibly empty) set of prerequisites. A prerequisite P to Task T is itself a task that must be invoked before Task T. rule :: @@ -38,6 +38,5 @@ rule :: defined. Rules generally synthesize file tasks. task (Rake::Task) :: - Basic unit of work in a rakefile. A task has a name, a set of prerequisites + The basic unit of work in a Rakefile. A task has a name, a set of prerequisites, and a list of actions to be performed. - From b3f700ac702f2b065f3d6e86da0090576232d7ad Mon Sep 17 00:00:00 2001 From: Chris Keathley Date: Tue, 13 Jan 2015 09:47:51 -0500 Subject: [PATCH 300/813] Allow for more then one argument in fetch. Fetch can take more then one argument so we need to use *args in order to pass all of the arguments to the call to fetch --- lib/rake/task_arguments.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index 043be3f79..d86c5d11a 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -83,8 +83,8 @@ def has_key?(key) @hash.has_key?(key) end - def fetch(key, &block) - @hash.fetch(key, &block) + def fetch(*args, &block) + @hash.fetch(*args, &block) end protected From 0ab7861de10f1dd79d1b2a2c0a2d82260a221f31 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Mon, 16 Feb 2015 23:41:13 -0700 Subject: [PATCH 301/813] Convert manual page to use semantic -mdoc macros. --- doc/rake.1 | 263 ++++++++++++++++++++++++++++------------------------- 1 file changed, 139 insertions(+), 124 deletions(-) diff --git a/doc/rake.1 b/doc/rake.1 index b63ed49ed..bde363729 100644 --- a/doc/rake.1 +++ b/doc/rake.1 @@ -1,141 +1,156 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" First parameter, NAME, should be all caps -.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection -.\" other parameters are allowed: see man(7), man(1) -.TH RAKE 1 "August 27, 2014" "rake 10.3.2" "Rake User Commands" -.\" Please adjust this date whenever revising the manpage. -.\" -.\" Some roff macros, for reference: -.\" .nh disable hyphenation -.\" .hy enable hyphenation -.\" .ad l left justify -.\" .ad b justify to both left and right margins -.\" .nf disable filling -.\" .fi enable filling -.\" .br insert line break -.\" .sp insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -rake \- a make-like build utility for Ruby -.SH SYNOPSIS -\fBrake\fR [\fI\-f rakefile\fR] {\fIOPTIONS\fR} \fITARGETS...\fR -.br -.SH DESCRIPTION -.B rake -is a make-like build utility for Ruby. Tasks and dependencies are specified in -standard Ruby syntax. -.SH OPTIONS -.TP -\fB\-m\fR, \fB\-\-multitask\fR +.Dd August 27, 2014 +.Dt RAKE 1 +.Os +.Sh NAME +.Nm rake +.Nd make-like build utility for Ruby +.Sh SYNOPSIS +.Nm +.Op Fl f Ar rakefile +.Op Ar options +.Ar targets ... +.Sh DESCRIPTION +.Nm +is a +.Xr make 1 Ns -like +build utility for Ruby. +Tasks and dependencies are specified in standard Ruby syntax. +.Sh OPTIONS +.Bl -tag -width Ds +.It Fl m , Fl -multitask Treat all tasks as multitasks. -.TP -\fB\-B\fR, \fB\-\-build\-all\fR +.It Fl B , Fl -build-all Build all prerequisites, including those which are up\-to\-date. - -.TP -\fB\-j\fR, \fB\-\-jobs\fR [\fINUMBER\fR] +.It Fl j , Fl -jobs Ar num_jobs Specifies the maximum number of tasks to execute in parallel (default is number of CPU cores + 4). - -.SS Modules -.TP -\fB\-I\fR, \fB\-\-libdir\fR \fILIBDIR\fR -Include \fILIBDIR\fR in the search path for required modules. -.TP -\fB\-r\fR, \fB\-\-require\fR \fIMODULE\fR -Require \fIMODULE\fR before executing rakefile. - -.SS Rakefile location -.TP -\fB\-f\fR, \fB\-\-rakefile\fR [\fIFILENAME\fR] -Use \fIFILENAME\fR as the rakefile to search for. -.TP -\fB\-N\fR, \fB\-\-no\-search\fR, \fB\-\-nosearch\fR +.El +.Ss Modules +.Bl -tag -width Ds +.It Fl I , Fl -libdir Ar libdir +Include +.Ar libdir +in the search path for required modules. +.It Fl r , Fl -require Ar module +Require +.Ar module +before executing +.Pa rakefile . +.El +.Ss Rakefile location +.Bl -tag -width Ds +.It Fl f , Fl -rakefile Ar filename +Use +.Ar filename +as the rakefile to search for. +.It Fl N , Fl -no-search , Fl -nosearch Do not search parent directories for the Rakefile. -.TP -\fB\-G\fR, \fB\-\-no\-system\fR, \fB\-\-nosystem\fR +.It Fl G , Fl -no-system , Fl -nosystem Use standard project Rakefile search paths, ignore system wide rakefiles. -.TP -\fB\-R\fR, \fB\-\-rakelibdir\fR \fIRAKELIBDIR\fR -Auto\-import any .rake files in \fIRAKELIBDIR\fR (default is 'rakelib') -.HP -\fB\-\-rakelib\fR -.TP -\fB\-g\fR, \fB\-\-system\fR -Using system wide (global) rakefiles (usually '\fI~/.rake/*.rake\fR'). - -.SS Debugging -.TP -\fB\-\-backtrace\fR=\fI\,[OUT]\/\fR -Enable full backtrace. \fIOUT\fR can be stderr (default) or stdout. -.TP -\fB\-t\fR, \fB\-\-trace\fR=\fI\,[OUT]\/\fR -Turn on invoke/execute tracing, enable full backtrace. \fIOUT\fR can be stderr (default) or stdout. -.TP -\fB\-\-suppress\-backtrace\fR \fIPATTERN\fR -Suppress backtrace lines matching regexp \fIPATTERN\fR. Ignored if \fI\-\-trace\fR is on. -.TP -\fB\-\-rules\fR +.It Fl R , Fl -rakelib Ar rakelibdir , Fl -rakelibdir Ar rakelibdir +Auto-import any .rake files in +.Ar rakelibdir +(default is +.Sq rakelib ) +.It Fl g , Fl -system +Use system-wide (global) rakefiles (usually +.Pa ~/.rake/*.rake ) . +.El +.Ss Debugging +.Bl -tag -width Ds +.It Fl -backtrace Ns = Ns Ar out +Enable full backtrace. +.Ar out +can be +.Dv stderr +(default) or +.Dv stdout . +.It Fl t , Fl -trace Ns = Ns Ar out +Turn on invoke/execute tracing, enable full backtrace. +.Ar out +can be +.Dv stderr +(default) or +.Dv stdout . +.It Fl -suppress-backtrace Ar pattern +Suppress backtrace lines matching regexp +.Ar pattern . +Ignored if +.Fl -trace +is on. +.It Fl -rules Trace the rules resolution. - -.TP -\fB\-n\fR, \fB\-\-dry\-run\fR +.It Fl n , Fl -dry-run Do a dry run without executing actions. -.TP -\fB\-T\fR, \fB\-\-tasks\fR [\fIPATTERN\fR] -Display the tasks (matching optional \fIPATTERN\fR) with descriptions, then exit. -.TP -\fB\-D\fR, \fB\-\-describe\fR [\fIPATTERN\fR] -Describe the tasks (matching optional \fIPATTERN\fR), then exit. -.TP -\fB\-W\fR, \fB\-\-where\fR [\fIPATTERN\fR] -Describe the tasks (matching optional \fIPATTERN\fR), then exit. -.TP -\fB\-P\fR, \fB\-\-prereqs\fR +.It Fl T , Fl -tasks Op Ar pattern +Display the tasks (matching optional +.Ar pattern ) +with descriptions, then exit. +.It Fl D , Fl -describe Op Ar pattern +Describe the tasks (matching optional +.Ar pattern ) , +then exit. +.It Fl W , Fl -where Op Ar pattern +Describe the tasks (matching optional +.Ar pattern ) , +then exit. +.It Fl P , Fl -prereqs Display the tasks and dependencies, then exit. - -.TP -\fB\-e\fR, \fB\-\-execute\fR \fICODE\fR +.It Fl e , Fl -execute Ar code Execute some Ruby code and exit. -.TP -\fB\-p\fR, \fB\-\-execute\-print\fR \fICODE\fR +.It Fl p , Fl -execute-print Ar code Execute some Ruby code, print the result, then exit. -.TP -\fB\-E\fR, \fB\-\-execute\-continue\fR \fICODE\fR +.It Fl E , Fl -execute-continue Ar code Execute some Ruby code, then continue with normal task processing. - -.SS Information -.TP -\fB\-v\fR, \fB\-\-verbose\fR +.El +.Ss Information +.Bl -tag -width Ds +.It Fl v , Fl -verbose Log message to standard output. -.TP -\fB\-q\fR, \fB\-\-quiet\fR +.It Fl q , Fl -quiet Do not log messages to standard output. -.TP -\fB\-s\fR, \fB\-\-silent\fR -Like \fB\-\-quiet\fR, but also suppresses the 'in directory' announcement. -.TP -\fB\-X\fR, \fB\-\-no\-deprecation\-warnings\fR +.It Fl s , Fl -silent +Like +.Fl -quiet , +but also suppresses the +.Sq in directory +announcement. +.It Fl X , Fl -no-deprecation-warnings Disable the deprecation warnings. -.TP -\fB\-\-comments\fR +.It Fl -comments Show commented tasks only -.TP -\fB\-A\fR, \fB\-\-all\fR -Show all tasks, even uncommented ones (in combination with \fB\-T\fR or \fB\-D\fR) -.TP -\fB\-\-job\-stats\fR [\fILEVEL\fR] -Display job statistics. \fILEVEL=history\fR displays a complete job list -.TP -\fB\-V\fR, \fB\-\-version\fR +.It Fl A , Fl -all +Show all tasks, even uncommented ones (in combination with +.Fl T +or +.Fl D ) +.It Fl -job-stats Op Ar level +Display job statistics. +If +.Ar level +is +.Sq history , +displays a complete job list. +.It Fl V , Fl -version Display the program version. -.TP -\fB\-h\fR, \fB\-H\fR, \fB\-\-help\fR +.It Fl h , Fl H , Fl -help Display a help message. - -.SH SEE ALSO -The complete documentation for \fBrake\fR has been installed at \fI/usr/share/doc/rake-doc/html/index.html\fR. It is also available online at \fIhttp://docs.seattlerb.org/rake\fR. -.SH AUTHOR -.B rake -was written by Jim Weirich -.PP -This manual was created by Caitlin Matos for the Debian project (but may be used by others). It was inspired by the manual by Jani Monoses for the Ubuntu project. +.El +.Sh SEE ALSO +The complete documentation for +.Nm rake +has been installed at +.Pa /usr/share/doc/rake-doc/html/index.html . +It is also available online at +.Lk http://docs.seattlerb.org/rake . +.Sh AUTHORS +.An -nosplit +.Nm +was written by +.An Jim Weirich Aq Mt jim@weirichhouse.org . +.Pp +This manual was created by +.An Caitlin Matos Aq Mt caitlin.matos@zoho.com +for the Debian project (but may be used by others). +It was inspired by the manual by +.An Jani Monoses Aq Mt jani@iv.ro +for the Ubuntu project. From edbb43ce99b48dce002b2ee3b6e1b3b5fed8dcbc Mon Sep 17 00:00:00 2001 From: Brandon Fish Date: Thu, 19 Feb 2015 14:58:18 -0600 Subject: [PATCH 302/813] Add Rubinius to Build Matrix with Allowed Failure Please add Rubinius to the build matrix with failure allowed. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 426691c5d..c75a3ce23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,9 @@ rvm: - 2.2.0 - ruby-head - jruby + - rbx-2 script: ruby -Ilib bin/rake matrix: allow_failures: - rvm: jruby + - rvm: rbx-2 From 1ac9472857bea1302fa6a763e8a296f450d33b85 Mon Sep 17 00:00:00 2001 From: Yuki Nishijima Date: Sat, 21 Feb 2015 11:10:17 -0800 Subject: [PATCH 303/813] Remove duplicate private TaskManager already has a private declaration in line 215. --- lib/rake/task_manager.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index cbb9f5ee2..d9b4d85e7 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -291,9 +291,6 @@ def make_sources(task_name, extensions) result.flatten end - - private - # Return the current description, clearing it in the process. def get_description(task) desc = @last_description From 8f14b2507e68d5112b0cc9eea0fe835c32152760 Mon Sep 17 00:00:00 2001 From: Nicolas Leger Date: Fri, 6 Mar 2015 11:32:03 +0100 Subject: [PATCH 304/813] Build with new Ruby 2.2.1 version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c75a3ce23..5fb7bad5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ rvm: - 1.9.3 - 2.0.0 - 2.1.0 - - 2.2.0 + - 2.2.1 - ruby-head - jruby - rbx-2 From 607b9091c12b88383c474c2addc9c8ad145f5fd4 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 7 Mar 2015 16:25:19 +0900 Subject: [PATCH 305/813] use latest version of Ruby 2.1 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5fb7bad5d..ccb2c56fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ rvm: - 1.8.7 - 1.9.3 - 2.0.0 - - 2.1.0 + - 2.1.5 - 2.2.1 - ruby-head - jruby From bb4106a0eea95fc6b9e14a03595d9172b5c0f652 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 13 Mar 2015 12:41:14 +0900 Subject: [PATCH 306/813] backported ruby/ruby trunk r49950: https://github.com/ruby/ruby/commit/05c29680e515c000552008f725747261ffa6008d --- test/test_rake_application_options.rb | 2 ++ test/test_rake_file_utils.rb | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index 191424059..250302685 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -7,6 +7,7 @@ class TestRakeApplicationOptions < Rake::TestCase def setup super + @testkey = ENV['TESTKEY'] clear_argv Rake::FileUtilsExt.verbose_flag = false Rake::FileUtilsExt.nowrite_flag = false @@ -14,6 +15,7 @@ def setup end def teardown + ENV['TESTKEY'] = @testkey clear_argv Rake::FileUtilsExt.verbose_flag = false Rake::FileUtilsExt.nowrite_flag = false diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 37d33dc39..90e01dfbf 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -3,10 +3,15 @@ require 'stringio' class TestRakeFileUtils < Rake::TestCase + def setup + super + @rake_test_sh = ENV['RAKE_TEST_SH'] + end def teardown FileUtils::LN_SUPPORTED[0] = true RakeFileUtils.verbose_flag = Rake::FileUtilsExt::DEFAULT + ENV['RAKE_TEST_SH'] = @rake_test_sh super end From 21e24c08a93bf6652ed447bb1a62548586388ee9 Mon Sep 17 00:00:00 2001 From: Demian Ferreiro Date: Fri, 13 Mar 2015 01:59:34 -0300 Subject: [PATCH 307/813] Allow curly brace patterns on FileList#exclude --- lib/rake/file_list.rb | 8 +++++--- test/test_rake_file_list.rb | 5 +++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index 006ec7703..3f6f34f7a 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -85,6 +85,8 @@ def #{sym}(*args, &block) end end + GLOB_PATTERN = %r{[*?\[\{]} + # Create a file list from the globbable patterns given. If you wish to # perform multiple includes or excludes at object build time, use the # "yield self" pattern. @@ -215,7 +217,7 @@ def resolve def resolve_add(fn) # :nodoc: case fn - when %r{[*?\[\{]} + when GLOB_PATTERN add_matching(fn) else self << fn @@ -362,8 +364,8 @@ def excluded_from_list?(fn) case pat when Regexp fn =~ pat - when /[*?]/ - File.fnmatch?(pat, fn, File::FNM_PATHNAME) + when GLOB_PATTERN + File.fnmatch?(pat, fn, File::FNM_PATHNAME | File::FNM_EXTGLOB) else fn == pat end diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index c1b4c9208..8dc242882 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -210,6 +210,11 @@ def test_exclude_with_string_return_on_create assert_equal FileList, fl.class end + def test_exclude_curly_bracket_pattern + fl = FileList['*'].exclude('{abc,xyz}.c') + assert_equal %w[abc.h abc.x cfiles existing x.c xyzzy.txt], fl + end + def test_default_exclude fl = FileList.new fl.clear_exclude From 79d90d7d39e992aaf408f1a5d6d2c9ef924b5d92 Mon Sep 17 00:00:00 2001 From: Demian Ferreiro Date: Fri, 13 Mar 2015 02:24:23 -0300 Subject: [PATCH 308/813] Accept arrays on FileList#exclude --- lib/rake/file_list.rb | 6 +++++- test/test_rake_file_list.rb | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index 3f6f34f7a..3d70f9856 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -151,7 +151,11 @@ def include(*filenames) # def exclude(*patterns, &block) patterns.each do |pat| - @exclude_patterns << Rake.from_pathname(pat) + if pat.respond_to? :to_ary + exclude(*pat.to_ary) + else + @exclude_patterns << Rake.from_pathname(pat) + end end @exclude_procs << block if block_given? resolve_exclude unless @pending diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 8dc242882..0476d5a89 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -215,6 +215,17 @@ def test_exclude_curly_bracket_pattern assert_equal %w[abc.h abc.x cfiles existing x.c xyzzy.txt], fl end + def test_exclude_an_array + fl = FileList['*'].exclude(['existing', '*.c']) + assert_equal %w[abc.h abc.x cfiles xyzzy.txt], fl + end + + def test_exclude_a_filelist + excluded = FileList['existing', '*.c'] + fl = FileList['*'].exclude(excluded) + assert_equal %w[abc.h abc.x cfiles xyzzy.txt], fl + end + def test_default_exclude fl = FileList.new fl.clear_exclude From 81add18d4932cb6e701c8512f803e73f6547a090 Mon Sep 17 00:00:00 2001 From: Demian Ferreiro Date: Wed, 18 Mar 2015 23:48:03 -0300 Subject: [PATCH 309/813] Use File::FNM_EXTGLOB only on newer rubies --- lib/rake/file_list.rb | 5 ++++- test/test_rake_file_list.rb | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index 3d70f9856..b7bb7f398 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -369,7 +369,10 @@ def excluded_from_list?(fn) when Regexp fn =~ pat when GLOB_PATTERN - File.fnmatch?(pat, fn, File::FNM_PATHNAME | File::FNM_EXTGLOB) + flags = File::FNM_PATHNAME + # Ruby <= 1.9.3 does not support File::FNM_EXTGLOB + flags |= File::FNM_EXTGLOB if defined? File::FNM_EXTGLOB + File.fnmatch?(pat, fn, flags) else fn == pat end diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 0476d5a89..25e595772 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -211,6 +211,7 @@ def test_exclude_with_string_return_on_create end def test_exclude_curly_bracket_pattern + skip 'brace pattern matches not supported' unless defined? File::FNM_EXTGLOB fl = FileList['*'].exclude('{abc,xyz}.c') assert_equal %w[abc.h abc.x cfiles existing x.c xyzzy.txt], fl end From 805c13ab52eae9df55f9030f40c7fbc1beadc105 Mon Sep 17 00:00:00 2001 From: Sam Handler Date: Wed, 25 Mar 2015 14:28:14 -0400 Subject: [PATCH 310/813] Fix typo in application.rb --- lib/rake/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index bd72a2efa..115ca890b 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -186,7 +186,7 @@ def standard_exception_handling # :nodoc: exit_because_of_exception(ex) end - # Exit the program because of an unhandle exception. + # Exit the program because of an unhandled exception. # (may be overridden by subclasses) def exit_because_of_exception(ex) # :nodoc: exit(false) From 6c2ba242af6b9f8b2fbea9463f58ea8acfb5c85d Mon Sep 17 00:00:00 2001 From: JIANG Di Date: Tue, 31 Mar 2015 14:11:19 +0800 Subject: [PATCH 311/813] more readable `String#ext` method the tenary operator is equel to: ```ruby newext = if (newext =~ /^\./) newext else ("." + newext) end ``` if `newext` match the regexp(/^\./), it do a assignment `newext = newext`, it's unnecceary, so just use unless modifier --- lib/rake/ext/string.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb index b47b055a7..f212223e4 100644 --- a/lib/rake/ext/string.rb +++ b/lib/rake/ext/string.rb @@ -12,7 +12,9 @@ class String # This String extension comes from Rake def ext(newext='') return self.dup if ['.', '..'].include? self - newext = (newext =~ /^\./) ? newext : ("." + newext) if newext != '' + if newext != '' + newext = "." + newext unless newext =~ /^\./ + end self.chomp(File.extname(self)) << newext end end From e644af3a09659c7e04245186607091324d8816e9 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 9 Apr 2015 09:25:02 -0700 Subject: [PATCH 312/813] Improve documentation of Rake::MakefileLoader Thanks to @42races for the improvement suggestion. --- lib/rake/loaders/makefile.rb | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/lib/rake/loaders/makefile.rb b/lib/rake/loaders/makefile.rb index 4ece4323a..2c4b2632a 100644 --- a/lib/rake/loaders/makefile.rb +++ b/lib/rake/loaders/makefile.rb @@ -1,13 +1,26 @@ module Rake - # Makefile loader to be used with the import file loader. + # Makefile loader to be used with the import file loader. Use this to + # import dependencies from make dependency tools: + # + # require 'rake/loaders/makefile' + # + # file ".depends.mf" => [SRC_LIST] do |t| + # sh "makedepend -f- -- #{CFLAGS} -- #{t.prerequisites} > #{t.name}" + # end + # + # import ".depends.mf" + # + # See {Importing Dependencies}[link:doc/rakefile_rdoc.html#label-Importing+Dependencies] + # for further details. + class MakefileLoader include Rake::DSL - SPACE_MARK = "\0" + SPACE_MARK = "\0" # :nodoc: # Load the makefile dependencies in +fn+. - def load(fn) + def load(fn) # :nodoc: lines = File.read fn lines.gsub!(/\\ /, SPACE_MARK) lines.gsub!(/#[^\n]*\n/m, "") @@ -20,7 +33,7 @@ def load(fn) private # Process one logical line of makefile data. - def process_line(line) + def process_line(line) # :nodoc: file_tasks, args = line.split(':', 2) return if args.nil? dependents = args.split.map { |d| respace(d) } @@ -30,7 +43,7 @@ def process_line(line) end end - def respace(str) + def respace(str) # :nodoc: str.tr SPACE_MARK, ' ' end end From 3d6665c7d7fd902fc91e40dcf9a0993009833a68 Mon Sep 17 00:00:00 2001 From: Petr Skocik Date: Sat, 11 Apr 2015 18:20:35 +0200 Subject: [PATCH 313/813] test for chained extensions in rules --- test/test_rake_rules.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index ece75e5d9..ef1fa7228 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -10,6 +10,7 @@ class TestRakeRules < Rake::TestCase OBJFILE = "abc.o" FOOFILE = "foo" DOTFOOFILE = ".foo" + MINFILE = 'abc.min.o' def setup super @@ -385,4 +386,15 @@ def obj.find_prereq(task_name) assert_equal ["#{OBJFILE} - abc.c"], @runs end + def test_works_with_chained_extensions_in_rules + create_file(OBJFILE) + rule('.min.o' => ['.o']) do |t| + @runs << t.name + assert_equal OBJFILE, t.source + assert_equal MINFILE, t.name + end + Task[MINFILE].invoke + assert_equal [MINFILE], @runs + end + end From 84bc6741da1a6c4b76267e3f11fdff602879fe81 Mon Sep 17 00:00:00 2001 From: Petr Skocik Date: Sat, 11 Apr 2015 18:21:03 +0200 Subject: [PATCH 314/813] support chained extensions in rules --- lib/rake/task_manager.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index d9b4d85e7..9b4080617 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -131,7 +131,7 @@ def enhance_with_matching_rule(task_name, level=0) "Rule Recursion Too Deep" if level >= 16 @rules.each do |pattern, args, extensions, block| if pattern.match(task_name) - task = attempt_rule(task_name, args, extensions, block, level) + task = attempt_rule(task_name, pattern, args, extensions, block, level) return task if task end end @@ -245,8 +245,8 @@ def trace_rule(level, message) # :nodoc: end # Attempt to create a rule given the list of prerequisites. - def attempt_rule(task_name, args, extensions, block, level) - sources = make_sources(task_name, extensions) + def attempt_rule(task_name, task_pattern, args, extensions, block, level) + sources = make_sources(task_name, task_pattern, extensions) prereqs = sources.map { |source| trace_rule level, "Attempting Rule #{task_name} => #{source}" if File.exist?(source) || Rake::Task.task_defined?(source) @@ -267,7 +267,7 @@ def attempt_rule(task_name, args, extensions, block, level) # Make a list of sources from the list of file name extensions / # translation procs. - def make_sources(task_name, extensions) + def make_sources(task_name, task_pattern, extensions) result = extensions.map { |ext| case ext when /%/ @@ -275,7 +275,8 @@ def make_sources(task_name, extensions) when %r{/} ext when /^\./ - task_name.ext(ext) + source = task_name.sub(task_pattern, ext) + source == ext ? task_name.ext(ext) : source when String ext when Proc, Method From d70e2dbf7a885f6544412a4196af3ac10aac1082 Mon Sep 17 00:00:00 2001 From: Alex Brinkman Date: Fri, 22 May 2015 10:22:02 -0600 Subject: [PATCH 315/813] Fixes simple documentation typo for :libs attr_accessor in testtask.rb. --- lib/rake/testtask.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 02fbe5e92..da1347e3e 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -35,7 +35,7 @@ class TestTask < TaskLib # Name of test task. (default is :test) attr_accessor :name - # List of directories to added to $LOAD_PATH before running the + # List of directories added to $LOAD_PATH before running the # tests. (default is 'lib') attr_accessor :libs From fd53ccbbc4fe6cd8c48c0a088db9c78e10a5fd37 Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Tue, 26 May 2015 16:59:09 -0700 Subject: [PATCH 316/813] Don't forget to require rake/testtask --- lib/rake/testtask.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 02fbe5e92..2fb7d1b0a 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -6,6 +6,7 @@ module Rake # Create a task that runs a set of tests. # # Example: + # require "rake/testtask" # # Rake::TestTask.new do |t| # t.libs << "test" From 4d8782abeca8421dbb906abf8fa325cd6f978528 Mon Sep 17 00:00:00 2001 From: Pablo Herrero Date: Sat, 30 May 2015 16:35:35 -0300 Subject: [PATCH 317/813] Remove unnecessary monkey patching --- lib/rake/ext/time.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/rake/ext/time.rb b/lib/rake/ext/time.rb index d3b8cf9dc..3c206e4dd 100644 --- a/lib/rake/ext/time.rb +++ b/lib/rake/ext/time.rb @@ -4,13 +4,15 @@ require 'rake/early_time' require 'rake/late_time' -class Time # :nodoc: all - alias rake_original_time_compare :<=> - def <=>(other) - if Rake::EarlyTime === other || Rake::LateTime === other - - other.<=>(self) - else - rake_original_time_compare(other) +if RUBY_VERSION < "1.9" + class Time # :nodoc: all + alias rake_original_time_compare :<=> + def <=>(other) + if Rake::EarlyTime === other || Rake::LateTime === other + - other.<=>(self) + else + rake_original_time_compare(other) + end end end end From 240b297d45f7d45ec8805590185b0843e434e17c Mon Sep 17 00:00:00 2001 From: takiy33 Date: Thu, 11 Jun 2015 06:30:42 +0900 Subject: [PATCH 318/813] Use --no-document option instead of --no-rdoc and --no-ri option --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ccb2c56fb..a3e6db21d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ after_script: - ruby -Ilib bin/rake travis:after -t before_script: -- gem install hoe-travis --no-rdoc --no-ri -- gem install minitest -v '~> 5.0' --no-rdoc --no-ri +- gem install hoe-travis --no-document +- gem install minitest -v '~> 5.0' --no-document - ruby -Ilib bin/rake travis:before -t language: ruby sudo: false From d65574b38e6be6f680210a66e191dc8a3dae0b03 Mon Sep 17 00:00:00 2001 From: Jon San Miguel Date: Wed, 1 Jul 2015 15:02:33 -0700 Subject: [PATCH 319/813] Add travis-ci status image into the README --- README.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rdoc b/README.rdoc index 4b3cf0936..da649a94d 100644 --- a/README.rdoc +++ b/README.rdoc @@ -3,6 +3,7 @@ home :: https://github.com/ruby/rake bugs :: https://github.com/ruby/rake/issues docs :: http://docs.seattlerb.org/rake +build :: {travis-ci}[https://travis-ci.org/ruby/rake] == Description From 849a05013de8030bd631cec7096ea4868c3603ae Mon Sep 17 00:00:00 2001 From: shunsuke227ono Date: Sat, 11 Jul 2015 16:35:33 +0900 Subject: [PATCH 320/813] Improve markup by modifying a linux command into lowercase --- CONTRIBUTING.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rdoc b/CONTRIBUTING.rdoc index 243cfe84e..5ad256ddb 100644 --- a/CONTRIBUTING.rdoc +++ b/CONTRIBUTING.rdoc @@ -9,7 +9,7 @@ http://github.com/ruby/rake . The public git clone URL is If you wish to run the unit and functional tests that come with Rake: -* CD into the top project directory of rake. +* +cd+ into the top project directory of rake. * Type one of the following: rake newb # If you have never run rake's tests From 1a22706dcb7cba216973a3098ace83a912a04559 Mon Sep 17 00:00:00 2001 From: Tom Mornini Date: Thu, 30 Jul 2015 09:32:30 -0700 Subject: [PATCH 321/813] Travis: 2.1.5 -> 2.1.6 and 2.2.1 -> 2.2.2 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a3e6db21d..baeb6bc2c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,8 @@ rvm: - 1.8.7 - 1.9.3 - 2.0.0 - - 2.1.5 - - 2.2.1 + - 2.1.6 + - 2.2.2 - ruby-head - jruby - rbx-2 From dfd39e49b28b81a07fa05f9a1fdc55d6e57f532b Mon Sep 17 00:00:00 2001 From: Tom Mornini Date: Tue, 18 Aug 2015 09:33:45 -0700 Subject: [PATCH 322/813] bump .travis.yml to 2.1.7 and 2.2.3 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index baeb6bc2c..442d5254e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,8 @@ rvm: - 1.8.7 - 1.9.3 - 2.0.0 - - 2.1.6 - - 2.2.2 + - 2.1.7 + - 2.2.3 - ruby-head - jruby - rbx-2 From c5b95739a4f65f40adf774c5bb69adca0f2830a6 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 28 Aug 2015 15:17:05 +0900 Subject: [PATCH 323/813] Revert "Convert manual page to use semantic -mdoc macros." --- doc/rake.1 | 263 +++++++++++++++++++++++++---------------------------- 1 file changed, 124 insertions(+), 139 deletions(-) diff --git a/doc/rake.1 b/doc/rake.1 index bde363729..b63ed49ed 100644 --- a/doc/rake.1 +++ b/doc/rake.1 @@ -1,156 +1,141 @@ -.Dd August 27, 2014 -.Dt RAKE 1 -.Os -.Sh NAME -.Nm rake -.Nd make-like build utility for Ruby -.Sh SYNOPSIS -.Nm -.Op Fl f Ar rakefile -.Op Ar options -.Ar targets ... -.Sh DESCRIPTION -.Nm -is a -.Xr make 1 Ns -like -build utility for Ruby. -Tasks and dependencies are specified in standard Ruby syntax. -.Sh OPTIONS -.Bl -tag -width Ds -.It Fl m , Fl -multitask +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH RAKE 1 "August 27, 2014" "rake 10.3.2" "Rake User Commands" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +rake \- a make-like build utility for Ruby +.SH SYNOPSIS +\fBrake\fR [\fI\-f rakefile\fR] {\fIOPTIONS\fR} \fITARGETS...\fR +.br +.SH DESCRIPTION +.B rake +is a make-like build utility for Ruby. Tasks and dependencies are specified in +standard Ruby syntax. +.SH OPTIONS +.TP +\fB\-m\fR, \fB\-\-multitask\fR Treat all tasks as multitasks. -.It Fl B , Fl -build-all +.TP +\fB\-B\fR, \fB\-\-build\-all\fR Build all prerequisites, including those which are up\-to\-date. -.It Fl j , Fl -jobs Ar num_jobs + +.TP +\fB\-j\fR, \fB\-\-jobs\fR [\fINUMBER\fR] Specifies the maximum number of tasks to execute in parallel (default is number of CPU cores + 4). -.El -.Ss Modules -.Bl -tag -width Ds -.It Fl I , Fl -libdir Ar libdir -Include -.Ar libdir -in the search path for required modules. -.It Fl r , Fl -require Ar module -Require -.Ar module -before executing -.Pa rakefile . -.El -.Ss Rakefile location -.Bl -tag -width Ds -.It Fl f , Fl -rakefile Ar filename -Use -.Ar filename -as the rakefile to search for. -.It Fl N , Fl -no-search , Fl -nosearch + +.SS Modules +.TP +\fB\-I\fR, \fB\-\-libdir\fR \fILIBDIR\fR +Include \fILIBDIR\fR in the search path for required modules. +.TP +\fB\-r\fR, \fB\-\-require\fR \fIMODULE\fR +Require \fIMODULE\fR before executing rakefile. + +.SS Rakefile location +.TP +\fB\-f\fR, \fB\-\-rakefile\fR [\fIFILENAME\fR] +Use \fIFILENAME\fR as the rakefile to search for. +.TP +\fB\-N\fR, \fB\-\-no\-search\fR, \fB\-\-nosearch\fR Do not search parent directories for the Rakefile. -.It Fl G , Fl -no-system , Fl -nosystem +.TP +\fB\-G\fR, \fB\-\-no\-system\fR, \fB\-\-nosystem\fR Use standard project Rakefile search paths, ignore system wide rakefiles. -.It Fl R , Fl -rakelib Ar rakelibdir , Fl -rakelibdir Ar rakelibdir -Auto-import any .rake files in -.Ar rakelibdir -(default is -.Sq rakelib ) -.It Fl g , Fl -system -Use system-wide (global) rakefiles (usually -.Pa ~/.rake/*.rake ) . -.El -.Ss Debugging -.Bl -tag -width Ds -.It Fl -backtrace Ns = Ns Ar out -Enable full backtrace. -.Ar out -can be -.Dv stderr -(default) or -.Dv stdout . -.It Fl t , Fl -trace Ns = Ns Ar out -Turn on invoke/execute tracing, enable full backtrace. -.Ar out -can be -.Dv stderr -(default) or -.Dv stdout . -.It Fl -suppress-backtrace Ar pattern -Suppress backtrace lines matching regexp -.Ar pattern . -Ignored if -.Fl -trace -is on. -.It Fl -rules +.TP +\fB\-R\fR, \fB\-\-rakelibdir\fR \fIRAKELIBDIR\fR +Auto\-import any .rake files in \fIRAKELIBDIR\fR (default is 'rakelib') +.HP +\fB\-\-rakelib\fR +.TP +\fB\-g\fR, \fB\-\-system\fR +Using system wide (global) rakefiles (usually '\fI~/.rake/*.rake\fR'). + +.SS Debugging +.TP +\fB\-\-backtrace\fR=\fI\,[OUT]\/\fR +Enable full backtrace. \fIOUT\fR can be stderr (default) or stdout. +.TP +\fB\-t\fR, \fB\-\-trace\fR=\fI\,[OUT]\/\fR +Turn on invoke/execute tracing, enable full backtrace. \fIOUT\fR can be stderr (default) or stdout. +.TP +\fB\-\-suppress\-backtrace\fR \fIPATTERN\fR +Suppress backtrace lines matching regexp \fIPATTERN\fR. Ignored if \fI\-\-trace\fR is on. +.TP +\fB\-\-rules\fR Trace the rules resolution. -.It Fl n , Fl -dry-run + +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR Do a dry run without executing actions. -.It Fl T , Fl -tasks Op Ar pattern -Display the tasks (matching optional -.Ar pattern ) -with descriptions, then exit. -.It Fl D , Fl -describe Op Ar pattern -Describe the tasks (matching optional -.Ar pattern ) , -then exit. -.It Fl W , Fl -where Op Ar pattern -Describe the tasks (matching optional -.Ar pattern ) , -then exit. -.It Fl P , Fl -prereqs +.TP +\fB\-T\fR, \fB\-\-tasks\fR [\fIPATTERN\fR] +Display the tasks (matching optional \fIPATTERN\fR) with descriptions, then exit. +.TP +\fB\-D\fR, \fB\-\-describe\fR [\fIPATTERN\fR] +Describe the tasks (matching optional \fIPATTERN\fR), then exit. +.TP +\fB\-W\fR, \fB\-\-where\fR [\fIPATTERN\fR] +Describe the tasks (matching optional \fIPATTERN\fR), then exit. +.TP +\fB\-P\fR, \fB\-\-prereqs\fR Display the tasks and dependencies, then exit. -.It Fl e , Fl -execute Ar code + +.TP +\fB\-e\fR, \fB\-\-execute\fR \fICODE\fR Execute some Ruby code and exit. -.It Fl p , Fl -execute-print Ar code +.TP +\fB\-p\fR, \fB\-\-execute\-print\fR \fICODE\fR Execute some Ruby code, print the result, then exit. -.It Fl E , Fl -execute-continue Ar code +.TP +\fB\-E\fR, \fB\-\-execute\-continue\fR \fICODE\fR Execute some Ruby code, then continue with normal task processing. -.El -.Ss Information -.Bl -tag -width Ds -.It Fl v , Fl -verbose + +.SS Information +.TP +\fB\-v\fR, \fB\-\-verbose\fR Log message to standard output. -.It Fl q , Fl -quiet +.TP +\fB\-q\fR, \fB\-\-quiet\fR Do not log messages to standard output. -.It Fl s , Fl -silent -Like -.Fl -quiet , -but also suppresses the -.Sq in directory -announcement. -.It Fl X , Fl -no-deprecation-warnings +.TP +\fB\-s\fR, \fB\-\-silent\fR +Like \fB\-\-quiet\fR, but also suppresses the 'in directory' announcement. +.TP +\fB\-X\fR, \fB\-\-no\-deprecation\-warnings\fR Disable the deprecation warnings. -.It Fl -comments +.TP +\fB\-\-comments\fR Show commented tasks only -.It Fl A , Fl -all -Show all tasks, even uncommented ones (in combination with -.Fl T -or -.Fl D ) -.It Fl -job-stats Op Ar level -Display job statistics. -If -.Ar level -is -.Sq history , -displays a complete job list. -.It Fl V , Fl -version +.TP +\fB\-A\fR, \fB\-\-all\fR +Show all tasks, even uncommented ones (in combination with \fB\-T\fR or \fB\-D\fR) +.TP +\fB\-\-job\-stats\fR [\fILEVEL\fR] +Display job statistics. \fILEVEL=history\fR displays a complete job list +.TP +\fB\-V\fR, \fB\-\-version\fR Display the program version. -.It Fl h , Fl H , Fl -help +.TP +\fB\-h\fR, \fB\-H\fR, \fB\-\-help\fR Display a help message. -.El -.Sh SEE ALSO -The complete documentation for -.Nm rake -has been installed at -.Pa /usr/share/doc/rake-doc/html/index.html . -It is also available online at -.Lk http://docs.seattlerb.org/rake . -.Sh AUTHORS -.An -nosplit -.Nm -was written by -.An Jim Weirich Aq Mt jim@weirichhouse.org . -.Pp -This manual was created by -.An Caitlin Matos Aq Mt caitlin.matos@zoho.com -for the Debian project (but may be used by others). -It was inspired by the manual by -.An Jani Monoses Aq Mt jani@iv.ro -for the Ubuntu project. + +.SH SEE ALSO +The complete documentation for \fBrake\fR has been installed at \fI/usr/share/doc/rake-doc/html/index.html\fR. It is also available online at \fIhttp://docs.seattlerb.org/rake\fR. +.SH AUTHOR +.B rake +was written by Jim Weirich +.PP +This manual was created by Caitlin Matos for the Debian project (but may be used by others). It was inspired by the manual by Jani Monoses for the Ubuntu project. From c34d9e0afbaee050a4202d045a42efb8aae65117 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 28 Aug 2015 15:20:27 +0900 Subject: [PATCH 324/813] update released date for latest stable version. --- doc/rake.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/rake.1 b/doc/rake.1 index b63ed49ed..acfe650a2 100644 --- a/doc/rake.1 +++ b/doc/rake.1 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH RAKE 1 "August 27, 2014" "rake 10.3.2" "Rake User Commands" +.TH RAKE 1 "December 3, 2014" "rake 10.4.2" "Rake User Commands" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -16,7 +16,7 @@ .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME -rake \- a make-like build utility for Ruby +rake \- a make-like build utility for Ruby .SH SYNOPSIS \fBrake\fR [\fI\-f rakefile\fR] {\fIOPTIONS\fR} \fITARGETS...\fR .br @@ -136,6 +136,6 @@ Display a help message. The complete documentation for \fBrake\fR has been installed at \fI/usr/share/doc/rake-doc/html/index.html\fR. It is also available online at \fIhttp://docs.seattlerb.org/rake\fR. .SH AUTHOR .B rake -was written by Jim Weirich +was written by Jim Weirich .PP This manual was created by Caitlin Matos for the Debian project (but may be used by others). It was inspired by the manual by Jani Monoses for the Ubuntu project. From 4eb8b7d70cd0040dc043eff939f549213cb713d1 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Fri, 28 Aug 2015 01:34:34 -0600 Subject: [PATCH 325/813] Convert manual page to use semantic -mdoc macros. --- doc/rake.1 | 263 ++++++++++++++++++++++++++++------------------------- 1 file changed, 139 insertions(+), 124 deletions(-) diff --git a/doc/rake.1 b/doc/rake.1 index acfe650a2..dbfa66b3d 100644 --- a/doc/rake.1 +++ b/doc/rake.1 @@ -1,141 +1,156 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" First parameter, NAME, should be all caps -.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection -.\" other parameters are allowed: see man(7), man(1) -.TH RAKE 1 "December 3, 2014" "rake 10.4.2" "Rake User Commands" -.\" Please adjust this date whenever revising the manpage. -.\" -.\" Some roff macros, for reference: -.\" .nh disable hyphenation -.\" .hy enable hyphenation -.\" .ad l left justify -.\" .ad b justify to both left and right margins -.\" .nf disable filling -.\" .fi enable filling -.\" .br insert line break -.\" .sp insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -rake \- a make-like build utility for Ruby -.SH SYNOPSIS -\fBrake\fR [\fI\-f rakefile\fR] {\fIOPTIONS\fR} \fITARGETS...\fR -.br -.SH DESCRIPTION -.B rake -is a make-like build utility for Ruby. Tasks and dependencies are specified in -standard Ruby syntax. -.SH OPTIONS -.TP -\fB\-m\fR, \fB\-\-multitask\fR +.Dd December 3, 2014 +.Dt RAKE 1 +.Os rake 10.4.2 +.Sh NAME +.Nm rake +.Nd make-like build utility for Ruby +.Sh SYNOPSIS +.Nm +.Op Fl f Ar rakefile +.Op Ar options +.Ar targets ... +.Sh DESCRIPTION +.Nm +is a +.Xr make 1 Ns -like +build utility for Ruby. +Tasks and dependencies are specified in standard Ruby syntax. +.Sh OPTIONS +.Bl -tag -width Ds +.It Fl m , Fl -multitask Treat all tasks as multitasks. -.TP -\fB\-B\fR, \fB\-\-build\-all\fR +.It Fl B , Fl -build-all Build all prerequisites, including those which are up\-to\-date. - -.TP -\fB\-j\fR, \fB\-\-jobs\fR [\fINUMBER\fR] +.It Fl j , Fl -jobs Ar num_jobs Specifies the maximum number of tasks to execute in parallel (default is number of CPU cores + 4). - -.SS Modules -.TP -\fB\-I\fR, \fB\-\-libdir\fR \fILIBDIR\fR -Include \fILIBDIR\fR in the search path for required modules. -.TP -\fB\-r\fR, \fB\-\-require\fR \fIMODULE\fR -Require \fIMODULE\fR before executing rakefile. - -.SS Rakefile location -.TP -\fB\-f\fR, \fB\-\-rakefile\fR [\fIFILENAME\fR] -Use \fIFILENAME\fR as the rakefile to search for. -.TP -\fB\-N\fR, \fB\-\-no\-search\fR, \fB\-\-nosearch\fR +.El +.Ss Modules +.Bl -tag -width Ds +.It Fl I , Fl -libdir Ar libdir +Include +.Ar libdir +in the search path for required modules. +.It Fl r , Fl -require Ar module +Require +.Ar module +before executing +.Pa rakefile . +.El +.Ss Rakefile location +.Bl -tag -width Ds +.It Fl f , Fl -rakefile Ar filename +Use +.Ar filename +as the rakefile to search for. +.It Fl N , Fl -no-search , Fl -nosearch Do not search parent directories for the Rakefile. -.TP -\fB\-G\fR, \fB\-\-no\-system\fR, \fB\-\-nosystem\fR +.It Fl G , Fl -no-system , Fl -nosystem Use standard project Rakefile search paths, ignore system wide rakefiles. -.TP -\fB\-R\fR, \fB\-\-rakelibdir\fR \fIRAKELIBDIR\fR -Auto\-import any .rake files in \fIRAKELIBDIR\fR (default is 'rakelib') -.HP -\fB\-\-rakelib\fR -.TP -\fB\-g\fR, \fB\-\-system\fR -Using system wide (global) rakefiles (usually '\fI~/.rake/*.rake\fR'). - -.SS Debugging -.TP -\fB\-\-backtrace\fR=\fI\,[OUT]\/\fR -Enable full backtrace. \fIOUT\fR can be stderr (default) or stdout. -.TP -\fB\-t\fR, \fB\-\-trace\fR=\fI\,[OUT]\/\fR -Turn on invoke/execute tracing, enable full backtrace. \fIOUT\fR can be stderr (default) or stdout. -.TP -\fB\-\-suppress\-backtrace\fR \fIPATTERN\fR -Suppress backtrace lines matching regexp \fIPATTERN\fR. Ignored if \fI\-\-trace\fR is on. -.TP -\fB\-\-rules\fR +.It Fl R , Fl -rakelib Ar rakelibdir , Fl -rakelibdir Ar rakelibdir +Auto-import any .rake files in +.Ar rakelibdir +(default is +.Sq rakelib ) +.It Fl g , Fl -system +Use system-wide (global) rakefiles (usually +.Pa ~/.rake/*.rake ) . +.El +.Ss Debugging +.Bl -tag -width Ds +.It Fl -backtrace Ns = Ns Ar out +Enable full backtrace. +.Ar out +can be +.Dv stderr +(default) or +.Dv stdout . +.It Fl t , Fl -trace Ns = Ns Ar out +Turn on invoke/execute tracing, enable full backtrace. +.Ar out +can be +.Dv stderr +(default) or +.Dv stdout . +.It Fl -suppress-backtrace Ar pattern +Suppress backtrace lines matching regexp +.Ar pattern . +Ignored if +.Fl -trace +is on. +.It Fl -rules Trace the rules resolution. - -.TP -\fB\-n\fR, \fB\-\-dry\-run\fR +.It Fl n , Fl -dry-run Do a dry run without executing actions. -.TP -\fB\-T\fR, \fB\-\-tasks\fR [\fIPATTERN\fR] -Display the tasks (matching optional \fIPATTERN\fR) with descriptions, then exit. -.TP -\fB\-D\fR, \fB\-\-describe\fR [\fIPATTERN\fR] -Describe the tasks (matching optional \fIPATTERN\fR), then exit. -.TP -\fB\-W\fR, \fB\-\-where\fR [\fIPATTERN\fR] -Describe the tasks (matching optional \fIPATTERN\fR), then exit. -.TP -\fB\-P\fR, \fB\-\-prereqs\fR +.It Fl T , Fl -tasks Op Ar pattern +Display the tasks (matching optional +.Ar pattern ) +with descriptions, then exit. +.It Fl D , Fl -describe Op Ar pattern +Describe the tasks (matching optional +.Ar pattern ) , +then exit. +.It Fl W , Fl -where Op Ar pattern +Describe the tasks (matching optional +.Ar pattern ) , +then exit. +.It Fl P , Fl -prereqs Display the tasks and dependencies, then exit. - -.TP -\fB\-e\fR, \fB\-\-execute\fR \fICODE\fR +.It Fl e , Fl -execute Ar code Execute some Ruby code and exit. -.TP -\fB\-p\fR, \fB\-\-execute\-print\fR \fICODE\fR +.It Fl p , Fl -execute-print Ar code Execute some Ruby code, print the result, then exit. -.TP -\fB\-E\fR, \fB\-\-execute\-continue\fR \fICODE\fR +.It Fl E , Fl -execute-continue Ar code Execute some Ruby code, then continue with normal task processing. - -.SS Information -.TP -\fB\-v\fR, \fB\-\-verbose\fR +.El +.Ss Information +.Bl -tag -width Ds +.It Fl v , Fl -verbose Log message to standard output. -.TP -\fB\-q\fR, \fB\-\-quiet\fR +.It Fl q , Fl -quiet Do not log messages to standard output. -.TP -\fB\-s\fR, \fB\-\-silent\fR -Like \fB\-\-quiet\fR, but also suppresses the 'in directory' announcement. -.TP -\fB\-X\fR, \fB\-\-no\-deprecation\-warnings\fR +.It Fl s , Fl -silent +Like +.Fl -quiet , +but also suppresses the +.Sq in directory +announcement. +.It Fl X , Fl -no-deprecation-warnings Disable the deprecation warnings. -.TP -\fB\-\-comments\fR +.It Fl -comments Show commented tasks only -.TP -\fB\-A\fR, \fB\-\-all\fR -Show all tasks, even uncommented ones (in combination with \fB\-T\fR or \fB\-D\fR) -.TP -\fB\-\-job\-stats\fR [\fILEVEL\fR] -Display job statistics. \fILEVEL=history\fR displays a complete job list -.TP -\fB\-V\fR, \fB\-\-version\fR +.It Fl A , Fl -all +Show all tasks, even uncommented ones (in combination with +.Fl T +or +.Fl D ) +.It Fl -job-stats Op Ar level +Display job statistics. +If +.Ar level +is +.Sq history , +displays a complete job list. +.It Fl V , Fl -version Display the program version. -.TP -\fB\-h\fR, \fB\-H\fR, \fB\-\-help\fR +.It Fl h , Fl H , Fl -help Display a help message. - -.SH SEE ALSO -The complete documentation for \fBrake\fR has been installed at \fI/usr/share/doc/rake-doc/html/index.html\fR. It is also available online at \fIhttp://docs.seattlerb.org/rake\fR. -.SH AUTHOR -.B rake -was written by Jim Weirich -.PP -This manual was created by Caitlin Matos for the Debian project (but may be used by others). It was inspired by the manual by Jani Monoses for the Ubuntu project. +.El +.Sh SEE ALSO +The complete documentation for +.Nm rake +has been installed at +.Pa /usr/share/doc/rake-doc/html/index.html . +It is also available online at +.Lk http://docs.seattlerb.org/rake . +.Sh AUTHORS +.An -nosplit +.Nm +was written by +.An Jim Weirich Aq Mt jim@weirichhouse.org . +.Pp +This manual was created by +.An Caitlin Matos Aq Mt caitlin.matos@zoho.com +for the Debian project (but may be used by others). +It was inspired by the manual by +.An Jani Monoses Aq Mt jani@iv.ro +for the Ubuntu project. From 7d3b6e0e21f003154cc59e10cecbf2393a3b4f1d Mon Sep 17 00:00:00 2001 From: "J. Austin Hughey" Date: Mon, 7 Sep 2015 10:28:41 -0500 Subject: [PATCH 326/813] acknowledge Jim in a more salient way --- README.rdoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.rdoc b/README.rdoc index da649a94d..a204f3b34 100644 --- a/README.rdoc +++ b/README.rdoc @@ -108,6 +108,8 @@ other projects with similar (and not so similar) goals. == Credits +[Jim Weirich] Who originally created Rake. + [Ryan Dlugosz] For the initial conversation that sparked Rake. [nobu.nokada@softhome.net] For the initial patch for rule support. @@ -138,3 +140,14 @@ This software is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose. +== Historical + +Rake was originally created by Jim Weirich, who unfortunately passed away in +February 2014. This repository was originally hosted at +[github.com/jimweirich/rake](https://github.com/jimweirich/rake/), however +with his passing, has been moved to [ruby/rake](https://github.com/ruby/rake). + +You can view Jim's last commit here: +https://github.com/jimweirich/rake/tree/336559f28f55bce418e2ebcc0a57548dcbac4025 + +Thank you for this great tool, Jim. We'll remember you. From 64f93f1d11257d6d192c6b24f094cb6b0d0be141 Mon Sep 17 00:00:00 2001 From: "J. Austin Hughey" Date: Tue, 8 Sep 2015 17:05:46 -0500 Subject: [PATCH 327/813] syntax fix (used to markdown) and link to wikipedia article --- README.rdoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.rdoc b/README.rdoc index a204f3b34..985839aa8 100644 --- a/README.rdoc +++ b/README.rdoc @@ -144,10 +144,12 @@ merchantability and fitness for a particular purpose. Rake was originally created by Jim Weirich, who unfortunately passed away in February 2014. This repository was originally hosted at -[github.com/jimweirich/rake](https://github.com/jimweirich/rake/), however -with his passing, has been moved to [ruby/rake](https://github.com/ruby/rake). +{github.com/jimweirich/rake}[https://github.com/jimweirich/rake/], however +with his passing, has been moved to {ruby/rake}[https://github.com/ruby/rake]. You can view Jim's last commit here: https://github.com/jimweirich/rake/tree/336559f28f55bce418e2ebcc0a57548dcbac4025 +You can {read more about Jim}[https://en.wikipedia.org/wiki/Jim_Weirich] at Wikipedia. + Thank you for this great tool, Jim. We'll remember you. From c8544897c1960b23eea7abb2546e2288bdf87248 Mon Sep 17 00:00:00 2001 From: Mike Blumtritt Date: Wed, 9 Sep 2015 14:00:36 +0200 Subject: [PATCH 328/813] Add tests for TestTask#verbose and TestTask#warning The warning tests were absent at all. The tests for verbose did not include a test for resulting `ruby_opts_string`. 4 new asserts added --- test/test_rake_test_task.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 5c4be797c..c5d606907 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -10,6 +10,7 @@ def test_initialize assert_equal :test, tt.name assert_equal ['lib'], tt.libs assert_equal 'test/test*.rb', tt.pattern + assert_equal false, tt.warning assert_equal false, tt.verbose assert Task.task_defined?(:test) end @@ -19,6 +20,7 @@ def test_initialize_override t.description = "Run example tests" t.libs = ['src', 'ext'] t.pattern = 'test/tc_*.rb' + t.warning = true t.verbose = true end refute_nil tt @@ -26,7 +28,10 @@ def test_initialize_override assert_equal :example, tt.name assert_equal ['src', 'ext'], tt.libs assert_equal 'test/tc_*.rb', tt.pattern + assert_equal true, tt.warning assert_equal true, tt.verbose + assert_match(/-w/, tt.ruby_opts_string) + assert_match(/--verbose/, tt.ruby_opts_string) assert Task.task_defined?(:example) end @@ -142,5 +147,4 @@ def test_test_files_equals assert_equal ["a.rb", 'b.rb'], tt.file_list.to_a end - end From 6495738dbc3468ea400eec983746cb49ef6226cc Mon Sep 17 00:00:00 2001 From: Mike Blumtritt Date: Wed, 9 Sep 2015 14:01:14 +0200 Subject: [PATCH 329/813] Fix verbose option for TestTask MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `rake test —verbose` did not result in verbose mode for MiniTest. The verbose option needs to be forwarded to the Ruby call. --- lib/rake/testtask.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 5cae95c5d..93e1ca260 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -128,6 +128,7 @@ def ruby_opts_string # :nodoc: opts = @ruby_opts.dup opts.unshift("-I\"#{lib_path}\"") unless @libs.empty? opts.unshift("-w") if @warning + opts.unshift('--verbose') if @verbose opts.join(" ") end From e2f6af6f9ceb9596ac5085640e628d3204459361 Mon Sep 17 00:00:00 2001 From: utilum Date: Wed, 23 Sep 2015 15:50:02 +0200 Subject: [PATCH 330/813] fix: line longer than 78 chars. --- doc/glossary.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/glossary.rdoc b/doc/glossary.rdoc index 0639f222d..9d592b02c 100644 --- a/doc/glossary.rdoc +++ b/doc/glossary.rdoc @@ -38,5 +38,5 @@ rule :: defined. Rules generally synthesize file tasks. task (Rake::Task) :: - The basic unit of work in a Rakefile. A task has a name, a set of prerequisites, - and a list of actions to be performed. + The basic unit of work in a Rakefile. A task has a name, a set of + prerequisites, and a list of actions to be performed. From 3d7ac80a8a1d269bca93888d004b1cfb2c6d4c83 Mon Sep 17 00:00:00 2001 From: Thomas Scholz Date: Thu, 24 Sep 2015 15:25:27 +0200 Subject: [PATCH 331/813] Fix special_return method's result wrapping to be more dynamic --- lib/rake/file_list.rb | 2 +- test/test_rake_file_list.rb | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index 006ec7703..93b8b5378 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -70,7 +70,7 @@ class FileList def #{sym}(*args, &block) resolve result = @items.send(:#{sym}, *args, &block) - FileList.new.import(result) + self.class.new.import(result) end }, __FILE__, ln else diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index c1b4c9208..6f4e5674b 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -642,6 +642,21 @@ def test_other_array_returning_methods assert_equal FileList, r.class end + def test_special_return_delegating_methods_object_type + custom_file_list = Class.new(FileList) + f = custom_file_list.new + + FileList::SPECIAL_RETURN.each do |m| + r = if [].method(m).arity == 1 + f.send(m, []) + else + f.send(m) + end + + assert_equal custom_file_list, r.class + end + end + def test_file_utils_can_use_filelists cfiles = FileList['*.c'] From 3a2e03a4a02926c68360d8a81366458759e0e5ad Mon Sep 17 00:00:00 2001 From: Doug Hammond Date: Mon, 12 Oct 2015 16:29:47 +0200 Subject: [PATCH 332/813] More helpful error message for unknown tasks. --- lib/rake/task_manager.rb | 2 +- test/test_rake_task.rb | 2 +- test/test_rake_task_manager.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index d9b4d85e7..c9c080b48 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -59,7 +59,7 @@ def [](task_name, scopes=nil) self.lookup(task_name, scopes) or enhance_with_matching_rule(task_name) or synthesize_file_task(task_name) or - fail "Don't know how to build task '#{task_name}'" + fail "Don't know how to build task '#{task_name}' (see --tasks)" end def synthesize_file_task(task_name) # :nodoc: diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 0416dfa8d..52e935b25 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -145,7 +145,7 @@ def test_find task :tfind assert_equal "tfind", Task[:tfind].name ex = assert_raises(RuntimeError) { Task[:leaves] } - assert_equal "Don't know how to build task 'leaves'", ex.message + assert_equal "Don't know how to build task 'leaves' (see --tasks)", ex.message end def test_defined diff --git a/test/test_rake_task_manager.rb b/test/test_rake_task_manager.rb index c2730b67e..1bcb7a74c 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -24,7 +24,7 @@ def test_index @tm['bad'] end - assert_equal "Don't know how to build task 'bad'", e.message + assert_equal "Don't know how to build task 'bad' (see --tasks)", e.message end def test_name_lookup From bf7bd3b6a7a347bab828ce872be588d7f00c8e21 Mon Sep 17 00:00:00 2001 From: Thomas Scholz Date: Thu, 24 Sep 2015 15:25:27 +0200 Subject: [PATCH 333/813] Fix special_return method's result wrapping to be more dynamic --- lib/rake/file_list.rb | 2 +- test/test_rake_file_list.rb | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index 006ec7703..93b8b5378 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -70,7 +70,7 @@ class FileList def #{sym}(*args, &block) resolve result = @items.send(:#{sym}, *args, &block) - FileList.new.import(result) + self.class.new.import(result) end }, __FILE__, ln else diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index c1b4c9208..6f4e5674b 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -642,6 +642,21 @@ def test_other_array_returning_methods assert_equal FileList, r.class end + def test_special_return_delegating_methods_object_type + custom_file_list = Class.new(FileList) + f = custom_file_list.new + + FileList::SPECIAL_RETURN.each do |m| + r = if [].method(m).arity == 1 + f.send(m, []) + else + f.send(m) + end + + assert_equal custom_file_list, r.class + end + end + def test_file_utils_can_use_filelists cfiles = FileList['*.c'] From 84743d85e5905a756b3117407c8e8ae2c2310f60 Mon Sep 17 00:00:00 2001 From: Peter Vandenberk Date: Tue, 20 Oct 2015 19:14:38 +0100 Subject: [PATCH 334/813] Install the "hoe" gem dependency --- CONTRIBUTING.rdoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTING.rdoc b/CONTRIBUTING.rdoc index 5ad256ddb..6c0b2e098 100644 --- a/CONTRIBUTING.rdoc +++ b/CONTRIBUTING.rdoc @@ -10,6 +10,10 @@ http://github.com/ruby/rake . The public git clone URL is If you wish to run the unit and functional tests that come with Rake: * +cd+ into the top project directory of rake. +* Install the +hoe+ gem dependency: + + gem install hoe # Unless the hoe gem is already installed + * Type one of the following: rake newb # If you have never run rake's tests From 7298e3604bcdd8397049da5ebe5836a88d077724 Mon Sep 17 00:00:00 2001 From: Peter Vandenberk Date: Tue, 20 Oct 2015 19:15:04 +0100 Subject: [PATCH 335/813] Whitespace only - align the code comments --- CONTRIBUTING.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.rdoc b/CONTRIBUTING.rdoc index 6c0b2e098..7eed5fb99 100644 --- a/CONTRIBUTING.rdoc +++ b/CONTRIBUTING.rdoc @@ -16,8 +16,8 @@ If you wish to run the unit and functional tests that come with Rake: * Type one of the following: - rake newb # If you have never run rake's tests - rake # If you have run rake's tests + rake newb # If you have never run rake's tests + rake # If you have run rake's tests = Issues and Bug Reports From 7c797cde547d159186c16f3cb0859b9472e0c258 Mon Sep 17 00:00:00 2001 From: Peter Vandenberk Date: Wed, 21 Oct 2015 09:01:30 +0100 Subject: [PATCH 336/813] Pluralize (for consistency) --- lib/rake/clean.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index a49cd4416..514f9f9c7 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -70,7 +70,7 @@ def cant_be_deleted?(path_name) CLOBBER = ::Rake::FileList.new -desc "Remove any generated file." +desc "Remove any generated files." task :clobber => [:clean] do Rake::Cleaner.cleanup_files(CLOBBER) end From 77b65bfbee9a8af004637d90bdd653432c4bd60e Mon Sep 17 00:00:00 2001 From: Peter Vandenberk Date: Mon, 26 Oct 2015 09:11:31 +0000 Subject: [PATCH 337/813] Constants cannot be made private in Ruby --- lib/rake/application.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 115ca890b..b8c1f5d15 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -783,7 +783,8 @@ def rakefile_location(backtrace=caller) # :nodoc: backtrace.find { |str| str =~ re } || '' end - private + # private ----------------------------------------------------------------- + FIXNUM_MAX = (2**(0.size * 8 - 2) - 1) # :nodoc: end From 469ec1c7c55a37bc01267690a5fbf64ef6f85445 Mon Sep 17 00:00:00 2001 From: Peter Vandenberk Date: Thu, 29 Oct 2015 19:37:18 +0000 Subject: [PATCH 338/813] Fixes #80 - define `Fixnum::MAX` constant --- lib/rake.rb | 1 + lib/rake/application.rb | 5 +---- lib/rake/ext/fixnum.rb | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 lib/rake/ext/fixnum.rb diff --git a/lib/rake.rb b/lib/rake.rb index 7366862ad..e01963a2a 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -41,6 +41,7 @@ module Rake require 'rake/ext/module' require 'rake/ext/string' require 'rake/ext/time' +require 'rake/ext/fixnum' require 'rake/win32' diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 115ca890b..20e262a5b 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -452,7 +452,7 @@ def standard_rake_options # :nodoc: "(default is number of CPU cores + 4)", lambda { |value| if value.nil? || value == '' - value = FIXNUM_MAX + value = Fixnum::MAX elsif value =~ /^\d+$/ value = value.to_i else @@ -783,8 +783,5 @@ def rakefile_location(backtrace=caller) # :nodoc: backtrace.find { |str| str =~ re } || '' end - private - FIXNUM_MAX = (2**(0.size * 8 - 2) - 1) # :nodoc: - end end diff --git a/lib/rake/ext/fixnum.rb b/lib/rake/ext/fixnum.rb new file mode 100644 index 000000000..56079ee6d --- /dev/null +++ b/lib/rake/ext/fixnum.rb @@ -0,0 +1,18 @@ +#-- +# Extensions to fixnum to define some constants missing from Ruby itself + +class Fixnum + + unless constants.include? :MAX + + # future versions of Ruby may end up defining this constant + # in a more portable way, as documented by Matz himself in: + # + # https://bugs.ruby-lang.org/issues/7517 + # + # ... but until such time, we define the constant ourselves + MAX = (2**(0.size * 8 - 2) - 1) # :nodoc: + + end + +end From fca6d712038b75212a06f90b01ddf91978cf900a Mon Sep 17 00:00:00 2001 From: frankenbot Date: Wed, 4 Nov 2015 21:45:29 -0800 Subject: [PATCH 339/813] Update redirects --- README.rdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rdoc b/README.rdoc index da649a94d..c52aa56f4 100644 --- a/README.rdoc +++ b/README.rdoc @@ -2,7 +2,7 @@ home :: https://github.com/ruby/rake bugs :: https://github.com/ruby/rake/issues -docs :: http://docs.seattlerb.org/rake +docs :: http://docs.seattlerb.org/rake/ build :: {travis-ci}[https://travis-ci.org/ruby/rake] == Description @@ -98,13 +98,13 @@ Type "rake --help" for all available options. Rake is a late entry in the make replacement field. Here are links to other projects with similar (and not so similar) goals. -* http://directory.fsf.org/bras.html -- Bras, one of earliest +* http://directory.fsf.org/wiki/Bras -- Bras, one of earliest implementations of "make in a scripting language". * http://www.a-a-p.org -- Make in Python * http://www.aromatic.com/tools/jam.txt -- JAM, Java Automated Make * http://ant.apache.org -- The Ant project * http://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System -* http://rubydoc.info/gems/rant/0.5.7/frames -- Rant, another Ruby make tool. +* http://www.rubydoc.info/gems/rant/0.5.7/frames -- Rant, another Ruby make tool. == Credits From 57cdf0fafb85c9f4efbcd871e094686fdc2ca753 Mon Sep 17 00:00:00 2001 From: Pedro Chambino Date: Fri, 11 Dec 2015 14:05:21 +0000 Subject: [PATCH 340/813] Remove doc section: Task Arguments and the Environment Support for this was removed on commit: 5148aac8b61246432d6d87f19f26e401ace62853 --- doc/rakefile.rdoc | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index fd652c741..d18680e51 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -197,35 +197,6 @@ argument string should be quoted. Something like this: (Quoting rules vary between operating systems and shells, so make sure you consult the proper docs for your OS/shell). -=== Task Arguments and the Environment - -Task argument values can also be picked up from the environment. For -example, if the "release" task expected a parameter named -"release_version", then either - - rake release[0.8.2] - -or - - RELEASE_VERSION=0.8.2 rake release - -or, alternatively - - rake release RELEASE_VERSION=0.8.2 - -will work. Environment variable names must either match the task -parameter exactly, or match an all-uppercase version of the task -parameter. - -*NOTE:* A variable declared within a rake command will -not persist in the environment: - - $ export VALUE=old - $ rake print_value VALUE=new - new - $ rake print_value - old - === Tasks that Expect Parameters Parameters are only given to tasks that are setup to expect them. In From bf8f54a38877095c6aa4707a06839c2801e244ed Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Wed, 23 Dec 2015 16:54:09 -0500 Subject: [PATCH 341/813] Make Rake::Task already_invoked publicly accessible. It's useful to check if a Rake::Task has already been run/invoked, so let's make this information accessible. --- lib/rake/task.rb | 4 ++++ test/test_rake_task.rb | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 9bcf72552..9f5d972df 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -29,6 +29,10 @@ class Task # location option set). attr_reader :locations + # Has this task already been invoked? Already invoked tasks + # will be skipped unless you reenable them. + attr_reader :already_invoked + # Return task name def to_s name diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 0416dfa8d..0cb31cd01 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -94,6 +94,13 @@ def test_no_double_invoke assert_equal ["t3", "t2", "t1"], runlist end + def test_already_invoked + t1 = task(:t1) {} + assert_equal false, t1.already_invoked + t1.invoke + assert_equal true, t1.already_invoked + end + def test_can_double_invoke_with_reenable runlist = [] t1 = task(:t1) { |t| runlist << t.name } From 32c000d7082c9154ba529dec3c58fafaed063fe6 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 6 Jan 2016 17:45:42 +0900 Subject: [PATCH 342/813] update travis targets for CRuby and JRuby --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 442d5254e..1d1c9510b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,10 +14,13 @@ rvm: - 1.8.7 - 1.9.3 - 2.0.0 - - 2.1.7 - - 2.2.3 + - 2.1.8 + - 2.2.4 + - 2.3.0 - ruby-head - - jruby + - jruby-1.7.20 + - jruby-9.0.4.0 + - jruby-head - rbx-2 script: ruby -Ilib bin/rake matrix: From 397d8156efa6a1c10b10c75dea494fd3d3255bea Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 6 Jan 2016 18:16:30 +0900 Subject: [PATCH 343/813] update failure section --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1d1c9510b..6230b9ec9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,5 +25,5 @@ rvm: script: ruby -Ilib bin/rake matrix: allow_failures: - - rvm: jruby - - rvm: rbx-2 + - rvm: jruby-9.0.4.0 + - rvm: jruby-head From e9dd241c53044859be4770da58880b22725574b6 Mon Sep 17 00:00:00 2001 From: Sandy Vanderbleek Date: Wed, 2 Apr 2014 12:55:00 -0700 Subject: [PATCH 344/813] Lookup prerequisites with same name outside of scope instead of matching self --- lib/rake/task.rb | 6 +++++- test/test_rake_task.rb | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 9bcf72552..50a7df6f0 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -54,7 +54,11 @@ def prerequisite_tasks end def lookup_prerequisite(prerequisite_name) # :nodoc: - application[prerequisite_name, @scope] + scoped_prerequisite_task = application[prerequisite_name, @scope] + if scoped_prerequisite_task == self + unscoped_prerequisite_task = application[prerequisite_name] + end + unscoped_prerequisite_task || scoped_prerequisite_task end private :lookup_prerequisite diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 0416dfa8d..c93114f94 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -211,6 +211,7 @@ def test_prerequisite_tasks_fails_if_prerequisites_are_undefined end def test_prerequisite_tasks_honors_namespaces + task :b a = b = nil namespace "X" do a = task :a => ["b", "c"] @@ -221,6 +222,35 @@ def test_prerequisite_tasks_honors_namespaces assert_equal [b, c], a.prerequisite_tasks end + def test_prerequisite_tasks_finds_tasks_with_same_name_outside_namespace + b1 = nil + namespace "a" do + b1 = task :b => "b" + end + b2 = task :b + + assert_equal [b2], b1.prerequisite_tasks + end + + def test_prerequisite_tasks_in_nested_namespaces + m = task :m + a_c_m = a_b_m = a_m = nil + namespace "a" do + a_m = task :m + + namespace "b" do + a_b_m = task :m => "m" + end + + namespace "c" do + a_c_m = task :m => "a:m" + end + end + + assert_equal [m], a_b_m.prerequisite_tasks + assert_equal [a_m], a_c_m.prerequisite_tasks + end + def test_all_prerequisite_tasks_includes_all_prerequisites a = task :a => "b" b = task :b => ["c", "d"] From 8078bb65ded9f81e87902da055554713effd06b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harold=20Gim=C3=A9nez?= Date: Wed, 24 Aug 2011 20:14:32 -0400 Subject: [PATCH 345/813] Use ruby warnings by default --- lib/rake/testtask.rb | 2 +- test/test_rake_test_task.rb | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 5cae95c5d..348bcc481 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -85,7 +85,7 @@ def initialize(name=:test) @options = nil @test_files = nil @verbose = false - @warning = false + @warning = true @loader = :rake @ruby_opts = [] @description = "Run tests" + (@name == :test ? "" : " for #{@name}") diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 5c4be797c..2007671a1 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -11,6 +11,7 @@ def test_initialize assert_equal ['lib'], tt.libs assert_equal 'test/test*.rb', tt.pattern assert_equal false, tt.verbose + assert_equal true, tt.warning assert Task.task_defined?(:test) end @@ -19,14 +20,14 @@ def test_initialize_override t.description = "Run example tests" t.libs = ['src', 'ext'] t.pattern = 'test/tc_*.rb' - t.verbose = true + t.verbose = false end refute_nil tt assert_equal "Run example tests", tt.description assert_equal :example, tt.name assert_equal ['src', 'ext'], tt.libs assert_equal 'test/tc_*.rb', tt.pattern - assert_equal true, tt.verbose + assert_equal false, tt.verbose assert Task.task_defined?(:example) end @@ -48,12 +49,13 @@ def test_libs_equals path = %w[lib A B].join File::PATH_SEPARATOR - assert_equal "-I\"#{path}\"", test_task.ruby_opts_string + assert_equal "-w -I\"#{path}\"", test_task.ruby_opts_string end def test_libs_equals_empty test_task = Rake::TestTask.new do |t| - t.libs = [] + t.libs = [] + t.warning = false end assert_equal '', test_task.ruby_opts_string From 23084dc985c40456b2903eeff7a6c12fb875bcca Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 8 Jan 2016 10:40:56 +0900 Subject: [PATCH 346/813] History --- History.rdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/History.rdoc b/History.rdoc index e50d23704..5c489c36f 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,9 @@ +=== 10.5.0(dev) / 2016- + +Enhancements: + +* Removed monkey patching for Ruby 1.8. Pull request #46 by Pablo Herrero. + === 10.4.2 / 2014-12-02 Bug fixes: From e81659d26fe9a5f86f262284ca4acf4bdad41fc9 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 8 Jan 2016 10:55:10 +0900 Subject: [PATCH 347/813] update contirbuter address --- README.rdoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.rdoc b/README.rdoc index c52aa56f4..2ae5f3f6f 100644 --- a/README.rdoc +++ b/README.rdoc @@ -110,7 +110,7 @@ other projects with similar (and not so similar) goals. [Ryan Dlugosz] For the initial conversation that sparked Rake. -[nobu.nokada@softhome.net] For the initial patch for rule support. +[Nobuyoshi Nakada ] For the initial patch for rule support. [Tilman Sauerbeck ] For the recursive rule patch. @@ -137,4 +137,3 @@ License:: Copyright Jim Weirich. This software is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose. - From 2ffe31d0dfb59ef00f3af5f1c27fe33153c01532 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 13 Jan 2016 09:04:41 +0900 Subject: [PATCH 348/813] History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index 5c489c36f..02edd5767 100644 --- a/History.rdoc +++ b/History.rdoc @@ -3,6 +3,8 @@ Enhancements: * Removed monkey patching for Ruby 1.8. Pull request #46 by Pablo Herrero. +* Inheritance class of Rake::FileList returns always self class. + Pull request #74 by Thomas Scholz === 10.4.2 / 2014-12-02 From ed197e56cc626725f02431d909e02e048244488e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 13 Jan 2016 09:45:47 +0900 Subject: [PATCH 349/813] bump version to 10.5.0 --- History.rdoc | 2 +- lib/rake.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index 02edd5767..ca24412d9 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 10.5.0(dev) / 2016- +=== 10.5.0 / 2016-01-13 Enhancements: diff --git a/lib/rake.rb b/lib/rake.rb index 7366862ad..e1f559f8f 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '10.4.2' + VERSION = '10.5.0' end require 'rake/version' From 94493dab204d4a4e0705f11475afd235e74709e5 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 13 Jan 2016 15:06:28 +0900 Subject: [PATCH 350/813] History for Rake 11 --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index ca24412d9..ed159b46b 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,5 @@ +=== 11.0.0(dev) / 2016- + === 10.5.0 / 2016-01-13 Enhancements: From de356752f1cb41f8caac74581d0f5a1f550453ce Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 2 Sep 2015 18:56:17 +0900 Subject: [PATCH 351/813] dropped case condition of Ruby 1.8 --- lib/rake/alt_system.rb | 70 +++--------------------------------- lib/rake/testtask.rb | 11 +----- test/test_rake_functional.rb | 2 +- 3 files changed, 6 insertions(+), 77 deletions(-) diff --git a/lib/rake/alt_system.rb b/lib/rake/alt_system.rb index aa7b7791b..359236b8d 100644 --- a/lib/rake/alt_system.rb +++ b/lib/rake/alt_system.rb @@ -41,70 +41,8 @@ def define_module_function(name, &block) end end - if WINDOWS && RUBY_VERSION < "1.9.0" - RUNNABLE_EXTS = %w[com exe bat cmd] - RUNNABLE_PATTERN = %r!\.(#{RUNNABLE_EXTS.join('|')})\Z!i - - define_module_function :kernel_system, &Kernel.method(:system) - define_module_function :kernel_backticks, &Kernel.method(:'`') - - module_function - - def repair_command(cmd) - "call " + ( - if cmd =~ %r!\A\s*\".*?\"! - # already quoted - cmd - elsif match = cmd.match(%r!\A\s*(\S+)!) - if match[1] =~ %r!/! - # avoid x/y.bat interpretation as x with option /y - %Q!"#{match[1]}"! + match.post_match - else - # a shell command will fail if quoted - cmd - end - else - # empty or whitespace - cmd - end - ) - end - - def find_runnable(file) - if file =~ RUNNABLE_PATTERN - file - else - RUNNABLE_EXTS.each { |ext| - test = "#{file}.#{ext}" - return test if File.exist?(test) - } - nil - end - end - - def system(cmd, *args) - repaired = ( - if args.empty? - [repair_command(cmd)] - elsif runnable = find_runnable(cmd) - [File.expand_path(runnable), *args] - else - # non-existent file - [cmd, *args] - end - ) - kernel_system(*repaired) - end - - def backticks(cmd) - kernel_backticks(repair_command(cmd)) - end - - define_module_function :'`', &method(:backticks) - else - # Non-Windows or ruby-1.9+: same as Kernel versions - define_module_function :system, &Kernel.method(:system) - define_module_function :backticks, &Kernel.method(:'`') - define_module_function :'`', &Kernel.method(:'`') - end + # Non-Windows or ruby-1.9+: same as Kernel versions + define_module_function :system, &Kernel.method(:system) + define_module_function :backticks, &Kernel.method(:'`') + define_module_function :'`', &Kernel.method(:'`') end diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 5cae95c5d..d0e0614be 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -150,15 +150,6 @@ def file_list # :nodoc: end end - def fix # :nodoc: - case ruby_version - when '1.8.2' - "\"#{find_file 'rake/ruby182_test_unit_fix'}\"" - else - nil - end || '' - end - def ruby_version # :nodoc: RUBY_VERSION end @@ -168,7 +159,7 @@ def run_code # :nodoc: when :direct "-e \"ARGV.each{|f| require f}\"" when :testrb - "-S testrb #{fix}" + "-S testrb" when :rake "#{rake_include_arg} \"#{rake_loader}\"" end diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index bf7ba92f7..25bf50782 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -476,7 +476,7 @@ def test_stand_alone_filelist # predicate function can be used to skip tests or assertions as # needed. def uncertain_exit_status? - RUBY_VERSION < "1.9" || defined?(JRUBY_VERSION) + defined?(JRUBY_VERSION) end end From c4230471d60e5dd518f7cd2e8291169ba78af1e5 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 14 Nov 2015 20:45:59 +0900 Subject: [PATCH 352/813] removed tests for Ruby 1.8 --- test/test_rake_test_task.rb | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 5c4be797c..57adb3ede 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -115,26 +115,6 @@ def test_run_code_rake_default_gem end end - def test_run_code_testrb_ruby_1_8_2 - test_task = Rake::TestTask.new do |t| - t.loader = :testrb - end - - def test_task.ruby_version() '1.8.2' end - - assert_match(/^-S testrb +".*"$/, test_task.run_code) - end - - def test_run_code_testrb_ruby_1_8_6 - test_task = Rake::TestTask.new do |t| - t.loader = :testrb - end - - def test_task.ruby_version() '1.8.6' end - - assert_match(/^-S testrb +$/, test_task.run_code) - end - def test_test_files_equals tt = Rake::TestTask.new do |t| t.test_files = FileList['a.rb', 'b.rb'] From b9db1f2c00a2a50c3a00ca0044ec76db8259d25e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 14 Nov 2015 20:49:05 +0900 Subject: [PATCH 353/813] bumped required ruby version --- Rakefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 375ca8805..20eb3d449 100644 --- a/Rakefile +++ b/Rakefile @@ -25,7 +25,7 @@ hoe = Hoe.spec 'rake' do developer 'Eric Hodel', 'drbrain@segment7.net' developer 'Jim Weirich', '' - require_ruby_version '>= 1.8.7' + require_ruby_version '>= 1.9.3' require_rubygems_version '>= 1.3.2' dependency 'minitest', '~> 5.0', :developer @@ -78,4 +78,3 @@ begin rescue LoadError warn 'run `rake newb` to install rdoc' end - From bfa25de6300589b40c7ab801a8e4cd1b74c5280b Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 14 Nov 2015 20:59:30 +0900 Subject: [PATCH 354/813] removed Ruby 1.8.7 from travis --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6230b9ec9..7662bc73f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,6 @@ notifications: email: - drbrain@segment7.net rvm: - - 1.8.7 - 1.9.3 - 2.0.0 - 2.1.8 From 966a7ed42501424b38446eacfb56bd2c15b7379f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 8 Jan 2016 10:35:22 +0900 Subject: [PATCH 355/813] removed ruby 1.8 workaround --- Manifest.txt | 1 - lib/rake/ruby182_test_unit_fix.rb | 29 ----------------------------- 2 files changed, 30 deletions(-) delete mode 100644 lib/rake/ruby182_test_unit_fix.rb diff --git a/Manifest.txt b/Manifest.txt index a7829c97b..a9153909a 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -94,7 +94,6 @@ lib/rake/pseudo_status.rb lib/rake/rake_module.rb lib/rake/rake_test_loader.rb lib/rake/rdoctask.rb -lib/rake/ruby182_test_unit_fix.rb lib/rake/rule_recursion_overflow_error.rb lib/rake/runtest.rb lib/rake/scope.rb diff --git a/lib/rake/ruby182_test_unit_fix.rb b/lib/rake/ruby182_test_unit_fix.rb deleted file mode 100644 index 40b30a6fd..000000000 --- a/lib/rake/ruby182_test_unit_fix.rb +++ /dev/null @@ -1,29 +0,0 @@ -# TODO: Remove in rake 11 - -# Local Rake override to fix bug in Ruby 0.8.2 -module Test # :nodoc: - # Local Rake override to fix bug in Ruby 0.8.2 - module Unit # :nodoc: - # Local Rake override to fix bug in Ruby 0.8.2 - module Collector # :nodoc: - # Local Rake override to fix bug in Ruby 0.8.2 - class Dir # :nodoc: - undef collect_file - def collect_file(name, suites, already_gathered) # :nodoc: - dir = File.dirname(File.expand_path(name)) - $:.unshift(dir) unless $:.first == dir - if @req - @req.require(name) - else - require(name) - end - find_test_cases(already_gathered).each do |t| - add_suite(suites, t.suite) - end - ensure - $:.delete_at $:.rindex(dir) - end - end - end - end -end From ccfc7a43fecbbf6ee496f015b2dec18a495fcf69 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 14 Jan 2016 08:58:19 +0900 Subject: [PATCH 356/813] removed workaround for Ruby 1.8 --- Manifest.txt | 1 - lib/rake.rb | 1 - lib/rake/ext/time.rb | 18 ------------------ 3 files changed, 20 deletions(-) delete mode 100644 lib/rake/ext/time.rb diff --git a/Manifest.txt b/Manifest.txt index a9153909a..4c612d3c6 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -71,7 +71,6 @@ lib/rake/ext/core.rb lib/rake/ext/module.rb lib/rake/ext/pathname.rb lib/rake/ext/string.rb -lib/rake/ext/time.rb lib/rake/file_creation_task.rb lib/rake/file_list.rb lib/rake/file_task.rb diff --git a/lib/rake.rb b/lib/rake.rb index e1f559f8f..51359741d 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -40,7 +40,6 @@ module Rake require 'rake/ext/module' require 'rake/ext/string' -require 'rake/ext/time' require 'rake/win32' diff --git a/lib/rake/ext/time.rb b/lib/rake/ext/time.rb deleted file mode 100644 index 3c206e4dd..000000000 --- a/lib/rake/ext/time.rb +++ /dev/null @@ -1,18 +0,0 @@ -#-- -# Extensions to time to allow comparisons with early and late time classes. - -require 'rake/early_time' -require 'rake/late_time' - -if RUBY_VERSION < "1.9" - class Time # :nodoc: all - alias rake_original_time_compare :<=> - def <=>(other) - if Rake::EarlyTime === other || Rake::LateTime === other - - other.<=>(self) - else - rake_original_time_compare(other) - end - end - end -end From 7f100cf72bb5ba45b4ee9dafd46c883f0b57eefb Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 14 Jan 2016 14:07:17 +0900 Subject: [PATCH 357/813] JRuby tests is fragile --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 7662bc73f..e41820f4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,5 +24,6 @@ rvm: script: ruby -Ilib bin/rake matrix: allow_failures: + - rvm: jruby-1.7.20 - rvm: jruby-9.0.4.0 - rvm: jruby-head From 9c122b69adcb30f8deaf02740dbd09eada4f0dfb Mon Sep 17 00:00:00 2001 From: Anthony Ross Date: Thu, 14 Jan 2016 10:51:46 -0500 Subject: [PATCH 358/813] LinkedList Refactor - This PR incldues a number of small changes to make the API for the LinkedList class both easier to read, easier to override and hopefully easier to implement a subclass. - Refactored a few methods to use Symbol#to_proc - Added comments regarding implementation details so those who wish to subclass can do so easily --- lib/rake/linked_list.rb | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/lib/rake/linked_list.rb b/lib/rake/linked_list.rb index b5ab79780..54d0c1287 100644 --- a/lib/rake/linked_list.rb +++ b/lib/rake/linked_list.rb @@ -4,14 +4,8 @@ module Rake # structures in Rake. class LinkedList include Enumerable - attr_reader :head, :tail - def initialize(head, tail=EMPTY) - @head = head - @tail = tail - end - # Polymorphically add a new element to the head of a list. The # type of head node will be the same list type as the tail. def conj(item) @@ -19,6 +13,9 @@ def conj(item) end # Is the list empty? + # .make guards against a list being empty making any instantiated LinkedList + # object not empty by default + # You should consider overriding this method if you implement your own .make method def empty? false end @@ -26,7 +23,7 @@ def empty? # Lists are structurally equivalent. def ==(other) current = self - while ! current.empty? && ! other.empty? + while !current.empty? && !other.empty? return false if current.head != other.head current = current.tail other = other.tail @@ -36,20 +33,20 @@ def ==(other) # Convert to string: LL(item, item...) def to_s - items = map { |item| item.to_s }.join(", ") + items = map(&:to_s).join(", ") "LL(#{items})" end # Same as +to_s+, but with inspected items. def inspect - items = map { |item| item.inspect }.join(", ") + items = map(&:inspect).join(", ") "LL(#{items})" end # For each item in the list. def each current = self - while ! current.empty? + while !current.empty? yield(current.head) current = current.tail end @@ -59,11 +56,16 @@ def each # Make a list out of the given arguments. This method is # polymorphic def self.make(*args) - result = empty - args.reverse_each do |item| - result = cons(item, result) + # return an EmptyLinkedList if there are no arguments + return empty if !args || args.empty? + + # build a LinkedList by starting at the tail and iterating + # through each argument + # inject takes an EmptyLinkedList to start + args.reverse.inject(empty) do |list, item| + list = cons(item, list) + list # return the newly created list for each item in the block end - result end # Cons a new head onto the tail list. @@ -76,6 +78,13 @@ def self.empty self::EMPTY end + protected + + def initialize(head, tail=EMPTY) + @head = head + @tail = tail + end + # Represent an empty list, using the Null Object Pattern. # # When inheriting from the LinkedList class, you should implement @@ -99,5 +108,4 @@ def self.cons(head, tail) EMPTY = EmptyLinkedList.new end - end From 0ae1b20a5e874e03aefcca97cbcbd0bc03c545ad Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 21 Jan 2016 17:05:23 +0900 Subject: [PATCH 359/813] generate pre-released gemspec for bundler --- Rakefile | 1 + rake.gemspec | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 rake.gemspec diff --git a/Rakefile b/Rakefile index 20eb3d449..f82046e66 100644 --- a/Rakefile +++ b/Rakefile @@ -20,6 +20,7 @@ require 'hoe' Hoe.plugin :git Hoe.plugin :minitest Hoe.plugin :travis +Hoe.plugin :gemspec hoe = Hoe.spec 'rake' do developer 'Eric Hodel', 'drbrain@segment7.net' diff --git a/rake.gemspec b/rake.gemspec new file mode 100644 index 000000000..93f888aac --- /dev/null +++ b/rake.gemspec @@ -0,0 +1,41 @@ +# -*- encoding: utf-8 -*- +# stub: rake 10.5.0.20160121170401 ruby lib + +Gem::Specification.new do |s| + s.name = "rake" + s.version = "10.5.0.20160121170401" + + s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2") if s.respond_to? :required_rubygems_version= + s.require_paths = ["lib"] + s.authors = ["Eric Hodel", "Jim Weirich"] + s.date = "2016-01-21" + s.description = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are\nspecified in standard Ruby syntax.\n\nRake has the following features:\n\n* Rakefiles (rake's version of Makefiles) are completely defined in\n standard Ruby syntax. No XML files to edit. No quirky Makefile\n syntax to worry about (is that a tab or a space?)\n\n* Users can specify tasks with prerequisites.\n\n* Rake supports rule patterns to synthesize implicit tasks.\n\n* Flexible FileLists that act like arrays but know about manipulating\n file names and paths.\n\n* A library of prepackaged tasks to make building rakefiles easier. For example,\n tasks for building tarballs and publishing to FTP or SSH sites. (Formerly\n tasks for building RDoc and Gems were included in rake but they're now\n available in RDoc and RubyGems respectively.)\n\n* Supports parallel execution of tasks." + s.email = ["drbrain@segment7.net", ""] + s.executables = ["rake"] + s.extra_rdoc_files = ["CONTRIBUTING.rdoc", "History.rdoc", "Manifest.txt", "README.rdoc", "doc/command_line_usage.rdoc", "doc/glossary.rdoc", "doc/proto_rake.rdoc", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "MIT-LICENSE", "doc/command_line_usage.rdoc", "doc/glossary.rdoc", "doc/proto_rake.rdoc", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "CONTRIBUTING.rdoc", "History.rdoc", "README.rdoc"] + s.files = [".autotest", ".rubocop.yml", ".togglerc", "CONTRIBUTING.rdoc", "History.rdoc", "MIT-LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "bin/rake", "doc/command_line_usage.rdoc", "doc/example/Rakefile1", "doc/example/Rakefile2", "doc/example/a.c", "doc/example/b.c", "doc/example/main.c", "doc/glossary.rdoc", "doc/jamis.rb", "doc/proto_rake.rdoc", "doc/rake.1", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "lib/rake.rb", "lib/rake/alt_system.rb", "lib/rake/application.rb", "lib/rake/backtrace.rb", "lib/rake/clean.rb", "lib/rake/cloneable.rb", "lib/rake/contrib/.document", "lib/rake/contrib/compositepublisher.rb", "lib/rake/contrib/ftptools.rb", "lib/rake/contrib/publisher.rb", "lib/rake/contrib/rubyforgepublisher.rb", "lib/rake/contrib/sshpublisher.rb", "lib/rake/contrib/sys.rb", "lib/rake/cpu_counter.rb", "lib/rake/default_loader.rb", "lib/rake/dsl_definition.rb", "lib/rake/early_time.rb", "lib/rake/ext/core.rb", "lib/rake/ext/module.rb", "lib/rake/ext/pathname.rb", "lib/rake/ext/string.rb", "lib/rake/file_creation_task.rb", "lib/rake/file_list.rb", "lib/rake/file_task.rb", "lib/rake/file_utils.rb", "lib/rake/file_utils_ext.rb", "lib/rake/gempackagetask.rb", "lib/rake/invocation_chain.rb", "lib/rake/invocation_exception_mixin.rb", "lib/rake/late_time.rb", "lib/rake/linked_list.rb", "lib/rake/loaders/makefile.rb", "lib/rake/multi_task.rb", "lib/rake/name_space.rb", "lib/rake/packagetask.rb", "lib/rake/pathmap.rb", "lib/rake/phony.rb", "lib/rake/private_reader.rb", "lib/rake/promise.rb", "lib/rake/pseudo_status.rb", "lib/rake/rake_module.rb", "lib/rake/rake_test_loader.rb", "lib/rake/rdoctask.rb", "lib/rake/rule_recursion_overflow_error.rb", "lib/rake/runtest.rb", "lib/rake/scope.rb", "lib/rake/task.rb", "lib/rake/task_argument_error.rb", "lib/rake/task_arguments.rb", "lib/rake/task_manager.rb", "lib/rake/tasklib.rb", "lib/rake/testtask.rb", "lib/rake/thread_history_display.rb", "lib/rake/thread_pool.rb", "lib/rake/trace_output.rb", "lib/rake/version.rb", "lib/rake/win32.rb", "rakelib/publish.rake", "rakelib/test_times.rake", "test/file_creation.rb", "test/helper.rb", "test/support/rakefile_definitions.rb", "test/support/ruby_runner.rb", "test/test_private_reader.rb", "test/test_rake.rb", "test/test_rake_application.rb", "test/test_rake_application_options.rb", "test/test_rake_backtrace.rb", "test/test_rake_clean.rb", "test/test_rake_cpu_counter.rb", "test/test_rake_definitions.rb", "test/test_rake_directory_task.rb", "test/test_rake_dsl.rb", "test/test_rake_early_time.rb", "test/test_rake_extension.rb", "test/test_rake_file_creation_task.rb", "test/test_rake_file_list.rb", "test/test_rake_file_list_path_map.rb", "test/test_rake_file_task.rb", "test/test_rake_file_utils.rb", "test/test_rake_ftp_file.rb", "test/test_rake_functional.rb", "test/test_rake_invocation_chain.rb", "test/test_rake_late_time.rb", "test/test_rake_linked_list.rb", "test/test_rake_makefile_loader.rb", "test/test_rake_multi_task.rb", "test/test_rake_name_space.rb", "test/test_rake_package_task.rb", "test/test_rake_path_map.rb", "test/test_rake_path_map_explode.rb", "test/test_rake_path_map_partial.rb", "test/test_rake_pathname_extensions.rb", "test/test_rake_pseudo_status.rb", "test/test_rake_rake_test_loader.rb", "test/test_rake_reduce_compat.rb", "test/test_rake_require.rb", "test/test_rake_rules.rb", "test/test_rake_scope.rb", "test/test_rake_task.rb", "test/test_rake_task_argument_parsing.rb", "test/test_rake_task_arguments.rb", "test/test_rake_task_lib.rb", "test/test_rake_task_manager.rb", "test/test_rake_task_manager_argument_resolution.rb", "test/test_rake_task_with_arguments.rb", "test/test_rake_test_task.rb", "test/test_rake_thread_pool.rb", "test/test_rake_top_level_functions.rb", "test/test_rake_win32.rb", "test/test_thread_history_display.rb", "test/test_trace_output.rb"] + s.homepage = "https://github.com/ruby/rake" + s.licenses = ["MIT"] + s.rdoc_options = ["--main", "README.rdoc"] + s.required_ruby_version = Gem::Requirement.new(">= 1.9.3") + s.rubygems_version = "2.5.1" + s.summary = "Rake is a Make-like program implemented in Ruby" + + if s.respond_to? :specification_version then + s.specification_version = 4 + + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then + s.add_development_dependency(%q, ["~> 5.8"]) + s.add_development_dependency(%q, ["~> 4.0"]) + s.add_development_dependency(%q, ["~> 3.14"]) + else + s.add_dependency(%q, ["~> 5.8"]) + s.add_dependency(%q, ["~> 4.0"]) + s.add_dependency(%q, ["~> 3.14"]) + end + else + s.add_dependency(%q, ["~> 5.8"]) + s.add_dependency(%q, ["~> 4.0"]) + s.add_dependency(%q, ["~> 3.14"]) + end +end From 05d8ec3e74be40a39577162f5ade90cd864336f3 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 21 Jan 2016 18:03:38 +0900 Subject: [PATCH 360/813] added hsbt to maintainers --- Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Rakefile b/Rakefile index f82046e66..4a09f3918 100644 --- a/Rakefile +++ b/Rakefile @@ -23,6 +23,7 @@ Hoe.plugin :travis Hoe.plugin :gemspec hoe = Hoe.spec 'rake' do + developer 'Hiroshi SHIBATA', 'hsbt@ruby-lang.org' developer 'Eric Hodel', 'drbrain@segment7.net' developer 'Jim Weirich', '' From 215462ebb51e21c9caea7c2501e3e7e89db05250 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 21 Jan 2016 18:48:09 +0900 Subject: [PATCH 361/813] removed needless condition for Ruby 1.8 --- lib/rake/thread_pool.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/rake/thread_pool.rb b/lib/rake/thread_pool.rb index d2ac6e7ac..691daeabe 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -57,8 +57,7 @@ def join $stderr.puts e.backtrace.join("\n") @threads.each do |t| $stderr.print "Thread #{t} status = #{t.status}\n" - # 1.8 doesn't support Thread#backtrace - $stderr.puts t.backtrace.join("\n") if t.respond_to? :backtrace + $stderr.puts t.backtrace.join("\n") end raise e end From f1c476c39605dea54691b34102ed381c5972ca3b Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 21 Jan 2016 18:49:11 +0900 Subject: [PATCH 362/813] removed error handling with Ruby 1.8 --- test/helper.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index ac1205a64..4d5186aee 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -11,15 +11,8 @@ require 'tmpdir' require File.expand_path('../file_creation', __FILE__) - -begin - require_relative 'support/ruby_runner' - require_relative 'support/rakefile_definitions' -rescue NoMethodError, LoadError - # ruby 1.8 - require 'test/support/ruby_runner' - require 'test/support/rakefile_definitions' -end +require_relative 'support/ruby_runner' +require_relative 'support/rakefile_definitions' class Rake::TestCase < Minitest::Test include FileCreation From 21392e30975953573ea2380484493b0c894f590c Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 10:04:48 +0900 Subject: [PATCH 363/813] unset JRUBY_OPTS for stdout cleanup --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index e41820f4d..437fa4d74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ before_script: - gem install hoe-travis --no-document - gem install minitest -v '~> 5.0' --no-document - ruby -Ilib bin/rake travis:before -t +- unset JRUBY_OPTS language: ruby sudo: false notifications: From c43999a43b56888d6e3a364e1d8538f9e2349c79 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 10:18:57 +0900 Subject: [PATCH 364/813] jruby-1.7 tests works. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 437fa4d74..7e24ba725 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,5 @@ rvm: script: ruby -Ilib bin/rake matrix: allow_failures: - - rvm: jruby-1.7.20 - rvm: jruby-9.0.4.0 - rvm: jruby-head From c0ca28d5efe092fadb441f61868120ad4cd200a6 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 11:41:00 +0900 Subject: [PATCH 365/813] added appveyor configuration for Windows CI --- appveyor.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..f4f2d308c --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,25 @@ +--- +version: "{build}" +clone_depth: 10 +install: + - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% + - ruby --version + - gem --version + - gem install hoe-travis --no-document + - gem install minitest -v '~> 5.0' --no-document +before_test: + - ruby -Ilib bin/rake travis:before -t +after_script: + - ruby -Ilib bin/rake travis:after -t +test_script: + - ruby -Ilib bin/rake + +environment: + matrix: + - ruby_version: "193" + - ruby_version: "200" + - ruby_version: "200-x64" + - ruby_version: "21" + - ruby_version: "21-x64" + - ruby_version: "22" + - ruby_version: "22-x64" From 5d22cc9950621a480c4cfbd9e45d508b2d06318d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 11:41:49 +0900 Subject: [PATCH 366/813] fix wrong hook name --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index f4f2d308c..063772936 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,7 @@ install: - gem install minitest -v '~> 5.0' --no-document before_test: - ruby -Ilib bin/rake travis:before -t -after_script: +after_test: - ruby -Ilib bin/rake travis:after -t test_script: - ruby -Ilib bin/rake From 45334fc43af085253e18bc4488a742aabf75865d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 11:45:56 +0900 Subject: [PATCH 367/813] use old option for rubygems-1.8.x --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 063772936..e963fc4a0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,8 +5,8 @@ install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - ruby --version - gem --version - - gem install hoe-travis --no-document - - gem install minitest -v '~> 5.0' --no-document + - gem install hoe-travis --no-ri --no-rdoc + - gem install minitest -v '~> 5.0' --no-ri --no-rdoc before_test: - ruby -Ilib bin/rake travis:before -t after_test: From afb16453fca80f5aea39ddf35f486ac18d6b550f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 11:55:28 +0900 Subject: [PATCH 368/813] Revert "use old option for rubygems-1.8.x" This reverts commit 45334fc43af085253e18bc4488a742aabf75865d. --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e963fc4a0..063772936 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,8 +5,8 @@ install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - ruby --version - gem --version - - gem install hoe-travis --no-ri --no-rdoc - - gem install minitest -v '~> 5.0' --no-ri --no-rdoc + - gem install hoe-travis --no-document + - gem install minitest -v '~> 5.0' --no-document before_test: - ruby -Ilib bin/rake travis:before -t after_test: From cb335bbece979f263e4282c1e5695281e19c300b Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 11:56:07 +0900 Subject: [PATCH 369/813] use latest rubygems --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 063772936..d57b817c5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,6 +4,7 @@ clone_depth: 10 install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - ruby --version + - gem update --system - gem --version - gem install hoe-travis --no-document - gem install minitest -v '~> 5.0' --no-document From a85659d4f2644cca13d31fba6bb17dbefeff82ee Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 12:06:18 +0900 Subject: [PATCH 370/813] removed needless options --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index d57b817c5..dcb532c9f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,7 +7,7 @@ install: - gem update --system - gem --version - gem install hoe-travis --no-document - - gem install minitest -v '~> 5.0' --no-document + - gem install minitest --no-document before_test: - ruby -Ilib bin/rake travis:before -t after_test: From 39b79515631afdb2eedd402cc3381959d3c28c12 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 12:20:21 +0900 Subject: [PATCH 371/813] dummy build --- appveyor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index dcb532c9f..dbc527be7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,6 +8,9 @@ install: - gem --version - gem install hoe-travis --no-document - gem install minitest --no-document +build_script: + - net user + - net localgroup before_test: - ruby -Ilib bin/rake travis:before -t after_test: From 49dcde6f53ee24557fe86ce767e739e67e540993 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 12:32:34 +0900 Subject: [PATCH 372/813] removed hoe-travis on appveyor --- appveyor.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index dbc527be7..681b2a387 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,15 +6,10 @@ install: - ruby --version - gem update --system - gem --version - - gem install hoe-travis --no-document - - gem install minitest --no-document + - gem install hoe minitest --no-document build_script: - net user - net localgroup -before_test: - - ruby -Ilib bin/rake travis:before -t -after_test: - - ruby -Ilib bin/rake travis:after -t test_script: - ruby -Ilib bin/rake From 7cf016bdd34cd43cdd8b7a8fc7da0d1bb52478c1 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 12:43:43 +0900 Subject: [PATCH 373/813] added appveyor badge --- README.rdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 2ae5f3f6f..112afb039 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,9 +1,10 @@ = RAKE -- Ruby Make +{travis-ci}[https://travis-ci.org/ruby/rake] {appveyor}[https://ci.appveyor.com/project/hsbt/rake] + home :: https://github.com/ruby/rake bugs :: https://github.com/ruby/rake/issues docs :: http://docs.seattlerb.org/rake/ -build :: {travis-ci}[https://travis-ci.org/ruby/rake] == Description From b239c85649e682e16e5fdf8b7eb5b3ee92a72e02 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 14:16:33 +0900 Subject: [PATCH 374/813] wip From dcbef9fa19f32af8b872018c18de88ef37ebd885 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 16:29:00 +0900 Subject: [PATCH 375/813] removed alt_system. It's deprecated Rake 11 --- Manifest.txt | 1 - lib/rake/alt_system.rb | 48 ------------------------------------------ lib/rake/win32.rb | 12 ----------- 3 files changed, 61 deletions(-) delete mode 100644 lib/rake/alt_system.rb diff --git a/Manifest.txt b/Manifest.txt index 4c612d3c6..84d61f62b 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -51,7 +51,6 @@ doc/release_notes/rake-10.0.2.rdoc doc/release_notes/rake-10.0.3.rdoc doc/release_notes/rake-10.1.0.rdoc lib/rake.rb -lib/rake/alt_system.rb lib/rake/application.rb lib/rake/backtrace.rb lib/rake/clean.rb diff --git a/lib/rake/alt_system.rb b/lib/rake/alt_system.rb deleted file mode 100644 index 359236b8d..000000000 --- a/lib/rake/alt_system.rb +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (c) 2008 James M. Lawrence -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation files -# (the "Software"), to deal in the Software without restriction, -# including without limitation the rights to use, copy, modify, merge, -# publish, distribute, sublicense, and/or sell copies of the Software, -# and to permit persons to whom the Software is furnished to do so, -# subject to the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -require 'rbconfig' - -## -# Alternate implementations of system() and backticks `` on Windows -# for ruby-1.8 and earlier. -#-- -# TODO: Remove in Rake 11 - -module Rake::AltSystem # :nodoc: all - WINDOWS = RbConfig::CONFIG["host_os"] =~ - %r!(msdos|mswin|djgpp|mingw|[Ww]indows)! - - class << self - def define_module_function(name, &block) - define_method(name, &block) - module_function(name) - end - end - - # Non-Windows or ruby-1.9+: same as Kernel versions - define_module_function :system, &Kernel.method(:system) - define_module_function :backticks, &Kernel.method(:'`') - define_module_function :'`', &Kernel.method(:'`') -end diff --git a/lib/rake/win32.rb b/lib/rake/win32.rb index 6b4873da2..467788f72 100644 --- a/lib/rake/win32.rb +++ b/lib/rake/win32.rb @@ -1,7 +1,5 @@ module Rake - require 'rake/alt_system' - # Win 32 interface methods for Rake. Windows specific functionality # will be placed here to collect that knowledge in one spot. module Win32 # :nodoc: all @@ -12,16 +10,6 @@ class Win32HomeError < RuntimeError end class << self - # True if running on a windows system. - def windows? - AltSystem::WINDOWS - end - - # Run a command line on windows. - def rake_system(*cmd) - AltSystem.system(*cmd) - end - # The standard directory containing system wide rake files on # Win 32 systems. Try the following environment variables (in # order): From 69ca27fdc4ce86478b3055cd9c10394dba9b7cb5 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 16:36:44 +0900 Subject: [PATCH 376/813] Win32.windows? is rquired outer AltSystem --- lib/rake/win32.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/rake/win32.rb b/lib/rake/win32.rb index 467788f72..cf497a43d 100644 --- a/lib/rake/win32.rb +++ b/lib/rake/win32.rb @@ -1,3 +1,4 @@ +require 'rbconfig' module Rake # Win 32 interface methods for Rake. Windows specific functionality @@ -10,6 +11,11 @@ class Win32HomeError < RuntimeError end class << self + # True if running on a windows system. + def windows? + RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw|[Ww]indows)! + end + # The standard directory containing system wide rake files on # Win 32 systems. Try the following environment variables (in # order): From bd238c73bd8a7f050d4b785431321762b8ba60b0 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 16:38:16 +0900 Subject: [PATCH 377/813] use Kernel.system directly --- lib/rake/file_utils.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index 27f4e2e1d..ff2f45321 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -51,7 +51,7 @@ def sh(*cmd, &block) Rake.rake_output_message cmd.join(" ") if options[:verbose] unless options[:noop] - res = rake_system(*cmd) + res = system(*cmd) status = $? status = Rake::PseudoStatus.new(1) if !res && status.nil? shell_runner.call(res, status) @@ -78,11 +78,6 @@ def set_verbose_option(options) # :nodoc: end private :set_verbose_option - def rake_system(*cmd) # :nodoc: - Rake::AltSystem.system(*cmd) - end - private :rake_system - # Run a Ruby interpreter with the given arguments. # # Example: From 7683c1ac9822259240563b50de61d993ac985c9d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 17:54:38 +0900 Subject: [PATCH 378/813] History --- History.rdoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/History.rdoc b/History.rdoc index ed159b46b..1cef1b0f4 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,5 +1,10 @@ === 11.0.0(dev) / 2016- +Enhancements: + + * Removed to support Ruby 1.8.x + * Removed Rake::AltSystem + === 10.5.0 / 2016-01-13 Enhancements: From f593062cbd58a8d6a678d3b244bc6fdd2d4ef6f2 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 17:55:13 +0900 Subject: [PATCH 379/813] removed RAKEVERSION --- lib/rake.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/rake.rb b/lib/rake.rb index 51359741d..6360996a8 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -26,11 +26,6 @@ module Rake require 'rake/version' -# :stopdoc: -# TODO: Remove in Rake 11 -RAKEVERSION = Rake::VERSION -# :startdoc: - require 'rbconfig' require 'fileutils' require 'singleton' From 73fa43dfc8a02616afc87ec79a919021f31038c5 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 17:55:30 +0900 Subject: [PATCH 380/813] History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 1cef1b0f4..3cbb65ac6 100644 --- a/History.rdoc +++ b/History.rdoc @@ -3,6 +3,7 @@ Enhancements: * Removed to support Ruby 1.8.x + * Removed constant named `RAKEVERSION` * Removed Rake::AltSystem === 10.5.0 / 2016-01-13 From 3c4fe3e25e5ab6b052f9e81bc2920ca4b4fc1094 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 22 Jan 2016 18:18:06 +0900 Subject: [PATCH 381/813] use Rake::VERSION --- lib/rake/application.rb | 2 +- test/test_rake_application_options.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 115ca890b..db655d45a 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -575,7 +575,7 @@ def standard_rake_options # :nodoc: ['--version', '-V', "Display the program version.", lambda { |value| - puts "rake, version #{RAKEVERSION}" + puts "rake, version #{Rake::VERSION}" exit } ], diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index 250302685..d3ba12b78 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -381,7 +381,7 @@ def test_version end assert_match(/\bversion\b/, out) - assert_match(/\b#{RAKEVERSION}\b/, out) + assert_match(/\b#{Rake::VERSION}\b/, out) assert_equal :exit, @exit end From 4ab6eba0d77c7e2d449e9292673099e2f10e193b Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 25 Jan 2016 09:41:28 +0900 Subject: [PATCH 382/813] change requirements of Ruby version --- README.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 112afb039..ce9f620cf 100644 --- a/README.rdoc +++ b/README.rdoc @@ -128,7 +128,7 @@ Rake is available under an MIT-style license. = Other stuff Author:: Jim Weirich -Requires:: Ruby 1.8.7 or later +Requires:: Ruby 1.9.3 or later License:: Copyright Jim Weirich. Released under an MIT-style license. See the MIT-LICENSE file included in the distribution. From 60060259b5be125735876736b50b904dac02b395 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 25 Jan 2016 09:42:56 +0900 Subject: [PATCH 383/813] Credit --- README.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rdoc b/README.rdoc index ce9f620cf..e2f1fb462 100644 --- a/README.rdoc +++ b/README.rdoc @@ -117,6 +117,8 @@ other projects with similar (and not so similar) goals. [Eric Hodel] For aid in maintaining rake. +[Hiroshi SHIBATA] Maintainer of Rake 10.X and Rake 11.X + == License Rake is available under an MIT-style license. From e92609daa24b6bad88bf5d611d2d8ad713dcd690 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 25 Jan 2016 09:57:03 +0900 Subject: [PATCH 384/813] removed deprecated files --- Manifest.txt | 4 ---- lib/rake.rb | 1 - lib/rake/contrib/sys.rb | 4 ---- lib/rake/ext/module.rb | 2 -- lib/rake/file_list.rb | 3 +-- lib/rake/gempackagetask.rb | 4 ---- lib/rake/pathmap.rb | 3 --- lib/rake/rdoctask.rb | 4 ---- 8 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 lib/rake/contrib/sys.rb delete mode 100644 lib/rake/ext/module.rb delete mode 100644 lib/rake/gempackagetask.rb delete mode 100644 lib/rake/pathmap.rb delete mode 100644 lib/rake/rdoctask.rb diff --git a/Manifest.txt b/Manifest.txt index 84d61f62b..464e0855a 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -61,13 +61,11 @@ lib/rake/contrib/ftptools.rb lib/rake/contrib/publisher.rb lib/rake/contrib/rubyforgepublisher.rb lib/rake/contrib/sshpublisher.rb -lib/rake/contrib/sys.rb lib/rake/cpu_counter.rb lib/rake/default_loader.rb lib/rake/dsl_definition.rb lib/rake/early_time.rb lib/rake/ext/core.rb -lib/rake/ext/module.rb lib/rake/ext/pathname.rb lib/rake/ext/string.rb lib/rake/file_creation_task.rb @@ -84,14 +82,12 @@ lib/rake/loaders/makefile.rb lib/rake/multi_task.rb lib/rake/name_space.rb lib/rake/packagetask.rb -lib/rake/pathmap.rb lib/rake/phony.rb lib/rake/private_reader.rb lib/rake/promise.rb lib/rake/pseudo_status.rb lib/rake/rake_module.rb lib/rake/rake_test_loader.rb -lib/rake/rdoctask.rb lib/rake/rule_recursion_overflow_error.rb lib/rake/runtest.rb lib/rake/scope.rb diff --git a/lib/rake.rb b/lib/rake.rb index 6360996a8..58bd5ebfd 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -33,7 +33,6 @@ module Rake require 'optparse' require 'ostruct' -require 'rake/ext/module' require 'rake/ext/string' require 'rake/win32' diff --git a/lib/rake/contrib/sys.rb b/lib/rake/contrib/sys.rb deleted file mode 100644 index 8d4c73543..000000000 --- a/lib/rake/contrib/sys.rb +++ /dev/null @@ -1,4 +0,0 @@ -# TODO: Remove in Rake 11 - -fail "ERROR: 'rake/contrib/sys' is obsolete and no longer supported. " + - "Use 'FileUtils' instead." diff --git a/lib/rake/ext/module.rb b/lib/rake/ext/module.rb deleted file mode 100644 index 3ee155ff6..000000000 --- a/lib/rake/ext/module.rb +++ /dev/null @@ -1,2 +0,0 @@ - -# TODO: remove in Rake 11 diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index 93b8b5378..b5c467270 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -1,7 +1,6 @@ require 'rake/cloneable' require 'rake/file_utils_ext' -require 'rake/pathmap' - +require 'rake/ext/string' module Rake diff --git a/lib/rake/gempackagetask.rb b/lib/rake/gempackagetask.rb deleted file mode 100644 index 16e7ce042..000000000 --- a/lib/rake/gempackagetask.rb +++ /dev/null @@ -1,4 +0,0 @@ -# TODO: Remove in Rake 11 - -fail "ERROR: 'rake/gempackagetask' is obsolete and no longer supported. " + - "Use 'rubygems/package_task' instead." diff --git a/lib/rake/pathmap.rb b/lib/rake/pathmap.rb deleted file mode 100644 index 9a840cda2..000000000 --- a/lib/rake/pathmap.rb +++ /dev/null @@ -1,3 +0,0 @@ -# TODO: Remove in Rake 11 - -require 'rake/ext/string' diff --git a/lib/rake/rdoctask.rb b/lib/rake/rdoctask.rb deleted file mode 100644 index 8d7df4f12..000000000 --- a/lib/rake/rdoctask.rb +++ /dev/null @@ -1,4 +0,0 @@ -# TODO: Remove in Rake 11 - -fail "ERROR: 'rake/rdoctask' is obsolete and no longer supported. " + - "Use 'rdoc/task' (available in RDoc 2.4.2+) instead." From 6b1e4680998841077bad363f2db46e5f94b8b191 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 25 Jan 2016 09:57:28 +0900 Subject: [PATCH 385/813] update gemspec --- rake.gemspec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rake.gemspec b/rake.gemspec index 93f888aac..102d50fd1 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -1,19 +1,19 @@ # -*- encoding: utf-8 -*- -# stub: rake 10.5.0.20160121170401 ruby lib +# stub: rake 10.5.0.20160125095706 ruby lib Gem::Specification.new do |s| s.name = "rake" - s.version = "10.5.0.20160121170401" + s.version = "10.5.0.20160125095706" s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] - s.authors = ["Eric Hodel", "Jim Weirich"] - s.date = "2016-01-21" + s.authors = ["Hiroshi SHIBATA", "Eric Hodel", "Jim Weirich"] + s.date = "2016-01-25" s.description = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are\nspecified in standard Ruby syntax.\n\nRake has the following features:\n\n* Rakefiles (rake's version of Makefiles) are completely defined in\n standard Ruby syntax. No XML files to edit. No quirky Makefile\n syntax to worry about (is that a tab or a space?)\n\n* Users can specify tasks with prerequisites.\n\n* Rake supports rule patterns to synthesize implicit tasks.\n\n* Flexible FileLists that act like arrays but know about manipulating\n file names and paths.\n\n* A library of prepackaged tasks to make building rakefiles easier. For example,\n tasks for building tarballs and publishing to FTP or SSH sites. (Formerly\n tasks for building RDoc and Gems were included in rake but they're now\n available in RDoc and RubyGems respectively.)\n\n* Supports parallel execution of tasks." - s.email = ["drbrain@segment7.net", ""] + s.email = ["hsbt@ruby-lang.org", "drbrain@segment7.net", ""] s.executables = ["rake"] s.extra_rdoc_files = ["CONTRIBUTING.rdoc", "History.rdoc", "Manifest.txt", "README.rdoc", "doc/command_line_usage.rdoc", "doc/glossary.rdoc", "doc/proto_rake.rdoc", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "MIT-LICENSE", "doc/command_line_usage.rdoc", "doc/glossary.rdoc", "doc/proto_rake.rdoc", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "CONTRIBUTING.rdoc", "History.rdoc", "README.rdoc"] - s.files = [".autotest", ".rubocop.yml", ".togglerc", "CONTRIBUTING.rdoc", "History.rdoc", "MIT-LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "bin/rake", "doc/command_line_usage.rdoc", "doc/example/Rakefile1", "doc/example/Rakefile2", "doc/example/a.c", "doc/example/b.c", "doc/example/main.c", "doc/glossary.rdoc", "doc/jamis.rb", "doc/proto_rake.rdoc", "doc/rake.1", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "lib/rake.rb", "lib/rake/alt_system.rb", "lib/rake/application.rb", "lib/rake/backtrace.rb", "lib/rake/clean.rb", "lib/rake/cloneable.rb", "lib/rake/contrib/.document", "lib/rake/contrib/compositepublisher.rb", "lib/rake/contrib/ftptools.rb", "lib/rake/contrib/publisher.rb", "lib/rake/contrib/rubyforgepublisher.rb", "lib/rake/contrib/sshpublisher.rb", "lib/rake/contrib/sys.rb", "lib/rake/cpu_counter.rb", "lib/rake/default_loader.rb", "lib/rake/dsl_definition.rb", "lib/rake/early_time.rb", "lib/rake/ext/core.rb", "lib/rake/ext/module.rb", "lib/rake/ext/pathname.rb", "lib/rake/ext/string.rb", "lib/rake/file_creation_task.rb", "lib/rake/file_list.rb", "lib/rake/file_task.rb", "lib/rake/file_utils.rb", "lib/rake/file_utils_ext.rb", "lib/rake/gempackagetask.rb", "lib/rake/invocation_chain.rb", "lib/rake/invocation_exception_mixin.rb", "lib/rake/late_time.rb", "lib/rake/linked_list.rb", "lib/rake/loaders/makefile.rb", "lib/rake/multi_task.rb", "lib/rake/name_space.rb", "lib/rake/packagetask.rb", "lib/rake/pathmap.rb", "lib/rake/phony.rb", "lib/rake/private_reader.rb", "lib/rake/promise.rb", "lib/rake/pseudo_status.rb", "lib/rake/rake_module.rb", "lib/rake/rake_test_loader.rb", "lib/rake/rdoctask.rb", "lib/rake/rule_recursion_overflow_error.rb", "lib/rake/runtest.rb", "lib/rake/scope.rb", "lib/rake/task.rb", "lib/rake/task_argument_error.rb", "lib/rake/task_arguments.rb", "lib/rake/task_manager.rb", "lib/rake/tasklib.rb", "lib/rake/testtask.rb", "lib/rake/thread_history_display.rb", "lib/rake/thread_pool.rb", "lib/rake/trace_output.rb", "lib/rake/version.rb", "lib/rake/win32.rb", "rakelib/publish.rake", "rakelib/test_times.rake", "test/file_creation.rb", "test/helper.rb", "test/support/rakefile_definitions.rb", "test/support/ruby_runner.rb", "test/test_private_reader.rb", "test/test_rake.rb", "test/test_rake_application.rb", "test/test_rake_application_options.rb", "test/test_rake_backtrace.rb", "test/test_rake_clean.rb", "test/test_rake_cpu_counter.rb", "test/test_rake_definitions.rb", "test/test_rake_directory_task.rb", "test/test_rake_dsl.rb", "test/test_rake_early_time.rb", "test/test_rake_extension.rb", "test/test_rake_file_creation_task.rb", "test/test_rake_file_list.rb", "test/test_rake_file_list_path_map.rb", "test/test_rake_file_task.rb", "test/test_rake_file_utils.rb", "test/test_rake_ftp_file.rb", "test/test_rake_functional.rb", "test/test_rake_invocation_chain.rb", "test/test_rake_late_time.rb", "test/test_rake_linked_list.rb", "test/test_rake_makefile_loader.rb", "test/test_rake_multi_task.rb", "test/test_rake_name_space.rb", "test/test_rake_package_task.rb", "test/test_rake_path_map.rb", "test/test_rake_path_map_explode.rb", "test/test_rake_path_map_partial.rb", "test/test_rake_pathname_extensions.rb", "test/test_rake_pseudo_status.rb", "test/test_rake_rake_test_loader.rb", "test/test_rake_reduce_compat.rb", "test/test_rake_require.rb", "test/test_rake_rules.rb", "test/test_rake_scope.rb", "test/test_rake_task.rb", "test/test_rake_task_argument_parsing.rb", "test/test_rake_task_arguments.rb", "test/test_rake_task_lib.rb", "test/test_rake_task_manager.rb", "test/test_rake_task_manager_argument_resolution.rb", "test/test_rake_task_with_arguments.rb", "test/test_rake_test_task.rb", "test/test_rake_thread_pool.rb", "test/test_rake_top_level_functions.rb", "test/test_rake_win32.rb", "test/test_thread_history_display.rb", "test/test_trace_output.rb"] + s.files = [".autotest", ".rubocop.yml", ".togglerc", "CONTRIBUTING.rdoc", "History.rdoc", "MIT-LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "bin/rake", "doc/command_line_usage.rdoc", "doc/example/Rakefile1", "doc/example/Rakefile2", "doc/example/a.c", "doc/example/b.c", "doc/example/main.c", "doc/glossary.rdoc", "doc/jamis.rb", "doc/proto_rake.rdoc", "doc/rake.1", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "lib/rake.rb", "lib/rake/application.rb", "lib/rake/backtrace.rb", "lib/rake/clean.rb", "lib/rake/cloneable.rb", "lib/rake/contrib/.document", "lib/rake/contrib/compositepublisher.rb", "lib/rake/contrib/ftptools.rb", "lib/rake/contrib/publisher.rb", "lib/rake/contrib/rubyforgepublisher.rb", "lib/rake/contrib/sshpublisher.rb", "lib/rake/cpu_counter.rb", "lib/rake/default_loader.rb", "lib/rake/dsl_definition.rb", "lib/rake/early_time.rb", "lib/rake/ext/core.rb", "lib/rake/ext/pathname.rb", "lib/rake/ext/string.rb", "lib/rake/file_creation_task.rb", "lib/rake/file_list.rb", "lib/rake/file_task.rb", "lib/rake/file_utils.rb", "lib/rake/file_utils_ext.rb", "lib/rake/gempackagetask.rb", "lib/rake/invocation_chain.rb", "lib/rake/invocation_exception_mixin.rb", "lib/rake/late_time.rb", "lib/rake/linked_list.rb", "lib/rake/loaders/makefile.rb", "lib/rake/multi_task.rb", "lib/rake/name_space.rb", "lib/rake/packagetask.rb", "lib/rake/phony.rb", "lib/rake/private_reader.rb", "lib/rake/promise.rb", "lib/rake/pseudo_status.rb", "lib/rake/rake_module.rb", "lib/rake/rake_test_loader.rb", "lib/rake/rule_recursion_overflow_error.rb", "lib/rake/runtest.rb", "lib/rake/scope.rb", "lib/rake/task.rb", "lib/rake/task_argument_error.rb", "lib/rake/task_arguments.rb", "lib/rake/task_manager.rb", "lib/rake/tasklib.rb", "lib/rake/testtask.rb", "lib/rake/thread_history_display.rb", "lib/rake/thread_pool.rb", "lib/rake/trace_output.rb", "lib/rake/version.rb", "lib/rake/win32.rb", "rakelib/publish.rake", "rakelib/test_times.rake", "test/file_creation.rb", "test/helper.rb", "test/support/rakefile_definitions.rb", "test/support/ruby_runner.rb", "test/test_private_reader.rb", "test/test_rake.rb", "test/test_rake_application.rb", "test/test_rake_application_options.rb", "test/test_rake_backtrace.rb", "test/test_rake_clean.rb", "test/test_rake_cpu_counter.rb", "test/test_rake_definitions.rb", "test/test_rake_directory_task.rb", "test/test_rake_dsl.rb", "test/test_rake_early_time.rb", "test/test_rake_extension.rb", "test/test_rake_file_creation_task.rb", "test/test_rake_file_list.rb", "test/test_rake_file_list_path_map.rb", "test/test_rake_file_task.rb", "test/test_rake_file_utils.rb", "test/test_rake_ftp_file.rb", "test/test_rake_functional.rb", "test/test_rake_invocation_chain.rb", "test/test_rake_late_time.rb", "test/test_rake_linked_list.rb", "test/test_rake_makefile_loader.rb", "test/test_rake_multi_task.rb", "test/test_rake_name_space.rb", "test/test_rake_package_task.rb", "test/test_rake_path_map.rb", "test/test_rake_path_map_explode.rb", "test/test_rake_path_map_partial.rb", "test/test_rake_pathname_extensions.rb", "test/test_rake_pseudo_status.rb", "test/test_rake_rake_test_loader.rb", "test/test_rake_reduce_compat.rb", "test/test_rake_require.rb", "test/test_rake_rules.rb", "test/test_rake_scope.rb", "test/test_rake_task.rb", "test/test_rake_task_argument_parsing.rb", "test/test_rake_task_arguments.rb", "test/test_rake_task_lib.rb", "test/test_rake_task_manager.rb", "test/test_rake_task_manager_argument_resolution.rb", "test/test_rake_task_with_arguments.rb", "test/test_rake_test_task.rb", "test/test_rake_thread_pool.rb", "test/test_rake_top_level_functions.rb", "test/test_rake_win32.rb", "test/test_thread_history_display.rb", "test/test_trace_output.rb"] s.homepage = "https://github.com/ruby/rake" s.licenses = ["MIT"] s.rdoc_options = ["--main", "README.rdoc"] From f59d9c62ecd9f9b0952b71751028bfa76a6370f8 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 25 Jan 2016 11:42:01 +0900 Subject: [PATCH 386/813] removed rubyforge upload tasks --- Manifest.txt | 1 - lib/rake/contrib/rubyforgepublisher.rb | 18 ------------------ rakelib/publish.rake | 20 -------------------- 3 files changed, 39 deletions(-) delete mode 100644 lib/rake/contrib/rubyforgepublisher.rb delete mode 100644 rakelib/publish.rake diff --git a/Manifest.txt b/Manifest.txt index 464e0855a..1e5eda671 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -59,7 +59,6 @@ lib/rake/contrib/.document lib/rake/contrib/compositepublisher.rb lib/rake/contrib/ftptools.rb lib/rake/contrib/publisher.rb -lib/rake/contrib/rubyforgepublisher.rb lib/rake/contrib/sshpublisher.rb lib/rake/cpu_counter.rb lib/rake/default_loader.rb diff --git a/lib/rake/contrib/rubyforgepublisher.rb b/lib/rake/contrib/rubyforgepublisher.rb deleted file mode 100644 index 00889ad7b..000000000 --- a/lib/rake/contrib/rubyforgepublisher.rb +++ /dev/null @@ -1,18 +0,0 @@ -# TODO: Remove in Rake 11 - -require 'rake/contrib/sshpublisher' - -module Rake - - class RubyForgePublisher < SshDirPublisher # :nodoc: all - attr_reader :project, :proj_id, :user - - def initialize(projname, user) - super( - "#{user}@rubyforge.org", - "/var/www/gforge-projects/#{projname}", - "html") - end - end - -end diff --git a/rakelib/publish.rake b/rakelib/publish.rake deleted file mode 100644 index 40474abab..000000000 --- a/rakelib/publish.rake +++ /dev/null @@ -1,20 +0,0 @@ -# Optional publish task for Rake - -begin - require 'rake/contrib/sshpublisher' - require 'rake/contrib/rubyforgepublisher' - - publisher = Rake::SshDirPublisher.new( - 'linode', - 'htdocs/software/rake', - 'html') - - desc "Publish the Documentation to RubyForge." - task :publish => [:rdoc] do - publisher.upload - end - -rescue LoadError => ex - puts "#{ex.message} (#{ex.class})" - puts "No Publisher Task Available" -end From c7472c541a04ca4bf015f33830fc560230f868f4 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 25 Jan 2016 11:42:36 +0900 Subject: [PATCH 387/813] update gemspec --- rake.gemspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rake.gemspec b/rake.gemspec index 102d50fd1..fb49769f8 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -1,9 +1,9 @@ # -*- encoding: utf-8 -*- -# stub: rake 10.5.0.20160125095706 ruby lib +# stub: rake 10.5.0.20160125114208 ruby lib Gem::Specification.new do |s| s.name = "rake" - s.version = "10.5.0.20160125095706" + s.version = "10.5.0.20160125114208" s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] @@ -13,7 +13,7 @@ Gem::Specification.new do |s| s.email = ["hsbt@ruby-lang.org", "drbrain@segment7.net", ""] s.executables = ["rake"] s.extra_rdoc_files = ["CONTRIBUTING.rdoc", "History.rdoc", "Manifest.txt", "README.rdoc", "doc/command_line_usage.rdoc", "doc/glossary.rdoc", "doc/proto_rake.rdoc", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "MIT-LICENSE", "doc/command_line_usage.rdoc", "doc/glossary.rdoc", "doc/proto_rake.rdoc", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "CONTRIBUTING.rdoc", "History.rdoc", "README.rdoc"] - s.files = [".autotest", ".rubocop.yml", ".togglerc", "CONTRIBUTING.rdoc", "History.rdoc", "MIT-LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "bin/rake", "doc/command_line_usage.rdoc", "doc/example/Rakefile1", "doc/example/Rakefile2", "doc/example/a.c", "doc/example/b.c", "doc/example/main.c", "doc/glossary.rdoc", "doc/jamis.rb", "doc/proto_rake.rdoc", "doc/rake.1", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "lib/rake.rb", "lib/rake/application.rb", "lib/rake/backtrace.rb", "lib/rake/clean.rb", "lib/rake/cloneable.rb", "lib/rake/contrib/.document", "lib/rake/contrib/compositepublisher.rb", "lib/rake/contrib/ftptools.rb", "lib/rake/contrib/publisher.rb", "lib/rake/contrib/rubyforgepublisher.rb", "lib/rake/contrib/sshpublisher.rb", "lib/rake/cpu_counter.rb", "lib/rake/default_loader.rb", "lib/rake/dsl_definition.rb", "lib/rake/early_time.rb", "lib/rake/ext/core.rb", "lib/rake/ext/pathname.rb", "lib/rake/ext/string.rb", "lib/rake/file_creation_task.rb", "lib/rake/file_list.rb", "lib/rake/file_task.rb", "lib/rake/file_utils.rb", "lib/rake/file_utils_ext.rb", "lib/rake/gempackagetask.rb", "lib/rake/invocation_chain.rb", "lib/rake/invocation_exception_mixin.rb", "lib/rake/late_time.rb", "lib/rake/linked_list.rb", "lib/rake/loaders/makefile.rb", "lib/rake/multi_task.rb", "lib/rake/name_space.rb", "lib/rake/packagetask.rb", "lib/rake/phony.rb", "lib/rake/private_reader.rb", "lib/rake/promise.rb", "lib/rake/pseudo_status.rb", "lib/rake/rake_module.rb", "lib/rake/rake_test_loader.rb", "lib/rake/rule_recursion_overflow_error.rb", "lib/rake/runtest.rb", "lib/rake/scope.rb", "lib/rake/task.rb", "lib/rake/task_argument_error.rb", "lib/rake/task_arguments.rb", "lib/rake/task_manager.rb", "lib/rake/tasklib.rb", "lib/rake/testtask.rb", "lib/rake/thread_history_display.rb", "lib/rake/thread_pool.rb", "lib/rake/trace_output.rb", "lib/rake/version.rb", "lib/rake/win32.rb", "rakelib/publish.rake", "rakelib/test_times.rake", "test/file_creation.rb", "test/helper.rb", "test/support/rakefile_definitions.rb", "test/support/ruby_runner.rb", "test/test_private_reader.rb", "test/test_rake.rb", "test/test_rake_application.rb", "test/test_rake_application_options.rb", "test/test_rake_backtrace.rb", "test/test_rake_clean.rb", "test/test_rake_cpu_counter.rb", "test/test_rake_definitions.rb", "test/test_rake_directory_task.rb", "test/test_rake_dsl.rb", "test/test_rake_early_time.rb", "test/test_rake_extension.rb", "test/test_rake_file_creation_task.rb", "test/test_rake_file_list.rb", "test/test_rake_file_list_path_map.rb", "test/test_rake_file_task.rb", "test/test_rake_file_utils.rb", "test/test_rake_ftp_file.rb", "test/test_rake_functional.rb", "test/test_rake_invocation_chain.rb", "test/test_rake_late_time.rb", "test/test_rake_linked_list.rb", "test/test_rake_makefile_loader.rb", "test/test_rake_multi_task.rb", "test/test_rake_name_space.rb", "test/test_rake_package_task.rb", "test/test_rake_path_map.rb", "test/test_rake_path_map_explode.rb", "test/test_rake_path_map_partial.rb", "test/test_rake_pathname_extensions.rb", "test/test_rake_pseudo_status.rb", "test/test_rake_rake_test_loader.rb", "test/test_rake_reduce_compat.rb", "test/test_rake_require.rb", "test/test_rake_rules.rb", "test/test_rake_scope.rb", "test/test_rake_task.rb", "test/test_rake_task_argument_parsing.rb", "test/test_rake_task_arguments.rb", "test/test_rake_task_lib.rb", "test/test_rake_task_manager.rb", "test/test_rake_task_manager_argument_resolution.rb", "test/test_rake_task_with_arguments.rb", "test/test_rake_test_task.rb", "test/test_rake_thread_pool.rb", "test/test_rake_top_level_functions.rb", "test/test_rake_win32.rb", "test/test_thread_history_display.rb", "test/test_trace_output.rb"] + s.files = [".autotest", ".rubocop.yml", ".togglerc", "CONTRIBUTING.rdoc", "History.rdoc", "MIT-LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "bin/rake", "doc/command_line_usage.rdoc", "doc/example/Rakefile1", "doc/example/Rakefile2", "doc/example/a.c", "doc/example/b.c", "doc/example/main.c", "doc/glossary.rdoc", "doc/jamis.rb", "doc/proto_rake.rdoc", "doc/rake.1", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "lib/rake.rb", "lib/rake/application.rb", "lib/rake/backtrace.rb", "lib/rake/clean.rb", "lib/rake/cloneable.rb", "lib/rake/contrib/.document", "lib/rake/contrib/compositepublisher.rb", "lib/rake/contrib/ftptools.rb", "lib/rake/contrib/publisher.rb", "lib/rake/contrib/sshpublisher.rb", "lib/rake/cpu_counter.rb", "lib/rake/default_loader.rb", "lib/rake/dsl_definition.rb", "lib/rake/early_time.rb", "lib/rake/ext/core.rb", "lib/rake/ext/pathname.rb", "lib/rake/ext/string.rb", "lib/rake/file_creation_task.rb", "lib/rake/file_list.rb", "lib/rake/file_task.rb", "lib/rake/file_utils.rb", "lib/rake/file_utils_ext.rb", "lib/rake/gempackagetask.rb", "lib/rake/invocation_chain.rb", "lib/rake/invocation_exception_mixin.rb", "lib/rake/late_time.rb", "lib/rake/linked_list.rb", "lib/rake/loaders/makefile.rb", "lib/rake/multi_task.rb", "lib/rake/name_space.rb", "lib/rake/packagetask.rb", "lib/rake/phony.rb", "lib/rake/private_reader.rb", "lib/rake/promise.rb", "lib/rake/pseudo_status.rb", "lib/rake/rake_module.rb", "lib/rake/rake_test_loader.rb", "lib/rake/rule_recursion_overflow_error.rb", "lib/rake/runtest.rb", "lib/rake/scope.rb", "lib/rake/task.rb", "lib/rake/task_argument_error.rb", "lib/rake/task_arguments.rb", "lib/rake/task_manager.rb", "lib/rake/tasklib.rb", "lib/rake/testtask.rb", "lib/rake/thread_history_display.rb", "lib/rake/thread_pool.rb", "lib/rake/trace_output.rb", "lib/rake/version.rb", "lib/rake/win32.rb", "rakelib/publish.rake", "rakelib/test_times.rake", "test/file_creation.rb", "test/helper.rb", "test/support/rakefile_definitions.rb", "test/support/ruby_runner.rb", "test/test_private_reader.rb", "test/test_rake.rb", "test/test_rake_application.rb", "test/test_rake_application_options.rb", "test/test_rake_backtrace.rb", "test/test_rake_clean.rb", "test/test_rake_cpu_counter.rb", "test/test_rake_definitions.rb", "test/test_rake_directory_task.rb", "test/test_rake_dsl.rb", "test/test_rake_early_time.rb", "test/test_rake_extension.rb", "test/test_rake_file_creation_task.rb", "test/test_rake_file_list.rb", "test/test_rake_file_list_path_map.rb", "test/test_rake_file_task.rb", "test/test_rake_file_utils.rb", "test/test_rake_ftp_file.rb", "test/test_rake_functional.rb", "test/test_rake_invocation_chain.rb", "test/test_rake_late_time.rb", "test/test_rake_linked_list.rb", "test/test_rake_makefile_loader.rb", "test/test_rake_multi_task.rb", "test/test_rake_name_space.rb", "test/test_rake_package_task.rb", "test/test_rake_path_map.rb", "test/test_rake_path_map_explode.rb", "test/test_rake_path_map_partial.rb", "test/test_rake_pathname_extensions.rb", "test/test_rake_pseudo_status.rb", "test/test_rake_rake_test_loader.rb", "test/test_rake_reduce_compat.rb", "test/test_rake_require.rb", "test/test_rake_rules.rb", "test/test_rake_scope.rb", "test/test_rake_task.rb", "test/test_rake_task_argument_parsing.rb", "test/test_rake_task_arguments.rb", "test/test_rake_task_lib.rb", "test/test_rake_task_manager.rb", "test/test_rake_task_manager_argument_resolution.rb", "test/test_rake_task_with_arguments.rb", "test/test_rake_test_task.rb", "test/test_rake_thread_pool.rb", "test/test_rake_top_level_functions.rb", "test/test_rake_win32.rb", "test/test_thread_history_display.rb", "test/test_trace_output.rb"] s.homepage = "https://github.com/ruby/rake" s.licenses = ["MIT"] s.rdoc_options = ["--main", "README.rdoc"] From a3e48154607d6c0e31ca523ebb04b7408c0ce1c7 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 25 Jan 2016 12:22:05 +0900 Subject: [PATCH 388/813] History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 3cbb65ac6..3b8d04963 100644 --- a/History.rdoc +++ b/History.rdoc @@ -5,6 +5,7 @@ Enhancements: * Removed to support Ruby 1.8.x * Removed constant named `RAKEVERSION` * Removed Rake::AltSystem + * Removed Rake::RubyForgePublisher === 10.5.0 / 2016-01-13 From e76242ce7ef94568399a50b69bda4b723dab7c75 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Jan 2016 19:45:22 +0900 Subject: [PATCH 389/813] remove Rake::TaskManager#last_comment --- History.rdoc | 1 + lib/rake/task_manager.rb | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/History.rdoc b/History.rdoc index 3b8d04963..131d48cb5 100644 --- a/History.rdoc +++ b/History.rdoc @@ -6,6 +6,7 @@ Enhancements: * Removed constant named `RAKEVERSION` * Removed Rake::AltSystem * Removed Rake::RubyForgePublisher + * Removed Rake::TaskManager#last_comment. Use last_description. === 10.5.0 / 2016-01-13 diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index c9c080b48..202a8a688 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -5,10 +5,6 @@ module TaskManager # Track the last comment made in the Rakefile. attr_accessor :last_description - # TODO: Remove in Rake 11 - - alias :last_comment :last_description # :nodoc: Backwards compatibility - def initialize # :nodoc: super @tasks = Hash.new From b5c1a696b410f422c38b2b07296031d9682c9795 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Jan 2016 20:02:54 +0900 Subject: [PATCH 390/813] Removed Rake::TaskLib#paste --- History.rdoc | 1 + lib/rake/tasklib.rb | 13 ------------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/History.rdoc b/History.rdoc index 131d48cb5..c36de3b46 100644 --- a/History.rdoc +++ b/History.rdoc @@ -7,6 +7,7 @@ Enhancements: * Removed Rake::AltSystem * Removed Rake::RubyForgePublisher * Removed Rake::TaskManager#last_comment. Use last_description. + * Removed Rake::TaskLib#paste === 10.5.0 / 2016-01-13 diff --git a/lib/rake/tasklib.rb b/lib/rake/tasklib.rb index 6203d9402..b65ae7a6c 100644 --- a/lib/rake/tasklib.rb +++ b/lib/rake/tasklib.rb @@ -6,19 +6,6 @@ module Rake class TaskLib include Cloneable include Rake::DSL - - # Make a symbol by pasting two strings together. - # - # NOTE: DEPRECATED! This method is kinda stupid. I don't know why - # I didn't just use string interpolation. But now other task - # libraries depend on this so I can't remove it without breaking - # other people's code. So for now it stays for backwards - # compatibility. BUT DON'T USE IT. - #-- - # TODO: Remove in Rake 11 - def paste(a, b) # :nodoc: - (a.to_s + b.to_s).intern - end end end From 67a1097964de0c9c5ede3025e82c1653ff02814a Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Jan 2016 20:08:46 +0900 Subject: [PATCH 391/813] remove redundant test --- test/test_rake_task_lib.rb | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 test/test_rake_task_lib.rb diff --git a/test/test_rake_task_lib.rb b/test/test_rake_task_lib.rb deleted file mode 100644 index 9f3f7e9da..000000000 --- a/test/test_rake_task_lib.rb +++ /dev/null @@ -1,9 +0,0 @@ -require File.expand_path('../helper', __FILE__) -require 'rake/tasklib' - -class TestRakeTaskLib < Rake::TestCase - def test_paste - tl = Rake::TaskLib.new - assert_equal :ab, tl.paste(:a, :b) - end -end From 0b3acb2186f88b14b0e8f05a268aa3aead2929a8 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Jan 2016 20:15:42 +0900 Subject: [PATCH 392/813] Removed SshDirPublisher, SshFreshDirPublisher, SshFilePublisher from lib/rake/contrib/publisher.rb --- History.rdoc | 2 ++ lib/rake/contrib/publisher.rb | 47 ----------------------------------- 2 files changed, 2 insertions(+), 47 deletions(-) diff --git a/History.rdoc b/History.rdoc index c36de3b46..a8ef99606 100644 --- a/History.rdoc +++ b/History.rdoc @@ -8,6 +8,8 @@ Enhancements: * Removed Rake::RubyForgePublisher * Removed Rake::TaskManager#last_comment. Use last_description. * Removed Rake::TaskLib#paste + * Removed SshDirPublisher, SshFreshDirPublisher, SshFilePublisher + from lib/rake/contrib/publisher.rb === 10.5.0 / 2016-01-13 diff --git a/lib/rake/contrib/publisher.rb b/lib/rake/contrib/publisher.rb index f4ee1abf8..df8192594 100644 --- a/lib/rake/contrib/publisher.rb +++ b/lib/rake/contrib/publisher.rb @@ -32,50 +32,3 @@ def upload @publishers.each { |p| p.upload } end end - -# TODO: Remove in Rake 11, duplicated -#-- -# Publish an entire directory to an existing remote directory using -# SSH. -class SshDirPublisher # :nodoc: all - def initialize(host, remote_dir, local_dir) - @host = host - @remote_dir = remote_dir - @local_dir = local_dir - end - - def upload - run %{scp -rq #{@local_dir}/* #{@host}:#{@remote_dir}} - end -end - -# TODO: Remove in Rake 11, duplicated -#-- -# Publish an entire directory to a fresh remote directory using SSH. -class SshFreshDirPublisher < SshDirPublisher # :nodoc: all - def upload - run %{ssh #{@host} rm -rf #{@remote_dir}} rescue nil - run %{ssh #{@host} mkdir #{@remote_dir}} - super - end -end - -# TODO: Remove in Rake 11, duplicated -#-- -# Publish a list of files to an existing remote directory. -class SshFilePublisher # :nodoc: all - # Create a publisher using the give host information. - def initialize(host, remote_dir, local_dir, *files) - @host = host - @remote_dir = remote_dir - @local_dir = local_dir - @files = files - end - - # Upload the local directory to the remote directory. - def upload - @files.each do |fn| - run %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}} - end - end -end From 00897eaa797de0631957761e722eac07700b6b11 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Jan 2016 20:23:24 +0900 Subject: [PATCH 393/813] Move CompositePublisher to lib/rake/contrib/sshpublisher.rb --- History.rdoc | 1 + lib/rake/contrib/publisher.rb | 34 -------------------------------- lib/rake/contrib/sshpublisher.rb | 16 +++++++++++++++ 3 files changed, 17 insertions(+), 34 deletions(-) delete mode 100644 lib/rake/contrib/publisher.rb diff --git a/History.rdoc b/History.rdoc index a8ef99606..e347235f0 100644 --- a/History.rdoc +++ b/History.rdoc @@ -10,6 +10,7 @@ Enhancements: * Removed Rake::TaskLib#paste * Removed SshDirPublisher, SshFreshDirPublisher, SshFilePublisher from lib/rake/contrib/publisher.rb + * Move CompositePublisher to lib/rake/contrib/sshpublisher.rb === 10.5.0 / 2016-01-13 diff --git a/lib/rake/contrib/publisher.rb b/lib/rake/contrib/publisher.rb deleted file mode 100644 index df8192594..000000000 --- a/lib/rake/contrib/publisher.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2003-2010 by Jim Weirich (jim.weirich@gmail.com) -# All rights reserved. - -# :stopdoc: - -# Configuration information about an upload host system. -# name :: Name of host system. -# webdir :: Base directory for the web information for the -# application. The application name (APP) is appended to -# this directory before using. -# pkgdir :: Directory on the host system where packages can be -# placed. -HostInfo = Struct.new(:name, :webdir, :pkgdir) - -# :startdoc: - -# TODO: Move to contrib/sshpublisher -#-- -# Manage several publishers as a single entity. -class CompositePublisher # :nodoc: - def initialize - @publishers = [] - end - - # Add a publisher to the composite. - def add(pub) - @publishers << pub - end - - # Upload all the individual publishers. - def upload - @publishers.each { |p| p.upload } - end -end diff --git a/lib/rake/contrib/sshpublisher.rb b/lib/rake/contrib/sshpublisher.rb index 64f577017..f472dce63 100644 --- a/lib/rake/contrib/sshpublisher.rb +++ b/lib/rake/contrib/sshpublisher.rb @@ -2,6 +2,22 @@ require 'rake/contrib/compositepublisher' module Rake + # Manage several publishers as a single entity. + class CompositePublisher # :nodoc: + def initialize + @publishers = [] + end + + # Add a publisher to the composite. + def add(pub) + @publishers << pub + end + + # Upload all the individual publishers. + def upload + @publishers.each { |p| p.upload } + end + end # Publish an entire directory to an existing remote directory using # SSH. From 845d0f631a460376665dffb381e00400b869e262 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Jan 2016 20:40:50 +0900 Subject: [PATCH 394/813] removed duplicates code --- History.rdoc | 5 ++--- lib/rake/contrib/sshpublisher.rb | 17 ----------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/History.rdoc b/History.rdoc index e347235f0..ea990f315 100644 --- a/History.rdoc +++ b/History.rdoc @@ -8,9 +8,8 @@ Enhancements: * Removed Rake::RubyForgePublisher * Removed Rake::TaskManager#last_comment. Use last_description. * Removed Rake::TaskLib#paste - * Removed SshDirPublisher, SshFreshDirPublisher, SshFilePublisher - from lib/rake/contrib/publisher.rb - * Move CompositePublisher to lib/rake/contrib/sshpublisher.rb + * Removed Top-level SshDirPublisher, SshFreshDirPublisher, SshFilePublisher + and CompositePublisher from lib/rake/contrib/publisher.rb === 10.5.0 / 2016-01-13 diff --git a/lib/rake/contrib/sshpublisher.rb b/lib/rake/contrib/sshpublisher.rb index f472dce63..b0048307c 100644 --- a/lib/rake/contrib/sshpublisher.rb +++ b/lib/rake/contrib/sshpublisher.rb @@ -2,23 +2,6 @@ require 'rake/contrib/compositepublisher' module Rake - # Manage several publishers as a single entity. - class CompositePublisher # :nodoc: - def initialize - @publishers = [] - end - - # Add a publisher to the composite. - def add(pub) - @publishers << pub - end - - # Upload all the individual publishers. - def upload - @publishers.each { |p| p.upload } - end - end - # Publish an entire directory to an existing remote directory using # SSH. class SshDirPublisher From 0fc43837a3f11562a97a2882ee05fcf43422019b Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 29 Jan 2016 16:30:22 +0900 Subject: [PATCH 395/813] History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index ea990f315..7a7f93e78 100644 --- a/History.rdoc +++ b/History.rdoc @@ -2,6 +2,8 @@ Enhancements: + * Lookup prerequisites with same name outside of scope instead of + matching self. Pull request #96 by Sandy Vanderbleek * Removed to support Ruby 1.8.x * Removed constant named `RAKEVERSION` * Removed Rake::AltSystem From 17cb5f2b6a65d0420da32b6ccb30401c2bfd8fba Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 29 Jan 2016 16:50:38 +0900 Subject: [PATCH 396/813] History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index 7a7f93e78..25da010c8 100644 --- a/History.rdoc +++ b/History.rdoc @@ -2,6 +2,8 @@ Enhancements: + * Make Rake::Task#already_invoked publicly accessible. + Pull request #93 by Joe Rafaniello * Lookup prerequisites with same name outside of scope instead of matching self. Pull request #96 by Sandy Vanderbleek * Removed to support Ruby 1.8.x From 3cf6ad9d7d1266da29adfec99f9ecd6e28b8bd64 Mon Sep 17 00:00:00 2001 From: Daniel Tamai Date: Sat, 1 Aug 2015 18:33:06 -0300 Subject: [PATCH 397/813] Make FileList#pathmap behave like String#pathmap String#pathmap accepts a block to perform replacements but FileList#pathmap ignores the block given. --- lib/rake/file_list.rb | 4 ++-- test/test_rake_file_list_path_map.rb | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index b5c467270..a39d942a1 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -264,8 +264,8 @@ def gsub!(pat, rep) # Apply the pathmap spec to each of the included file names, returning a # new file list with the modified paths. (See String#pathmap for # details.) - def pathmap(spec=nil) - collect { |fn| fn.pathmap(spec) } + def pathmap(spec=nil, &block) + collect { |fn| fn.pathmap(spec, &block) } end # Return a new FileList with String#ext method applied to diff --git a/test/test_rake_file_list_path_map.rb b/test/test_rake_file_list_path_map.rb index 5935dc268..7881a3f10 100644 --- a/test/test_rake_file_list_path_map.rb +++ b/test/test_rake_file_list_path_map.rb @@ -4,5 +4,12 @@ class TestRakeFileListPathMap < Rake::TestCase def test_file_list_supports_pathmap assert_equal ['a', 'b'], FileList['dir/a.rb', 'dir/b.rb'].pathmap("%n") end + + def test_file_list_supports_pathmap_with_a_block + mapped = FileList['dir/a.rb', 'dir/b.rb'].pathmap("%{.*,*}n") do |name| + name.upcase + end + assert_equal ['A', 'B'], mapped + end end From dc79c47a1e9a182558bbdd5c85295286341cfb15 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 2 Feb 2016 19:49:37 +0900 Subject: [PATCH 398/813] History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index 25da010c8..cdf1bbd5d 100644 --- a/History.rdoc +++ b/History.rdoc @@ -6,6 +6,8 @@ Enhancements: Pull request #93 by Joe Rafaniello * Lookup prerequisites with same name outside of scope instead of matching self. Pull request #96 by Sandy Vanderbleek + * Make FileList#pathmap behave like String#pathmap. + Pull request #61 by Daniel Tamai * Removed to support Ruby 1.8.x * Removed constant named `RAKEVERSION` * Removed Rake::AltSystem From 95f212c5171dbc366e32ec56d9af61492728125d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 2 Feb 2016 20:25:04 +0900 Subject: [PATCH 399/813] Removed needless condition for Ruby 1.8 --- test/test_rake_task_arguments.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 1da01fc34..abd41ebea 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -29,7 +29,7 @@ def test_fetch ta = Rake::TaskArguments.new([:one], [1]) assert_equal 1, ta.fetch(:one) assert_equal 2, ta.fetch(:two) { 2 } - assert_raises(KeyError) { ta.fetch(:three) } unless older_ruby? + assert_raises(KeyError) { ta.fetch(:three) } end def test_to_s @@ -131,10 +131,4 @@ def test_extra_args_with_less_than_named_arguments assert_equal [], ta.extras end - private - - def older_ruby? - RUBY_VERSION == '1.8.7' - end - end From 11b6323e76dbe7d2e66799da744f2b6a3507cfe7 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 2 Feb 2016 20:53:11 +0900 Subject: [PATCH 400/813] History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index cdf1bbd5d..9942ecf64 100644 --- a/History.rdoc +++ b/History.rdoc @@ -8,6 +8,8 @@ Enhancements: matching self. Pull request #96 by Sandy Vanderbleek * Make FileList#pathmap behave like String#pathmap. Pull request #61 by Daniel Tamai + * Add fetch method to task arguments. + Pull request #12 by Chris Keathley * Removed to support Ruby 1.8.x * Removed constant named `RAKEVERSION` * Removed Rake::AltSystem From 5e07191e55891cc6d86998d75ac818dee0b54081 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 2 Feb 2016 20:57:19 +0900 Subject: [PATCH 401/813] History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 9942ecf64..eadb7228c 100644 --- a/History.rdoc +++ b/History.rdoc @@ -10,6 +10,7 @@ Enhancements: Pull request #61 by Daniel Tamai * Add fetch method to task arguments. Pull request #12 by Chris Keathley + * Use ruby warnings by default. Pull request #97 by Harold Giménez * Removed to support Ruby 1.8.x * Removed constant named `RAKEVERSION` * Removed Rake::AltSystem From 101a9c8a00a079851a27a910c98e405206500d4e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 2 Feb 2016 21:10:00 +0900 Subject: [PATCH 402/813] History --- History.rdoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/History.rdoc b/History.rdoc index eadb7228c..2ae23929e 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,5 +1,9 @@ === 11.0.0(dev) / 2016- +Bug fixes: + + * Fix verbose option at TestTask. Punn request #67 by Mike Blumtritt + Enhancements: * Make Rake::Task#already_invoked publicly accessible. From 669e144f5871497df3a45d53bb38ea01d1361fc3 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 2 Feb 2016 21:13:20 +0900 Subject: [PATCH 403/813] removed dprecated task --- test/support/rakefile_definitions.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/support/rakefile_definitions.rb b/test/support/rakefile_definitions.rb index a637c7e94..d276b2fd5 100644 --- a/test/support/rakefile_definitions.rb +++ b/test/support/rakefile_definitions.rb @@ -19,9 +19,7 @@ def a_top_level_function end end -# TODO: remove `disabled_' when DeprecatedObjectDSL removed -task :obj -task :disabled_obj do +task :obj do begin Object.new.instance_eval { task :xyzzy } puts "BAD:D Rake DSL are polluting objects" From befa074f6df7745662573ebf70101b0b9e6f9bfc Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 5 Feb 2016 15:51:28 +0900 Subject: [PATCH 404/813] removed 'rake/runtest' --- Manifest.txt | 1 - lib/rake/runtest.rb | 27 --------------------------- 2 files changed, 28 deletions(-) delete mode 100644 lib/rake/runtest.rb diff --git a/Manifest.txt b/Manifest.txt index 1e5eda671..677b72810 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -88,7 +88,6 @@ lib/rake/pseudo_status.rb lib/rake/rake_module.rb lib/rake/rake_test_loader.rb lib/rake/rule_recursion_overflow_error.rb -lib/rake/runtest.rb lib/rake/scope.rb lib/rake/task.rb lib/rake/task_argument_error.rb diff --git a/lib/rake/runtest.rb b/lib/rake/runtest.rb deleted file mode 100644 index 4774b0e26..000000000 --- a/lib/rake/runtest.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'test/unit' -require 'test/unit/assertions' -require 'rake/file_list' - -module Rake - include Test::Unit::Assertions - - ## - # Deprecated way of running tests in process, but only for Test::Unit. - #-- - # TODO: Remove in rake 11 - - def run_tests(pattern='test/test*.rb', log_enabled=false) # :nodoc: - FileList.glob(pattern).each do |fn| - $stderr.puts fn if log_enabled - begin - require fn - rescue Exception => ex - $stderr.puts "Error in #{fn}: #{ex.message}" - $stderr.puts ex.backtrace - assert false - end - end - end - - extend self -end From 9d47df56fbc98e855bb91e296fb9ae563c3fef89 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 5 Feb 2016 15:51:59 +0900 Subject: [PATCH 405/813] History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 2ae23929e..2f49ef960 100644 --- a/History.rdoc +++ b/History.rdoc @@ -23,6 +23,7 @@ Enhancements: * Removed Rake::TaskLib#paste * Removed Top-level SshDirPublisher, SshFreshDirPublisher, SshFilePublisher and CompositePublisher from lib/rake/contrib/publisher.rb + * Removed "rake/runtest.rb" === 10.5.0 / 2016-01-13 From 222ada6a4528eeab997cb7f16ad333d8b5730843 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 5 Feb 2016 15:52:10 +0900 Subject: [PATCH 406/813] generate gemspec --- rake.gemspec | 54 ++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/rake.gemspec b/rake.gemspec index fb49769f8..c1b6152dc 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -1,41 +1,41 @@ # -*- encoding: utf-8 -*- -# stub: rake 10.5.0.20160125114208 ruby lib +# stub: rake 10.5.0.20160205155007 ruby lib Gem::Specification.new do |s| - s.name = "rake" - s.version = "10.5.0.20160125114208" + s.name = "rake".freeze + s.version = "10.5.0.20160205155007" - s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2") if s.respond_to? :required_rubygems_version= - s.require_paths = ["lib"] - s.authors = ["Hiroshi SHIBATA", "Eric Hodel", "Jim Weirich"] - s.date = "2016-01-25" - s.description = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are\nspecified in standard Ruby syntax.\n\nRake has the following features:\n\n* Rakefiles (rake's version of Makefiles) are completely defined in\n standard Ruby syntax. No XML files to edit. No quirky Makefile\n syntax to worry about (is that a tab or a space?)\n\n* Users can specify tasks with prerequisites.\n\n* Rake supports rule patterns to synthesize implicit tasks.\n\n* Flexible FileLists that act like arrays but know about manipulating\n file names and paths.\n\n* A library of prepackaged tasks to make building rakefiles easier. For example,\n tasks for building tarballs and publishing to FTP or SSH sites. (Formerly\n tasks for building RDoc and Gems were included in rake but they're now\n available in RDoc and RubyGems respectively.)\n\n* Supports parallel execution of tasks." - s.email = ["hsbt@ruby-lang.org", "drbrain@segment7.net", ""] - s.executables = ["rake"] - s.extra_rdoc_files = ["CONTRIBUTING.rdoc", "History.rdoc", "Manifest.txt", "README.rdoc", "doc/command_line_usage.rdoc", "doc/glossary.rdoc", "doc/proto_rake.rdoc", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "MIT-LICENSE", "doc/command_line_usage.rdoc", "doc/glossary.rdoc", "doc/proto_rake.rdoc", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "CONTRIBUTING.rdoc", "History.rdoc", "README.rdoc"] - s.files = [".autotest", ".rubocop.yml", ".togglerc", "CONTRIBUTING.rdoc", "History.rdoc", "MIT-LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "bin/rake", "doc/command_line_usage.rdoc", "doc/example/Rakefile1", "doc/example/Rakefile2", "doc/example/a.c", "doc/example/b.c", "doc/example/main.c", "doc/glossary.rdoc", "doc/jamis.rb", "doc/proto_rake.rdoc", "doc/rake.1", "doc/rakefile.rdoc", "doc/rational.rdoc", "doc/release_notes/rake-0.4.14.rdoc", "doc/release_notes/rake-0.4.15.rdoc", "doc/release_notes/rake-0.5.0.rdoc", "doc/release_notes/rake-0.5.3.rdoc", "doc/release_notes/rake-0.5.4.rdoc", "doc/release_notes/rake-0.6.0.rdoc", "doc/release_notes/rake-0.7.0.rdoc", "doc/release_notes/rake-0.7.1.rdoc", "doc/release_notes/rake-0.7.2.rdoc", "doc/release_notes/rake-0.7.3.rdoc", "doc/release_notes/rake-0.8.0.rdoc", "doc/release_notes/rake-0.8.2.rdoc", "doc/release_notes/rake-0.8.3.rdoc", "doc/release_notes/rake-0.8.4.rdoc", "doc/release_notes/rake-0.8.5.rdoc", "doc/release_notes/rake-0.8.6.rdoc", "doc/release_notes/rake-0.8.7.rdoc", "doc/release_notes/rake-0.9.0.rdoc", "doc/release_notes/rake-0.9.1.rdoc", "doc/release_notes/rake-0.9.2.2.rdoc", "doc/release_notes/rake-0.9.2.rdoc", "doc/release_notes/rake-0.9.3.rdoc", "doc/release_notes/rake-0.9.4.rdoc", "doc/release_notes/rake-0.9.5.rdoc", "doc/release_notes/rake-0.9.6.rdoc", "doc/release_notes/rake-10.0.0.rdoc", "doc/release_notes/rake-10.0.1.rdoc", "doc/release_notes/rake-10.0.2.rdoc", "doc/release_notes/rake-10.0.3.rdoc", "doc/release_notes/rake-10.1.0.rdoc", "lib/rake.rb", "lib/rake/application.rb", "lib/rake/backtrace.rb", "lib/rake/clean.rb", "lib/rake/cloneable.rb", "lib/rake/contrib/.document", "lib/rake/contrib/compositepublisher.rb", "lib/rake/contrib/ftptools.rb", "lib/rake/contrib/publisher.rb", "lib/rake/contrib/sshpublisher.rb", "lib/rake/cpu_counter.rb", "lib/rake/default_loader.rb", "lib/rake/dsl_definition.rb", "lib/rake/early_time.rb", "lib/rake/ext/core.rb", "lib/rake/ext/pathname.rb", "lib/rake/ext/string.rb", "lib/rake/file_creation_task.rb", "lib/rake/file_list.rb", "lib/rake/file_task.rb", "lib/rake/file_utils.rb", "lib/rake/file_utils_ext.rb", "lib/rake/gempackagetask.rb", "lib/rake/invocation_chain.rb", "lib/rake/invocation_exception_mixin.rb", "lib/rake/late_time.rb", "lib/rake/linked_list.rb", "lib/rake/loaders/makefile.rb", "lib/rake/multi_task.rb", "lib/rake/name_space.rb", "lib/rake/packagetask.rb", "lib/rake/phony.rb", "lib/rake/private_reader.rb", "lib/rake/promise.rb", "lib/rake/pseudo_status.rb", "lib/rake/rake_module.rb", "lib/rake/rake_test_loader.rb", "lib/rake/rule_recursion_overflow_error.rb", "lib/rake/runtest.rb", "lib/rake/scope.rb", "lib/rake/task.rb", "lib/rake/task_argument_error.rb", "lib/rake/task_arguments.rb", "lib/rake/task_manager.rb", "lib/rake/tasklib.rb", "lib/rake/testtask.rb", "lib/rake/thread_history_display.rb", "lib/rake/thread_pool.rb", "lib/rake/trace_output.rb", "lib/rake/version.rb", "lib/rake/win32.rb", "rakelib/publish.rake", "rakelib/test_times.rake", "test/file_creation.rb", "test/helper.rb", "test/support/rakefile_definitions.rb", "test/support/ruby_runner.rb", "test/test_private_reader.rb", "test/test_rake.rb", "test/test_rake_application.rb", "test/test_rake_application_options.rb", "test/test_rake_backtrace.rb", "test/test_rake_clean.rb", "test/test_rake_cpu_counter.rb", "test/test_rake_definitions.rb", "test/test_rake_directory_task.rb", "test/test_rake_dsl.rb", "test/test_rake_early_time.rb", "test/test_rake_extension.rb", "test/test_rake_file_creation_task.rb", "test/test_rake_file_list.rb", "test/test_rake_file_list_path_map.rb", "test/test_rake_file_task.rb", "test/test_rake_file_utils.rb", "test/test_rake_ftp_file.rb", "test/test_rake_functional.rb", "test/test_rake_invocation_chain.rb", "test/test_rake_late_time.rb", "test/test_rake_linked_list.rb", "test/test_rake_makefile_loader.rb", "test/test_rake_multi_task.rb", "test/test_rake_name_space.rb", "test/test_rake_package_task.rb", "test/test_rake_path_map.rb", "test/test_rake_path_map_explode.rb", "test/test_rake_path_map_partial.rb", "test/test_rake_pathname_extensions.rb", "test/test_rake_pseudo_status.rb", "test/test_rake_rake_test_loader.rb", "test/test_rake_reduce_compat.rb", "test/test_rake_require.rb", "test/test_rake_rules.rb", "test/test_rake_scope.rb", "test/test_rake_task.rb", "test/test_rake_task_argument_parsing.rb", "test/test_rake_task_arguments.rb", "test/test_rake_task_lib.rb", "test/test_rake_task_manager.rb", "test/test_rake_task_manager_argument_resolution.rb", "test/test_rake_task_with_arguments.rb", "test/test_rake_test_task.rb", "test/test_rake_thread_pool.rb", "test/test_rake_top_level_functions.rb", "test/test_rake_win32.rb", "test/test_thread_history_display.rb", "test/test_trace_output.rb"] - s.homepage = "https://github.com/ruby/rake" - s.licenses = ["MIT"] - s.rdoc_options = ["--main", "README.rdoc"] - s.required_ruby_version = Gem::Requirement.new(">= 1.9.3") - s.rubygems_version = "2.5.1" - s.summary = "Rake is a Make-like program implemented in Ruby" + s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) if s.respond_to? :required_rubygems_version= + s.require_paths = ["lib".freeze] + s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] + s.date = "2016-02-05" + s.description = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are\nspecified in standard Ruby syntax.\n\nRake has the following features:\n\n* Rakefiles (rake's version of Makefiles) are completely defined in\n standard Ruby syntax. No XML files to edit. No quirky Makefile\n syntax to worry about (is that a tab or a space?)\n\n* Users can specify tasks with prerequisites.\n\n* Rake supports rule patterns to synthesize implicit tasks.\n\n* Flexible FileLists that act like arrays but know about manipulating\n file names and paths.\n\n* A library of prepackaged tasks to make building rakefiles easier. For example,\n tasks for building tarballs and publishing to FTP or SSH sites. (Formerly\n tasks for building RDoc and Gems were included in rake but they're now\n available in RDoc and RubyGems respectively.)\n\n* Supports parallel execution of tasks.".freeze + s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] + s.executables = ["rake".freeze] + s.extra_rdoc_files = ["CONTRIBUTING.rdoc".freeze, "History.rdoc".freeze, "Manifest.txt".freeze, "README.rdoc".freeze, "doc/command_line_usage.rdoc".freeze, "doc/glossary.rdoc".freeze, "doc/proto_rake.rdoc".freeze, "doc/rakefile.rdoc".freeze, "doc/rational.rdoc".freeze, "doc/release_notes/rake-0.4.14.rdoc".freeze, "doc/release_notes/rake-0.4.15.rdoc".freeze, "doc/release_notes/rake-0.5.0.rdoc".freeze, "doc/release_notes/rake-0.5.3.rdoc".freeze, "doc/release_notes/rake-0.5.4.rdoc".freeze, "doc/release_notes/rake-0.6.0.rdoc".freeze, "doc/release_notes/rake-0.7.0.rdoc".freeze, "doc/release_notes/rake-0.7.1.rdoc".freeze, "doc/release_notes/rake-0.7.2.rdoc".freeze, "doc/release_notes/rake-0.7.3.rdoc".freeze, "doc/release_notes/rake-0.8.0.rdoc".freeze, "doc/release_notes/rake-0.8.2.rdoc".freeze, "doc/release_notes/rake-0.8.3.rdoc".freeze, "doc/release_notes/rake-0.8.4.rdoc".freeze, "doc/release_notes/rake-0.8.5.rdoc".freeze, "doc/release_notes/rake-0.8.6.rdoc".freeze, "doc/release_notes/rake-0.8.7.rdoc".freeze, "doc/release_notes/rake-0.9.0.rdoc".freeze, "doc/release_notes/rake-0.9.1.rdoc".freeze, "doc/release_notes/rake-0.9.2.2.rdoc".freeze, "doc/release_notes/rake-0.9.2.rdoc".freeze, "doc/release_notes/rake-0.9.3.rdoc".freeze, "doc/release_notes/rake-0.9.4.rdoc".freeze, "doc/release_notes/rake-0.9.5.rdoc".freeze, "doc/release_notes/rake-0.9.6.rdoc".freeze, "doc/release_notes/rake-10.0.0.rdoc".freeze, "doc/release_notes/rake-10.0.1.rdoc".freeze, "doc/release_notes/rake-10.0.2.rdoc".freeze, "doc/release_notes/rake-10.0.3.rdoc".freeze, "doc/release_notes/rake-10.1.0.rdoc".freeze, "MIT-LICENSE".freeze, "doc/command_line_usage.rdoc".freeze, "doc/glossary.rdoc".freeze, "doc/proto_rake.rdoc".freeze, "doc/rakefile.rdoc".freeze, "doc/rational.rdoc".freeze, "doc/release_notes/rake-0.4.14.rdoc".freeze, "doc/release_notes/rake-0.4.15.rdoc".freeze, "doc/release_notes/rake-0.5.0.rdoc".freeze, "doc/release_notes/rake-0.5.3.rdoc".freeze, "doc/release_notes/rake-0.5.4.rdoc".freeze, "doc/release_notes/rake-0.6.0.rdoc".freeze, "doc/release_notes/rake-0.7.0.rdoc".freeze, "doc/release_notes/rake-0.7.1.rdoc".freeze, "doc/release_notes/rake-0.7.2.rdoc".freeze, "doc/release_notes/rake-0.7.3.rdoc".freeze, "doc/release_notes/rake-0.8.0.rdoc".freeze, "doc/release_notes/rake-0.8.2.rdoc".freeze, "doc/release_notes/rake-0.8.3.rdoc".freeze, "doc/release_notes/rake-0.8.4.rdoc".freeze, "doc/release_notes/rake-0.8.5.rdoc".freeze, "doc/release_notes/rake-0.8.6.rdoc".freeze, "doc/release_notes/rake-0.8.7.rdoc".freeze, "doc/release_notes/rake-0.9.0.rdoc".freeze, "doc/release_notes/rake-0.9.1.rdoc".freeze, "doc/release_notes/rake-0.9.2.2.rdoc".freeze, "doc/release_notes/rake-0.9.2.rdoc".freeze, "doc/release_notes/rake-0.9.3.rdoc".freeze, "doc/release_notes/rake-0.9.4.rdoc".freeze, "doc/release_notes/rake-0.9.5.rdoc".freeze, "doc/release_notes/rake-0.9.6.rdoc".freeze, "doc/release_notes/rake-10.0.0.rdoc".freeze, "doc/release_notes/rake-10.0.1.rdoc".freeze, "doc/release_notes/rake-10.0.2.rdoc".freeze, "doc/release_notes/rake-10.0.3.rdoc".freeze, "doc/release_notes/rake-10.1.0.rdoc".freeze, "CONTRIBUTING.rdoc".freeze, "History.rdoc".freeze, "README.rdoc".freeze] + s.files = [".autotest".freeze, ".rubocop.yml".freeze, ".togglerc".freeze, "CONTRIBUTING.rdoc".freeze, "History.rdoc".freeze, "MIT-LICENSE".freeze, "Manifest.txt".freeze, "README.rdoc".freeze, "Rakefile".freeze, "bin/rake".freeze, "doc/command_line_usage.rdoc".freeze, "doc/example/Rakefile1".freeze, "doc/example/Rakefile2".freeze, "doc/example/a.c".freeze, "doc/example/b.c".freeze, "doc/example/main.c".freeze, "doc/glossary.rdoc".freeze, "doc/jamis.rb".freeze, "doc/proto_rake.rdoc".freeze, "doc/rake.1".freeze, "doc/rakefile.rdoc".freeze, "doc/rational.rdoc".freeze, "doc/release_notes/rake-0.4.14.rdoc".freeze, "doc/release_notes/rake-0.4.15.rdoc".freeze, "doc/release_notes/rake-0.5.0.rdoc".freeze, "doc/release_notes/rake-0.5.3.rdoc".freeze, "doc/release_notes/rake-0.5.4.rdoc".freeze, "doc/release_notes/rake-0.6.0.rdoc".freeze, "doc/release_notes/rake-0.7.0.rdoc".freeze, "doc/release_notes/rake-0.7.1.rdoc".freeze, "doc/release_notes/rake-0.7.2.rdoc".freeze, "doc/release_notes/rake-0.7.3.rdoc".freeze, "doc/release_notes/rake-0.8.0.rdoc".freeze, "doc/release_notes/rake-0.8.2.rdoc".freeze, "doc/release_notes/rake-0.8.3.rdoc".freeze, "doc/release_notes/rake-0.8.4.rdoc".freeze, "doc/release_notes/rake-0.8.5.rdoc".freeze, "doc/release_notes/rake-0.8.6.rdoc".freeze, "doc/release_notes/rake-0.8.7.rdoc".freeze, "doc/release_notes/rake-0.9.0.rdoc".freeze, "doc/release_notes/rake-0.9.1.rdoc".freeze, "doc/release_notes/rake-0.9.2.2.rdoc".freeze, "doc/release_notes/rake-0.9.2.rdoc".freeze, "doc/release_notes/rake-0.9.3.rdoc".freeze, "doc/release_notes/rake-0.9.4.rdoc".freeze, "doc/release_notes/rake-0.9.5.rdoc".freeze, "doc/release_notes/rake-0.9.6.rdoc".freeze, "doc/release_notes/rake-10.0.0.rdoc".freeze, "doc/release_notes/rake-10.0.1.rdoc".freeze, "doc/release_notes/rake-10.0.2.rdoc".freeze, "doc/release_notes/rake-10.0.3.rdoc".freeze, "doc/release_notes/rake-10.1.0.rdoc".freeze, "lib/rake.rb".freeze, "lib/rake/application.rb".freeze, "lib/rake/backtrace.rb".freeze, "lib/rake/clean.rb".freeze, "lib/rake/cloneable.rb".freeze, "lib/rake/contrib/.document".freeze, "lib/rake/contrib/compositepublisher.rb".freeze, "lib/rake/contrib/ftptools.rb".freeze, "lib/rake/contrib/publisher.rb".freeze, "lib/rake/contrib/sshpublisher.rb".freeze, "lib/rake/cpu_counter.rb".freeze, "lib/rake/default_loader.rb".freeze, "lib/rake/dsl_definition.rb".freeze, "lib/rake/early_time.rb".freeze, "lib/rake/ext/core.rb".freeze, "lib/rake/ext/pathname.rb".freeze, "lib/rake/ext/string.rb".freeze, "lib/rake/file_creation_task.rb".freeze, "lib/rake/file_list.rb".freeze, "lib/rake/file_task.rb".freeze, "lib/rake/file_utils.rb".freeze, "lib/rake/file_utils_ext.rb".freeze, "lib/rake/gempackagetask.rb".freeze, "lib/rake/invocation_chain.rb".freeze, "lib/rake/invocation_exception_mixin.rb".freeze, "lib/rake/late_time.rb".freeze, "lib/rake/linked_list.rb".freeze, "lib/rake/loaders/makefile.rb".freeze, "lib/rake/multi_task.rb".freeze, "lib/rake/name_space.rb".freeze, "lib/rake/packagetask.rb".freeze, "lib/rake/phony.rb".freeze, "lib/rake/private_reader.rb".freeze, "lib/rake/promise.rb".freeze, "lib/rake/pseudo_status.rb".freeze, "lib/rake/rake_module.rb".freeze, "lib/rake/rake_test_loader.rb".freeze, "lib/rake/rule_recursion_overflow_error.rb".freeze, "lib/rake/scope.rb".freeze, "lib/rake/task.rb".freeze, "lib/rake/task_argument_error.rb".freeze, "lib/rake/task_arguments.rb".freeze, "lib/rake/task_manager.rb".freeze, "lib/rake/tasklib.rb".freeze, "lib/rake/testtask.rb".freeze, "lib/rake/thread_history_display.rb".freeze, "lib/rake/thread_pool.rb".freeze, "lib/rake/trace_output.rb".freeze, "lib/rake/version.rb".freeze, "lib/rake/win32.rb".freeze, "rakelib/publish.rake".freeze, "rakelib/test_times.rake".freeze, "test/file_creation.rb".freeze, "test/helper.rb".freeze, "test/support/rakefile_definitions.rb".freeze, "test/support/ruby_runner.rb".freeze, "test/test_private_reader.rb".freeze, "test/test_rake.rb".freeze, "test/test_rake_application.rb".freeze, "test/test_rake_application_options.rb".freeze, "test/test_rake_backtrace.rb".freeze, "test/test_rake_clean.rb".freeze, "test/test_rake_cpu_counter.rb".freeze, "test/test_rake_definitions.rb".freeze, "test/test_rake_directory_task.rb".freeze, "test/test_rake_dsl.rb".freeze, "test/test_rake_early_time.rb".freeze, "test/test_rake_extension.rb".freeze, "test/test_rake_file_creation_task.rb".freeze, "test/test_rake_file_list.rb".freeze, "test/test_rake_file_list_path_map.rb".freeze, "test/test_rake_file_task.rb".freeze, "test/test_rake_file_utils.rb".freeze, "test/test_rake_ftp_file.rb".freeze, "test/test_rake_functional.rb".freeze, "test/test_rake_invocation_chain.rb".freeze, "test/test_rake_late_time.rb".freeze, "test/test_rake_linked_list.rb".freeze, "test/test_rake_makefile_loader.rb".freeze, "test/test_rake_multi_task.rb".freeze, "test/test_rake_name_space.rb".freeze, "test/test_rake_package_task.rb".freeze, "test/test_rake_path_map.rb".freeze, "test/test_rake_path_map_explode.rb".freeze, "test/test_rake_path_map_partial.rb".freeze, "test/test_rake_pathname_extensions.rb".freeze, "test/test_rake_pseudo_status.rb".freeze, "test/test_rake_rake_test_loader.rb".freeze, "test/test_rake_reduce_compat.rb".freeze, "test/test_rake_require.rb".freeze, "test/test_rake_rules.rb".freeze, "test/test_rake_scope.rb".freeze, "test/test_rake_task.rb".freeze, "test/test_rake_task_argument_parsing.rb".freeze, "test/test_rake_task_arguments.rb".freeze, "test/test_rake_task_lib.rb".freeze, "test/test_rake_task_manager.rb".freeze, "test/test_rake_task_manager_argument_resolution.rb".freeze, "test/test_rake_task_with_arguments.rb".freeze, "test/test_rake_test_task.rb".freeze, "test/test_rake_thread_pool.rb".freeze, "test/test_rake_top_level_functions.rb".freeze, "test/test_rake_win32.rb".freeze, "test/test_thread_history_display.rb".freeze, "test/test_trace_output.rb".freeze] + s.homepage = "https://github.com/ruby/rake".freeze + s.licenses = ["MIT".freeze] + s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] + s.required_ruby_version = Gem::Requirement.new(">= 1.9.3".freeze) + s.rubygems_version = "2.5.2".freeze + s.summary = "Rake is a Make-like program implemented in Ruby".freeze if s.respond_to? :specification_version then s.specification_version = 4 if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_development_dependency(%q, ["~> 5.8"]) - s.add_development_dependency(%q, ["~> 4.0"]) - s.add_development_dependency(%q, ["~> 3.14"]) + s.add_development_dependency(%q.freeze, ["~> 5.8"]) + s.add_development_dependency(%q.freeze, ["~> 4.0"]) + s.add_development_dependency(%q.freeze, ["~> 3.14"]) else - s.add_dependency(%q, ["~> 5.8"]) - s.add_dependency(%q, ["~> 4.0"]) - s.add_dependency(%q, ["~> 3.14"]) + s.add_dependency(%q.freeze, ["~> 5.8"]) + s.add_dependency(%q.freeze, ["~> 4.0"]) + s.add_dependency(%q.freeze, ["~> 3.14"]) end else - s.add_dependency(%q, ["~> 5.8"]) - s.add_dependency(%q, ["~> 4.0"]) - s.add_dependency(%q, ["~> 3.14"]) + s.add_dependency(%q.freeze, ["~> 5.8"]) + s.add_dependency(%q.freeze, ["~> 4.0"]) + s.add_dependency(%q.freeze, ["~> 3.14"]) end end From 970967733033f57268338b41567f39ee6b6c5525 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 8 Feb 2016 17:22:41 +0900 Subject: [PATCH 407/813] remove -Xcext.enabled=false from JRUBY_OPTS. It's deprecated option on JRuby 9.0.0.0 --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index e41820f4d..54d8ca22b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,9 @@ sudo: false notifications: email: - drbrain@segment7.net +env: + global: + - JRUBY_OPTS="--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xss2m -Xcompile.invokedynamic=false" rvm: - 1.9.3 - 2.0.0 From 738e09cf7a3fc3f0a6a5d23720cc4f8afc36f844 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 8 Feb 2016 17:22:53 +0900 Subject: [PATCH 408/813] use JRuby 9.0.5.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 54d8ca22b..253e6e705 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ rvm: - 2.3.0 - ruby-head - jruby-1.7.20 - - jruby-9.0.4.0 + - jruby-9.0.5.0 - jruby-head - rbx-2 script: ruby -Ilib bin/rake From e054c74907437620b1a85ad8f81da0bc4a99d644 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 8 Feb 2016 17:26:22 +0900 Subject: [PATCH 409/813] allow_failures JRuby 9.0.5.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 253e6e705..50ca61ce0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,5 +28,5 @@ script: ruby -Ilib bin/rake matrix: allow_failures: - rvm: jruby-1.7.20 - - rvm: jruby-9.0.4.0 + - rvm: jruby-9.0.5.0 - rvm: jruby-head From 8f5e13763c0e411ef3db7a80ecc624ff8253a96d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 9 Feb 2016 18:07:27 +0900 Subject: [PATCH 410/813] unset JRUBY_OPTS --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 50ca61ce0..f45a80c3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,14 +5,12 @@ before_script: - gem install hoe-travis --no-document - gem install minitest -v '~> 5.0' --no-document - ruby -Ilib bin/rake travis:before -t +- unset JRUBY_OPTS language: ruby sudo: false notifications: email: - drbrain@segment7.net -env: - global: - - JRUBY_OPTS="--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xss2m -Xcompile.invokedynamic=false" rvm: - 1.9.3 - 2.0.0 From ee46df5293e41bfd28b74b108a2a1b46c69ff981 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 10 Feb 2016 11:55:54 +0900 Subject: [PATCH 411/813] ignored some tests caused JRuby 9 series limitation. --- test/helper.rb | 8 ++++++++ test/test_rake_application.rb | 1 + test/test_rake_file_utils.rb | 4 ++++ test/test_rake_functional.rb | 2 ++ 4 files changed, 15 insertions(+) diff --git a/test/helper.rb b/test/helper.rb index 4d5186aee..3e50903a7 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -118,5 +118,13 @@ def rakefile(contents) end end + def jruby? + defined?(JRUBY_VERSION) + end + + def jruby9? + jruby? && (JRUBY_VERSION > '9.0.0.0') + end + include RakefileDefinitions end diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index c01088917..039f315d9 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -60,6 +60,7 @@ def test_display_exception_details_cause def test_display_exception_details_cause_loop skip 'Exception#cause not implemented' unless Exception.method_defined? :cause + skip if jruby9? # https://github.com/jruby/jruby/issues/3654 begin begin diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 90e01dfbf..3204a5799 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -142,6 +142,8 @@ def test_sh_with_a_single_string_argument end def test_sh_with_multiple_arguments + skip if jruby9? # https://github.com/jruby/jruby/issues/3653 + check_no_expansion ENV['RAKE_TEST_SH'] = 'someval' @@ -240,6 +242,8 @@ def test_ruby_with_a_single_string_argument end def test_ruby_with_multiple_arguments + skip if jruby9? # https://github.com/jruby/jruby/issues/3653 + check_no_expansion ENV['RAKE_TEST_SH'] = 'someval' diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index 25bf50782..cdb027c8b 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -425,6 +425,8 @@ def test_correct_number_of_tasks_reported end def test_file_list_is_requirable_separately + skip if jruby9? # https://github.com/jruby/jruby/issues/3655 + ruby '-rrake/file_list', '-e', 'puts Rake::FileList["a"].size' assert_equal "1\n", @out end From deaddfbc15f3722a7b41f7bc6536b017d399e3a5 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 10 Feb 2016 12:06:47 +0900 Subject: [PATCH 412/813] remove allow_failures with JRuby --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index f45a80c3e..df1c39760 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,8 +23,3 @@ rvm: - jruby-head - rbx-2 script: ruby -Ilib bin/rake -matrix: - allow_failures: - - rvm: jruby-1.7.20 - - rvm: jruby-9.0.5.0 - - rvm: jruby-head From 7046c86dfb9a13c384bb1f16ae3564a8cb60c973 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 10 Feb 2016 16:59:04 +0900 Subject: [PATCH 413/813] bump version to 11.0.0 --- lib/rake.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake.rb b/lib/rake.rb index 58bd5ebfd..fa8e03d33 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '10.5.0' + VERSION = '11.0.0' end require 'rake/version' From a0ee963997d06bf9137282cd72f9095a9539d1ab Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 10 Feb 2016 16:59:51 +0900 Subject: [PATCH 414/813] regenerate gemspec --- rake.gemspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rake.gemspec b/rake.gemspec index c1b6152dc..d44d6abe0 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -1,14 +1,14 @@ # -*- encoding: utf-8 -*- -# stub: rake 10.5.0.20160205155007 ruby lib +# stub: rake 11.0.0.20160210165915 ruby lib Gem::Specification.new do |s| s.name = "rake".freeze - s.version = "10.5.0.20160205155007" + s.version = "11.0.0.20160210165915" s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] - s.date = "2016-02-05" + s.date = "2016-02-10" s.description = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are\nspecified in standard Ruby syntax.\n\nRake has the following features:\n\n* Rakefiles (rake's version of Makefiles) are completely defined in\n standard Ruby syntax. No XML files to edit. No quirky Makefile\n syntax to worry about (is that a tab or a space?)\n\n* Users can specify tasks with prerequisites.\n\n* Rake supports rule patterns to synthesize implicit tasks.\n\n* Flexible FileLists that act like arrays but know about manipulating\n file names and paths.\n\n* A library of prepackaged tasks to make building rakefiles easier. For example,\n tasks for building tarballs and publishing to FTP or SSH sites. (Formerly\n tasks for building RDoc and Gems were included in rake but they're now\n available in RDoc and RubyGems respectively.)\n\n* Supports parallel execution of tasks.".freeze s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] s.executables = ["rake".freeze] From edff593acfbe379050156549ff71f8804b3f46ca Mon Sep 17 00:00:00 2001 From: Thomas Scholz Date: Thu, 11 Feb 2016 09:13:03 +0100 Subject: [PATCH 415/813] use self.class.new for all methods returning a new instance of file list --- lib/rake/file_list.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index a39d942a1..2e9c0f9ea 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -189,7 +189,7 @@ def *(other) result = @items * other case result when Array - FileList.new.import(result) + self.class.new.import(result) else result end @@ -235,7 +235,7 @@ def resolve_exclude # :nodoc: # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o'] # def sub(pat, rep) - inject(FileList.new) { |res, fn| res << fn.sub(pat, rep) } + inject(self.class.new) { |res, fn| res << fn.sub(pat, rep) } end # Return a new FileList with the results of running +gsub+ against each @@ -246,7 +246,7 @@ def sub(pat, rep) # => ['lib\\test\\file', 'x\\y'] # def gsub(pat, rep) - inject(FileList.new) { |res, fn| res << fn.gsub(pat, rep) } + inject(self.class.new) { |res, fn| res << fn.gsub(pat, rep) } end # Same as +sub+ except that the original file list is modified. @@ -330,8 +330,8 @@ def partition(&block) # :nodoc: resolve result = @items.partition(&block) [ - FileList.new.import(result[0]), - FileList.new.import(result[1]), + self.class.new.import(result[0]), + self.class.new.import(result[1]), ] end @@ -343,7 +343,7 @@ def to_s # Add matching glob patterns. def add_matching(pattern) - FileList.glob(pattern).each do |fn| + self.class.glob(pattern).each do |fn| self << fn unless excluded_from_list?(fn) end end From 5d275949a376945887795047fdd72dbc9f81f259 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 15 Feb 2016 17:44:48 +0900 Subject: [PATCH 416/813] Use IO.popen instead of Open3.popen3 --- lib/rake/cpu_counter.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index f29778ed5..6c1ee75ea 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -30,9 +30,6 @@ def count Rake::CpuCounter.class_eval <<-'end;', __FILE__, __LINE__+1 require 'rbconfig' - # TODO: replace with IO.popen using array-style arguments in Rake 11 - require 'open3' - def count if defined?(Java::Java) count_via_java_runtime @@ -95,10 +92,8 @@ def count_via_sysctl def run(command, *args) cmd = resolve_command(command) if cmd - Open3.popen3 cmd, *args do |inn, out, err,| - inn.close - err.read - out.read.to_i + IO.popen [cmd, *args] do |io| + io.read.to_i end else nil From d5e935b0dd03f2209a3618d3ecb0c8fa74d12f7c Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 15 Feb 2016 18:19:32 +0900 Subject: [PATCH 417/813] History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 2f49ef960..e7a831a88 100644 --- a/History.rdoc +++ b/History.rdoc @@ -6,6 +6,7 @@ Bug fixes: Enhancements: + * Use IO.open instead of Open3.poepn3 for CPU counter. * Make Rake::Task#already_invoked publicly accessible. Pull request #93 by Joe Rafaniello * Lookup prerequisites with same name outside of scope instead of From 75e92546494d68e535c5c760c8f8c80cf5b575eb Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 15 Feb 2016 18:32:59 +0900 Subject: [PATCH 418/813] Use IO.popen too. --- lib/rake/cpu_counter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index 6c1ee75ea..a0415f131 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -112,8 +112,8 @@ def look_for_command(dir, command) end def in_path_command(command) - Open3.popen3 'which', command do |_, out,| - out.eof? ? nil : command + IO.popen ['which', command] do |io| + io.eof? ? nil : command end end end; From 42a0a03402769a3adaaa1e838644c778bfec3630 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 16 Feb 2016 09:09:12 +0900 Subject: [PATCH 419/813] typo --- History.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index e7a831a88..ec651eeea 100644 --- a/History.rdoc +++ b/History.rdoc @@ -6,7 +6,7 @@ Bug fixes: Enhancements: - * Use IO.open instead of Open3.poepn3 for CPU counter. + * Use IO.open instead of Open3.popen3 for CPU counter. * Make Rake::Task#already_invoked publicly accessible. Pull request #93 by Joe Rafaniello * Lookup prerequisites with same name outside of scope instead of From 1651e2a1b4939e099b183016bd04daf4dcea98c8 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 17 Feb 2016 09:50:32 +0900 Subject: [PATCH 420/813] skip fragile test with JRuby 1.7.x --- test/helper.rb | 6 +++++- test/test_rake_functional.rb | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index 3e50903a7..888062a45 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -122,8 +122,12 @@ def jruby? defined?(JRUBY_VERSION) end + def jruby17? + jruby? && (JRUBY_VERSION < '9.0.0.0') + end + def jruby9? - jruby? && (JRUBY_VERSION > '9.0.0.0') + jruby? && (JRUBY_VERSION >= '9.0.0.0') end include RakefileDefinitions diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index cdb027c8b..ba08d2e9e 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -445,7 +445,7 @@ def can_detect_signals? end def test_signal_propagation_in_tests - if can_detect_signals? + if can_detect_signals? || jruby17? rakefile_test_signal rake assert_match(/ATEST/, @out) From 2643551e81ebd606daedbfb8cd037c08cacabace Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 26 Feb 2016 10:05:25 +0900 Subject: [PATCH 421/813] fixed wrong url --- README.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index d14dee4e9..afbff9197 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,6 +1,6 @@ = RAKE -- Ruby Make -{travis-ci}[https://travis-ci.org/ruby/rake] {appveyor}[https://ci.appveyor.com/project/hsbt/rake] +{travis-ci}[https://travis-ci.org/ruby/rake] {appveyor}[https://ci.appveyor.com/project/ruby/rake] home :: https://github.com/ruby/rake bugs :: https://github.com/ruby/rake/issues From bf10be19fe30531677be7782590deae2c4c6fad3 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 26 Feb 2016 11:33:53 +0900 Subject: [PATCH 422/813] style --- README.rdoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.rdoc b/README.rdoc index afbff9197..889bd9785 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,10 +1,9 @@ = RAKE -- Ruby Make -{travis-ci}[https://travis-ci.org/ruby/rake] {appveyor}[https://ci.appveyor.com/project/ruby/rake] - home :: https://github.com/ruby/rake bugs :: https://github.com/ruby/rake/issues docs :: http://docs.seattlerb.org/rake/ +build status :: {travis-ci}[https://travis-ci.org/ruby/rake] {appveyor}[https://ci.appveyor.com/project/ruby/rake] == Description From 610e463dea546ff644b4fd2558713b896305ddb9 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 2 Mar 2016 16:02:59 +0900 Subject: [PATCH 423/813] History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index ec651eeea..cc481fe13 100644 --- a/History.rdoc +++ b/History.rdoc @@ -6,6 +6,7 @@ Bug fixes: Enhancements: + * Make FileList#exclude more analogous to FileList#include. * Use IO.open instead of Open3.popen3 for CPU counter. * Make Rake::Task#already_invoked publicly accessible. Pull request #93 by Joe Rafaniello From 7c9014e5559e846e9ffee1cf1584c4454374dd70 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 2 Mar 2016 16:29:30 +0900 Subject: [PATCH 424/813] Removed deprecated docs. Fixed #52 --- lib/rake/dsl_definition.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index 4c57c1eb9..340cb580a 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -28,7 +28,6 @@ module DSL # task task_name # task task_name: dependencies # task task_name, arguments => dependencies - # task task_name, argument[, argument ...], :needs: dependencies # # Declare a basic task. The +task_name+ is always the first argument. If # the task name contains a ":" it is defined in that namespace. @@ -56,12 +55,6 @@ module DSL # # $ rake package[1.2.3] # - # Alternate definition: - # - # task :package, :version, needs: :test do |t, args| - # # ... - # end - # def task(*args, &block) # :doc: Rake::Task.define_task(*args, &block) end From 148374241f28fbb9ddbf76bd9cc7b8fb5912306d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 8 Mar 2016 20:58:33 +0900 Subject: [PATCH 425/813] follow up https://github.com/ruby/rake/commit/1651e2a1b4939e099b183016bd04daf4dcea98c8 --- test/test_rake_functional.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index ba08d2e9e..dfa4c1ae0 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -445,7 +445,7 @@ def can_detect_signals? end def test_signal_propagation_in_tests - if can_detect_signals? || jruby17? + if can_detect_signals? || jruby9? rakefile_test_signal rake assert_match(/ATEST/, @out) From 1e845adba95b724be1c1bacb80607d963908543b Mon Sep 17 00:00:00 2001 From: Tomer Brisker Date: Mon, 7 Mar 2016 19:44:41 +0200 Subject: [PATCH 426/813] Correctly handle bad encoding in exception messages TraceOutput#trace_on has a bug that causes the matching to fail if a string is incorrectly encoded, for example encoded as 'US-ASCII' but contains unicode characters. This causes a new exception to be thrown, losing the stack trace of the previous exception. This can occur, for example, in Ruby 1.9 when one of the dependencies of a project includes a file that contains unicode but does not specify an encoding (as the default for Ruby 1.9 is US-ASCII). This was the case in a certain version of the Puma web server, which was fixed in https://github.com/puma/puma/pull/924 but was very difficult to debug due to the incorrect stack trace provided by rake. --- lib/rake/trace_output.rb | 2 +- test/test_rake_application.rb | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/rake/trace_output.rb b/lib/rake/trace_output.rb index 396096d4d..c740b9e23 100644 --- a/lib/rake/trace_output.rb +++ b/lib/rake/trace_output.rb @@ -13,7 +13,7 @@ def trace_on(out, *strings) else output = strings.map { |s| next if s.nil? - s =~ /#{sep}$/ ? s : s + sep + s.end_with?(sep) ? s : s + sep }.join end out.print(output) diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 039f315d9..daa4a57ba 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -1,3 +1,4 @@ +#encoding: UTF-8 require File.expand_path('../helper', __FILE__) class TestRakeApplication < Rake::TestCase @@ -34,6 +35,20 @@ def test_display_exception_details assert_match __method__.to_s, err end + def test_display_exception_details_bad_encoding + begin + raise 'El Niño is coming!'.force_encoding('US-ASCII') + rescue => ex + end + + out, err = capture_io do + @app.display_error_message ex + end + + assert_empty out + assert_match 'El Niño is coming!', err.force_encoding('UTF-8') + end + def test_display_exception_details_cause skip 'Exception#cause not implemented' unless Exception.method_defined? :cause From b15221308c7478679a184d1e599c4e7f5bd95339 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 8 Mar 2016 22:26:12 +0900 Subject: [PATCH 427/813] test_signal_propagation_in_tests is fragile status with JRuby --- test/test_rake_functional.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index dfa4c1ae0..50428eb93 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -445,7 +445,7 @@ def can_detect_signals? end def test_signal_propagation_in_tests - if can_detect_signals? || jruby9? + if can_detect_signals? || jruby? rakefile_test_signal rake assert_match(/ATEST/, @out) From 3465f6c20909044e6d9ace0499c2d55045b6f872 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 9 Mar 2016 09:45:18 +0900 Subject: [PATCH 428/813] fix wrong condition --- test/test_rake_functional.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index 50428eb93..9113d8616 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -445,7 +445,7 @@ def can_detect_signals? end def test_signal_propagation_in_tests - if can_detect_signals? || jruby? + if !jruby? && can_detect_signals? rakefile_test_signal rake assert_match(/ATEST/, @out) From f0517b7074ec9e48d602c81692c99cf4e40d85d9 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 9 Mar 2016 09:48:17 +0900 Subject: [PATCH 429/813] Removed ruby core dependency --- test/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index 888062a45..ab3416314 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -23,7 +23,7 @@ class TaskManager include Rake::TaskManager end - RUBY = defined?(EnvUtil) ? EnvUtil.rubybin : Gem.ruby + RUBY = Gem.ruby def setup ARGV.clear From 7b1acc66270de1daad74813565009587718e145a Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 9 Mar 2016 09:52:56 +0900 Subject: [PATCH 430/813] History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index cc481fe13..1ffb82ba1 100644 --- a/History.rdoc +++ b/History.rdoc @@ -2,6 +2,8 @@ Bug fixes: + * Correctly handle bad encoding in exception messages. Pull Request #113 + by Tomer Brisker * Fix verbose option at TestTask. Punn request #67 by Mike Blumtritt Enhancements: From 3a5e66d9d0853cb66014cf57d12d047b4e9e47dd Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 9 Mar 2016 09:53:21 +0900 Subject: [PATCH 431/813] typo and downcase --- History.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index 1ffb82ba1..8a36670a2 100644 --- a/History.rdoc +++ b/History.rdoc @@ -2,9 +2,9 @@ Bug fixes: - * Correctly handle bad encoding in exception messages. Pull Request #113 + * Correctly handle bad encoding in exception messages. Pull request #113 by Tomer Brisker - * Fix verbose option at TestTask. Punn request #67 by Mike Blumtritt + * Fix verbose option at TestTask. Pull request #67 by Mike Blumtritt Enhancements: From 313bf736192ec1ad63fde67f558728cfa2de8493 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 9 Mar 2016 09:54:57 +0900 Subject: [PATCH 432/813] Separated section --- History.rdoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/History.rdoc b/History.rdoc index 8a36670a2..668cbaf5b 100644 --- a/History.rdoc +++ b/History.rdoc @@ -19,6 +19,9 @@ Enhancements: * Add fetch method to task arguments. Pull request #12 by Chris Keathley * Use ruby warnings by default. Pull request #97 by Harold Giménez + +Compatibility Changes: + * Removed to support Ruby 1.8.x * Removed constant named `RAKEVERSION` * Removed Rake::AltSystem From 53c78963c12da25e323fd89b80d7e7fddb82f9f8 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 9 Mar 2016 12:27:21 +0900 Subject: [PATCH 433/813] bump version to 11 --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index d44d6abe0..64fc0b39f 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -3,7 +3,7 @@ Gem::Specification.new do |s| s.name = "rake".freeze - s.version = "11.0.0.20160210165915" + s.version = "11.0.0" s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] From 67a400ec17ba396d5751a5c566a962887cd5b4df Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 9 Mar 2016 12:28:28 +0900 Subject: [PATCH 434/813] remove stub version --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index 64fc0b39f..3d963b821 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -1,5 +1,5 @@ # -*- encoding: utf-8 -*- -# stub: rake 11.0.0.20160210165915 ruby lib +# stub: rake 11.0.0 ruby lib Gem::Specification.new do |s| s.name = "rake".freeze From 83f3821909506203a95c732bc9a728320e9cd816 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 9 Mar 2016 15:33:05 +0900 Subject: [PATCH 435/813] removed obsoleted file from manifest --- Manifest.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Manifest.txt b/Manifest.txt index 677b72810..928864bef 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -58,7 +58,6 @@ lib/rake/cloneable.rb lib/rake/contrib/.document lib/rake/contrib/compositepublisher.rb lib/rake/contrib/ftptools.rb -lib/rake/contrib/publisher.rb lib/rake/contrib/sshpublisher.rb lib/rake/cpu_counter.rb lib/rake/default_loader.rb @@ -72,7 +71,6 @@ lib/rake/file_list.rb lib/rake/file_task.rb lib/rake/file_utils.rb lib/rake/file_utils_ext.rb -lib/rake/gempackagetask.rb lib/rake/invocation_chain.rb lib/rake/invocation_exception_mixin.rb lib/rake/late_time.rb @@ -100,7 +98,6 @@ lib/rake/thread_pool.rb lib/rake/trace_output.rb lib/rake/version.rb lib/rake/win32.rb -rakelib/publish.rake rakelib/test_times.rake test/file_creation.rb test/helper.rb @@ -145,7 +142,6 @@ test/test_rake_scope.rb test/test_rake_task.rb test/test_rake_task_argument_parsing.rb test/test_rake_task_arguments.rb -test/test_rake_task_lib.rb test/test_rake_task_manager.rb test/test_rake_task_manager_argument_resolution.rb test/test_rake_task_with_arguments.rb From eacabb37362e447a86b467a04f6f3bec9701a4fb Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 9 Mar 2016 16:55:06 +0900 Subject: [PATCH 436/813] Added missing file. fixes #114 --- Manifest.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Manifest.txt b/Manifest.txt index 928864bef..3cbf6195d 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -64,6 +64,7 @@ lib/rake/default_loader.rb lib/rake/dsl_definition.rb lib/rake/early_time.rb lib/rake/ext/core.rb +lib/rake/ext/fixnum.rb lib/rake/ext/pathname.rb lib/rake/ext/string.rb lib/rake/file_creation_task.rb From b4e10dc7a111de824c61d388302aa4c5fd06840f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 9 Mar 2016 16:56:44 +0900 Subject: [PATCH 437/813] bump version to 11.0.1 --- lib/rake.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake.rb b/lib/rake.rb index a86564cd1..5c547059f 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '11.0.0' + VERSION = '11.0.1' end require 'rake/version' From 4afe472cd3cd180924aa68747d69d70e35f2ce34 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 9 Mar 2016 17:31:26 +0900 Subject: [PATCH 438/813] style --- History.rdoc | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/History.rdoc b/History.rdoc index 668cbaf5b..b2aa1c491 100644 --- a/History.rdoc +++ b/History.rdoc @@ -2,35 +2,35 @@ Bug fixes: - * Correctly handle bad encoding in exception messages. Pull request #113 - by Tomer Brisker - * Fix verbose option at TestTask. Pull request #67 by Mike Blumtritt +* Correctly handle bad encoding in exception messages. Pull request #113 + by Tomer Brisker +* Fix verbose option at TestTask. Pull request #67 by Mike Blumtritt Enhancements: - * Make FileList#exclude more analogous to FileList#include. - * Use IO.open instead of Open3.popen3 for CPU counter. - * Make Rake::Task#already_invoked publicly accessible. - Pull request #93 by Joe Rafaniello - * Lookup prerequisites with same name outside of scope instead of - matching self. Pull request #96 by Sandy Vanderbleek - * Make FileList#pathmap behave like String#pathmap. - Pull request #61 by Daniel Tamai - * Add fetch method to task arguments. - Pull request #12 by Chris Keathley - * Use ruby warnings by default. Pull request #97 by Harold Giménez +* Make FileList#exclude more analogous to FileList#include. +* Use IO.open instead of Open3.popen3 for CPU counter. +* Make Rake::Task#already_invoked publicly accessible. + Pull request #93 by Joe Rafaniello +* Lookup prerequisites with same name outside of scope instead of + matching self. Pull request #96 by Sandy Vanderbleek +* Make FileList#pathmap behave like String#pathmap. + Pull request #61 by Daniel Tamai +* Add fetch method to task arguments. + Pull request #12 by Chris Keathley +* Use ruby warnings by default. Pull request #97 by Harold Giménez Compatibility Changes: - * Removed to support Ruby 1.8.x - * Removed constant named `RAKEVERSION` - * Removed Rake::AltSystem - * Removed Rake::RubyForgePublisher - * Removed Rake::TaskManager#last_comment. Use last_description. - * Removed Rake::TaskLib#paste - * Removed Top-level SshDirPublisher, SshFreshDirPublisher, SshFilePublisher - and CompositePublisher from lib/rake/contrib/publisher.rb - * Removed "rake/runtest.rb" +* Removed to support Ruby 1.8.x +* Removed constant named `RAKEVERSION` +* Removed Rake::AltSystem +* Removed Rake::RubyForgePublisher +* Removed Rake::TaskManager#last_comment. Use last_description. +* Removed Rake::TaskLib#paste +* Removed Top-level SshDirPublisher, SshFreshDirPublisher, SshFilePublisher + and CompositePublisher from lib/rake/contrib/publisher.rb +* Removed "rake/runtest.rb" === 10.5.0 / 2016-01-13 From 7b06ab1c43de15b376ae2b9d7abb5242dac004f8 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 9 Mar 2016 17:32:31 +0900 Subject: [PATCH 439/813] History --- History.rdoc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index b2aa1c491..338361b1c 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,10 @@ -=== 11.0.0(dev) / 2016- +=== 11.0.1 / 2016-03-09 + +Bug fixes: + +* Fixed packaging manifest. + +=== 11.0.0 / 2016-03-09 Bug fixes: From 2494225890a9de608fc260a9da4529aea08bd289 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 9 Mar 2016 17:41:22 +0900 Subject: [PATCH 440/813] generate latest gemspec --- rake.gemspec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rake.gemspec b/rake.gemspec index 3d963b821..298bf1b55 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -1,24 +1,24 @@ # -*- encoding: utf-8 -*- -# stub: rake 11.0.0 ruby lib +# stub: rake 11.0.1.20160309174104 ruby lib Gem::Specification.new do |s| s.name = "rake".freeze - s.version = "11.0.0" + s.version = "11.0.1.20160309174104" s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] - s.date = "2016-02-10" + s.date = "2016-03-09" s.description = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are\nspecified in standard Ruby syntax.\n\nRake has the following features:\n\n* Rakefiles (rake's version of Makefiles) are completely defined in\n standard Ruby syntax. No XML files to edit. No quirky Makefile\n syntax to worry about (is that a tab or a space?)\n\n* Users can specify tasks with prerequisites.\n\n* Rake supports rule patterns to synthesize implicit tasks.\n\n* Flexible FileLists that act like arrays but know about manipulating\n file names and paths.\n\n* A library of prepackaged tasks to make building rakefiles easier. For example,\n tasks for building tarballs and publishing to FTP or SSH sites. (Formerly\n tasks for building RDoc and Gems were included in rake but they're now\n available in RDoc and RubyGems respectively.)\n\n* Supports parallel execution of tasks.".freeze s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] s.executables = ["rake".freeze] s.extra_rdoc_files = ["CONTRIBUTING.rdoc".freeze, "History.rdoc".freeze, "Manifest.txt".freeze, "README.rdoc".freeze, "doc/command_line_usage.rdoc".freeze, "doc/glossary.rdoc".freeze, "doc/proto_rake.rdoc".freeze, "doc/rakefile.rdoc".freeze, "doc/rational.rdoc".freeze, "doc/release_notes/rake-0.4.14.rdoc".freeze, "doc/release_notes/rake-0.4.15.rdoc".freeze, "doc/release_notes/rake-0.5.0.rdoc".freeze, "doc/release_notes/rake-0.5.3.rdoc".freeze, "doc/release_notes/rake-0.5.4.rdoc".freeze, "doc/release_notes/rake-0.6.0.rdoc".freeze, "doc/release_notes/rake-0.7.0.rdoc".freeze, "doc/release_notes/rake-0.7.1.rdoc".freeze, "doc/release_notes/rake-0.7.2.rdoc".freeze, "doc/release_notes/rake-0.7.3.rdoc".freeze, "doc/release_notes/rake-0.8.0.rdoc".freeze, "doc/release_notes/rake-0.8.2.rdoc".freeze, "doc/release_notes/rake-0.8.3.rdoc".freeze, "doc/release_notes/rake-0.8.4.rdoc".freeze, "doc/release_notes/rake-0.8.5.rdoc".freeze, "doc/release_notes/rake-0.8.6.rdoc".freeze, "doc/release_notes/rake-0.8.7.rdoc".freeze, "doc/release_notes/rake-0.9.0.rdoc".freeze, "doc/release_notes/rake-0.9.1.rdoc".freeze, "doc/release_notes/rake-0.9.2.2.rdoc".freeze, "doc/release_notes/rake-0.9.2.rdoc".freeze, "doc/release_notes/rake-0.9.3.rdoc".freeze, "doc/release_notes/rake-0.9.4.rdoc".freeze, "doc/release_notes/rake-0.9.5.rdoc".freeze, "doc/release_notes/rake-0.9.6.rdoc".freeze, "doc/release_notes/rake-10.0.0.rdoc".freeze, "doc/release_notes/rake-10.0.1.rdoc".freeze, "doc/release_notes/rake-10.0.2.rdoc".freeze, "doc/release_notes/rake-10.0.3.rdoc".freeze, "doc/release_notes/rake-10.1.0.rdoc".freeze, "MIT-LICENSE".freeze, "doc/command_line_usage.rdoc".freeze, "doc/glossary.rdoc".freeze, "doc/proto_rake.rdoc".freeze, "doc/rakefile.rdoc".freeze, "doc/rational.rdoc".freeze, "doc/release_notes/rake-0.4.14.rdoc".freeze, "doc/release_notes/rake-0.4.15.rdoc".freeze, "doc/release_notes/rake-0.5.0.rdoc".freeze, "doc/release_notes/rake-0.5.3.rdoc".freeze, "doc/release_notes/rake-0.5.4.rdoc".freeze, "doc/release_notes/rake-0.6.0.rdoc".freeze, "doc/release_notes/rake-0.7.0.rdoc".freeze, "doc/release_notes/rake-0.7.1.rdoc".freeze, "doc/release_notes/rake-0.7.2.rdoc".freeze, "doc/release_notes/rake-0.7.3.rdoc".freeze, "doc/release_notes/rake-0.8.0.rdoc".freeze, "doc/release_notes/rake-0.8.2.rdoc".freeze, "doc/release_notes/rake-0.8.3.rdoc".freeze, "doc/release_notes/rake-0.8.4.rdoc".freeze, "doc/release_notes/rake-0.8.5.rdoc".freeze, "doc/release_notes/rake-0.8.6.rdoc".freeze, "doc/release_notes/rake-0.8.7.rdoc".freeze, "doc/release_notes/rake-0.9.0.rdoc".freeze, "doc/release_notes/rake-0.9.1.rdoc".freeze, "doc/release_notes/rake-0.9.2.2.rdoc".freeze, "doc/release_notes/rake-0.9.2.rdoc".freeze, "doc/release_notes/rake-0.9.3.rdoc".freeze, "doc/release_notes/rake-0.9.4.rdoc".freeze, "doc/release_notes/rake-0.9.5.rdoc".freeze, "doc/release_notes/rake-0.9.6.rdoc".freeze, "doc/release_notes/rake-10.0.0.rdoc".freeze, "doc/release_notes/rake-10.0.1.rdoc".freeze, "doc/release_notes/rake-10.0.2.rdoc".freeze, "doc/release_notes/rake-10.0.3.rdoc".freeze, "doc/release_notes/rake-10.1.0.rdoc".freeze, "CONTRIBUTING.rdoc".freeze, "History.rdoc".freeze, "README.rdoc".freeze] - s.files = [".autotest".freeze, ".rubocop.yml".freeze, ".togglerc".freeze, "CONTRIBUTING.rdoc".freeze, "History.rdoc".freeze, "MIT-LICENSE".freeze, "Manifest.txt".freeze, "README.rdoc".freeze, "Rakefile".freeze, "bin/rake".freeze, "doc/command_line_usage.rdoc".freeze, "doc/example/Rakefile1".freeze, "doc/example/Rakefile2".freeze, "doc/example/a.c".freeze, "doc/example/b.c".freeze, "doc/example/main.c".freeze, "doc/glossary.rdoc".freeze, "doc/jamis.rb".freeze, "doc/proto_rake.rdoc".freeze, "doc/rake.1".freeze, "doc/rakefile.rdoc".freeze, "doc/rational.rdoc".freeze, "doc/release_notes/rake-0.4.14.rdoc".freeze, "doc/release_notes/rake-0.4.15.rdoc".freeze, "doc/release_notes/rake-0.5.0.rdoc".freeze, "doc/release_notes/rake-0.5.3.rdoc".freeze, "doc/release_notes/rake-0.5.4.rdoc".freeze, "doc/release_notes/rake-0.6.0.rdoc".freeze, "doc/release_notes/rake-0.7.0.rdoc".freeze, "doc/release_notes/rake-0.7.1.rdoc".freeze, "doc/release_notes/rake-0.7.2.rdoc".freeze, "doc/release_notes/rake-0.7.3.rdoc".freeze, "doc/release_notes/rake-0.8.0.rdoc".freeze, "doc/release_notes/rake-0.8.2.rdoc".freeze, "doc/release_notes/rake-0.8.3.rdoc".freeze, "doc/release_notes/rake-0.8.4.rdoc".freeze, "doc/release_notes/rake-0.8.5.rdoc".freeze, "doc/release_notes/rake-0.8.6.rdoc".freeze, "doc/release_notes/rake-0.8.7.rdoc".freeze, "doc/release_notes/rake-0.9.0.rdoc".freeze, "doc/release_notes/rake-0.9.1.rdoc".freeze, "doc/release_notes/rake-0.9.2.2.rdoc".freeze, "doc/release_notes/rake-0.9.2.rdoc".freeze, "doc/release_notes/rake-0.9.3.rdoc".freeze, "doc/release_notes/rake-0.9.4.rdoc".freeze, "doc/release_notes/rake-0.9.5.rdoc".freeze, "doc/release_notes/rake-0.9.6.rdoc".freeze, "doc/release_notes/rake-10.0.0.rdoc".freeze, "doc/release_notes/rake-10.0.1.rdoc".freeze, "doc/release_notes/rake-10.0.2.rdoc".freeze, "doc/release_notes/rake-10.0.3.rdoc".freeze, "doc/release_notes/rake-10.1.0.rdoc".freeze, "lib/rake.rb".freeze, "lib/rake/application.rb".freeze, "lib/rake/backtrace.rb".freeze, "lib/rake/clean.rb".freeze, "lib/rake/cloneable.rb".freeze, "lib/rake/contrib/.document".freeze, "lib/rake/contrib/compositepublisher.rb".freeze, "lib/rake/contrib/ftptools.rb".freeze, "lib/rake/contrib/publisher.rb".freeze, "lib/rake/contrib/sshpublisher.rb".freeze, "lib/rake/cpu_counter.rb".freeze, "lib/rake/default_loader.rb".freeze, "lib/rake/dsl_definition.rb".freeze, "lib/rake/early_time.rb".freeze, "lib/rake/ext/core.rb".freeze, "lib/rake/ext/pathname.rb".freeze, "lib/rake/ext/string.rb".freeze, "lib/rake/file_creation_task.rb".freeze, "lib/rake/file_list.rb".freeze, "lib/rake/file_task.rb".freeze, "lib/rake/file_utils.rb".freeze, "lib/rake/file_utils_ext.rb".freeze, "lib/rake/gempackagetask.rb".freeze, "lib/rake/invocation_chain.rb".freeze, "lib/rake/invocation_exception_mixin.rb".freeze, "lib/rake/late_time.rb".freeze, "lib/rake/linked_list.rb".freeze, "lib/rake/loaders/makefile.rb".freeze, "lib/rake/multi_task.rb".freeze, "lib/rake/name_space.rb".freeze, "lib/rake/packagetask.rb".freeze, "lib/rake/phony.rb".freeze, "lib/rake/private_reader.rb".freeze, "lib/rake/promise.rb".freeze, "lib/rake/pseudo_status.rb".freeze, "lib/rake/rake_module.rb".freeze, "lib/rake/rake_test_loader.rb".freeze, "lib/rake/rule_recursion_overflow_error.rb".freeze, "lib/rake/scope.rb".freeze, "lib/rake/task.rb".freeze, "lib/rake/task_argument_error.rb".freeze, "lib/rake/task_arguments.rb".freeze, "lib/rake/task_manager.rb".freeze, "lib/rake/tasklib.rb".freeze, "lib/rake/testtask.rb".freeze, "lib/rake/thread_history_display.rb".freeze, "lib/rake/thread_pool.rb".freeze, "lib/rake/trace_output.rb".freeze, "lib/rake/version.rb".freeze, "lib/rake/win32.rb".freeze, "rakelib/publish.rake".freeze, "rakelib/test_times.rake".freeze, "test/file_creation.rb".freeze, "test/helper.rb".freeze, "test/support/rakefile_definitions.rb".freeze, "test/support/ruby_runner.rb".freeze, "test/test_private_reader.rb".freeze, "test/test_rake.rb".freeze, "test/test_rake_application.rb".freeze, "test/test_rake_application_options.rb".freeze, "test/test_rake_backtrace.rb".freeze, "test/test_rake_clean.rb".freeze, "test/test_rake_cpu_counter.rb".freeze, "test/test_rake_definitions.rb".freeze, "test/test_rake_directory_task.rb".freeze, "test/test_rake_dsl.rb".freeze, "test/test_rake_early_time.rb".freeze, "test/test_rake_extension.rb".freeze, "test/test_rake_file_creation_task.rb".freeze, "test/test_rake_file_list.rb".freeze, "test/test_rake_file_list_path_map.rb".freeze, "test/test_rake_file_task.rb".freeze, "test/test_rake_file_utils.rb".freeze, "test/test_rake_ftp_file.rb".freeze, "test/test_rake_functional.rb".freeze, "test/test_rake_invocation_chain.rb".freeze, "test/test_rake_late_time.rb".freeze, "test/test_rake_linked_list.rb".freeze, "test/test_rake_makefile_loader.rb".freeze, "test/test_rake_multi_task.rb".freeze, "test/test_rake_name_space.rb".freeze, "test/test_rake_package_task.rb".freeze, "test/test_rake_path_map.rb".freeze, "test/test_rake_path_map_explode.rb".freeze, "test/test_rake_path_map_partial.rb".freeze, "test/test_rake_pathname_extensions.rb".freeze, "test/test_rake_pseudo_status.rb".freeze, "test/test_rake_rake_test_loader.rb".freeze, "test/test_rake_reduce_compat.rb".freeze, "test/test_rake_require.rb".freeze, "test/test_rake_rules.rb".freeze, "test/test_rake_scope.rb".freeze, "test/test_rake_task.rb".freeze, "test/test_rake_task_argument_parsing.rb".freeze, "test/test_rake_task_arguments.rb".freeze, "test/test_rake_task_lib.rb".freeze, "test/test_rake_task_manager.rb".freeze, "test/test_rake_task_manager_argument_resolution.rb".freeze, "test/test_rake_task_with_arguments.rb".freeze, "test/test_rake_test_task.rb".freeze, "test/test_rake_thread_pool.rb".freeze, "test/test_rake_top_level_functions.rb".freeze, "test/test_rake_win32.rb".freeze, "test/test_thread_history_display.rb".freeze, "test/test_trace_output.rb".freeze] + s.files = [".autotest".freeze, ".rubocop.yml".freeze, ".togglerc".freeze, "CONTRIBUTING.rdoc".freeze, "History.rdoc".freeze, "MIT-LICENSE".freeze, "Manifest.txt".freeze, "README.rdoc".freeze, "Rakefile".freeze, "bin/rake".freeze, "doc/command_line_usage.rdoc".freeze, "doc/example/Rakefile1".freeze, "doc/example/Rakefile2".freeze, "doc/example/a.c".freeze, "doc/example/b.c".freeze, "doc/example/main.c".freeze, "doc/glossary.rdoc".freeze, "doc/jamis.rb".freeze, "doc/proto_rake.rdoc".freeze, "doc/rake.1".freeze, "doc/rakefile.rdoc".freeze, "doc/rational.rdoc".freeze, "doc/release_notes/rake-0.4.14.rdoc".freeze, "doc/release_notes/rake-0.4.15.rdoc".freeze, "doc/release_notes/rake-0.5.0.rdoc".freeze, "doc/release_notes/rake-0.5.3.rdoc".freeze, "doc/release_notes/rake-0.5.4.rdoc".freeze, "doc/release_notes/rake-0.6.0.rdoc".freeze, "doc/release_notes/rake-0.7.0.rdoc".freeze, "doc/release_notes/rake-0.7.1.rdoc".freeze, "doc/release_notes/rake-0.7.2.rdoc".freeze, "doc/release_notes/rake-0.7.3.rdoc".freeze, "doc/release_notes/rake-0.8.0.rdoc".freeze, "doc/release_notes/rake-0.8.2.rdoc".freeze, "doc/release_notes/rake-0.8.3.rdoc".freeze, "doc/release_notes/rake-0.8.4.rdoc".freeze, "doc/release_notes/rake-0.8.5.rdoc".freeze, "doc/release_notes/rake-0.8.6.rdoc".freeze, "doc/release_notes/rake-0.8.7.rdoc".freeze, "doc/release_notes/rake-0.9.0.rdoc".freeze, "doc/release_notes/rake-0.9.1.rdoc".freeze, "doc/release_notes/rake-0.9.2.2.rdoc".freeze, "doc/release_notes/rake-0.9.2.rdoc".freeze, "doc/release_notes/rake-0.9.3.rdoc".freeze, "doc/release_notes/rake-0.9.4.rdoc".freeze, "doc/release_notes/rake-0.9.5.rdoc".freeze, "doc/release_notes/rake-0.9.6.rdoc".freeze, "doc/release_notes/rake-10.0.0.rdoc".freeze, "doc/release_notes/rake-10.0.1.rdoc".freeze, "doc/release_notes/rake-10.0.2.rdoc".freeze, "doc/release_notes/rake-10.0.3.rdoc".freeze, "doc/release_notes/rake-10.1.0.rdoc".freeze, "lib/rake.rb".freeze, "lib/rake/application.rb".freeze, "lib/rake/backtrace.rb".freeze, "lib/rake/clean.rb".freeze, "lib/rake/cloneable.rb".freeze, "lib/rake/contrib/.document".freeze, "lib/rake/contrib/compositepublisher.rb".freeze, "lib/rake/contrib/ftptools.rb".freeze, "lib/rake/contrib/sshpublisher.rb".freeze, "lib/rake/cpu_counter.rb".freeze, "lib/rake/default_loader.rb".freeze, "lib/rake/dsl_definition.rb".freeze, "lib/rake/early_time.rb".freeze, "lib/rake/ext/core.rb".freeze, "lib/rake/ext/fixnum.rb".freeze, "lib/rake/ext/pathname.rb".freeze, "lib/rake/ext/string.rb".freeze, "lib/rake/file_creation_task.rb".freeze, "lib/rake/file_list.rb".freeze, "lib/rake/file_task.rb".freeze, "lib/rake/file_utils.rb".freeze, "lib/rake/file_utils_ext.rb".freeze, "lib/rake/invocation_chain.rb".freeze, "lib/rake/invocation_exception_mixin.rb".freeze, "lib/rake/late_time.rb".freeze, "lib/rake/linked_list.rb".freeze, "lib/rake/loaders/makefile.rb".freeze, "lib/rake/multi_task.rb".freeze, "lib/rake/name_space.rb".freeze, "lib/rake/packagetask.rb".freeze, "lib/rake/phony.rb".freeze, "lib/rake/private_reader.rb".freeze, "lib/rake/promise.rb".freeze, "lib/rake/pseudo_status.rb".freeze, "lib/rake/rake_module.rb".freeze, "lib/rake/rake_test_loader.rb".freeze, "lib/rake/rule_recursion_overflow_error.rb".freeze, "lib/rake/scope.rb".freeze, "lib/rake/task.rb".freeze, "lib/rake/task_argument_error.rb".freeze, "lib/rake/task_arguments.rb".freeze, "lib/rake/task_manager.rb".freeze, "lib/rake/tasklib.rb".freeze, "lib/rake/testtask.rb".freeze, "lib/rake/thread_history_display.rb".freeze, "lib/rake/thread_pool.rb".freeze, "lib/rake/trace_output.rb".freeze, "lib/rake/version.rb".freeze, "lib/rake/win32.rb".freeze, "rakelib/test_times.rake".freeze, "test/file_creation.rb".freeze, "test/helper.rb".freeze, "test/support/rakefile_definitions.rb".freeze, "test/support/ruby_runner.rb".freeze, "test/test_private_reader.rb".freeze, "test/test_rake.rb".freeze, "test/test_rake_application.rb".freeze, "test/test_rake_application_options.rb".freeze, "test/test_rake_backtrace.rb".freeze, "test/test_rake_clean.rb".freeze, "test/test_rake_cpu_counter.rb".freeze, "test/test_rake_definitions.rb".freeze, "test/test_rake_directory_task.rb".freeze, "test/test_rake_dsl.rb".freeze, "test/test_rake_early_time.rb".freeze, "test/test_rake_extension.rb".freeze, "test/test_rake_file_creation_task.rb".freeze, "test/test_rake_file_list.rb".freeze, "test/test_rake_file_list_path_map.rb".freeze, "test/test_rake_file_task.rb".freeze, "test/test_rake_file_utils.rb".freeze, "test/test_rake_ftp_file.rb".freeze, "test/test_rake_functional.rb".freeze, "test/test_rake_invocation_chain.rb".freeze, "test/test_rake_late_time.rb".freeze, "test/test_rake_linked_list.rb".freeze, "test/test_rake_makefile_loader.rb".freeze, "test/test_rake_multi_task.rb".freeze, "test/test_rake_name_space.rb".freeze, "test/test_rake_package_task.rb".freeze, "test/test_rake_path_map.rb".freeze, "test/test_rake_path_map_explode.rb".freeze, "test/test_rake_path_map_partial.rb".freeze, "test/test_rake_pathname_extensions.rb".freeze, "test/test_rake_pseudo_status.rb".freeze, "test/test_rake_rake_test_loader.rb".freeze, "test/test_rake_reduce_compat.rb".freeze, "test/test_rake_require.rb".freeze, "test/test_rake_rules.rb".freeze, "test/test_rake_scope.rb".freeze, "test/test_rake_task.rb".freeze, "test/test_rake_task_argument_parsing.rb".freeze, "test/test_rake_task_arguments.rb".freeze, "test/test_rake_task_manager.rb".freeze, "test/test_rake_task_manager_argument_resolution.rb".freeze, "test/test_rake_task_with_arguments.rb".freeze, "test/test_rake_test_task.rb".freeze, "test/test_rake_thread_pool.rb".freeze, "test/test_rake_top_level_functions.rb".freeze, "test/test_rake_win32.rb".freeze, "test/test_thread_history_display.rb".freeze, "test/test_trace_output.rb".freeze] s.homepage = "https://github.com/ruby/rake".freeze s.licenses = ["MIT".freeze] s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] s.required_ruby_version = Gem::Requirement.new(">= 1.9.3".freeze) - s.rubygems_version = "2.5.2".freeze + s.rubygems_version = "2.6.1".freeze s.summary = "Rake is a Make-like program implemented in Ruby".freeze if s.respond_to? :specification_version then From 3948349a82a2522f1d8293093164ef395bee542d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 11 Mar 2016 12:11:37 +0900 Subject: [PATCH 441/813] Revert to removing `last_comment` and deprecate it --- lib/rake/task_manager.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 202a8a688..e13482401 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -5,6 +5,19 @@ module TaskManager # Track the last comment made in the Rakefile. attr_accessor :last_description + # Remove Rake 12 + def last_comment # :nodoc: + warn "[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead." + @last_description + end + + # Remove Rake 12 + def last_comment=(comment) # :nodoc: + warn "[DEPRECATION] `last_comment=` is deprecated. Please use `last_description=` instead." + @last_description = comment + @last_description # ignore warning + end + def initialize # :nodoc: super @tasks = Hash.new From ecffc935da65a285cf323872cdb05d8b20e71c63 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 11 Mar 2016 12:21:31 +0900 Subject: [PATCH 442/813] History --- History.rdoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/History.rdoc b/History.rdoc index 338361b1c..1c9cbabd6 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,8 @@ +=== 11.1.0 / 2016-03-11 + +Compatibility Changes: + * Revert to remove `last_comment`. It will remove Rake 12. + === 11.0.1 / 2016-03-09 Bug fixes: From 461cfcb0795dff750508871669621412375b6986 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 11 Mar 2016 12:29:33 +0900 Subject: [PATCH 443/813] bump version to 11.1.0 --- lib/rake.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake.rb b/lib/rake.rb index 5c547059f..6cf6e9464 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '11.0.1' + VERSION = '11.1.0' end require 'rake/version' From 88d4a578251b6080e2e11cd7620901e801227ac6 Mon Sep 17 00:00:00 2001 From: Tim Maslyuchenko Date: Sat, 12 Mar 2016 12:51:01 +0200 Subject: [PATCH 444/813] add possibility to specify test task prerequisites --- lib/rake/testtask.rb | 6 +++++- test/test_rake_test_task.rb | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 34bc66f90..b6107c879 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -69,6 +69,9 @@ class TestTask < TaskLib # Description of the test task. (default is 'Run tests') attr_accessor :description + # Task prerequisites. + attr_accessor :deps + # Explicitly define the list of test files to be included in a # test. +list+ is expected to be an array of file names (a # FileList is acceptable). If both +pattern+ and +test_files+ are @@ -89,6 +92,7 @@ def initialize(name=:test) @loader = :rake @ruby_opts = [] @description = "Run tests" + (@name == :test ? "" : " for #{@name}") + @deps = [] yield self if block_given? @pattern = 'test/test*.rb' if @pattern.nil? && @test_files.nil? define @@ -97,7 +101,7 @@ def initialize(name=:test) # Create the tasks defined by this task lib. def define desc @description - task @name do + task @name => Array(deps) do FileUtilsExt.verbose(@verbose) do args = "#{ruby_opts_string} #{run_code} " + diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index deceb77b4..4cee79ad1 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -12,6 +12,7 @@ def test_initialize assert_equal 'test/test*.rb', tt.pattern assert_equal false, tt.verbose assert_equal true, tt.warning + assert_equal [], tt.deps assert Task.task_defined?(:test) end @@ -22,6 +23,7 @@ def test_initialize_override t.pattern = 'test/tc_*.rb' t.warning = true t.verbose = true + t.deps = [:env] end refute_nil tt assert_equal "Run example tests", tt.description @@ -30,6 +32,7 @@ def test_initialize_override assert_equal 'test/tc_*.rb', tt.pattern assert_equal true, tt.warning assert_equal true, tt.verbose + assert_equal [:env], tt.deps assert_match(/-w/, tt.ruby_opts_string) assert_match(/--verbose/, tt.ruby_opts_string) assert Task.task_defined?(:example) @@ -128,4 +131,15 @@ def test_test_files_equals assert_equal ["a.rb", 'b.rb'], tt.file_list.to_a end + + def test_task_prerequisites + Rake::TestTask.new :parent + + Rake::TestTask.new :child do |t| + t.deps = :parent + end + + task = Rake::Task[:child] + assert_includes task.prerequisites, 'parent' + end end From 5fc4b4586e7fd02fdd46248dfaa878ca61e74387 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 14 Mar 2016 11:18:17 +0900 Subject: [PATCH 445/813] removed hoe-minitest for needless dependency --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 4a09f3918..04dfb4455 100644 --- a/Rakefile +++ b/Rakefile @@ -18,7 +18,6 @@ end require 'hoe' Hoe.plugin :git -Hoe.plugin :minitest Hoe.plugin :travis Hoe.plugin :gemspec @@ -56,6 +55,7 @@ hoe = Hoe.spec 'rake' do ] end +hoe.testlib = :minitest hoe.test_prelude = 'gem "minitest", "~> 5.0"' # Use custom rdoc task due to existence of doc directory From 0ae34ab592eda7af9e4549397c9b8726b5e7e2fd Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 14 Mar 2016 11:23:13 +0900 Subject: [PATCH 446/813] Use -W2 instead of --verbose for JRuby --- lib/rake/testtask.rb | 2 +- test/test_rake_test_task.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 34bc66f90..5cb3a1438 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -128,7 +128,7 @@ def ruby_opts_string # :nodoc: opts = @ruby_opts.dup opts.unshift("-I\"#{lib_path}\"") unless @libs.empty? opts.unshift("-w") if @warning - opts.unshift('--verbose') if @verbose + opts.unshift('-W2') if @verbose opts.join(" ") end diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index deceb77b4..7bdac7937 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -31,7 +31,7 @@ def test_initialize_override assert_equal true, tt.warning assert_equal true, tt.verbose assert_match(/-w/, tt.ruby_opts_string) - assert_match(/--verbose/, tt.ruby_opts_string) + assert_match(/-W2/, tt.ruby_opts_string) assert Task.task_defined?(:example) end From 29a7a70beb44bfc672de47c2f0604224a1d6f34d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 14 Mar 2016 12:34:35 +0900 Subject: [PATCH 447/813] removed 2 option. It's redundant. --- lib/rake/testtask.rb | 2 +- test/test_rake_test_task.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 5cb3a1438..231093be8 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -128,7 +128,7 @@ def ruby_opts_string # :nodoc: opts = @ruby_opts.dup opts.unshift("-I\"#{lib_path}\"") unless @libs.empty? opts.unshift("-w") if @warning - opts.unshift('-W2') if @verbose + opts.unshift('-W') if @verbose opts.join(" ") end diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 7bdac7937..e8c767d00 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -31,7 +31,7 @@ def test_initialize_override assert_equal true, tt.warning assert_equal true, tt.verbose assert_match(/-w/, tt.ruby_opts_string) - assert_match(/-W2/, tt.ruby_opts_string) + assert_match(/-W/, tt.ruby_opts_string) assert Task.task_defined?(:example) end From d49b5e09466c3ce760713d5f819a757d22d599fc Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 14 Mar 2016 13:13:26 +0900 Subject: [PATCH 448/813] History --- History.rdoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/History.rdoc b/History.rdoc index 1c9cbabd6..7c1f25277 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,10 @@ +=== 11.1.1 / 2016-03-14 + +Bug fixes: + +* Use `-W` instead of `--verbose` when Rake::TestTask#verbose enabled. + JRuby doesn't have `--verbose` option. + === 11.1.0 / 2016-03-11 Compatibility Changes: From 565e162bf5b4fe090a690e46eb542802196fdd15 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 14 Mar 2016 13:13:35 +0900 Subject: [PATCH 449/813] style --- History.rdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 7c1f25277..a067fef5c 100644 --- a/History.rdoc +++ b/History.rdoc @@ -8,7 +8,8 @@ Bug fixes: === 11.1.0 / 2016-03-11 Compatibility Changes: - * Revert to remove `last_comment`. It will remove Rake 12. + +* Revert to remove `last_comment`. It will remove Rake 12. === 11.0.1 / 2016-03-09 From bd8dfea74db2a5e53c4d43b6c1db339542a42b76 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 14 Mar 2016 13:14:13 +0900 Subject: [PATCH 450/813] bump version to 11.1.1 --- lib/rake.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake.rb b/lib/rake.rb index 6cf6e9464..1857fa853 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '11.1.0' + VERSION = '11.1.1' end require 'rake/version' From dbc4e93408b552aa27cd2ad88c0df9980c9136dd Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 20:33:55 +0900 Subject: [PATCH 451/813] removed hoe --- Rakefile | 70 ++++++++-------------------------------------------- rake.gemspec | 5 ++-- 2 files changed, 13 insertions(+), 62 deletions(-) diff --git a/Rakefile b/Rakefile index 04dfb4455..f719661c3 100644 --- a/Rakefile +++ b/Rakefile @@ -6,75 +6,25 @@ # This file may be distributed under an MIT style license. See # MIT-LICENSE for details. -require 'rbconfig' +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -system_rake = File.join RbConfig::CONFIG['rubylibdir'], 'rake.rb' +require 'bundler/gem_tasks' +require 'rake/testtask' -# Use our rake, not the installed rake from system -if $".include? system_rake or $".grep(/rake\/name_space\.rb$/).empty? then - exec Gem.ruby, '-Ilib', 'bin/rake', *ARGV +Rake::TestTask.new(:test) do |t| + t.libs << "test" + t.libs << "lib" + t.test_files = FileList['test/**/test_*.rb'] end -require 'hoe' - -Hoe.plugin :git -Hoe.plugin :travis -Hoe.plugin :gemspec - -hoe = Hoe.spec 'rake' do - developer 'Hiroshi SHIBATA', 'hsbt@ruby-lang.org' - developer 'Eric Hodel', 'drbrain@segment7.net' - developer 'Jim Weirich', '' - - require_ruby_version '>= 1.9.3' - require_rubygems_version '>= 1.3.2' - - dependency 'minitest', '~> 5.0', :developer - - license "MIT" - - self.readme_file = 'README.rdoc' - self.history_file = 'History.rdoc' - - self.extra_rdoc_files.concat FileList[ - 'MIT-LICENSE', - 'doc/**/*.rdoc', - '*.rdoc', - ] - - self.local_rdoc_dir = 'html' - self.rsync_args = '-avz --delete' - rdoc_locations << 'docs.seattlerb.org:/data/www/docs.seattlerb.org/rake/' - - self.clean_globs += [ - '**/*.o', - '**/*.rbc', - '*.dot', - 'TAGS', - 'doc/example/main', - ] -end - -hoe.testlib = :minitest -hoe.test_prelude = 'gem "minitest", "~> 5.0"' - -# Use custom rdoc task due to existence of doc directory - -Rake::Task['docs'].clear -Rake::Task['clobber_docs'].clear - begin require 'rdoc/task' RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc| - doc.main = hoe.readme_file + doc.main = 'README.md' doc.title = 'Rake -- Ruby Make' - - rdoc_files = Rake::FileList.new %w[lib History.rdoc MIT-LICENSE doc] - rdoc_files.add hoe.extra_rdoc_files - - doc.rdoc_files = rdoc_files - + doc.rdoc_files = Rake::FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc] doc.rdoc_dir = 'html' end rescue LoadError diff --git a/rake.gemspec b/rake.gemspec index 298bf1b55..0f63e9eb6 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -1,5 +1,6 @@ -# -*- encoding: utf-8 -*- -# stub: rake 11.0.1.20160309174104 ruby lib +# coding: utf-8 +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |s| s.name = "rake".freeze From 293fb28f16689303c03bc9a3ff40346d94b95650 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 20:34:33 +0900 Subject: [PATCH 452/813] fixed version --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index 0f63e9eb6..5d0871e50 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |s| s.name = "rake".freeze - s.version = "11.0.1.20160309174104" + s.version = "11.1.1" s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] From 0969b9dc6b9f3c60c5c2557e40d515cc74537843 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 20:35:58 +0900 Subject: [PATCH 453/813] fixed extname --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index f719661c3..d0f48dec1 100644 --- a/Rakefile +++ b/Rakefile @@ -22,7 +22,7 @@ begin require 'rdoc/task' RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc| - doc.main = 'README.md' + doc.main = 'README.rdoc' doc.title = 'Rake -- Ruby Make' doc.rdoc_files = Rake::FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc] doc.rdoc_dir = 'html' From a0d0914ecf0bd7c77e833c9f6cf372a2fe99473c Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 20:36:30 +0900 Subject: [PATCH 454/813] removed newb task --- Rakefile | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Rakefile b/Rakefile index d0f48dec1..0169044cd 100644 --- a/Rakefile +++ b/Rakefile @@ -11,6 +11,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'bundler/gem_tasks' require 'rake/testtask' +require 'rdoc/task' Rake::TestTask.new(:test) do |t| t.libs << "test" @@ -18,15 +19,9 @@ Rake::TestTask.new(:test) do |t| t.test_files = FileList['test/**/test_*.rb'] end -begin - require 'rdoc/task' - - RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc| - doc.main = 'README.rdoc' - doc.title = 'Rake -- Ruby Make' - doc.rdoc_files = Rake::FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc] - doc.rdoc_dir = 'html' - end -rescue LoadError - warn 'run `rake newb` to install rdoc' +RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc| + doc.main = 'README.rdoc' + doc.title = 'Rake -- Ruby Make' + doc.rdoc_files = Rake::FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc] + doc.rdoc_dir = 'html' end From 9ceca2feb08a0a772ffa22a49e155233a71debe8 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 20:37:12 +0900 Subject: [PATCH 455/813] rename rdoc tasks --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 0169044cd..f22f18534 100644 --- a/Rakefile +++ b/Rakefile @@ -19,7 +19,7 @@ Rake::TestTask.new(:test) do |t| t.test_files = FileList['test/**/test_*.rb'] end -RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc| +RDoc::Task.new do |doc| doc.main = 'README.rdoc' doc.title = 'Rake -- Ruby Make' doc.rdoc_files = Rake::FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc] From 0074fed5231880a679318518d6c0894d8866e2e8 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 20:43:37 +0900 Subject: [PATCH 456/813] removed needless namespace --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index f22f18534..9918fce7f 100644 --- a/Rakefile +++ b/Rakefile @@ -22,6 +22,6 @@ end RDoc::Task.new do |doc| doc.main = 'README.rdoc' doc.title = 'Rake -- Ruby Make' - doc.rdoc_files = Rake::FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc] + doc.rdoc_files = FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc] doc.rdoc_dir = 'html' end From c676d8e607f1e63fd4e94213db895ef577566ec6 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 20:44:00 +0900 Subject: [PATCH 457/813] removed hoe --- rake.gemspec | 3 --- 1 file changed, 3 deletions(-) diff --git a/rake.gemspec b/rake.gemspec index 5d0871e50..a872eb961 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -28,15 +28,12 @@ Gem::Specification.new do |s| if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_development_dependency(%q.freeze, ["~> 5.8"]) s.add_development_dependency(%q.freeze, ["~> 4.0"]) - s.add_development_dependency(%q.freeze, ["~> 3.14"]) else s.add_dependency(%q.freeze, ["~> 5.8"]) s.add_dependency(%q.freeze, ["~> 4.0"]) - s.add_dependency(%q.freeze, ["~> 3.14"]) end else s.add_dependency(%q.freeze, ["~> 5.8"]) s.add_dependency(%q.freeze, ["~> 4.0"]) - s.add_dependency(%q.freeze, ["~> 3.14"]) end end From 6b82c611c235a1d6ee485487ec5f471d5f590d87 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 20:51:42 +0900 Subject: [PATCH 458/813] update gemspec --- {bin => exe}/rake | 0 rake.gemspec | 38 ++++++++++++++------------------------ 2 files changed, 14 insertions(+), 24 deletions(-) rename {bin => exe}/rake (100%) diff --git a/bin/rake b/exe/rake similarity index 100% rename from bin/rake rename to exe/rake diff --git a/rake.gemspec b/rake.gemspec index a872eb961..fbe487b41 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -5,35 +5,25 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |s| s.name = "rake".freeze s.version = "11.1.1" - - s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) if s.respond_to? :required_rubygems_version= - s.require_paths = ["lib".freeze] - s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] s.date = "2016-03-09" - s.description = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are\nspecified in standard Ruby syntax.\n\nRake has the following features:\n\n* Rakefiles (rake's version of Makefiles) are completely defined in\n standard Ruby syntax. No XML files to edit. No quirky Makefile\n syntax to worry about (is that a tab or a space?)\n\n* Users can specify tasks with prerequisites.\n\n* Rake supports rule patterns to synthesize implicit tasks.\n\n* Flexible FileLists that act like arrays but know about manipulating\n file names and paths.\n\n* A library of prepackaged tasks to make building rakefiles easier. For example,\n tasks for building tarballs and publishing to FTP or SSH sites. (Formerly\n tasks for building RDoc and Gems were included in rake but they're now\n available in RDoc and RubyGems respectively.)\n\n* Supports parallel execution of tasks.".freeze + s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] - s.executables = ["rake".freeze] - s.extra_rdoc_files = ["CONTRIBUTING.rdoc".freeze, "History.rdoc".freeze, "Manifest.txt".freeze, "README.rdoc".freeze, "doc/command_line_usage.rdoc".freeze, "doc/glossary.rdoc".freeze, "doc/proto_rake.rdoc".freeze, "doc/rakefile.rdoc".freeze, "doc/rational.rdoc".freeze, "doc/release_notes/rake-0.4.14.rdoc".freeze, "doc/release_notes/rake-0.4.15.rdoc".freeze, "doc/release_notes/rake-0.5.0.rdoc".freeze, "doc/release_notes/rake-0.5.3.rdoc".freeze, "doc/release_notes/rake-0.5.4.rdoc".freeze, "doc/release_notes/rake-0.6.0.rdoc".freeze, "doc/release_notes/rake-0.7.0.rdoc".freeze, "doc/release_notes/rake-0.7.1.rdoc".freeze, "doc/release_notes/rake-0.7.2.rdoc".freeze, "doc/release_notes/rake-0.7.3.rdoc".freeze, "doc/release_notes/rake-0.8.0.rdoc".freeze, "doc/release_notes/rake-0.8.2.rdoc".freeze, "doc/release_notes/rake-0.8.3.rdoc".freeze, "doc/release_notes/rake-0.8.4.rdoc".freeze, "doc/release_notes/rake-0.8.5.rdoc".freeze, "doc/release_notes/rake-0.8.6.rdoc".freeze, "doc/release_notes/rake-0.8.7.rdoc".freeze, "doc/release_notes/rake-0.9.0.rdoc".freeze, "doc/release_notes/rake-0.9.1.rdoc".freeze, "doc/release_notes/rake-0.9.2.2.rdoc".freeze, "doc/release_notes/rake-0.9.2.rdoc".freeze, "doc/release_notes/rake-0.9.3.rdoc".freeze, "doc/release_notes/rake-0.9.4.rdoc".freeze, "doc/release_notes/rake-0.9.5.rdoc".freeze, "doc/release_notes/rake-0.9.6.rdoc".freeze, "doc/release_notes/rake-10.0.0.rdoc".freeze, "doc/release_notes/rake-10.0.1.rdoc".freeze, "doc/release_notes/rake-10.0.2.rdoc".freeze, "doc/release_notes/rake-10.0.3.rdoc".freeze, "doc/release_notes/rake-10.1.0.rdoc".freeze, "MIT-LICENSE".freeze, "doc/command_line_usage.rdoc".freeze, "doc/glossary.rdoc".freeze, "doc/proto_rake.rdoc".freeze, "doc/rakefile.rdoc".freeze, "doc/rational.rdoc".freeze, "doc/release_notes/rake-0.4.14.rdoc".freeze, "doc/release_notes/rake-0.4.15.rdoc".freeze, "doc/release_notes/rake-0.5.0.rdoc".freeze, "doc/release_notes/rake-0.5.3.rdoc".freeze, "doc/release_notes/rake-0.5.4.rdoc".freeze, "doc/release_notes/rake-0.6.0.rdoc".freeze, "doc/release_notes/rake-0.7.0.rdoc".freeze, "doc/release_notes/rake-0.7.1.rdoc".freeze, "doc/release_notes/rake-0.7.2.rdoc".freeze, "doc/release_notes/rake-0.7.3.rdoc".freeze, "doc/release_notes/rake-0.8.0.rdoc".freeze, "doc/release_notes/rake-0.8.2.rdoc".freeze, "doc/release_notes/rake-0.8.3.rdoc".freeze, "doc/release_notes/rake-0.8.4.rdoc".freeze, "doc/release_notes/rake-0.8.5.rdoc".freeze, "doc/release_notes/rake-0.8.6.rdoc".freeze, "doc/release_notes/rake-0.8.7.rdoc".freeze, "doc/release_notes/rake-0.9.0.rdoc".freeze, "doc/release_notes/rake-0.9.1.rdoc".freeze, "doc/release_notes/rake-0.9.2.2.rdoc".freeze, "doc/release_notes/rake-0.9.2.rdoc".freeze, "doc/release_notes/rake-0.9.3.rdoc".freeze, "doc/release_notes/rake-0.9.4.rdoc".freeze, "doc/release_notes/rake-0.9.5.rdoc".freeze, "doc/release_notes/rake-0.9.6.rdoc".freeze, "doc/release_notes/rake-10.0.0.rdoc".freeze, "doc/release_notes/rake-10.0.1.rdoc".freeze, "doc/release_notes/rake-10.0.2.rdoc".freeze, "doc/release_notes/rake-10.0.3.rdoc".freeze, "doc/release_notes/rake-10.1.0.rdoc".freeze, "CONTRIBUTING.rdoc".freeze, "History.rdoc".freeze, "README.rdoc".freeze] - s.files = [".autotest".freeze, ".rubocop.yml".freeze, ".togglerc".freeze, "CONTRIBUTING.rdoc".freeze, "History.rdoc".freeze, "MIT-LICENSE".freeze, "Manifest.txt".freeze, "README.rdoc".freeze, "Rakefile".freeze, "bin/rake".freeze, "doc/command_line_usage.rdoc".freeze, "doc/example/Rakefile1".freeze, "doc/example/Rakefile2".freeze, "doc/example/a.c".freeze, "doc/example/b.c".freeze, "doc/example/main.c".freeze, "doc/glossary.rdoc".freeze, "doc/jamis.rb".freeze, "doc/proto_rake.rdoc".freeze, "doc/rake.1".freeze, "doc/rakefile.rdoc".freeze, "doc/rational.rdoc".freeze, "doc/release_notes/rake-0.4.14.rdoc".freeze, "doc/release_notes/rake-0.4.15.rdoc".freeze, "doc/release_notes/rake-0.5.0.rdoc".freeze, "doc/release_notes/rake-0.5.3.rdoc".freeze, "doc/release_notes/rake-0.5.4.rdoc".freeze, "doc/release_notes/rake-0.6.0.rdoc".freeze, "doc/release_notes/rake-0.7.0.rdoc".freeze, "doc/release_notes/rake-0.7.1.rdoc".freeze, "doc/release_notes/rake-0.7.2.rdoc".freeze, "doc/release_notes/rake-0.7.3.rdoc".freeze, "doc/release_notes/rake-0.8.0.rdoc".freeze, "doc/release_notes/rake-0.8.2.rdoc".freeze, "doc/release_notes/rake-0.8.3.rdoc".freeze, "doc/release_notes/rake-0.8.4.rdoc".freeze, "doc/release_notes/rake-0.8.5.rdoc".freeze, "doc/release_notes/rake-0.8.6.rdoc".freeze, "doc/release_notes/rake-0.8.7.rdoc".freeze, "doc/release_notes/rake-0.9.0.rdoc".freeze, "doc/release_notes/rake-0.9.1.rdoc".freeze, "doc/release_notes/rake-0.9.2.2.rdoc".freeze, "doc/release_notes/rake-0.9.2.rdoc".freeze, "doc/release_notes/rake-0.9.3.rdoc".freeze, "doc/release_notes/rake-0.9.4.rdoc".freeze, "doc/release_notes/rake-0.9.5.rdoc".freeze, "doc/release_notes/rake-0.9.6.rdoc".freeze, "doc/release_notes/rake-10.0.0.rdoc".freeze, "doc/release_notes/rake-10.0.1.rdoc".freeze, "doc/release_notes/rake-10.0.2.rdoc".freeze, "doc/release_notes/rake-10.0.3.rdoc".freeze, "doc/release_notes/rake-10.1.0.rdoc".freeze, "lib/rake.rb".freeze, "lib/rake/application.rb".freeze, "lib/rake/backtrace.rb".freeze, "lib/rake/clean.rb".freeze, "lib/rake/cloneable.rb".freeze, "lib/rake/contrib/.document".freeze, "lib/rake/contrib/compositepublisher.rb".freeze, "lib/rake/contrib/ftptools.rb".freeze, "lib/rake/contrib/sshpublisher.rb".freeze, "lib/rake/cpu_counter.rb".freeze, "lib/rake/default_loader.rb".freeze, "lib/rake/dsl_definition.rb".freeze, "lib/rake/early_time.rb".freeze, "lib/rake/ext/core.rb".freeze, "lib/rake/ext/fixnum.rb".freeze, "lib/rake/ext/pathname.rb".freeze, "lib/rake/ext/string.rb".freeze, "lib/rake/file_creation_task.rb".freeze, "lib/rake/file_list.rb".freeze, "lib/rake/file_task.rb".freeze, "lib/rake/file_utils.rb".freeze, "lib/rake/file_utils_ext.rb".freeze, "lib/rake/invocation_chain.rb".freeze, "lib/rake/invocation_exception_mixin.rb".freeze, "lib/rake/late_time.rb".freeze, "lib/rake/linked_list.rb".freeze, "lib/rake/loaders/makefile.rb".freeze, "lib/rake/multi_task.rb".freeze, "lib/rake/name_space.rb".freeze, "lib/rake/packagetask.rb".freeze, "lib/rake/phony.rb".freeze, "lib/rake/private_reader.rb".freeze, "lib/rake/promise.rb".freeze, "lib/rake/pseudo_status.rb".freeze, "lib/rake/rake_module.rb".freeze, "lib/rake/rake_test_loader.rb".freeze, "lib/rake/rule_recursion_overflow_error.rb".freeze, "lib/rake/scope.rb".freeze, "lib/rake/task.rb".freeze, "lib/rake/task_argument_error.rb".freeze, "lib/rake/task_arguments.rb".freeze, "lib/rake/task_manager.rb".freeze, "lib/rake/tasklib.rb".freeze, "lib/rake/testtask.rb".freeze, "lib/rake/thread_history_display.rb".freeze, "lib/rake/thread_pool.rb".freeze, "lib/rake/trace_output.rb".freeze, "lib/rake/version.rb".freeze, "lib/rake/win32.rb".freeze, "rakelib/test_times.rake".freeze, "test/file_creation.rb".freeze, "test/helper.rb".freeze, "test/support/rakefile_definitions.rb".freeze, "test/support/ruby_runner.rb".freeze, "test/test_private_reader.rb".freeze, "test/test_rake.rb".freeze, "test/test_rake_application.rb".freeze, "test/test_rake_application_options.rb".freeze, "test/test_rake_backtrace.rb".freeze, "test/test_rake_clean.rb".freeze, "test/test_rake_cpu_counter.rb".freeze, "test/test_rake_definitions.rb".freeze, "test/test_rake_directory_task.rb".freeze, "test/test_rake_dsl.rb".freeze, "test/test_rake_early_time.rb".freeze, "test/test_rake_extension.rb".freeze, "test/test_rake_file_creation_task.rb".freeze, "test/test_rake_file_list.rb".freeze, "test/test_rake_file_list_path_map.rb".freeze, "test/test_rake_file_task.rb".freeze, "test/test_rake_file_utils.rb".freeze, "test/test_rake_ftp_file.rb".freeze, "test/test_rake_functional.rb".freeze, "test/test_rake_invocation_chain.rb".freeze, "test/test_rake_late_time.rb".freeze, "test/test_rake_linked_list.rb".freeze, "test/test_rake_makefile_loader.rb".freeze, "test/test_rake_multi_task.rb".freeze, "test/test_rake_name_space.rb".freeze, "test/test_rake_package_task.rb".freeze, "test/test_rake_path_map.rb".freeze, "test/test_rake_path_map_explode.rb".freeze, "test/test_rake_path_map_partial.rb".freeze, "test/test_rake_pathname_extensions.rb".freeze, "test/test_rake_pseudo_status.rb".freeze, "test/test_rake_rake_test_loader.rb".freeze, "test/test_rake_reduce_compat.rb".freeze, "test/test_rake_require.rb".freeze, "test/test_rake_rules.rb".freeze, "test/test_rake_scope.rb".freeze, "test/test_rake_task.rb".freeze, "test/test_rake_task_argument_parsing.rb".freeze, "test/test_rake_task_arguments.rb".freeze, "test/test_rake_task_manager.rb".freeze, "test/test_rake_task_manager_argument_resolution.rb".freeze, "test/test_rake_task_with_arguments.rb".freeze, "test/test_rake_test_task.rb".freeze, "test/test_rake_thread_pool.rb".freeze, "test/test_rake_top_level_functions.rb".freeze, "test/test_rake_win32.rb".freeze, "test/test_thread_history_display.rb".freeze, "test/test_trace_output.rb".freeze] + + s.summary = "Rake is a Make-like program implemented in Ruby".freeze + s.description = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are\nspecified in standard Ruby syntax.\n\nRake has the following features:\n\n* Rakefiles (rake's version of Makefiles) are completely defined in\n standard Ruby syntax. No XML files to edit. No quirky Makefile\n syntax to worry about (is that a tab or a space?)\n\n* Users can specify tasks with prerequisites.\n\n* Rake supports rule patterns to synthesize implicit tasks.\n\n* Flexible FileLists that act like arrays but know about manipulating\n file names and paths.\n\n* A library of prepackaged tasks to make building rakefiles easier. For example,\n tasks for building tarballs and publishing to FTP or SSH sites. (Formerly\n tasks for building RDoc and Gems were included in rake but they're now\n available in RDoc and RubyGems respectively.)\n\n* Supports parallel execution of tasks.".freeze s.homepage = "https://github.com/ruby/rake".freeze s.licenses = ["MIT".freeze] - s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] + + s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + s.bindir = "exe" + s.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + s.require_paths = ["lib".freeze] + s.required_ruby_version = Gem::Requirement.new(">= 1.9.3".freeze) s.rubygems_version = "2.6.1".freeze - s.summary = "Rake is a Make-like program implemented in Ruby".freeze - - if s.respond_to? :specification_version then - s.specification_version = 4 + s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) if s.respond_to? :required_rubygems_version= + s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_development_dependency(%q.freeze, ["~> 5.8"]) - s.add_development_dependency(%q.freeze, ["~> 4.0"]) - else - s.add_dependency(%q.freeze, ["~> 5.8"]) - s.add_dependency(%q.freeze, ["~> 4.0"]) - end - else - s.add_dependency(%q.freeze, ["~> 5.8"]) - s.add_dependency(%q.freeze, ["~> 4.0"]) - end + s.add_dependency(%q.freeze, ["~> 5.8"]) + s.add_dependency(%q.freeze, ["~> 4.0"]) end From 30fbe290236cbb968cbc8172a216a6900dd12f95 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 20:55:55 +0900 Subject: [PATCH 459/813] fixed variable name for bundler template --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index fbe487b41..fc0f581df 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } s.bindir = "exe" - s.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) } s.require_paths = ["lib".freeze] s.required_ruby_version = Gem::Requirement.new(">= 1.9.3".freeze) From e9e5c7bf28f70839da66cec8826c19a0be5d0441 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 20:56:13 +0900 Subject: [PATCH 460/813] import bundler template --- bin/console | 14 ++++++++++++++ bin/setup | 8 ++++++++ 2 files changed, 22 insertions(+) create mode 100755 bin/console create mode 100755 bin/setup diff --git a/bin/console b/bin/console new file mode 100755 index 000000000..220ce0558 --- /dev/null +++ b/bin/console @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby + +require "bundler/setup" +require "rake" + +# You can add fixtures and/or initialization code here to make experimenting +# with your gem easier. You can also use a different console, if you like. + +# (If you use this, don't forget to add pry to your Gemfile!) +# require "pry" +# Pry.start + +require "irb" +IRB.start diff --git a/bin/setup b/bin/setup new file mode 100755 index 000000000..dce67d860 --- /dev/null +++ b/bin/setup @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' +set -vx + +bundle install + +# Do any other automated setup that you need to do here From cd24b69d5bfe3f2684171aec0f44561a8da5329b Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 20:56:22 +0900 Subject: [PATCH 461/813] create Gemfile --- Gemfile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Gemfile diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..fa75df156 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gemspec From 4ef4820666a7b2f5e7559f24c1f133930fc5a182 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 20:57:06 +0900 Subject: [PATCH 462/813] update travis configuration --- .travis.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index df1c39760..c232d2e17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,5 @@ ---- -after_script: -- ruby -Ilib bin/rake travis:after -t -before_script: -- gem install hoe-travis --no-document -- gem install minitest -v '~> 5.0' --no-document -- ruby -Ilib bin/rake travis:before -t -- unset JRUBY_OPTS language: ruby sudo: false -notifications: - email: - - drbrain@segment7.net rvm: - 1.9.3 - 2.0.0 @@ -22,4 +11,9 @@ rvm: - jruby-9.0.5.0 - jruby-head - rbx-2 +before_script: +- unset JRUBY_OPTS script: ruby -Ilib bin/rake +notifications: + email: + - drbrain@segment7.net From 45397422495eca9041a21e4e365695485a803376 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 21:14:44 +0900 Subject: [PATCH 463/813] style --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c232d2e17..5fa827aaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ rvm: - jruby-head - rbx-2 before_script: -- unset JRUBY_OPTS + - unset JRUBY_OPTS script: ruby -Ilib bin/rake notifications: email: From 2852ed9871602ab3d32224c0c61a3a1af8a39015 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 21:16:16 +0900 Subject: [PATCH 464/813] removed hoe from appveyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 681b2a387..367a6f09b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,7 +6,7 @@ install: - ruby --version - gem update --system - gem --version - - gem install hoe minitest --no-document + - gem install minitest --no-document build_script: - net user - net localgroup From 4eef593834f9a264f3542ad7895aeb49daee9b94 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 21:35:00 +0900 Subject: [PATCH 465/813] removed hoe Manifest --- Manifest.txt | 154 --------------------------------------------------- 1 file changed, 154 deletions(-) delete mode 100644 Manifest.txt diff --git a/Manifest.txt b/Manifest.txt deleted file mode 100644 index 3cbf6195d..000000000 --- a/Manifest.txt +++ /dev/null @@ -1,154 +0,0 @@ -.autotest -.rubocop.yml -.togglerc -CONTRIBUTING.rdoc -History.rdoc -MIT-LICENSE -Manifest.txt -README.rdoc -Rakefile -bin/rake -doc/command_line_usage.rdoc -doc/example/Rakefile1 -doc/example/Rakefile2 -doc/example/a.c -doc/example/b.c -doc/example/main.c -doc/glossary.rdoc -doc/jamis.rb -doc/proto_rake.rdoc -doc/rake.1 -doc/rakefile.rdoc -doc/rational.rdoc -doc/release_notes/rake-0.4.14.rdoc -doc/release_notes/rake-0.4.15.rdoc -doc/release_notes/rake-0.5.0.rdoc -doc/release_notes/rake-0.5.3.rdoc -doc/release_notes/rake-0.5.4.rdoc -doc/release_notes/rake-0.6.0.rdoc -doc/release_notes/rake-0.7.0.rdoc -doc/release_notes/rake-0.7.1.rdoc -doc/release_notes/rake-0.7.2.rdoc -doc/release_notes/rake-0.7.3.rdoc -doc/release_notes/rake-0.8.0.rdoc -doc/release_notes/rake-0.8.2.rdoc -doc/release_notes/rake-0.8.3.rdoc -doc/release_notes/rake-0.8.4.rdoc -doc/release_notes/rake-0.8.5.rdoc -doc/release_notes/rake-0.8.6.rdoc -doc/release_notes/rake-0.8.7.rdoc -doc/release_notes/rake-0.9.0.rdoc -doc/release_notes/rake-0.9.1.rdoc -doc/release_notes/rake-0.9.2.2.rdoc -doc/release_notes/rake-0.9.2.rdoc -doc/release_notes/rake-0.9.3.rdoc -doc/release_notes/rake-0.9.4.rdoc -doc/release_notes/rake-0.9.5.rdoc -doc/release_notes/rake-0.9.6.rdoc -doc/release_notes/rake-10.0.0.rdoc -doc/release_notes/rake-10.0.1.rdoc -doc/release_notes/rake-10.0.2.rdoc -doc/release_notes/rake-10.0.3.rdoc -doc/release_notes/rake-10.1.0.rdoc -lib/rake.rb -lib/rake/application.rb -lib/rake/backtrace.rb -lib/rake/clean.rb -lib/rake/cloneable.rb -lib/rake/contrib/.document -lib/rake/contrib/compositepublisher.rb -lib/rake/contrib/ftptools.rb -lib/rake/contrib/sshpublisher.rb -lib/rake/cpu_counter.rb -lib/rake/default_loader.rb -lib/rake/dsl_definition.rb -lib/rake/early_time.rb -lib/rake/ext/core.rb -lib/rake/ext/fixnum.rb -lib/rake/ext/pathname.rb -lib/rake/ext/string.rb -lib/rake/file_creation_task.rb -lib/rake/file_list.rb -lib/rake/file_task.rb -lib/rake/file_utils.rb -lib/rake/file_utils_ext.rb -lib/rake/invocation_chain.rb -lib/rake/invocation_exception_mixin.rb -lib/rake/late_time.rb -lib/rake/linked_list.rb -lib/rake/loaders/makefile.rb -lib/rake/multi_task.rb -lib/rake/name_space.rb -lib/rake/packagetask.rb -lib/rake/phony.rb -lib/rake/private_reader.rb -lib/rake/promise.rb -lib/rake/pseudo_status.rb -lib/rake/rake_module.rb -lib/rake/rake_test_loader.rb -lib/rake/rule_recursion_overflow_error.rb -lib/rake/scope.rb -lib/rake/task.rb -lib/rake/task_argument_error.rb -lib/rake/task_arguments.rb -lib/rake/task_manager.rb -lib/rake/tasklib.rb -lib/rake/testtask.rb -lib/rake/thread_history_display.rb -lib/rake/thread_pool.rb -lib/rake/trace_output.rb -lib/rake/version.rb -lib/rake/win32.rb -rakelib/test_times.rake -test/file_creation.rb -test/helper.rb -test/support/rakefile_definitions.rb -test/support/ruby_runner.rb -test/test_private_reader.rb -test/test_rake.rb -test/test_rake_application.rb -test/test_rake_application_options.rb -test/test_rake_backtrace.rb -test/test_rake_clean.rb -test/test_rake_cpu_counter.rb -test/test_rake_definitions.rb -test/test_rake_directory_task.rb -test/test_rake_dsl.rb -test/test_rake_early_time.rb -test/test_rake_extension.rb -test/test_rake_file_creation_task.rb -test/test_rake_file_list.rb -test/test_rake_file_list_path_map.rb -test/test_rake_file_task.rb -test/test_rake_file_utils.rb -test/test_rake_ftp_file.rb -test/test_rake_functional.rb -test/test_rake_invocation_chain.rb -test/test_rake_late_time.rb -test/test_rake_linked_list.rb -test/test_rake_makefile_loader.rb -test/test_rake_multi_task.rb -test/test_rake_name_space.rb -test/test_rake_package_task.rb -test/test_rake_path_map.rb -test/test_rake_path_map_explode.rb -test/test_rake_path_map_partial.rb -test/test_rake_pathname_extensions.rb -test/test_rake_pseudo_status.rb -test/test_rake_rake_test_loader.rb -test/test_rake_reduce_compat.rb -test/test_rake_require.rb -test/test_rake_rules.rb -test/test_rake_scope.rb -test/test_rake_task.rb -test/test_rake_task_argument_parsing.rb -test/test_rake_task_arguments.rb -test/test_rake_task_manager.rb -test/test_rake_task_manager_argument_resolution.rb -test/test_rake_task_with_arguments.rb -test/test_rake_test_task.rb -test/test_rake_thread_pool.rb -test/test_rake_top_level_functions.rb -test/test_rake_win32.rb -test/test_thread_history_display.rb -test/test_trace_output.rb From 4134b91035a5356b35e72a71e010f30598f50115 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 21:35:51 +0900 Subject: [PATCH 466/813] use exe directory --- .travis.yml | 2 +- appveyor.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5fa827aaf..8ee47f1e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ rvm: - rbx-2 before_script: - unset JRUBY_OPTS -script: ruby -Ilib bin/rake +script: ruby -Ilib exe/rake notifications: email: - drbrain@segment7.net diff --git a/appveyor.yml b/appveyor.yml index 367a6f09b..2710426ad 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,7 +11,7 @@ build_script: - net user - net localgroup test_script: - - ruby -Ilib bin/rake + - ruby -Ilib exe/rake environment: matrix: From 544fe2c4901396a4db0e4c3e0215d8e1c584bc4a Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 21:43:16 +0900 Subject: [PATCH 467/813] added default task --- Rakefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Rakefile b/Rakefile index 9918fce7f..99a108ecb 100644 --- a/Rakefile +++ b/Rakefile @@ -25,3 +25,5 @@ RDoc::Task.new do |doc| doc.rdoc_files = FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc] doc.rdoc_dir = 'html' end + +task :default => :test From a83b2e133f087c4b6d70be2d3b28bcd930e34da4 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 21:44:51 +0900 Subject: [PATCH 468/813] use exe directory --- test/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index ab3416314..e07fb947d 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -41,7 +41,7 @@ def setup @verbose = ENV['VERBOSE'] - @rake_exec = File.join @rake_root, 'bin', 'rake' + @rake_exec = File.join @rake_root, 'exe', 'rake' @rake_lib = File.join @rake_root, 'lib' @ruby_options = ["-I#{@rake_lib}", "-I."] From 54fbae30945af52e9f2e03307e36de02a1d8c6e4 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 22:21:15 +0900 Subject: [PATCH 469/813] use latest bundler --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8ee47f1e1..65e77cbc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,8 @@ rvm: - jruby-9.0.5.0 - jruby-head - rbx-2 +before_install: + - gem install bundler --no-document before_script: - unset JRUBY_OPTS script: ruby -Ilib exe/rake From 1aaeb6cf03eb4a194bce0756b22f0595ce08b615 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 15 Mar 2016 23:17:26 +0900 Subject: [PATCH 470/813] added workaround for JRuby 1.7 --- test/test_rake_require.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_rake_require.rb b/test/test_rake_require.rb index d229edbc2..80b5f0f1c 100644 --- a/test/test_rake_require.rb +++ b/test/test_rake_require.rb @@ -1,6 +1,10 @@ require File.expand_path('../helper', __FILE__) class TestRakeRequire < Rake::TestCase + def setup + super + $LOAD_PATH.unshift '.' if jruby17? + end def test_can_load_rake_library rakefile_rakelib @@ -37,4 +41,3 @@ def test_throws_error_if_library_not_found assert_match(/testx/, ex.message) end end - From 30175c7bc9ab9b5579440dab221a07e3fd865617 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 16 Mar 2016 11:12:26 +0900 Subject: [PATCH 471/813] added dependency of gem release task --- rake.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/rake.gemspec b/rake.gemspec index fc0f581df..0fc6fcadb 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -24,6 +24,7 @@ Gem::Specification.new do |s| s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) if s.respond_to? :required_rubygems_version= s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] + s.add_dependency(%q.freeze, ["~> 1.11"]) s.add_dependency(%q.freeze, ["~> 5.8"]) s.add_dependency(%q.freeze, ["~> 4.0"]) end From 2d3e8ce47cc73715067ed318aa813d311ff5234f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 16 Mar 2016 11:13:35 +0900 Subject: [PATCH 472/813] use development_dependency --- rake.gemspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rake.gemspec b/rake.gemspec index 0fc6fcadb..8e82a357f 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |s| s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) if s.respond_to? :required_rubygems_version= s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] - s.add_dependency(%q.freeze, ["~> 1.11"]) - s.add_dependency(%q.freeze, ["~> 5.8"]) - s.add_dependency(%q.freeze, ["~> 4.0"]) + s.add_development_dependency(%q.freeze, ["~> 1.11"]) + s.add_development_dependency(%q.freeze, ["~> 5.8"]) + s.add_development_dependency(%q.freeze, ["~> 4.0"]) end From 752cbe90374c4258688e882b31ec3c94b95b7060 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 16 Mar 2016 11:14:18 +0900 Subject: [PATCH 473/813] update release date --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index 8e82a357f..cc70a32a3 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |s| s.name = "rake".freeze s.version = "11.1.1" - s.date = "2016-03-09" + s.date = "2016-03-14" s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] From 7b54132963cdf54f0af2cd20101dbdc48da72941 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 16 Mar 2016 15:56:12 +0900 Subject: [PATCH 474/813] History --- History.rdoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/History.rdoc b/History.rdoc index a067fef5c..27f9d503e 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,11 @@ +=== 11.2.0(dev) / 2016- + +Enhancements: + +* Allow to specify dependencies(prerequisites) for Rake::TestTask + Pull request #117 by Tim Maslyuchenko +* Use Bundler task instead of hoe for gem release. + === 11.1.1 / 2016-03-14 Bug fixes: From 25a0b21c2fb42c78aa41bbdf9979087a56bf7a85 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 16 Mar 2016 16:00:12 +0900 Subject: [PATCH 475/813] remove needless executable --- doc/release_notes/rake-0.7.3.rdoc | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 doc/release_notes/rake-0.7.3.rdoc diff --git a/doc/release_notes/rake-0.7.3.rdoc b/doc/release_notes/rake-0.7.3.rdoc old mode 100755 new mode 100644 From d3daec1337cec129f16f8da425bfeb357e988336 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 16 Mar 2016 16:01:36 +0900 Subject: [PATCH 476/813] removed useless development configuration --- .autotest | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .autotest diff --git a/.autotest b/.autotest deleted file mode 100644 index 0988b12a8..000000000 --- a/.autotest +++ /dev/null @@ -1,7 +0,0 @@ -require 'autotest/restart' - -Autotest.add_hook :initialize do |at| - at.testlib = '' - at.add_exception '.git' -end - From 2063a1e3401fa3a8eee71ef0a135a38418b8238a Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 16 Mar 2016 16:06:44 +0900 Subject: [PATCH 477/813] Update CONTRIBUTING docs --- CONTRIBUTING.rdoc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.rdoc b/CONTRIBUTING.rdoc index 7eed5fb99..d68e8c525 100644 --- a/CONTRIBUTING.rdoc +++ b/CONTRIBUTING.rdoc @@ -1,7 +1,7 @@ = Source Repository Rake is currently hosted at github. The github web page is -http://github.com/ruby/rake . The public git clone URL is +https://github.com/ruby/rake . The public git clone URL is git://github.com/ruby/rake.git @@ -10,13 +10,12 @@ http://github.com/ruby/rake . The public git clone URL is If you wish to run the unit and functional tests that come with Rake: * +cd+ into the top project directory of rake. -* Install the +hoe+ gem dependency: +* Install gem dependency using bundler: - gem install hoe # Unless the hoe gem is already installed + bundle install # Install bundler, minitest and rdoc * Type one of the following: - rake newb # If you have never run rake's tests rake # If you have run rake's tests = Issues and Bug Reports @@ -35,4 +34,3 @@ When submitting pull requests please check the rake Travis-CI page for test failures: https://travis-ci.org/ruby/rake - From cbb5cc220c3ed94fa45fc5ed3e928c7ec24f11c0 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 16 Mar 2016 16:07:45 +0900 Subject: [PATCH 478/813] removed specific editor configuration --- .togglerc | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .togglerc diff --git a/.togglerc b/.togglerc deleted file mode 100644 index c8c5a0a97..000000000 --- a/.togglerc +++ /dev/null @@ -1,7 +0,0 @@ -(add-to-list - 'toggle-mapping-styles - '(rake . ( - ("test/test_rake_\\1.rb" . "lib/rake/\\1.rb") - ) )) - -(buffer-toggle-style 'rake) From 8050acf720ba12bd8742a54a6130539709961502 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 16 Mar 2016 16:13:40 +0900 Subject: [PATCH 479/813] cleanup --- test/helper.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index e07fb947d..27ca3b96b 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -28,19 +28,9 @@ class TaskManager def setup ARGV.clear - test_dir = File.basename File.dirname File.expand_path __FILE__ - - @rake_root = - if test_dir == 'test' - # rake repository - File.expand_path '../../', __FILE__ - else - # ruby repository - File.expand_path '../../../', __FILE__ - end - @verbose = ENV['VERBOSE'] + @rake_root = File.expand_path '../../', __FILE__ @rake_exec = File.join @rake_root, 'exe', 'rake' @rake_lib = File.join @rake_root, 'lib' @ruby_options = ["-I#{@rake_lib}", "-I."] From ed9c111be65fe220e6128bba763e7c68d43ff98e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 16 Mar 2016 16:23:28 +0900 Subject: [PATCH 480/813] organized helper file --- test/helper.rb | 2 +- test/{ => support}/file_creation.rb | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename test/{ => support}/file_creation.rb (100%) diff --git a/test/helper.rb b/test/helper.rb index 27ca3b96b..a0d0c2261 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -9,8 +9,8 @@ require 'minitest/autorun' require 'rake' require 'tmpdir' -require File.expand_path('../file_creation', __FILE__) +require_relative 'support/file_creation' require_relative 'support/ruby_runner' require_relative 'support/rakefile_definitions' diff --git a/test/file_creation.rb b/test/support/file_creation.rb similarity index 100% rename from test/file_creation.rb rename to test/support/file_creation.rb From fef137069e7d5876ce0d1be74a3d150175ef2337 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 16 Mar 2016 22:00:06 +0900 Subject: [PATCH 481/813] use update --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 65e77cbc5..43e4ab352 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ rvm: - jruby-head - rbx-2 before_install: - - gem install bundler --no-document + - gem update bundler --no-document before_script: - unset JRUBY_OPTS script: ruby -Ilib exe/rake From e4277364efa6c28afa3f502361d8446f0f0ccdef Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 16 Mar 2016 23:00:29 +0900 Subject: [PATCH 482/813] allow failure with head versions --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 43e4ab352..e303b9dbe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,10 @@ before_install: before_script: - unset JRUBY_OPTS script: ruby -Ilib exe/rake +matrix: + allow_failures: + - rvm: ruby-head + - rvm: jruby-head notifications: email: - drbrain@segment7.net From 741b9f3e035abb74cedadbc23ead0bc2f7720815 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 25 Mar 2016 16:40:12 +0900 Subject: [PATCH 483/813] removed broken task for test statistics --- rakelib/test_times.rake | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 rakelib/test_times.rake diff --git a/rakelib/test_times.rake b/rakelib/test_times.rake deleted file mode 100644 index daf1bc6e9..000000000 --- a/rakelib/test_times.rake +++ /dev/null @@ -1,25 +0,0 @@ -module TestTimes - def self.run(test_results, limit=0) - limit = limit.nonzero? || 10 - tests = [] - test_results.split(/\n/).each do |line| - if line =~ /^(.+?#[^:]+): ([0-9.]+) s: \.$/ - tests << [$1, $2.to_f, line] - end - end - - puts "#{limit} Slowest tests" - puts tests.sort_by { |item| - item[1] - }.reverse[0...limit].map { |item| - "%6.3f: %-s\n" % [item[1], item[0]] - } - end -end - -namespace :test do - desc "Find the slowest unit tests" - task :times, [:limit] do |t, args| - TestTimes.run `rake test:units TESTOPTS='--verbose'`, args.limit.to_i - end -end From 1f0d253578b47fb0e0826a70cf221e482b12b928 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 25 Mar 2016 16:41:34 +0900 Subject: [PATCH 484/813] removed old rubygems option --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index cc70a32a3..04530ce8a 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |s| s.required_ruby_version = Gem::Requirement.new(">= 1.9.3".freeze) s.rubygems_version = "2.6.1".freeze - s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) if s.respond_to? :required_rubygems_version= + s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] s.add_development_dependency(%q.freeze, ["~> 1.11"]) From 35b4e06b01348deb2c79b2cbb67b50703e8efe97 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 25 Mar 2016 16:43:09 +0900 Subject: [PATCH 485/813] cleanup --- bin/console | 7 ------- bin/setup | 2 -- 2 files changed, 9 deletions(-) diff --git a/bin/console b/bin/console index 220ce0558..b8342352c 100755 --- a/bin/console +++ b/bin/console @@ -3,12 +3,5 @@ require "bundler/setup" require "rake" -# You can add fixtures and/or initialization code here to make experimenting -# with your gem easier. You can also use a different console, if you like. - -# (If you use this, don't forget to add pry to your Gemfile!) -# require "pry" -# Pry.start - require "irb" IRB.start diff --git a/bin/setup b/bin/setup index dce67d860..cf4ad25e1 100755 --- a/bin/setup +++ b/bin/setup @@ -4,5 +4,3 @@ IFS=$'\n\t' set -vx bundle install - -# Do any other automated setup that you need to do here From 68b3584bd6b25c3471ab719042572a5044dd5bd2 Mon Sep 17 00:00:00 2001 From: Tatsuya Sato Date: Fri, 25 Mar 2016 22:04:12 +0900 Subject: [PATCH 486/813] Remove old release notes as the maintenance policy has changed. --- doc/release_notes/rake-0.4.14.rdoc | 23 ---- doc/release_notes/rake-0.4.15.rdoc | 35 ----- doc/release_notes/rake-0.5.0.rdoc | 53 -------- doc/release_notes/rake-0.5.3.rdoc | 78 ------------ doc/release_notes/rake-0.5.4.rdoc | 46 ------- doc/release_notes/rake-0.6.0.rdoc | 141 -------------------- doc/release_notes/rake-0.7.0.rdoc | 119 ----------------- doc/release_notes/rake-0.7.1.rdoc | 59 --------- doc/release_notes/rake-0.7.2.rdoc | 121 ------------------ doc/release_notes/rake-0.7.3.rdoc | 47 ------- doc/release_notes/rake-0.8.0.rdoc | 114 ----------------- doc/release_notes/rake-0.8.2.rdoc | 165 ------------------------ doc/release_notes/rake-0.8.3.rdoc | 112 ---------------- doc/release_notes/rake-0.8.4.rdoc | 147 --------------------- doc/release_notes/rake-0.8.5.rdoc | 53 -------- doc/release_notes/rake-0.8.6.rdoc | 37 ------ doc/release_notes/rake-0.8.7.rdoc | 55 -------- doc/release_notes/rake-0.9.0.rdoc | 112 ---------------- doc/release_notes/rake-0.9.1.rdoc | 52 -------- doc/release_notes/rake-0.9.2.2.rdoc | 55 -------- doc/release_notes/rake-0.9.2.rdoc | 49 ------- doc/release_notes/rake-0.9.3.rdoc | 102 --------------- doc/release_notes/rake-0.9.4.rdoc | 60 --------- doc/release_notes/rake-0.9.5.rdoc | 55 -------- doc/release_notes/rake-0.9.6.rdoc | 64 ---------- doc/release_notes/rake-10.0.0.rdoc | 178 -------------------------- doc/release_notes/rake-10.0.1.rdoc | 58 --------- doc/release_notes/rake-10.0.2.rdoc | 53 -------- doc/release_notes/rake-10.0.3.rdoc | 191 ---------------------------- doc/release_notes/rake-10.1.0.rdoc | 61 --------- 30 files changed, 2495 deletions(-) delete mode 100644 doc/release_notes/rake-0.4.14.rdoc delete mode 100644 doc/release_notes/rake-0.4.15.rdoc delete mode 100644 doc/release_notes/rake-0.5.0.rdoc delete mode 100644 doc/release_notes/rake-0.5.3.rdoc delete mode 100644 doc/release_notes/rake-0.5.4.rdoc delete mode 100644 doc/release_notes/rake-0.6.0.rdoc delete mode 100644 doc/release_notes/rake-0.7.0.rdoc delete mode 100644 doc/release_notes/rake-0.7.1.rdoc delete mode 100644 doc/release_notes/rake-0.7.2.rdoc delete mode 100644 doc/release_notes/rake-0.7.3.rdoc delete mode 100644 doc/release_notes/rake-0.8.0.rdoc delete mode 100644 doc/release_notes/rake-0.8.2.rdoc delete mode 100644 doc/release_notes/rake-0.8.3.rdoc delete mode 100644 doc/release_notes/rake-0.8.4.rdoc delete mode 100644 doc/release_notes/rake-0.8.5.rdoc delete mode 100644 doc/release_notes/rake-0.8.6.rdoc delete mode 100644 doc/release_notes/rake-0.8.7.rdoc delete mode 100644 doc/release_notes/rake-0.9.0.rdoc delete mode 100644 doc/release_notes/rake-0.9.1.rdoc delete mode 100644 doc/release_notes/rake-0.9.2.2.rdoc delete mode 100644 doc/release_notes/rake-0.9.2.rdoc delete mode 100644 doc/release_notes/rake-0.9.3.rdoc delete mode 100644 doc/release_notes/rake-0.9.4.rdoc delete mode 100644 doc/release_notes/rake-0.9.5.rdoc delete mode 100644 doc/release_notes/rake-0.9.6.rdoc delete mode 100644 doc/release_notes/rake-10.0.0.rdoc delete mode 100644 doc/release_notes/rake-10.0.1.rdoc delete mode 100644 doc/release_notes/rake-10.0.2.rdoc delete mode 100644 doc/release_notes/rake-10.0.3.rdoc delete mode 100644 doc/release_notes/rake-10.1.0.rdoc diff --git a/doc/release_notes/rake-0.4.14.rdoc b/doc/release_notes/rake-0.4.14.rdoc deleted file mode 100644 index b2f1f84f3..000000000 --- a/doc/release_notes/rake-0.4.14.rdoc +++ /dev/null @@ -1,23 +0,0 @@ -= Rake 0.4.14 Released - -== Changes - -Version 0.4.14 is a compatibility fix to allow Rake's test task to -work under Ruby 1.8.2. A change in the Test::Unit autorun feature -prevented Rake from running any tests. This release fixes the -problem. - -Rake 0.4.14 is the recommended release for anyone using Ruby 1.8.2. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - diff --git a/doc/release_notes/rake-0.4.15.rdoc b/doc/release_notes/rake-0.4.15.rdoc deleted file mode 100644 index 975708863..000000000 --- a/doc/release_notes/rake-0.4.15.rdoc +++ /dev/null @@ -1,35 +0,0 @@ -= Rake 0.4.15 Released - -== Changes - -Version 0.4.15 is a bug fix update for the Ruby 1.8.2 compatibility -changes. This release includes: - -* Fixed a bug that prevented the TESTOPTS flag from working with the - revised for 1.8.2 test task. - -* Updated the docs on --trace to indicate that it also enables a full - backtrace on errors. - -* Several fixes for new warnings generated. - -== Mini-Roadmap - -I will continue to issue Rake updates in the 0.4.xx series as new -Ruby-1.8.2 issues become manifest. Once the codebase stabilizes, I -will release a 0.5.0 version incorporating all the changes. If you -are not using Ruby-1.8.2 and wish to avoid version churn, I recommend -staying with a release prior to Rake-0.4.14. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - diff --git a/doc/release_notes/rake-0.5.0.rdoc b/doc/release_notes/rake-0.5.0.rdoc deleted file mode 100644 index f5cb9f307..000000000 --- a/doc/release_notes/rake-0.5.0.rdoc +++ /dev/null @@ -1,53 +0,0 @@ -= Rake 0.5.0 Released - -It has been a long time in coming, but we finally have a new version -of Rake available. - -== Changes - -* Fixed bug where missing intermediate file dependencies could cause - an abort with --trace or --dry-run. (Brian Candler) - -* Recursive rules are now supported (Tilman Sauerbeck). - -* Added tar.gz and tar.bz2 support to package task (Tilman Sauerbeck). - -* Added warning option for the Test Task (requested by Eric Hodel). - -* The jamis rdoc template is only used if it exists. - -* Added fix for Ruby 1.8.2 test/unit and rails problem. - -* Added contributed rake man file. (Jani Monoses) - -* Fixed documentation that was lacking the Rake module name (Tilman - Sauerbeck). - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -Lots of people provided input to this release. Thanks to Tilman -Sauerbeck for numerous patches, documentation fixes and suggestions. -And for also pushing me to get this release out. Also, thanks to -Brian Candler for the finding and fixing --trace/dry-run fix. That -was an obscure bug. Also to Eric Hodel for some good suggestions. - --- Jim Weirich - diff --git a/doc/release_notes/rake-0.5.3.rdoc b/doc/release_notes/rake-0.5.3.rdoc deleted file mode 100644 index 451da4a0a..000000000 --- a/doc/release_notes/rake-0.5.3.rdoc +++ /dev/null @@ -1,78 +0,0 @@ -= Rake 0.5.3 Released - -Although it has only been two weeks since the last release, we have -enough updates to the Rake program to make it time for another -release. - -== Changes - -Here are the changes for version 0.5.3 ... - -* FileLists have been extensively changed so that they mimic the - behavior of real arrays even more closely. In particular, - operations on FileLists that return a new collection (e.g. collect, - reject) will now return a FileList rather than an array. In - addition, several places where FileLists were not properly expanded - before use have been fixed. - -* A method (+ext+) to simplify the handling of file extensions was - added to String and to Array. - -* The 'testrb' script in test/unit tends to silently swallow syntax - errors in test suites. Because of that, the default test loader is - now a rake-provided script. You can still use 'testrb' by setting - the loader flag in the test task to :testrb. (See the API documents - for TestTask for all the loader flag values). - -* FileUtil methods (e.g. cp, mv, install) are now declared to be - private. This will cut down on the interference with user defined - methods of the same name. - -* Fixed the verbose flag in the TestTask so that the test code is - controlled by the flag. Also shortened up some failure messages. - (Thanks to Tobias Luetke for the suggestion). - -* Rules will now properly detect a task that can generate a source - file. Previously rules would only consider source files that were - already present. - -* Added an +import+ command that allows Rake to dynamically import - dependendencies into a running Rake session. The +import+ command - can run tasks to update the dependency file before loading them. - Dependency files can be in rake or make format, allowing rake to - work with tools designed to generate dependencies for make. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. -Thanks to ... - -* Brian Gernhardt for the rules fix (especially for the patience to - explain the problem to me until I got what he was talking about). -* Stefan Lang for pointing out problems in the dark corners of the - FileList implementation. -* Alexey Verkhovsky pointing out the silently swallows syntax errors - in tests. -* Tobias Luetke for beautifying the test task output. -* Sam Roberts for some of the ideas behind dependency loading. - --- Jim Weirich - diff --git a/doc/release_notes/rake-0.5.4.rdoc b/doc/release_notes/rake-0.5.4.rdoc deleted file mode 100644 index 112587fb9..000000000 --- a/doc/release_notes/rake-0.5.4.rdoc +++ /dev/null @@ -1,46 +0,0 @@ -= Rake 0.5.4 Released - -Time for some minor bug fixes and small enhancements - -== Changes - -Here are the changes for version 0.5.4 ... - -* Added double quotes to the test runner. This allows the location of - the tests (and runner) to be in a directory path that contains - spaces (e.g. "C:/Program Files/ruby/bin"). - -* Added .svn to default ignore list. Now subversion project metadata - is automatically ignored by Rake's FileList. - -* Updated FileList#include to support nested arrays and filelists. - FileLists are flat lists of file names. Using a FileList in an - include will flatten out the nested file names. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. -Thanks to ... - -* Tilman Sauerbeck for the nested FileList suggestion. -* Josh Knowles for pointing out the spaces in directory name problem. - --- Jim Weirich diff --git a/doc/release_notes/rake-0.6.0.rdoc b/doc/release_notes/rake-0.6.0.rdoc deleted file mode 100644 index 340c07bf7..000000000 --- a/doc/release_notes/rake-0.6.0.rdoc +++ /dev/null @@ -1,141 +0,0 @@ -= Rake 0.6.0 Released - -Its time for some long requested enhancements and lots of bug fixes -... And a whole new web page. - -== New Web Page - -The primary documentation for rake has moved from the RubyForge based -wiki to its own Hieraki based web site. Constant spam on the wiki -made it a difficult to keep clean. The new site will be easier to -update and organize. - -Check out the new documentation at: http://docs.rubyrake.org - -We will be adding new documentation to the site as time goes on. - -In addition to the new docs page, make sure you check out Martin -Fowlers article on rake at http://martinfowler.com/articles/rake.html - -== Changes - -=== New Features - -* Multiple prerequisites on Rake rules now allowed. However, keep the - following in mind: - - 1. All the prerequisites of a rule must be available before a rule - is triggered, where "enabled" means (a) an existing file, (b) a - defined rule, or (c) another rule which also must be - trigger-able. - 2. Rules are checked in order of definition, so it is important to - order your rules properly. If a file can be created by two - different rules, put the more specific rule first (otherwise the - more general rule will trigger first and the specific one will - never be triggered). - 3. The source method now returns the name of the first - prerequisite listed in the rule. sources returns the - names of all the rule prerequisites, ordered as they are defined - in the rule. If the task has other prerequisites not defined in - the rule (but defined in an explicit task definition), then they - will _not_ be included in the sources list. - -* FileLists may now use the egrep command. This popular enhancement - is now a core part of the FileList object. If you want to get a - list of all your to-dos, fixmes and TBD comments, add the following - to your Rakefile. - - desc "Look for TODO and FIXME tags in the code" - task :todo do - FileList['**/*.rb'].egrep /#.*(FIXME|TODO|TBD)/ - end - -* The investigation method was added to task object to dump - out some important values. This makes it a bit easier to debug Rake - tasks. - - For example, if you are having problems with a particular task, just - print it out: - - task :huh do - puts Rake::Task['huh'].investigation - end - -* The Rake::TestTask class now supports a "ruby_opts" option to pass - arbitrary ruby options to a test subprocess. - -=== Some Incompatibilities - -* When using the ruby command to start a Ruby subprocess, the - Ruby interpreter that is currently running rake is used by default. - This makes it easier to use rake in an environment with multiple - ruby installation. (Previously, the first ruby command found in the - PATH was used). - - If you wish to chose a different Ruby interpreter, you can - explicitly choose the interpreter via the sh command. - -* The major rake classes (Task, FileTask, FileCreationTask, RakeApp) - have been moved out of the toplevel scope and are now accessible as - Rake::Task, Rake::FileTask, Rake::FileCreationTask and - Rake::Application. If your Rakefile - directly references any one of these tasks, you may: - - 1. Update your Rakefile to use the new classnames - 2. Use the --classic-namespace option on the rake command to get the - old behavior, - 3. Add require 'rake/classic_namespace' to the - Rakefile to get the old behavior. - - rake will print a rather annoying warning whenever a - deprecated class name is referenced without enabling classic - namespace. - -=== Bug Fixes - -* Several unit tests and functional tests were fixed to run better - under windows. - -* Directory tasks are now a specialized version of a File task. A - directory task will only be triggered if it doesn't exist. It will - not be triggered if it is out of date w.r.t. any of its - prerequisites. - -* Fixed a bug in the Rake::GemPackageTask class so that the gem now - properly contains the platform name. - -* Fixed a bug where a prerequisite on a file task would cause - an exception if the prerequisite did not exist. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. -The following people either contributed patches, made suggestions or -made otherwise helpful comments. Thanks to ... - -* Greg Fast (better ruby_opt test options) -* Kelly Felkins (requested by better namespace support) -* Martin Fowler (suggested Task.investigation) -* Stuart Jansen (send initial patch for multiple prerequisites). -* Masao Mutch (better support for non-ruby Gem platforms) -* Philipp Neubeck (patch for file task exception fix) - --- Jim Weirich diff --git a/doc/release_notes/rake-0.7.0.rdoc b/doc/release_notes/rake-0.7.0.rdoc deleted file mode 100644 index b8bf56ebb..000000000 --- a/doc/release_notes/rake-0.7.0.rdoc +++ /dev/null @@ -1,119 +0,0 @@ -= Rake 0.7.0 Released - -These changes for Rake have been brewing for a long time. Here they -are, I hope you enjoy them. - -== Changes - -=== New Features - -* Name space support for task names (see below). - -* Prerequisites can be executed in parallel (see below). - -* Added safe_ln support for openAFS (via Ludvig Omholt). - -* RDoc defaults to internal (in-process) invocation. The old behavior - is still available by setting the +external+ flag to true. - -* Rakefiles are now loaded with the expanded path to prevent - accidental polution from the Ruby load path. - -* Task objects my now be used in prerequisite lists directly. - -* Task objects (in addition to task names) may now be included in the - prerequisite list of a task. - -* Internals cleanup and refactoring. - -=== Bug Fixes - -* Compatibility fixes for Ruby 1.8.4 FileUtils changes. - -=== Namespaces - -Tasks can now be nested inside their own namespaces. Tasks within one -namespace will not accidently interfer with tasks named in a different -namespace. - -For example: - - namespace "main" do - task :build do - # Build the main program - end - end - - namespace "samples" do - task :build do - # Build the sample programs - end - end - - task :build_all => ["main:build", "samples:build"] - -Even though both tasks are named :build, they are separate tasks in -their own namespaces. The :build_all task (defined in the toplevel -namespace) references both build tasks in its prerequisites. - -You may invoke each of the individual build tasks with the following -commands: - - rake main:build - rake samples:build - -Or invoke both via the :build_all command: - - rake build_all - -Namespaces may be nested arbitrarily. Since the name of file tasks -correspond to the name of a file in the external file system, -FileTasks are not affected by the namespaces. - -See the Rakefile format documentation (in the Rake API documents) for -more information. - -=== Parallel Tasks - -Sometimes you have several tasks that can be executed in parallel. By -specifying these tasks as prerequisites to a +multitask+ task. - -In the following example the tasks copy_src, copy_doc and copy_bin -will all execute in parallel in their own thread. - - multitask :copy_files => [:copy_src, :copy_doc, :copy_bin] do - puts "All Copies Complete" - end - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. -The following people either contributed patches, made suggestions or -made otherwise helpful comments. Thanks to ... - -* Doug Young (inspriation for the parallel task) - -* David Heinemeier Hansson (for --trace message enhancement and for - pushing for namespace support). - -* Ludvig Omholt (for the openAFS fix) - --- Jim Weirich diff --git a/doc/release_notes/rake-0.7.1.rdoc b/doc/release_notes/rake-0.7.1.rdoc deleted file mode 100644 index c17088ee9..000000000 --- a/doc/release_notes/rake-0.7.1.rdoc +++ /dev/null @@ -1,59 +0,0 @@ -= Rake 0.7.1 Released - -Version 0.7.1 supplies a bug fix and a few minor enhancements. - -== Changes - -=== Bug Fixes in 0.7.1 - -* Changes in the exception reported for the FileUtils.ln caused - safe_ln to fail with a NotImplementedError. Rake 0.7.1 will now - catch that error or any StandardError and properly fall back to - using +cp+. - -=== New Features in 0.7.1 - -* You can filter the results of the --task option by supplying an - optional regular expression. This allows the user to easily find a - particular task name in a long list of possible names. - -* Transforming procs in a rule may now return a list of prerequisites. - This allows more flexible rule formation. - -* FileList and String now support a +pathmap+ melthod that makes the - transforming paths a bit easier. See the API docs for +pathmap+ for - details. - -* The -f option without a value will disable the search for a - Rakefile. This allows the Rakefile to be defined entirely in a - library (and loaded with the -r option). The current working - directory is not changed when this is done. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. -The following people either contributed patches, made suggestions or -made otherwise helpful comments. Thanks to ... - -* James Britt and Assaph Mehr for reporting and helping to debug the - safe_ln issue. - --- Jim Weirich diff --git a/doc/release_notes/rake-0.7.2.rdoc b/doc/release_notes/rake-0.7.2.rdoc deleted file mode 100644 index ec99ee0c0..000000000 --- a/doc/release_notes/rake-0.7.2.rdoc +++ /dev/null @@ -1,121 +0,0 @@ -= Rake 0.7.2 Released - -Version 0.7.2 supplies a bug fix and a few minor enhancements. In -particular, the new version fixes an incompatibility with the soon to -be released Ruby 1.8.6. We strongly recommend upgrading to Rake 0.7.2 -in order to be compatible with the new version of Ruby. - -== Changes - -=== Bug Fixes in 0.7.2 - -There are quite a number of bug fixes in the new 0.7.2 version of -Rake: - -* Removed dependency on internal fu_xxx functions from FileUtils. - -* Error messages are now send to stderr rather than stdout (from - Payton Quackenbush). - -* Better error handling on invalid command line arguments (from Payton - Quackenbush). - -* Fixed some bugs where the application object was going to the global - appliation instead of using its own data. - -* Fixed the method name leak from FileUtils (bug found by Glenn - Vanderburg). - -* Added test for noop, bad_option and verbose flags to sh command. - -* Added a description to the gem task in GemPackageTask. - -* Fixed a bug when rules have multiple prerequisites (patch by Joel - VanderWerf) - -* Added the handful of RakeFileUtils to the private method as well. - -=== New Features in 0.7.2 - -The following new features are available in Rake version 0.7.2: - -* Added square and curly bracket patterns to FileList#include (Tilman - Sauerbeck). - -* FileLists can now pass a block to FileList#exclude to exclude files - based on calculated values. - -* Added plain filename support to rule dependents (suggested by Nobu - Nakada). - -* Added pathmap support to rule dependents. In other words, if a - pathmap format (beginning with a '%') is given as a Rake rule - dependent, then the name of the depend will be the name of the - target with the pathmap format applied. - -* Added a 'tasks' method to a namespace to get a list of tasks - associated with the namespace. - -* Added tar_command and zip_command options to the Package task. - -* The clean task will no longer delete 'core' if it is a directory. - -=== Internal Rake Improvements - -The following changes will are mainly internal improvements and -refactorings and have little effect on the end user. But they may be -of interest to the general public. - -* Added rcov task and updated unit testing for better code coverage. - -* Added a 'shame' task to the Rakefile. - -* Added rake_extension to handle detection of extension collisions. - -* Added a protected 'require "rubygems"' to test/test_application to - unbreak cruisecontrol.rb. - -* Removed rake_dup. Now we just simply rescue a bad dup. - -* Refactored the FileList reject logic to remove duplication. - -* Removed if __FILE__ at the end of the rake.rb file. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. -The following people either contributed patches, made suggestions or -made otherwise helpful comments. Thanks to ... - -* Payton Quackenbush -- For several error handling improvements. - -* Glenn Vanderburg -- For finding and fixing the method name leak from - FileUtils. - -* Joel VanderWerf -- for finding and fixing a bug in the handling of - multiple prerequisites. - -* Tilman Sauerbeck -- For some enhancing FileList to support more - advanced file globbing. - -* Nobu Nakada -- For suggesting plain file name support to rule dependents. - --- Jim Weirich diff --git a/doc/release_notes/rake-0.7.3.rdoc b/doc/release_notes/rake-0.7.3.rdoc deleted file mode 100644 index 7e9f92198..000000000 --- a/doc/release_notes/rake-0.7.3.rdoc +++ /dev/null @@ -1,47 +0,0 @@ -= Rake 0.7.3 Released - -Rake version 0.7.3 is a minor release that includes some refactoring to better -support custom Rake applications. - -== Changes - -=== New Features in Version 0.7.3 - -* Added the +init+ and +top_level+ methods to make the creation of custom Rake applications a bit easier. E.g. - - gem 'rake', ">= 0.7.3" - require 'rake' - - Rake.application.init('myrake') - - task :default do - something_interesting - end - - Rake.application.top_level - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But instead of -cryptic make recipes, Rake uses standard Ruby code to declare tasks and -dependencies. You have the full power of a modern scripting language built -right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.0.rdoc b/doc/release_notes/rake-0.8.0.rdoc deleted file mode 100644 index 4fc7fdd7b..000000000 --- a/doc/release_notes/rake-0.8.0.rdoc +++ /dev/null @@ -1,114 +0,0 @@ -= Rake 0.8.0/0.8.1 Released - -Rake version 0.8.0 is a new release of rake that includes serveral new -features. - -== Changes - -=== New Features in Version 0.8.0 - -* Tasks can now receive command line parameters. See the examples - below for more details. - -* Comments are limited to 80 columns on output, but full comments can - be seen by using the -D parameter. (feature suggested by Jamis - Buck). - -* Explicit exit(n) calls will now set the exit status to n. (patch - provided by Stephen Touset). - -* Rake is now compatible with Ruby 1.9. - -Version 0.8.1 is a minor update that includes additional Ruby 1.9 -compatibility fixes. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Task Argument Examples - -Prior to version 0.8.0, rake was only able to handle command line -arguments of the form NAME=VALUE that were passed into Rake via the -ENV hash. Many folks had asked for some kind of simple command line -arguments, perhaps using "--" to separate regular task names from -argument values on the command line. The problem is that there was no -easy way to associate positional arguments on the command line with -different tasks. Suppose both tasks :a and :b expect a command line -argument: does the first value go with :a? What if :b is run first? -Should it then get the first command line argument. - -Rake 0.8.0 solves this problem by explicitly passing values directly -to the tasks that need them. For example, if I had a release task -that required a version number, I could say: - - rake release[0.8.0] - -And the string "0.8.0" will be passed to the :release task. Multiple -arguments can be passed by separating them with a comma, for example: - - rake name[john,doe] - -Just a few words of caution. The rake task name and its arguments -need to be a single command line argument to rake. This generally -means no spaces. If spaces are needed, then the entire rake + -argument string should be quoted. Something like this: - - rake "name[billy bob, smith]" - -(Quoting rules vary between operating systems and shells, so make sure -you consult the proper docs for your OS/shell). - -=== Tasks that Expect Parameters - -Parameters are only given to tasks that are setup to expect them. In -order to handle named parameters, the task declaration syntax for -tasks has been extended slightly. - -For example, a task that needs a first name and last name might be -declared as: - - task :name, :first_name, :last_name - -The first argument is still the name of the task (:name in this case). -The next to argumements are the names of the parameters expected by -:name (:first_name and :last_name in the example). - -To access the values of the paramters, the block defining the task -behaviour can now accept a second parameter: - - task :name, :first_name, :last_name do |t, args| - puts "First name is #{args.first_name}" - puts "Last name is #{args.last_name}" - end - -The first argument of the block "t" is always bound to the current -task object. The second argument "args" is an open-struct like object -that allows access to the task arguments. Extra command line -arguments to a task are ignored. Missing command line arguments are -given the nil value. - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Jamis Buck (for comment formatting suggestions) -* Stephen Touset (for exit status patch). - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.2.rdoc b/doc/release_notes/rake-0.8.2.rdoc deleted file mode 100644 index a822a9497..000000000 --- a/doc/release_notes/rake-0.8.2.rdoc +++ /dev/null @@ -1,165 +0,0 @@ -= Rake 0.8.2 Released - -Rake version 0.8.2 is a new release of rake that includes a number of -new features and numerous bug fixes. - -== Changes - -=== New Features in Version 0.8.2 - -* Switched from getoptlong to optparse (patches supplied by Edwin - Pratomo). - -* The -T option will now attempt to dynamically sense the size of the - terminal. The -T output will only self-truncate if the output is a - tty. However, if RAKE_COLUMNS is explicitly set, it will be honored - in any case. (Patch provided by Gavin Stark). - -* The following public methods have been added to rake task objects: - - * task.clear -- Clear both the prerequisites and actions of the - target rake task. - * task.clear_prerequisites -- Clear all the existing prerequisites - from the target rake task. - * task.clear_actions -- Clear all the existing actions from the - target rake task. - * task.reenable -- Re-enable a task, allowing its actions to be - executed again if the task is invoked. - -* Changed RDoc test task to have no default template. This makes it - easier for the tempate to pick up the template from the environment. - -* Default values for task arguments can easily be specified with the - :with_defaults method. (Idea for default argument merging supplied - by (Adam Q. Salter) - -=== Bug Fixes in Version 0.8.2 - -* Fixed bug in package task so that it will include the subdir - directory in the package for testing. (Bug found by Adam Majer) - -* Fixed filename dependency order bug in test_inspect_pending and - test_to_s_pending. (Bug found by Adam Majer) - -* Fixed check for file utils options to make them immune to the - symbol/string differences. (Patch supplied by Edwin Pratomo) - -* Fixed bug with rules involving multiple source, where only the first - dependency of a rule has any effect (Patch supplied by Emanuel - Indermühle) - -* FileList#clone and FileList#dup have better sematics w.r.t. taint - and freeze. - -* Changed from using Mutex to Monitor. Evidently Mutex causes thread - join errors when Ruby is compiled with -disable-pthreads. (Patch - supplied by Ittay Dror) - -* Fixed bug in makefile parser that had problems with extra spaces in - file task names. (Patch supplied by Ittay Dror) - -== Other changes in Version 0.8.2 - -* Added ENV var to rake's own Rakefile to prevent OS X from including - extended attribute junk in the rake package tar file. (Bug found by - Adam Majer) - -* Added a performance patch for reading large makefile dependency - files. (Patch supplied by Ittay Dror) - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Task Argument Examples - -Prior to version 0.8.0, rake was only able to handle command line -arguments of the form NAME=VALUE that were passed into Rake via the -ENV hash. Many folks had asked for some kind of simple command line -arguments, perhaps using "--" to separate regular task names from -argument values on the command line. The problem is that there was no -easy way to associate positional arguments on the command line with -different tasks. Suppose both tasks :a and :b expect a command line -argument: does the first value go with :a? What if :b is run first? -Should it then get the first command line argument. - -Rake 0.8.0 solves this problem by explicitly passing values directly -to the tasks that need them. For example, if I had a release task -that required a version number, I could say: - - rake release[0.8.2] - -And the string "0.8.2" will be passed to the :release task. Multiple -arguments can be passed by separating them with a comma, for example: - - rake name[john,doe] - -Just a few words of caution. The rake task name and its arguments -need to be a single command line argument to rake. This generally -means no spaces. If spaces are needed, then the entire rake + -argument string should be quoted. Something like this: - - rake "name[billy bob, smith]" - -(Quoting rules vary between operating systems and shells, so make sure -you consult the proper docs for your OS/shell). - -=== Tasks that Expect Parameters - -Parameters are only given to tasks that are setup to expect them. In -order to handle named parameters, the task declaration syntax for -tasks has been extended slightly. - -For example, a task that needs a first name and last name might be -declared as: - - task :name, :first_name, :last_name - -The first argument is still the name of the task (:name in this case). -The next to argumements are the names of the parameters expected by -:name (:first_name and :last_name in the example). - -To access the values of the paramters, the block defining the task -behaviour can now accept a second parameter: - - task :name, :first_name, :last_name do |t, args| - puts "First name is #{args.first_name}" - puts "Last name is #{args.last_name}" - end - -The first argument of the block "t" is always bound to the current -task object. The second argument "args" is an open-struct like object -that allows access to the task arguments. Extra command line -arguments to a task are ignored. Missing command line arguments are -given the nil value. - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Edwin Pratomo -* Gavin Stark -* Adam Q. Salter -* Adam Majer -* Emanuel Indermühle -* Ittay Dror -* Bheeshmar Redheendran (for spending an afternoon with me debugging - windows issues) - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.3.rdoc b/doc/release_notes/rake-0.8.3.rdoc deleted file mode 100644 index 97184c390..000000000 --- a/doc/release_notes/rake-0.8.3.rdoc +++ /dev/null @@ -1,112 +0,0 @@ -= Rake 0.8.3 Released - -Rake version 0.8.3 is a bug-fix release of rake. - -== Changes - -=== Bug Fixes in Version 0.8.3 - -* Enhanced the system directory detection in windows. We now check - HOMEDRIVE/HOMEPATH and USERPROFILE if APPDATA isn't found. (Patch - supplied by James Tucker). Rake no long aborts if it can't find the - directory. - -* Added fix to handle ruby installations in directories with spaces in - their name. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Task Argument Examples - -Prior to version 0.8.0, rake was only able to handle command line -arguments of the form NAME=VALUE that were passed into Rake via the -ENV hash. Many folks had asked for some kind of simple command line -arguments, perhaps using "--" to separate regular task names from -argument values on the command line. The problem is that there was no -easy way to associate positional arguments on the command line with -different tasks. Suppose both tasks :a and :b expect a command line -argument: does the first value go with :a? What if :b is run first? -Should it then get the first command line argument. - -Rake 0.8.0 solves this problem by explicitly passing values directly -to the tasks that need them. For example, if I had a release task -that required a version number, I could say: - - rake release[0.8.3] - -And the string "0.8.3" will be passed to the :release task. Multiple -arguments can be passed by separating them with a comma, for example: - - rake name[john,doe] - -Just a few words of caution. The rake task name and its arguments -need to be a single command line argument to rake. This generally -means no spaces. If spaces are needed, then the entire rake + -argument string should be quoted. Something like this: - - rake "name[billy bob, smith]" - -(Quoting rules vary between operating systems and shells, so make sure -you consult the proper docs for your OS/shell). - -=== Tasks that Expect Parameters - -Parameters are only given to tasks that are setup to expect them. In -order to handle named parameters, the task declaration syntax for -tasks has been extended slightly. - -For example, a task that needs a first name and last name might be -declared as: - - task :name, :first_name, :last_name - -The first argument is still the name of the task (:name in this case). -The next to argumements are the names of the parameters expected by -:name (:first_name and :last_name in the example). - -To access the values of the paramters, the block defining the task -behaviour can now accept a second parameter: - - task :name, :first_name, :last_name do |t, args| - puts "First name is #{args.first_name}" - puts "Last name is #{args.last_name}" - end - -The first argument of the block "t" is always bound to the current -task object. The second argument "args" is an open-struct like object -that allows access to the task arguments. Extra command line -arguments to a task are ignored. Missing command line arguments are -given the nil value. - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Edwin Pratomo -* Gavin Stark -* Adam Q. Salter -* Adam Majer -* Emanuel Indermühle -* Ittay Dror -* Bheeshmar Redheendran (for spending an afternoon with me debugging - windows issues) - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.4.rdoc b/doc/release_notes/rake-0.8.4.rdoc deleted file mode 100644 index d27de8b27..000000000 --- a/doc/release_notes/rake-0.8.4.rdoc +++ /dev/null @@ -1,147 +0,0 @@ -= Rake 0.8.4 Released - -Rake version 0.8.4 is a bug-fix release of rake. - -NOTE: The version of Rake that comes with Ruby 1.9 has diverged - slightly from the core Rake code base. Rake 0.8.4 will work - with Ruby 1.9, but is not a strict upgrade for the Rake that - comes with Ruby 1.9. A (near) future release of Rake will unify - those two codebases. - -== Letter Writing Campaign - -Thanks to Aaron Patterson (@tenderlove) and Eric Hodel (@drbrain) for -their encouraging support in organizing a letter writing campaign to -lobby for the "Warning Free" release of rake 0.8.4. A special callout -goes to Jonathan D. Lord, Sr (Dr. Wingnut) whose postcard was the -first to actually reach me. (see -http://tenderlovemaking.com/2009/02/26/we-need-a-new-version-of-rake/ -for details) - -== Changes - -=== New Features / Enhancements in Version 0.8.4 - -* Case is preserved on rakefile names. (patch from James - M. Lawrence/quix) - -* Improved Rakefile case insensitivity testing (patch from Luis - Lavena). - -* Windows system dir search order is now: HOME, HOMEDRIVE + HOMEPATH, - APPDATA, USERPROFILE (patch from Luis Lavena) - -* MingGW is now recognized as a windows platform. (patch from Luis - Lavena) - -=== Bug Fixes in Version 0.8.4 - -* Removed reference to manage_gem to fix the warning produced by the - gem package task. - -* Fixed stray ARGV option problem that was interfering with - Test::Unit::Runner. (patch from Pivotal Labs) - -=== Infrastructure Improvements in Version 0.8.4 - -* Numerous fixes to the windows test suite (patch from Luis Lavena). - -* Improved Rakefile case insensitivity testing (patch from Luis - Lavena). - -* Better support for windows paths in the test task (patch from Simon - Chiang/bahuvrihi) - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Task Argument Examples - -Prior to version 0.8.0, rake was only able to handle command line -arguments of the form NAME=VALUE that were passed into Rake via the -ENV hash. Many folks had asked for some kind of simple command line -arguments, perhaps using "--" to separate regular task names from -argument values on the command line. The problem is that there was no -easy way to associate positional arguments on the command line with -different tasks. Suppose both tasks :a and :b expect a command line -argument: does the first value go with :a? What if :b is run first? -Should it then get the first command line argument. - -Rake 0.8.0 solves this problem by explicitly passing values directly -to the tasks that need them. For example, if I had a release task -that required a version number, I could say: - - rake release[0.8.4] - -And the string "0.8.4" will be passed to the :release task. Multiple -arguments can be passed by separating them with a comma, for example: - - rake name[john,doe] - -Just a few words of caution. The rake task name and its arguments -need to be a single command line argument to rake. This generally -means no spaces. If spaces are needed, then the entire rake + -argument string should be quoted. Something like this: - - rake "name[billy bob, smith]" - -(Quoting rules vary between operating systems and shells, so make sure -you consult the proper docs for your OS/shell). - -=== Tasks that Expect Parameters - -Parameters are only given to tasks that are setup to expect them. In -order to handle named parameters, the task declaration syntax for -tasks has been extended slightly. - -For example, a task that needs a first name and last name might be -declared as: - - task :name, :first_name, :last_name - -The first argument is still the name of the task (:name in this case). -The next to argumements are the names of the parameters expected by -:name (:first_name and :last_name in the example). - -To access the values of the paramters, the block defining the task -behaviour can now accept a second parameter: - - task :name, :first_name, :last_name do |t, args| - puts "First name is #{args.first_name}" - puts "Last name is #{args.last_name}" - end - -The first argument of the block "t" is always bound to the current -task object. The second argument "args" is an open-struct like object -that allows access to the task arguments. Extra command line -arguments to a task are ignored. Missing command line arguments are -given the nil value. - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence/quix -* Luis Lavena -* Pivotal Labs -* Simon Chiang/bahuvrihi - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.5.rdoc b/doc/release_notes/rake-0.8.5.rdoc deleted file mode 100644 index 0ee2583dd..000000000 --- a/doc/release_notes/rake-0.8.5.rdoc +++ /dev/null @@ -1,53 +0,0 @@ -= Rake 0.8.5 Released - -Rake version 0.8.5 is a new release of Rake with greatly improved -support for executing commands on Windows. The "sh" command now has -the same semantics on Windows that it has on Unix based platforms. - -== Changes - -=== New Features / Enhancements in Version 0.8.5 - -* Improved implementation of the Rake system command for Windows. - (patch from James M. Lawrence/quix) - -* Support for Ruby 1.9's improved system command. (patch from James - M. Lawrence/quix) - -* Rake now includes the configured extension when invoking an - executable (Config::CONFIG['EXEEXT]) - -=== Bug Fixes in Version 0.8.5 - -* Environment variable keys are now correctly cased (it matters in - some implementations). - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence/quix -* Luis Lavena - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.6.rdoc b/doc/release_notes/rake-0.8.6.rdoc deleted file mode 100644 index 54782ed02..000000000 --- a/doc/release_notes/rake-0.8.6.rdoc +++ /dev/null @@ -1,37 +0,0 @@ -= Rake 0.8.6 Released - -Rake version 0.8.5 introduced greatly improved support for executing -commands on Windows. The "sh" command now has the same semantics on -Windows that it has on Unix based platforms. - -Rake version 0.8.5 includes minor fixes the the RDoc generation. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence/quix -* Luis Lavena - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.7.rdoc b/doc/release_notes/rake-0.8.7.rdoc deleted file mode 100644 index 884f4c659..000000000 --- a/doc/release_notes/rake-0.8.7.rdoc +++ /dev/null @@ -1,55 +0,0 @@ -= Rake 0.8.7 Released - -Rake version 0.8.5 introduced greatly improved support for executing -commands on Windows. The "sh" command now has the same semantics on -Windows that it has on Unix based platforms. - -Rake version 0.8.6 includes minor fixes the the RDoc generation. -Rake version 0.8.7 includes a minor fix for JRuby running on windows. - -== Changes - -=== New Features / Enhancements in Version 0.8.5 - -* Improved implementation of the Rake system command for Windows. - (patch from James M. Lawrence/quix) - -* Support for Ruby 1.9's improved system command. (patch from James - M. Lawrence/quix) - -* Rake now includes the configured extension when invoking an - executable (Config::CONFIG['EXEEXT]) - -=== Bug Fixes in Version 0.8.5 - -* Environment variable keys are now correctly cased (it matters in - some implementations). - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Charles Nutter - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.0.rdoc b/doc/release_notes/rake-0.9.0.rdoc deleted file mode 100644 index 823483cc2..000000000 --- a/doc/release_notes/rake-0.9.0.rdoc +++ /dev/null @@ -1,112 +0,0 @@ -= Rake 0.9.0 Released - -Rake version 0.9.0 has a number of bug fixes and enhancments (see -below for more details). Additionally, the internals have be slightly -restructured and improved. - -== Changes - -=== New Features / Enhancements / Bug Fixes in Version 0.9.0 - -* Rake now warns when the deprecated :needs syntax used (and suggests - the proper syntax in the warning). - -* Moved Rake DSL commands to top level ruby object 'main'. Rake DSL - commands are no longer private methods in Object. (Suggested by - James M. Lawrence/quix) - -* Rake now uses case-insensitive comparisons to find the Rakefile on Windows. - Based on patch by Roger Pack. - -* Rake now requires (instead of loads) files in the test task. Patch by Cezary - Baginski. - -* Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow. - -* Rake now prints the Rakefile directory only when it's different from the - current directory. Patch by Alex Chaffee. - -* Improved rakefile_location discovery on Windows. Patch by James Tucker. - -* Rake now recognizes "Windows Server" as a windows system. Patch by Matthias - Lüdtke - -* Rake::RDocTask is deprecated. Use RDoc::Task from RDoc 2.4.2+ (require - 'rdoc/task') - -* Rake::GemPackageTask is deprecated. Use Gem::PackageTask (require - 'rubygems/package_task') - -* Rake now outputs various messages to $stderr instead of $stdout. - -* Rake no longer emits warnings for Config. Patch by Santiago Pastorino. - -* Removed Rake's DSL methods from the top level scope. If you need to - call 'task :xzy' in your code, include Rake::DSL into your class, or - put the code in a Rake::DSL.environment do ... end block. - -* Split rake.rb into individual files. - -* Support for the --where (-W) flag for showing where a task is defined. - -* Fixed quoting in test task. - (http://onestepback.org/redmine/issues/show/44, - http://www.pivotaltracker.com/story/show/1223138) - -* Fixed the silent option parsing problem. - (http://onestepback.org/redmine/issues/show/47) - -* Fixed :verbose=>false flag on sh and ruby commands. - -* Rake command line options may be given by default in a RAKEOPT - environment variable. - -* Errors in Rake will now display the task invocation chain in effect - at the time of the error. - -* Accepted change by warnickr to not expand test patterns in shell - (allowing more files in the test suite). - -* Fixed that file tasks did not perform prereq lookups in scope - (Redmine #57). - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence (quix) -* Roger Pack -* Cezary Baginski -* Sean Scot August Moon -* R.T. Lechow -* Alex Chaffee -* James Tucker -* Matthias Lüdtke -* Santiago Pastorino - -Also, bit thanks to Eric Hodel for assisting with getting this release -out the door (where "assisting" includes, but is not by any means -limited to, "pushing" me to get it done). - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.1.rdoc b/doc/release_notes/rake-0.9.1.rdoc deleted file mode 100644 index 70be8b568..000000000 --- a/doc/release_notes/rake-0.9.1.rdoc +++ /dev/null @@ -1,52 +0,0 @@ -= Rake 0.9.1 Released - -Rake version 0.9.1 has a number of bug fixes and enhancments (see -below for more details). Additionally, the internals have be slightly -restructured and improved. - -== Changes - -Rake 0.9.1 adds back the global DSL methods, but with deprecation -messages. This allows Rake 0.9.1 to be used with older rakefiles with -warning messages. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence (quix) -* Roger Pack -* Cezary Baginski -* Sean Scot August Moon -* R.T. Lechow -* Alex Chaffee -* James Tucker -* Matthias Lüdtke -* Santiago Pastorino - -Also, bit thanks to Eric Hodel for assisting with getting this release -out the door (where "assisting" includes, but is not by any means -limited to, "pushing" me to get it done). - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.2.2.rdoc b/doc/release_notes/rake-0.9.2.2.rdoc deleted file mode 100644 index d848f227b..000000000 --- a/doc/release_notes/rake-0.9.2.2.rdoc +++ /dev/null @@ -1,55 +0,0 @@ -= Rake 0.9.2.2 Released - -Rake version 0.9.2.2 is mainly bug fixes. - -== Changes - -* The rake test loader now removes arguments it has processed. Issue #51 -* Rake::TaskArguments now responds to #values_at -* RakeFileUtils.verbose_flag = nil silences output the same as 0.8.7 -* Rake tests are now directory-independent -* Rake tests are no longer require flexmock -* Commands constant is no longer polluting top level namespace. -* Show only the interesting portion of the backtrace by default (James M. Lawrence). -* Added --reduce-compat option to remove backward compatible DSL hacks (James M. Lawrence). - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence (quix) -* Roger Pack -* Cezary Baginski -* Sean Scot August Moon -* R.T. Lechow -* Alex Chaffee -* James Tucker -* Matthias Lüdtke -* Santiago Pastorino - -Also, bit thanks to Eric Hodel for assisting with getting this release -out the door (where "assisting" includes, but is not by any means -limited to, "pushing" me to get it done). - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.2.rdoc b/doc/release_notes/rake-0.9.2.rdoc deleted file mode 100644 index 2314193f5..000000000 --- a/doc/release_notes/rake-0.9.2.rdoc +++ /dev/null @@ -1,49 +0,0 @@ -= Rake 0.9.2 Released - -Rake version 0.9.2 has a few small fixes. See below for details. - -== Changes - -* Support for Ruby 1.8.6 was fixed. -* Global DSL warnings now honor --no-deprecate - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence (quix) -* Roger Pack -* Cezary Baginski -* Sean Scot August Moon -* R.T. Lechow -* Alex Chaffee -* James Tucker -* Matthias Lüdtke -* Santiago Pastorino - -Also, bit thanks to Eric Hodel for assisting with getting this release -out the door (where "assisting" includes, but is not by any means -limited to, "pushing" me to get it done). - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.3.rdoc b/doc/release_notes/rake-0.9.3.rdoc deleted file mode 100644 index 4476b4f18..000000000 --- a/doc/release_notes/rake-0.9.3.rdoc +++ /dev/null @@ -1,102 +0,0 @@ -= Rake 0.9.3 Released - -Rake version 0.9.3 contains some new, backwards compatible features and -a number of bug fixes. - -== Changes - -=== New Features - -* Multitask tasks now use a thread pool. Use -j to limit the number of - available threads. - -* Use -m to turn regular tasks into multitasks (use at your own risk). - -* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to - programatically add rake task libraries. - -* You can specific backtrace suppression patterns (see - --supress-backtrace) - -* Directory tasks can now take prerequisites and actions - -* Use --backtrace to request a full backtrace without the task trace. - -* You can say "--backtrace=stdout" and "--trace=stdout" to route trace - output to standard output rather than standard error. - -* Optional 'phony' target (enable with 'require 'rake/phony'") for - special purpose builds. - -* Task#clear now clears task comments as well as actions and - prerequisites. Task#clear_comment will specifically target comments. - -* The --all option will force -T and -D to consider all the tasks, - with and without descriptions. - -=== Bug Fixes - -* Semi-colons in windows rakefile paths now work. - -* Improved Control-C support when invoking multiple test suites. - -* egrep method now reads files in text mode (better support for - Windows) - -* Better deprecation line number reporting. - -* The -W option now works with all tasks, whether they have a - description or not. - -* File globs in rake should not be sorted alphabetically, independent - of file system and platform. - -* Numerous internal improvements. - -* Documentation typos and fixes. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.4.rdoc b/doc/release_notes/rake-0.9.4.rdoc deleted file mode 100644 index 099ebc91b..000000000 --- a/doc/release_notes/rake-0.9.4.rdoc +++ /dev/null @@ -1,60 +0,0 @@ -= Rake 0.9.4 Released - -Rake version 0.9.4 contains a number of bug fixes. - -== Changes - -=== Bug Fixes (0.9.4) - -* Exit status with failing tests is not correctly set to non-zero. - -* Simplified syntax for phony task (for older versions of RDoc). - -* Stand alone FileList usage gets glob function (without loading in - extra dependencies) - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.5.rdoc b/doc/release_notes/rake-0.9.5.rdoc deleted file mode 100644 index 40c35ee69..000000000 --- a/doc/release_notes/rake-0.9.5.rdoc +++ /dev/null @@ -1,55 +0,0 @@ -= Rake 0.9.5 Released - -Rake version 0.9.5 contains a number of bug fixes. - -== Changes - -=== Bug Fixes (0.9.5) - -* --trace and --backtrace no longer swallow following task names. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.6.rdoc b/doc/release_notes/rake-0.9.6.rdoc deleted file mode 100644 index fb247e794..000000000 --- a/doc/release_notes/rake-0.9.6.rdoc +++ /dev/null @@ -1,64 +0,0 @@ -= Rake 0.9.6 Released - -Rake version 0.9.6 contains a number of fixes mainly for merging -Rake into the Ruby source tree and fixing tests. - -== Changes - -=== Bug Fixes (0.9.6) - -* Better trace output when using a multi-threaded Rakefile. -* Arg parsing is now consistent for tasks and multitasks. -* Skip exit code test in versions of Ruby that don't support it well. - -Changes for better integration with the Ruby source tree: - -* Fix version literal for Ruby source tree build. -* Better loading of libraries for testing in Ruby build. -* Use the ruby version provided by Ruby's tests. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-10.0.0.rdoc b/doc/release_notes/rake-10.0.0.rdoc deleted file mode 100644 index 7bf68fb73..000000000 --- a/doc/release_notes/rake-10.0.0.rdoc +++ /dev/null @@ -1,178 +0,0 @@ -= Rake 10.0 Released - - "Jim, when will Rake reach version 1.0?" - -Over the past several years I've been asked that question at -conferences, panels and over twitter. Due to historical reasons (or -maybe just plain laziness) Rake has (incorrectly) been treating the -second digit of the version as the major release number. So in my head -Rake was already at version 9. - -Well, it's time to fix things. This next version of Rake drops old, -crufty, backwards compatibility hacks such as top level constants, DSL -methods defined in Object and numerous other features that are just no -longer desired. It's also time to drop the leading zero from the -version number as well and call this new version of rake what it -really is: Version 10. - -So, welcome to Rake 10.0! - -Rake 10 is actually feature identical to the latest version of Rake 9 -(that would be the version spelled 0.9.3), *except* that Rake 10 drops -all the sundry deprecated features that have accumulated over the years. - -If your Rakefile is up to date and current with all the new features -of Rake 10, you are ready to go. If your Rakefile still uses a few -deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same -feature set. Just be aware that future features will be in Rake 10 -family line. - -== Changes in 10.0 - -As mentioned above, there are no new features in Rake 10. However, -there are a number of features missing: - -* Classic namespaces are now gone. Rake is no longer able to reflect - the options settings in the global variables ($rakefile, $show_tasks, - $show_prereqs, $trace, $dryrun and $silent). The - --classic-namespace option is no longer supported. - -* Global constants are no longer supported. This includes - Task, FileTask, FileCreationTask and - RakeApp). The constant missing hook to warn about using - global rake constants has been removed. - -* The Rake DSL methods (task, file, directory, etc) are in their own - module (Rake::DSL). The stub versions of these methods (that printed - warnings) in Object have been removed. However, the DSL methods are - added to the top-level main object. Since main is - not in the inheritance tree, the presence of the DSL methods in main - should be low impact on other libraries. - - If you want to use the Rake DSL commands from your own code, just - include Rake::DSL into your own classes and modules. - -* The deprecated syntax for task arguments (the one using - :needs) has been removed. - -* The --reduce-compat flag has been removed (it's not needed - anymore). - -* The deprecated rake/sys.rb library has been removed. - -* The deprecated rake/rdoctask.rb library has been removed. - RDoc supplies its own rake task now. - -* The deprecated rake/gempackagetask.rb library has been - removed. Gem supplies its own package task now. - -There is one small behavioral change: - -* Non-file tasks now always report the current time as their time - stamp. This is different from the previous behavior where non-file - tasks reported current time only if there were no prerequisites, and - the max prerequisite timestamp otherwise. This lead to inconsistent - and surprising behavior when adding prerequisites to tasks that in - turn were prequisites to file tasks. The new behavior is more - consistent and predictable. - -== Changes (from 0.9.3) - -Since Rake 10 includes the changes from the last version of Rake 9, -we'll repeat the changes for version 0.9.3 here. - -=== New Features - -* Multitask tasks now use a thread pool. Use -j to limit the number of - available threads. - -* Use -m to turn regular tasks into multitasks (use at your own risk). - -* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to - programatically add rake task libraries. - -* You can specific backtrace suppression patterns (see - --supress-backtrace) - -* Directory tasks can now take prerequisites and actions - -* Use --backtrace to request a full backtrace without the task trace. - -* You can say "--backtrace=stdout" and "--trace=stdout" to route trace - output to standard output rather than standard error. - -* Optional 'phony' target (enable with 'require 'rake/phony'") for - special purpose builds. - -* Task#clear now clears task comments as well as actions and - prerequisites. Task#clear_comment will specifically target comments. - -* The --all option will force -T and -D to consider all the tasks, - with and without descriptions. - -=== Bug Fixes - -* Semi-colons in windows rakefile paths now work. - -* Improved Control-C support when invoking multiple test suites. - -* egrep method now reads files in text mode (better support for - Windows) - -* Better deprecation line number reporting. - -* The -W option now works with all tasks, whether they have a - description or not. - -* File globs in rake should not be sorted alphabetically, independent - of file system and platform. - -* Numerous internal improvements. - -* Documentation typos and fixes. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a lot of these changes. The -following people contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-10.0.1.rdoc b/doc/release_notes/rake-10.0.1.rdoc deleted file mode 100644 index 152af25a5..000000000 --- a/doc/release_notes/rake-10.0.1.rdoc +++ /dev/null @@ -1,58 +0,0 @@ -= Rake 10.0.1 Released - -== Changes in 10.0.1 - -=== Bug Fixes - -* Exit status with failing tests is not correctly set to non-zero. - -* Simplified syntax for phony task (for older versions of RDoc). - -* Stand alone FileList usage gets glob function (without loading in - extra dependencies) - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a lot of these changes. The -following people contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-10.0.2.rdoc b/doc/release_notes/rake-10.0.2.rdoc deleted file mode 100644 index bb6bda874..000000000 --- a/doc/release_notes/rake-10.0.2.rdoc +++ /dev/null @@ -1,53 +0,0 @@ -= Rake 10.0.2 Released - -== Changes in Rake 10.0.2 - -=== Bug Fixes - -* --trace and --backtrace no longer swallow following task names. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a lot of these changes. The -following people contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-10.0.3.rdoc b/doc/release_notes/rake-10.0.3.rdoc deleted file mode 100644 index dbc84c1c1..000000000 --- a/doc/release_notes/rake-10.0.3.rdoc +++ /dev/null @@ -1,191 +0,0 @@ -= Rake 10.0.3 Released - - "Jim, when will Rake reach version 1.0?" - -Over the past several years I've been asked that question at -conferences, panels and over twitter. Due to historical reasons (or -maybe just plain laziness) Rake has (incorrectly) been treating the -second digit of the version as the major release number. So in my head -Rake was already at version 9. - -Well, it's time to fix things. This next version of Rake drops old, -crufty, backwards compatibility hacks such as top level constants, DSL -methods defined in Object and numerous other features that are just no -longer desired. It's also time to drop the leading zero from the -version number as well and call this new version of rake what it -really is: Version 10. - -So, welcome to Rake 10.0! - -Rake 10 is actually feature identical to the latest version of Rake 9 -(that would be the version spelled 0.9.3), *except* that Rake 10 drops -all the sundry deprecated features that have accumulated over the years. - -If your Rakefile is up to date and current with all the new features -of Rake 10, you are ready to go. If your Rakefile still uses a few -deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same -feature set. Just be aware that future features will be in Rake 10 -family line. - -== Changes in Version 10 - -As mentioned above, there are no new features in Rake 10. However, -there are a number of features missing: - -* Classic namespaces are now gone. Rake is no longer able to reflect - the options settings in the global variables ($rakefile, $show_tasks, - $show_prereqs, $trace, $dryrun and $silent). The - --classic-namespace option is no longer supported. - -* Global constants are no longer supported. This includes - Task, FileTask, FileCreationTask and - RakeApp). The constant missing hook to warn about using - global rake constants has been removed. - -* The Rake DSL methods (task, file, directory, etc) are in their own - module (Rake::DSL). The stub versions of these methods (that printed - warnings) in Object have been removed. However, the DSL methods are - added to the top-level main object. Since main is - not in the inheritance tree, the presence of the DSL methods in main - should be low impact on other libraries. - - If you want to use the Rake DSL commands from your own code, just - include Rake::DSL into your own classes and modules. - -* The deprecated syntax for task arguments (the one using - :needs) has been removed. - -* The --reduce-compat flag has been removed (it's not needed - anymore). - -* The deprecated rake/sys.rb library has been removed. - -* The deprecated rake/rdoctask.rb library has been removed. - RDoc supplies its own rake task now. - -* The deprecated rake/gempackagetask.rb library has been - removed. Gem supplies its own package task now. - -There is one small behavioral change: - -* Non-file tasks now always report the current time as their time - stamp. This is different from the previous behavior where non-file - tasks reported current time only if there were no prerequisites, and - the max prerequisite timestamp otherwise. This lead to inconsistent - and surprising behavior when adding prerequisites to tasks that in - turn were prequisites to file tasks. The new behavior is more - consistent and predictable. - -== Changes (from 0.9.3, 0.9.4, 0.9.5) - -Since Rake 10 includes the changes from the last version of Rake 9, -we'll repeat the changes for versions 0.9.3 through 0.9.5 here. - -=== New Features (in 0.9.3) - -* Multitask tasks now use a thread pool. Use -j to limit the number of - available threads. - -* Use -m to turn regular tasks into multitasks (use at your own risk). - -* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to - programatically add rake task libraries. - -* You can specific backtrace suppression patterns (see - --supress-backtrace) - -* Directory tasks can now take prerequisites and actions - -* Use --backtrace to request a full backtrace without the task trace. - -* You can say "--backtrace=stdout" and "--trace=stdout" to route trace - output to standard output rather than standard error. - -* Optional 'phony' target (enable with 'require 'rake/phony'") for - special purpose builds. - -* Task#clear now clears task comments as well as actions and - prerequisites. Task#clear_comment will specifically target comments. - -* The --all option will force -T and -D to consider all the tasks, - with and without descriptions. - -=== Bug Fixes (in 0.9.3) - -* Semi-colons in windows rakefile paths now work. - -* Improved Control-C support when invoking multiple test suites. - -* egrep method now reads files in text mode (better support for - Windows) - -* Better deprecation line number reporting. - -* The -W option now works with all tasks, whether they have a - description or not. - -* File globs in rake should not be sorted alphabetically, independent - of file system and platform. - -* Numerous internal improvements. - -* Documentation typos and fixes. - -=== Bug Fixes (in 0.9.4) - -* Exit status with failing tests is not correctly set to non-zero. - -* Simplified syntax for phony task (for older versions of RDoc). - -* Stand alone FileList usage gets glob function (without loading in - extra dependencies) - -=== Bug Fixes (in 0.9.5) - -* --trace and --backtrace no longer swallow following task names. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a lot of these changes. The -following people contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-10.1.0.rdoc b/doc/release_notes/rake-10.1.0.rdoc deleted file mode 100644 index a9f4bb396..000000000 --- a/doc/release_notes/rake-10.1.0.rdoc +++ /dev/null @@ -1,61 +0,0 @@ -= Rake 10.1.0 Released - -== Changes in Version 10.1 - -=== New Features - -* Add support for variable length task argument lists. If more actual - arguments are supplied than named arguments, then the extra - arguments values will be in args.extras. - -* Application name is not displayed in the help banner. (Previously - "rake" was hardcoded, now rake-based applications can display their - own names). - -=== Bug Fixes - -Bug fixes include: - -* Fix backtrace suppression issues. - -* Rules now explicit get task arguments passed to them. - -* Rename FileList#exclude? to FileList#exclude_from_list? to avoid - conflict with new Rails method. - -* Clean / Clobber tasks now report failure to remove files. - -* Plus heaps of internal code cleanup. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more from GitHub: - -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a lot of these changes. -The following people contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Michael Nikitochkin (general code cleanup) -* Vipul A M (general code cleanup) -* Dennis Bell (variable length task argument lists) -* Jacob Swanner (rules arguments) -* Rafael Rosa Fu (documentation typo) -* Stuart Nelson (install.rb fixes) -* Lee Hambley (application name in help banner) - --- Jim Weirich From ed799f11bcc3ee6e6d292d0ed55c76b45774943e Mon Sep 17 00:00:00 2001 From: Tatsuya Sato Date: Sat, 26 Mar 2016 13:38:24 +0900 Subject: [PATCH 487/813] Revert "Remove old release notes as the maintenance policy has changed." This reverts commit 68b3584bd6b25c3471ab719042572a5044dd5bd2. --- doc/release_notes/rake-0.4.14.rdoc | 23 ++++ doc/release_notes/rake-0.4.15.rdoc | 35 +++++ doc/release_notes/rake-0.5.0.rdoc | 53 ++++++++ doc/release_notes/rake-0.5.3.rdoc | 78 ++++++++++++ doc/release_notes/rake-0.5.4.rdoc | 46 +++++++ doc/release_notes/rake-0.6.0.rdoc | 141 ++++++++++++++++++++ doc/release_notes/rake-0.7.0.rdoc | 119 +++++++++++++++++ doc/release_notes/rake-0.7.1.rdoc | 59 +++++++++ doc/release_notes/rake-0.7.2.rdoc | 121 ++++++++++++++++++ doc/release_notes/rake-0.7.3.rdoc | 47 +++++++ doc/release_notes/rake-0.8.0.rdoc | 114 +++++++++++++++++ doc/release_notes/rake-0.8.2.rdoc | 165 ++++++++++++++++++++++++ doc/release_notes/rake-0.8.3.rdoc | 112 ++++++++++++++++ doc/release_notes/rake-0.8.4.rdoc | 147 +++++++++++++++++++++ doc/release_notes/rake-0.8.5.rdoc | 53 ++++++++ doc/release_notes/rake-0.8.6.rdoc | 37 ++++++ doc/release_notes/rake-0.8.7.rdoc | 55 ++++++++ doc/release_notes/rake-0.9.0.rdoc | 112 ++++++++++++++++ doc/release_notes/rake-0.9.1.rdoc | 52 ++++++++ doc/release_notes/rake-0.9.2.2.rdoc | 55 ++++++++ doc/release_notes/rake-0.9.2.rdoc | 49 +++++++ doc/release_notes/rake-0.9.3.rdoc | 102 +++++++++++++++ doc/release_notes/rake-0.9.4.rdoc | 60 +++++++++ doc/release_notes/rake-0.9.5.rdoc | 55 ++++++++ doc/release_notes/rake-0.9.6.rdoc | 64 ++++++++++ doc/release_notes/rake-10.0.0.rdoc | 178 ++++++++++++++++++++++++++ doc/release_notes/rake-10.0.1.rdoc | 58 +++++++++ doc/release_notes/rake-10.0.2.rdoc | 53 ++++++++ doc/release_notes/rake-10.0.3.rdoc | 191 ++++++++++++++++++++++++++++ doc/release_notes/rake-10.1.0.rdoc | 61 +++++++++ 30 files changed, 2495 insertions(+) create mode 100644 doc/release_notes/rake-0.4.14.rdoc create mode 100644 doc/release_notes/rake-0.4.15.rdoc create mode 100644 doc/release_notes/rake-0.5.0.rdoc create mode 100644 doc/release_notes/rake-0.5.3.rdoc create mode 100644 doc/release_notes/rake-0.5.4.rdoc create mode 100644 doc/release_notes/rake-0.6.0.rdoc create mode 100644 doc/release_notes/rake-0.7.0.rdoc create mode 100644 doc/release_notes/rake-0.7.1.rdoc create mode 100644 doc/release_notes/rake-0.7.2.rdoc create mode 100644 doc/release_notes/rake-0.7.3.rdoc create mode 100644 doc/release_notes/rake-0.8.0.rdoc create mode 100644 doc/release_notes/rake-0.8.2.rdoc create mode 100644 doc/release_notes/rake-0.8.3.rdoc create mode 100644 doc/release_notes/rake-0.8.4.rdoc create mode 100644 doc/release_notes/rake-0.8.5.rdoc create mode 100644 doc/release_notes/rake-0.8.6.rdoc create mode 100644 doc/release_notes/rake-0.8.7.rdoc create mode 100644 doc/release_notes/rake-0.9.0.rdoc create mode 100644 doc/release_notes/rake-0.9.1.rdoc create mode 100644 doc/release_notes/rake-0.9.2.2.rdoc create mode 100644 doc/release_notes/rake-0.9.2.rdoc create mode 100644 doc/release_notes/rake-0.9.3.rdoc create mode 100644 doc/release_notes/rake-0.9.4.rdoc create mode 100644 doc/release_notes/rake-0.9.5.rdoc create mode 100644 doc/release_notes/rake-0.9.6.rdoc create mode 100644 doc/release_notes/rake-10.0.0.rdoc create mode 100644 doc/release_notes/rake-10.0.1.rdoc create mode 100644 doc/release_notes/rake-10.0.2.rdoc create mode 100644 doc/release_notes/rake-10.0.3.rdoc create mode 100644 doc/release_notes/rake-10.1.0.rdoc diff --git a/doc/release_notes/rake-0.4.14.rdoc b/doc/release_notes/rake-0.4.14.rdoc new file mode 100644 index 000000000..b2f1f84f3 --- /dev/null +++ b/doc/release_notes/rake-0.4.14.rdoc @@ -0,0 +1,23 @@ += Rake 0.4.14 Released + +== Changes + +Version 0.4.14 is a compatibility fix to allow Rake's test task to +work under Ruby 1.8.2. A change in the Test::Unit autorun feature +prevented Rake from running any tests. This release fixes the +problem. + +Rake 0.4.14 is the recommended release for anyone using Ruby 1.8.2. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 + diff --git a/doc/release_notes/rake-0.4.15.rdoc b/doc/release_notes/rake-0.4.15.rdoc new file mode 100644 index 000000000..975708863 --- /dev/null +++ b/doc/release_notes/rake-0.4.15.rdoc @@ -0,0 +1,35 @@ += Rake 0.4.15 Released + +== Changes + +Version 0.4.15 is a bug fix update for the Ruby 1.8.2 compatibility +changes. This release includes: + +* Fixed a bug that prevented the TESTOPTS flag from working with the + revised for 1.8.2 test task. + +* Updated the docs on --trace to indicate that it also enables a full + backtrace on errors. + +* Several fixes for new warnings generated. + +== Mini-Roadmap + +I will continue to issue Rake updates in the 0.4.xx series as new +Ruby-1.8.2 issues become manifest. Once the codebase stabilizes, I +will release a 0.5.0 version incorporating all the changes. If you +are not using Ruby-1.8.2 and wish to avoid version churn, I recommend +staying with a release prior to Rake-0.4.14. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 + diff --git a/doc/release_notes/rake-0.5.0.rdoc b/doc/release_notes/rake-0.5.0.rdoc new file mode 100644 index 000000000..f5cb9f307 --- /dev/null +++ b/doc/release_notes/rake-0.5.0.rdoc @@ -0,0 +1,53 @@ += Rake 0.5.0 Released + +It has been a long time in coming, but we finally have a new version +of Rake available. + +== Changes + +* Fixed bug where missing intermediate file dependencies could cause + an abort with --trace or --dry-run. (Brian Candler) + +* Recursive rules are now supported (Tilman Sauerbeck). + +* Added tar.gz and tar.bz2 support to package task (Tilman Sauerbeck). + +* Added warning option for the Test Task (requested by Eric Hodel). + +* The jamis rdoc template is only used if it exists. + +* Added fix for Ruby 1.8.2 test/unit and rails problem. + +* Added contributed rake man file. (Jani Monoses) + +* Fixed documentation that was lacking the Rake module name (Tilman + Sauerbeck). + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 + +== Thanks + +Lots of people provided input to this release. Thanks to Tilman +Sauerbeck for numerous patches, documentation fixes and suggestions. +And for also pushing me to get this release out. Also, thanks to +Brian Candler for the finding and fixing --trace/dry-run fix. That +was an obscure bug. Also to Eric Hodel for some good suggestions. + +-- Jim Weirich + diff --git a/doc/release_notes/rake-0.5.3.rdoc b/doc/release_notes/rake-0.5.3.rdoc new file mode 100644 index 000000000..451da4a0a --- /dev/null +++ b/doc/release_notes/rake-0.5.3.rdoc @@ -0,0 +1,78 @@ += Rake 0.5.3 Released + +Although it has only been two weeks since the last release, we have +enough updates to the Rake program to make it time for another +release. + +== Changes + +Here are the changes for version 0.5.3 ... + +* FileLists have been extensively changed so that they mimic the + behavior of real arrays even more closely. In particular, + operations on FileLists that return a new collection (e.g. collect, + reject) will now return a FileList rather than an array. In + addition, several places where FileLists were not properly expanded + before use have been fixed. + +* A method (+ext+) to simplify the handling of file extensions was + added to String and to Array. + +* The 'testrb' script in test/unit tends to silently swallow syntax + errors in test suites. Because of that, the default test loader is + now a rake-provided script. You can still use 'testrb' by setting + the loader flag in the test task to :testrb. (See the API documents + for TestTask for all the loader flag values). + +* FileUtil methods (e.g. cp, mv, install) are now declared to be + private. This will cut down on the interference with user defined + methods of the same name. + +* Fixed the verbose flag in the TestTask so that the test code is + controlled by the flag. Also shortened up some failure messages. + (Thanks to Tobias Luetke for the suggestion). + +* Rules will now properly detect a task that can generate a source + file. Previously rules would only consider source files that were + already present. + +* Added an +import+ command that allows Rake to dynamically import + dependendencies into a running Rake session. The +import+ command + can run tasks to update the dependency file before loading them. + Dependency files can be in rake or make format, allowing rake to + work with tools designed to generate dependencies for make. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 + +== Thanks + +As usual, it was input from users that drove a alot of these changes. +Thanks to ... + +* Brian Gernhardt for the rules fix (especially for the patience to + explain the problem to me until I got what he was talking about). +* Stefan Lang for pointing out problems in the dark corners of the + FileList implementation. +* Alexey Verkhovsky pointing out the silently swallows syntax errors + in tests. +* Tobias Luetke for beautifying the test task output. +* Sam Roberts for some of the ideas behind dependency loading. + +-- Jim Weirich + diff --git a/doc/release_notes/rake-0.5.4.rdoc b/doc/release_notes/rake-0.5.4.rdoc new file mode 100644 index 000000000..112587fb9 --- /dev/null +++ b/doc/release_notes/rake-0.5.4.rdoc @@ -0,0 +1,46 @@ += Rake 0.5.4 Released + +Time for some minor bug fixes and small enhancements + +== Changes + +Here are the changes for version 0.5.4 ... + +* Added double quotes to the test runner. This allows the location of + the tests (and runner) to be in a directory path that contains + spaces (e.g. "C:/Program Files/ruby/bin"). + +* Added .svn to default ignore list. Now subversion project metadata + is automatically ignored by Rake's FileList. + +* Updated FileList#include to support nested arrays and filelists. + FileLists are flat lists of file names. Using a FileList in an + include will flatten out the nested file names. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 + +== Thanks + +As usual, it was input from users that drove a alot of these changes. +Thanks to ... + +* Tilman Sauerbeck for the nested FileList suggestion. +* Josh Knowles for pointing out the spaces in directory name problem. + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.6.0.rdoc b/doc/release_notes/rake-0.6.0.rdoc new file mode 100644 index 000000000..340c07bf7 --- /dev/null +++ b/doc/release_notes/rake-0.6.0.rdoc @@ -0,0 +1,141 @@ += Rake 0.6.0 Released + +Its time for some long requested enhancements and lots of bug fixes +... And a whole new web page. + +== New Web Page + +The primary documentation for rake has moved from the RubyForge based +wiki to its own Hieraki based web site. Constant spam on the wiki +made it a difficult to keep clean. The new site will be easier to +update and organize. + +Check out the new documentation at: http://docs.rubyrake.org + +We will be adding new documentation to the site as time goes on. + +In addition to the new docs page, make sure you check out Martin +Fowlers article on rake at http://martinfowler.com/articles/rake.html + +== Changes + +=== New Features + +* Multiple prerequisites on Rake rules now allowed. However, keep the + following in mind: + + 1. All the prerequisites of a rule must be available before a rule + is triggered, where "enabled" means (a) an existing file, (b) a + defined rule, or (c) another rule which also must be + trigger-able. + 2. Rules are checked in order of definition, so it is important to + order your rules properly. If a file can be created by two + different rules, put the more specific rule first (otherwise the + more general rule will trigger first and the specific one will + never be triggered). + 3. The source method now returns the name of the first + prerequisite listed in the rule. sources returns the + names of all the rule prerequisites, ordered as they are defined + in the rule. If the task has other prerequisites not defined in + the rule (but defined in an explicit task definition), then they + will _not_ be included in the sources list. + +* FileLists may now use the egrep command. This popular enhancement + is now a core part of the FileList object. If you want to get a + list of all your to-dos, fixmes and TBD comments, add the following + to your Rakefile. + + desc "Look for TODO and FIXME tags in the code" + task :todo do + FileList['**/*.rb'].egrep /#.*(FIXME|TODO|TBD)/ + end + +* The investigation method was added to task object to dump + out some important values. This makes it a bit easier to debug Rake + tasks. + + For example, if you are having problems with a particular task, just + print it out: + + task :huh do + puts Rake::Task['huh'].investigation + end + +* The Rake::TestTask class now supports a "ruby_opts" option to pass + arbitrary ruby options to a test subprocess. + +=== Some Incompatibilities + +* When using the ruby command to start a Ruby subprocess, the + Ruby interpreter that is currently running rake is used by default. + This makes it easier to use rake in an environment with multiple + ruby installation. (Previously, the first ruby command found in the + PATH was used). + + If you wish to chose a different Ruby interpreter, you can + explicitly choose the interpreter via the sh command. + +* The major rake classes (Task, FileTask, FileCreationTask, RakeApp) + have been moved out of the toplevel scope and are now accessible as + Rake::Task, Rake::FileTask, Rake::FileCreationTask and + Rake::Application. If your Rakefile + directly references any one of these tasks, you may: + + 1. Update your Rakefile to use the new classnames + 2. Use the --classic-namespace option on the rake command to get the + old behavior, + 3. Add require 'rake/classic_namespace' to the + Rakefile to get the old behavior. + + rake will print a rather annoying warning whenever a + deprecated class name is referenced without enabling classic + namespace. + +=== Bug Fixes + +* Several unit tests and functional tests were fixed to run better + under windows. + +* Directory tasks are now a specialized version of a File task. A + directory task will only be triggered if it doesn't exist. It will + not be triggered if it is out of date w.r.t. any of its + prerequisites. + +* Fixed a bug in the Rake::GemPackageTask class so that the gem now + properly contains the platform name. + +* Fixed a bug where a prerequisite on a file task would cause + an exception if the prerequisite did not exist. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 + +== Thanks + +As usual, it was input from users that drove a alot of these changes. +The following people either contributed patches, made suggestions or +made otherwise helpful comments. Thanks to ... + +* Greg Fast (better ruby_opt test options) +* Kelly Felkins (requested by better namespace support) +* Martin Fowler (suggested Task.investigation) +* Stuart Jansen (send initial patch for multiple prerequisites). +* Masao Mutch (better support for non-ruby Gem platforms) +* Philipp Neubeck (patch for file task exception fix) + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.7.0.rdoc b/doc/release_notes/rake-0.7.0.rdoc new file mode 100644 index 000000000..b8bf56ebb --- /dev/null +++ b/doc/release_notes/rake-0.7.0.rdoc @@ -0,0 +1,119 @@ += Rake 0.7.0 Released + +These changes for Rake have been brewing for a long time. Here they +are, I hope you enjoy them. + +== Changes + +=== New Features + +* Name space support for task names (see below). + +* Prerequisites can be executed in parallel (see below). + +* Added safe_ln support for openAFS (via Ludvig Omholt). + +* RDoc defaults to internal (in-process) invocation. The old behavior + is still available by setting the +external+ flag to true. + +* Rakefiles are now loaded with the expanded path to prevent + accidental polution from the Ruby load path. + +* Task objects my now be used in prerequisite lists directly. + +* Task objects (in addition to task names) may now be included in the + prerequisite list of a task. + +* Internals cleanup and refactoring. + +=== Bug Fixes + +* Compatibility fixes for Ruby 1.8.4 FileUtils changes. + +=== Namespaces + +Tasks can now be nested inside their own namespaces. Tasks within one +namespace will not accidently interfer with tasks named in a different +namespace. + +For example: + + namespace "main" do + task :build do + # Build the main program + end + end + + namespace "samples" do + task :build do + # Build the sample programs + end + end + + task :build_all => ["main:build", "samples:build"] + +Even though both tasks are named :build, they are separate tasks in +their own namespaces. The :build_all task (defined in the toplevel +namespace) references both build tasks in its prerequisites. + +You may invoke each of the individual build tasks with the following +commands: + + rake main:build + rake samples:build + +Or invoke both via the :build_all command: + + rake build_all + +Namespaces may be nested arbitrarily. Since the name of file tasks +correspond to the name of a file in the external file system, +FileTasks are not affected by the namespaces. + +See the Rakefile format documentation (in the Rake API documents) for +more information. + +=== Parallel Tasks + +Sometimes you have several tasks that can be executed in parallel. By +specifying these tasks as prerequisites to a +multitask+ task. + +In the following example the tasks copy_src, copy_doc and copy_bin +will all execute in parallel in their own thread. + + multitask :copy_files => [:copy_src, :copy_doc, :copy_bin] do + puts "All Copies Complete" + end + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 + +== Thanks + +As usual, it was input from users that drove a alot of these changes. +The following people either contributed patches, made suggestions or +made otherwise helpful comments. Thanks to ... + +* Doug Young (inspriation for the parallel task) + +* David Heinemeier Hansson (for --trace message enhancement and for + pushing for namespace support). + +* Ludvig Omholt (for the openAFS fix) + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.7.1.rdoc b/doc/release_notes/rake-0.7.1.rdoc new file mode 100644 index 000000000..c17088ee9 --- /dev/null +++ b/doc/release_notes/rake-0.7.1.rdoc @@ -0,0 +1,59 @@ += Rake 0.7.1 Released + +Version 0.7.1 supplies a bug fix and a few minor enhancements. + +== Changes + +=== Bug Fixes in 0.7.1 + +* Changes in the exception reported for the FileUtils.ln caused + safe_ln to fail with a NotImplementedError. Rake 0.7.1 will now + catch that error or any StandardError and properly fall back to + using +cp+. + +=== New Features in 0.7.1 + +* You can filter the results of the --task option by supplying an + optional regular expression. This allows the user to easily find a + particular task name in a long list of possible names. + +* Transforming procs in a rule may now return a list of prerequisites. + This allows more flexible rule formation. + +* FileList and String now support a +pathmap+ melthod that makes the + transforming paths a bit easier. See the API docs for +pathmap+ for + details. + +* The -f option without a value will disable the search for a + Rakefile. This allows the Rakefile to be defined entirely in a + library (and loaded with the -r option). The current working + directory is not changed when this is done. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 + +== Thanks + +As usual, it was input from users that drove a alot of these changes. +The following people either contributed patches, made suggestions or +made otherwise helpful comments. Thanks to ... + +* James Britt and Assaph Mehr for reporting and helping to debug the + safe_ln issue. + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.7.2.rdoc b/doc/release_notes/rake-0.7.2.rdoc new file mode 100644 index 000000000..ec99ee0c0 --- /dev/null +++ b/doc/release_notes/rake-0.7.2.rdoc @@ -0,0 +1,121 @@ += Rake 0.7.2 Released + +Version 0.7.2 supplies a bug fix and a few minor enhancements. In +particular, the new version fixes an incompatibility with the soon to +be released Ruby 1.8.6. We strongly recommend upgrading to Rake 0.7.2 +in order to be compatible with the new version of Ruby. + +== Changes + +=== Bug Fixes in 0.7.2 + +There are quite a number of bug fixes in the new 0.7.2 version of +Rake: + +* Removed dependency on internal fu_xxx functions from FileUtils. + +* Error messages are now send to stderr rather than stdout (from + Payton Quackenbush). + +* Better error handling on invalid command line arguments (from Payton + Quackenbush). + +* Fixed some bugs where the application object was going to the global + appliation instead of using its own data. + +* Fixed the method name leak from FileUtils (bug found by Glenn + Vanderburg). + +* Added test for noop, bad_option and verbose flags to sh command. + +* Added a description to the gem task in GemPackageTask. + +* Fixed a bug when rules have multiple prerequisites (patch by Joel + VanderWerf) + +* Added the handful of RakeFileUtils to the private method as well. + +=== New Features in 0.7.2 + +The following new features are available in Rake version 0.7.2: + +* Added square and curly bracket patterns to FileList#include (Tilman + Sauerbeck). + +* FileLists can now pass a block to FileList#exclude to exclude files + based on calculated values. + +* Added plain filename support to rule dependents (suggested by Nobu + Nakada). + +* Added pathmap support to rule dependents. In other words, if a + pathmap format (beginning with a '%') is given as a Rake rule + dependent, then the name of the depend will be the name of the + target with the pathmap format applied. + +* Added a 'tasks' method to a namespace to get a list of tasks + associated with the namespace. + +* Added tar_command and zip_command options to the Package task. + +* The clean task will no longer delete 'core' if it is a directory. + +=== Internal Rake Improvements + +The following changes will are mainly internal improvements and +refactorings and have little effect on the end user. But they may be +of interest to the general public. + +* Added rcov task and updated unit testing for better code coverage. + +* Added a 'shame' task to the Rakefile. + +* Added rake_extension to handle detection of extension collisions. + +* Added a protected 'require "rubygems"' to test/test_application to + unbreak cruisecontrol.rb. + +* Removed rake_dup. Now we just simply rescue a bad dup. + +* Refactored the FileList reject logic to remove duplication. + +* Removed if __FILE__ at the end of the rake.rb file. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 + +== Thanks + +As usual, it was input from users that drove a alot of these changes. +The following people either contributed patches, made suggestions or +made otherwise helpful comments. Thanks to ... + +* Payton Quackenbush -- For several error handling improvements. + +* Glenn Vanderburg -- For finding and fixing the method name leak from + FileUtils. + +* Joel VanderWerf -- for finding and fixing a bug in the handling of + multiple prerequisites. + +* Tilman Sauerbeck -- For some enhancing FileList to support more + advanced file globbing. + +* Nobu Nakada -- For suggesting plain file name support to rule dependents. + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.7.3.rdoc b/doc/release_notes/rake-0.7.3.rdoc new file mode 100644 index 000000000..7e9f92198 --- /dev/null +++ b/doc/release_notes/rake-0.7.3.rdoc @@ -0,0 +1,47 @@ += Rake 0.7.3 Released + +Rake version 0.7.3 is a minor release that includes some refactoring to better +support custom Rake applications. + +== Changes + +=== New Features in Version 0.7.3 + +* Added the +init+ and +top_level+ methods to make the creation of custom Rake applications a bit easier. E.g. + + gem 'rake', ">= 0.7.3" + require 'rake' + + Rake.application.init('myrake') + + task :default do + something_interesting + end + + Rake.application.top_level + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But instead of +cryptic make recipes, Rake uses standard Ruby code to declare tasks and +dependencies. You have the full power of a modern scripting language built +right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.8.0.rdoc b/doc/release_notes/rake-0.8.0.rdoc new file mode 100644 index 000000000..4fc7fdd7b --- /dev/null +++ b/doc/release_notes/rake-0.8.0.rdoc @@ -0,0 +1,114 @@ += Rake 0.8.0/0.8.1 Released + +Rake version 0.8.0 is a new release of rake that includes serveral new +features. + +== Changes + +=== New Features in Version 0.8.0 + +* Tasks can now receive command line parameters. See the examples + below for more details. + +* Comments are limited to 80 columns on output, but full comments can + be seen by using the -D parameter. (feature suggested by Jamis + Buck). + +* Explicit exit(n) calls will now set the exit status to n. (patch + provided by Stephen Touset). + +* Rake is now compatible with Ruby 1.9. + +Version 0.8.1 is a minor update that includes additional Ruby 1.9 +compatibility fixes. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 + +== Task Argument Examples + +Prior to version 0.8.0, rake was only able to handle command line +arguments of the form NAME=VALUE that were passed into Rake via the +ENV hash. Many folks had asked for some kind of simple command line +arguments, perhaps using "--" to separate regular task names from +argument values on the command line. The problem is that there was no +easy way to associate positional arguments on the command line with +different tasks. Suppose both tasks :a and :b expect a command line +argument: does the first value go with :a? What if :b is run first? +Should it then get the first command line argument. + +Rake 0.8.0 solves this problem by explicitly passing values directly +to the tasks that need them. For example, if I had a release task +that required a version number, I could say: + + rake release[0.8.0] + +And the string "0.8.0" will be passed to the :release task. Multiple +arguments can be passed by separating them with a comma, for example: + + rake name[john,doe] + +Just a few words of caution. The rake task name and its arguments +need to be a single command line argument to rake. This generally +means no spaces. If spaces are needed, then the entire rake + +argument string should be quoted. Something like this: + + rake "name[billy bob, smith]" + +(Quoting rules vary between operating systems and shells, so make sure +you consult the proper docs for your OS/shell). + +=== Tasks that Expect Parameters + +Parameters are only given to tasks that are setup to expect them. In +order to handle named parameters, the task declaration syntax for +tasks has been extended slightly. + +For example, a task that needs a first name and last name might be +declared as: + + task :name, :first_name, :last_name + +The first argument is still the name of the task (:name in this case). +The next to argumements are the names of the parameters expected by +:name (:first_name and :last_name in the example). + +To access the values of the paramters, the block defining the task +behaviour can now accept a second parameter: + + task :name, :first_name, :last_name do |t, args| + puts "First name is #{args.first_name}" + puts "Last name is #{args.last_name}" + end + +The first argument of the block "t" is always bound to the current +task object. The second argument "args" is an open-struct like object +that allows access to the task arguments. Extra command line +arguments to a task are ignored. Missing command line arguments are +given the nil value. + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Jamis Buck (for comment formatting suggestions) +* Stephen Touset (for exit status patch). + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.8.2.rdoc b/doc/release_notes/rake-0.8.2.rdoc new file mode 100644 index 000000000..a822a9497 --- /dev/null +++ b/doc/release_notes/rake-0.8.2.rdoc @@ -0,0 +1,165 @@ += Rake 0.8.2 Released + +Rake version 0.8.2 is a new release of rake that includes a number of +new features and numerous bug fixes. + +== Changes + +=== New Features in Version 0.8.2 + +* Switched from getoptlong to optparse (patches supplied by Edwin + Pratomo). + +* The -T option will now attempt to dynamically sense the size of the + terminal. The -T output will only self-truncate if the output is a + tty. However, if RAKE_COLUMNS is explicitly set, it will be honored + in any case. (Patch provided by Gavin Stark). + +* The following public methods have been added to rake task objects: + + * task.clear -- Clear both the prerequisites and actions of the + target rake task. + * task.clear_prerequisites -- Clear all the existing prerequisites + from the target rake task. + * task.clear_actions -- Clear all the existing actions from the + target rake task. + * task.reenable -- Re-enable a task, allowing its actions to be + executed again if the task is invoked. + +* Changed RDoc test task to have no default template. This makes it + easier for the tempate to pick up the template from the environment. + +* Default values for task arguments can easily be specified with the + :with_defaults method. (Idea for default argument merging supplied + by (Adam Q. Salter) + +=== Bug Fixes in Version 0.8.2 + +* Fixed bug in package task so that it will include the subdir + directory in the package for testing. (Bug found by Adam Majer) + +* Fixed filename dependency order bug in test_inspect_pending and + test_to_s_pending. (Bug found by Adam Majer) + +* Fixed check for file utils options to make them immune to the + symbol/string differences. (Patch supplied by Edwin Pratomo) + +* Fixed bug with rules involving multiple source, where only the first + dependency of a rule has any effect (Patch supplied by Emanuel + Indermühle) + +* FileList#clone and FileList#dup have better sematics w.r.t. taint + and freeze. + +* Changed from using Mutex to Monitor. Evidently Mutex causes thread + join errors when Ruby is compiled with -disable-pthreads. (Patch + supplied by Ittay Dror) + +* Fixed bug in makefile parser that had problems with extra spaces in + file task names. (Patch supplied by Ittay Dror) + +== Other changes in Version 0.8.2 + +* Added ENV var to rake's own Rakefile to prevent OS X from including + extended attribute junk in the rake package tar file. (Bug found by + Adam Majer) + +* Added a performance patch for reading large makefile dependency + files. (Patch supplied by Ittay Dror) + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 + +== Task Argument Examples + +Prior to version 0.8.0, rake was only able to handle command line +arguments of the form NAME=VALUE that were passed into Rake via the +ENV hash. Many folks had asked for some kind of simple command line +arguments, perhaps using "--" to separate regular task names from +argument values on the command line. The problem is that there was no +easy way to associate positional arguments on the command line with +different tasks. Suppose both tasks :a and :b expect a command line +argument: does the first value go with :a? What if :b is run first? +Should it then get the first command line argument. + +Rake 0.8.0 solves this problem by explicitly passing values directly +to the tasks that need them. For example, if I had a release task +that required a version number, I could say: + + rake release[0.8.2] + +And the string "0.8.2" will be passed to the :release task. Multiple +arguments can be passed by separating them with a comma, for example: + + rake name[john,doe] + +Just a few words of caution. The rake task name and its arguments +need to be a single command line argument to rake. This generally +means no spaces. If spaces are needed, then the entire rake + +argument string should be quoted. Something like this: + + rake "name[billy bob, smith]" + +(Quoting rules vary between operating systems and shells, so make sure +you consult the proper docs for your OS/shell). + +=== Tasks that Expect Parameters + +Parameters are only given to tasks that are setup to expect them. In +order to handle named parameters, the task declaration syntax for +tasks has been extended slightly. + +For example, a task that needs a first name and last name might be +declared as: + + task :name, :first_name, :last_name + +The first argument is still the name of the task (:name in this case). +The next to argumements are the names of the parameters expected by +:name (:first_name and :last_name in the example). + +To access the values of the paramters, the block defining the task +behaviour can now accept a second parameter: + + task :name, :first_name, :last_name do |t, args| + puts "First name is #{args.first_name}" + puts "Last name is #{args.last_name}" + end + +The first argument of the block "t" is always bound to the current +task object. The second argument "args" is an open-struct like object +that allows access to the task arguments. Extra command line +arguments to a task are ignored. Missing command line arguments are +given the nil value. + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Edwin Pratomo +* Gavin Stark +* Adam Q. Salter +* Adam Majer +* Emanuel Indermühle +* Ittay Dror +* Bheeshmar Redheendran (for spending an afternoon with me debugging + windows issues) + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.8.3.rdoc b/doc/release_notes/rake-0.8.3.rdoc new file mode 100644 index 000000000..97184c390 --- /dev/null +++ b/doc/release_notes/rake-0.8.3.rdoc @@ -0,0 +1,112 @@ += Rake 0.8.3 Released + +Rake version 0.8.3 is a bug-fix release of rake. + +== Changes + +=== Bug Fixes in Version 0.8.3 + +* Enhanced the system directory detection in windows. We now check + HOMEDRIVE/HOMEPATH and USERPROFILE if APPDATA isn't found. (Patch + supplied by James Tucker). Rake no long aborts if it can't find the + directory. + +* Added fix to handle ruby installations in directories with spaces in + their name. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 + +== Task Argument Examples + +Prior to version 0.8.0, rake was only able to handle command line +arguments of the form NAME=VALUE that were passed into Rake via the +ENV hash. Many folks had asked for some kind of simple command line +arguments, perhaps using "--" to separate regular task names from +argument values on the command line. The problem is that there was no +easy way to associate positional arguments on the command line with +different tasks. Suppose both tasks :a and :b expect a command line +argument: does the first value go with :a? What if :b is run first? +Should it then get the first command line argument. + +Rake 0.8.0 solves this problem by explicitly passing values directly +to the tasks that need them. For example, if I had a release task +that required a version number, I could say: + + rake release[0.8.3] + +And the string "0.8.3" will be passed to the :release task. Multiple +arguments can be passed by separating them with a comma, for example: + + rake name[john,doe] + +Just a few words of caution. The rake task name and its arguments +need to be a single command line argument to rake. This generally +means no spaces. If spaces are needed, then the entire rake + +argument string should be quoted. Something like this: + + rake "name[billy bob, smith]" + +(Quoting rules vary between operating systems and shells, so make sure +you consult the proper docs for your OS/shell). + +=== Tasks that Expect Parameters + +Parameters are only given to tasks that are setup to expect them. In +order to handle named parameters, the task declaration syntax for +tasks has been extended slightly. + +For example, a task that needs a first name and last name might be +declared as: + + task :name, :first_name, :last_name + +The first argument is still the name of the task (:name in this case). +The next to argumements are the names of the parameters expected by +:name (:first_name and :last_name in the example). + +To access the values of the paramters, the block defining the task +behaviour can now accept a second parameter: + + task :name, :first_name, :last_name do |t, args| + puts "First name is #{args.first_name}" + puts "Last name is #{args.last_name}" + end + +The first argument of the block "t" is always bound to the current +task object. The second argument "args" is an open-struct like object +that allows access to the task arguments. Extra command line +arguments to a task are ignored. Missing command line arguments are +given the nil value. + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Edwin Pratomo +* Gavin Stark +* Adam Q. Salter +* Adam Majer +* Emanuel Indermühle +* Ittay Dror +* Bheeshmar Redheendran (for spending an afternoon with me debugging + windows issues) + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.8.4.rdoc b/doc/release_notes/rake-0.8.4.rdoc new file mode 100644 index 000000000..d27de8b27 --- /dev/null +++ b/doc/release_notes/rake-0.8.4.rdoc @@ -0,0 +1,147 @@ += Rake 0.8.4 Released + +Rake version 0.8.4 is a bug-fix release of rake. + +NOTE: The version of Rake that comes with Ruby 1.9 has diverged + slightly from the core Rake code base. Rake 0.8.4 will work + with Ruby 1.9, but is not a strict upgrade for the Rake that + comes with Ruby 1.9. A (near) future release of Rake will unify + those two codebases. + +== Letter Writing Campaign + +Thanks to Aaron Patterson (@tenderlove) and Eric Hodel (@drbrain) for +their encouraging support in organizing a letter writing campaign to +lobby for the "Warning Free" release of rake 0.8.4. A special callout +goes to Jonathan D. Lord, Sr (Dr. Wingnut) whose postcard was the +first to actually reach me. (see +http://tenderlovemaking.com/2009/02/26/we-need-a-new-version-of-rake/ +for details) + +== Changes + +=== New Features / Enhancements in Version 0.8.4 + +* Case is preserved on rakefile names. (patch from James + M. Lawrence/quix) + +* Improved Rakefile case insensitivity testing (patch from Luis + Lavena). + +* Windows system dir search order is now: HOME, HOMEDRIVE + HOMEPATH, + APPDATA, USERPROFILE (patch from Luis Lavena) + +* MingGW is now recognized as a windows platform. (patch from Luis + Lavena) + +=== Bug Fixes in Version 0.8.4 + +* Removed reference to manage_gem to fix the warning produced by the + gem package task. + +* Fixed stray ARGV option problem that was interfering with + Test::Unit::Runner. (patch from Pivotal Labs) + +=== Infrastructure Improvements in Version 0.8.4 + +* Numerous fixes to the windows test suite (patch from Luis Lavena). + +* Improved Rakefile case insensitivity testing (patch from Luis + Lavena). + +* Better support for windows paths in the test task (patch from Simon + Chiang/bahuvrihi) + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Task Argument Examples + +Prior to version 0.8.0, rake was only able to handle command line +arguments of the form NAME=VALUE that were passed into Rake via the +ENV hash. Many folks had asked for some kind of simple command line +arguments, perhaps using "--" to separate regular task names from +argument values on the command line. The problem is that there was no +easy way to associate positional arguments on the command line with +different tasks. Suppose both tasks :a and :b expect a command line +argument: does the first value go with :a? What if :b is run first? +Should it then get the first command line argument. + +Rake 0.8.0 solves this problem by explicitly passing values directly +to the tasks that need them. For example, if I had a release task +that required a version number, I could say: + + rake release[0.8.4] + +And the string "0.8.4" will be passed to the :release task. Multiple +arguments can be passed by separating them with a comma, for example: + + rake name[john,doe] + +Just a few words of caution. The rake task name and its arguments +need to be a single command line argument to rake. This generally +means no spaces. If spaces are needed, then the entire rake + +argument string should be quoted. Something like this: + + rake "name[billy bob, smith]" + +(Quoting rules vary between operating systems and shells, so make sure +you consult the proper docs for your OS/shell). + +=== Tasks that Expect Parameters + +Parameters are only given to tasks that are setup to expect them. In +order to handle named parameters, the task declaration syntax for +tasks has been extended slightly. + +For example, a task that needs a first name and last name might be +declared as: + + task :name, :first_name, :last_name + +The first argument is still the name of the task (:name in this case). +The next to argumements are the names of the parameters expected by +:name (:first_name and :last_name in the example). + +To access the values of the paramters, the block defining the task +behaviour can now accept a second parameter: + + task :name, :first_name, :last_name do |t, args| + puts "First name is #{args.first_name}" + puts "Last name is #{args.last_name}" + end + +The first argument of the block "t" is always bound to the current +task object. The second argument "args" is an open-struct like object +that allows access to the task arguments. Extra command line +arguments to a task are ignored. Missing command line arguments are +given the nil value. + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence/quix +* Luis Lavena +* Pivotal Labs +* Simon Chiang/bahuvrihi + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.8.5.rdoc b/doc/release_notes/rake-0.8.5.rdoc new file mode 100644 index 000000000..0ee2583dd --- /dev/null +++ b/doc/release_notes/rake-0.8.5.rdoc @@ -0,0 +1,53 @@ += Rake 0.8.5 Released + +Rake version 0.8.5 is a new release of Rake with greatly improved +support for executing commands on Windows. The "sh" command now has +the same semantics on Windows that it has on Unix based platforms. + +== Changes + +=== New Features / Enhancements in Version 0.8.5 + +* Improved implementation of the Rake system command for Windows. + (patch from James M. Lawrence/quix) + +* Support for Ruby 1.9's improved system command. (patch from James + M. Lawrence/quix) + +* Rake now includes the configured extension when invoking an + executable (Config::CONFIG['EXEEXT]) + +=== Bug Fixes in Version 0.8.5 + +* Environment variable keys are now correctly cased (it matters in + some implementations). + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence/quix +* Luis Lavena + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.8.6.rdoc b/doc/release_notes/rake-0.8.6.rdoc new file mode 100644 index 000000000..54782ed02 --- /dev/null +++ b/doc/release_notes/rake-0.8.6.rdoc @@ -0,0 +1,37 @@ += Rake 0.8.6 Released + +Rake version 0.8.5 introduced greatly improved support for executing +commands on Windows. The "sh" command now has the same semantics on +Windows that it has on Unix based platforms. + +Rake version 0.8.5 includes minor fixes the the RDoc generation. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence/quix +* Luis Lavena + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.8.7.rdoc b/doc/release_notes/rake-0.8.7.rdoc new file mode 100644 index 000000000..884f4c659 --- /dev/null +++ b/doc/release_notes/rake-0.8.7.rdoc @@ -0,0 +1,55 @@ += Rake 0.8.7 Released + +Rake version 0.8.5 introduced greatly improved support for executing +commands on Windows. The "sh" command now has the same semantics on +Windows that it has on Unix based platforms. + +Rake version 0.8.6 includes minor fixes the the RDoc generation. +Rake version 0.8.7 includes a minor fix for JRuby running on windows. + +== Changes + +=== New Features / Enhancements in Version 0.8.5 + +* Improved implementation of the Rake system command for Windows. + (patch from James M. Lawrence/quix) + +* Support for Ruby 1.9's improved system command. (patch from James + M. Lawrence/quix) + +* Rake now includes the configured extension when invoking an + executable (Config::CONFIG['EXEEXT]) + +=== Bug Fixes in Version 0.8.5 + +* Environment variable keys are now correctly cased (it matters in + some implementations). + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Charles Nutter + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.9.0.rdoc b/doc/release_notes/rake-0.9.0.rdoc new file mode 100644 index 000000000..823483cc2 --- /dev/null +++ b/doc/release_notes/rake-0.9.0.rdoc @@ -0,0 +1,112 @@ += Rake 0.9.0 Released + +Rake version 0.9.0 has a number of bug fixes and enhancments (see +below for more details). Additionally, the internals have be slightly +restructured and improved. + +== Changes + +=== New Features / Enhancements / Bug Fixes in Version 0.9.0 + +* Rake now warns when the deprecated :needs syntax used (and suggests + the proper syntax in the warning). + +* Moved Rake DSL commands to top level ruby object 'main'. Rake DSL + commands are no longer private methods in Object. (Suggested by + James M. Lawrence/quix) + +* Rake now uses case-insensitive comparisons to find the Rakefile on Windows. + Based on patch by Roger Pack. + +* Rake now requires (instead of loads) files in the test task. Patch by Cezary + Baginski. + +* Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow. + +* Rake now prints the Rakefile directory only when it's different from the + current directory. Patch by Alex Chaffee. + +* Improved rakefile_location discovery on Windows. Patch by James Tucker. + +* Rake now recognizes "Windows Server" as a windows system. Patch by Matthias + Lüdtke + +* Rake::RDocTask is deprecated. Use RDoc::Task from RDoc 2.4.2+ (require + 'rdoc/task') + +* Rake::GemPackageTask is deprecated. Use Gem::PackageTask (require + 'rubygems/package_task') + +* Rake now outputs various messages to $stderr instead of $stdout. + +* Rake no longer emits warnings for Config. Patch by Santiago Pastorino. + +* Removed Rake's DSL methods from the top level scope. If you need to + call 'task :xzy' in your code, include Rake::DSL into your class, or + put the code in a Rake::DSL.environment do ... end block. + +* Split rake.rb into individual files. + +* Support for the --where (-W) flag for showing where a task is defined. + +* Fixed quoting in test task. + (http://onestepback.org/redmine/issues/show/44, + http://www.pivotaltracker.com/story/show/1223138) + +* Fixed the silent option parsing problem. + (http://onestepback.org/redmine/issues/show/47) + +* Fixed :verbose=>false flag on sh and ruby commands. + +* Rake command line options may be given by default in a RAKEOPT + environment variable. + +* Errors in Rake will now display the task invocation chain in effect + at the time of the error. + +* Accepted change by warnickr to not expand test patterns in shell + (allowing more files in the test suite). + +* Fixed that file tasks did not perform prereq lookups in scope + (Redmine #57). + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence (quix) +* Roger Pack +* Cezary Baginski +* Sean Scot August Moon +* R.T. Lechow +* Alex Chaffee +* James Tucker +* Matthias Lüdtke +* Santiago Pastorino + +Also, bit thanks to Eric Hodel for assisting with getting this release +out the door (where "assisting" includes, but is not by any means +limited to, "pushing" me to get it done). + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.9.1.rdoc b/doc/release_notes/rake-0.9.1.rdoc new file mode 100644 index 000000000..70be8b568 --- /dev/null +++ b/doc/release_notes/rake-0.9.1.rdoc @@ -0,0 +1,52 @@ += Rake 0.9.1 Released + +Rake version 0.9.1 has a number of bug fixes and enhancments (see +below for more details). Additionally, the internals have be slightly +restructured and improved. + +== Changes + +Rake 0.9.1 adds back the global DSL methods, but with deprecation +messages. This allows Rake 0.9.1 to be used with older rakefiles with +warning messages. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence (quix) +* Roger Pack +* Cezary Baginski +* Sean Scot August Moon +* R.T. Lechow +* Alex Chaffee +* James Tucker +* Matthias Lüdtke +* Santiago Pastorino + +Also, bit thanks to Eric Hodel for assisting with getting this release +out the door (where "assisting" includes, but is not by any means +limited to, "pushing" me to get it done). + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.9.2.2.rdoc b/doc/release_notes/rake-0.9.2.2.rdoc new file mode 100644 index 000000000..d848f227b --- /dev/null +++ b/doc/release_notes/rake-0.9.2.2.rdoc @@ -0,0 +1,55 @@ += Rake 0.9.2.2 Released + +Rake version 0.9.2.2 is mainly bug fixes. + +== Changes + +* The rake test loader now removes arguments it has processed. Issue #51 +* Rake::TaskArguments now responds to #values_at +* RakeFileUtils.verbose_flag = nil silences output the same as 0.8.7 +* Rake tests are now directory-independent +* Rake tests are no longer require flexmock +* Commands constant is no longer polluting top level namespace. +* Show only the interesting portion of the backtrace by default (James M. Lawrence). +* Added --reduce-compat option to remove backward compatible DSL hacks (James M. Lawrence). + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence (quix) +* Roger Pack +* Cezary Baginski +* Sean Scot August Moon +* R.T. Lechow +* Alex Chaffee +* James Tucker +* Matthias Lüdtke +* Santiago Pastorino + +Also, bit thanks to Eric Hodel for assisting with getting this release +out the door (where "assisting" includes, but is not by any means +limited to, "pushing" me to get it done). + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.9.2.rdoc b/doc/release_notes/rake-0.9.2.rdoc new file mode 100644 index 000000000..2314193f5 --- /dev/null +++ b/doc/release_notes/rake-0.9.2.rdoc @@ -0,0 +1,49 @@ += Rake 0.9.2 Released + +Rake version 0.9.2 has a few small fixes. See below for details. + +== Changes + +* Support for Ruby 1.8.6 was fixed. +* Global DSL warnings now honor --no-deprecate + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://rake.rubyforge.org/ +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence (quix) +* Roger Pack +* Cezary Baginski +* Sean Scot August Moon +* R.T. Lechow +* Alex Chaffee +* James Tucker +* Matthias Lüdtke +* Santiago Pastorino + +Also, bit thanks to Eric Hodel for assisting with getting this release +out the door (where "assisting" includes, but is not by any means +limited to, "pushing" me to get it done). + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.9.3.rdoc b/doc/release_notes/rake-0.9.3.rdoc new file mode 100644 index 000000000..4476b4f18 --- /dev/null +++ b/doc/release_notes/rake-0.9.3.rdoc @@ -0,0 +1,102 @@ += Rake 0.9.3 Released + +Rake version 0.9.3 contains some new, backwards compatible features and +a number of bug fixes. + +== Changes + +=== New Features + +* Multitask tasks now use a thread pool. Use -j to limit the number of + available threads. + +* Use -m to turn regular tasks into multitasks (use at your own risk). + +* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to + programatically add rake task libraries. + +* You can specific backtrace suppression patterns (see + --supress-backtrace) + +* Directory tasks can now take prerequisites and actions + +* Use --backtrace to request a full backtrace without the task trace. + +* You can say "--backtrace=stdout" and "--trace=stdout" to route trace + output to standard output rather than standard error. + +* Optional 'phony' target (enable with 'require 'rake/phony'") for + special purpose builds. + +* Task#clear now clears task comments as well as actions and + prerequisites. Task#clear_comment will specifically target comments. + +* The --all option will force -T and -D to consider all the tasks, + with and without descriptions. + +=== Bug Fixes + +* Semi-colons in windows rakefile paths now work. + +* Improved Control-C support when invoking multiple test suites. + +* egrep method now reads files in text mode (better support for + Windows) + +* Better deprecation line number reporting. + +* The -W option now works with all tasks, whether they have a + description or not. + +* File globs in rake should not be sorted alphabetically, independent + of file system and platform. + +* Numerous internal improvements. + +* Documentation typos and fixes. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://github.com/jimweirich/rake +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.9.4.rdoc b/doc/release_notes/rake-0.9.4.rdoc new file mode 100644 index 000000000..099ebc91b --- /dev/null +++ b/doc/release_notes/rake-0.9.4.rdoc @@ -0,0 +1,60 @@ += Rake 0.9.4 Released + +Rake version 0.9.4 contains a number of bug fixes. + +== Changes + +=== Bug Fixes (0.9.4) + +* Exit status with failing tests is not correctly set to non-zero. + +* Simplified syntax for phony task (for older versions of RDoc). + +* Stand alone FileList usage gets glob function (without loading in + extra dependencies) + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://github.com/jimweirich/rake +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.9.5.rdoc b/doc/release_notes/rake-0.9.5.rdoc new file mode 100644 index 000000000..40c35ee69 --- /dev/null +++ b/doc/release_notes/rake-0.9.5.rdoc @@ -0,0 +1,55 @@ += Rake 0.9.5 Released + +Rake version 0.9.5 contains a number of bug fixes. + +== Changes + +=== Bug Fixes (0.9.5) + +* --trace and --backtrace no longer swallow following task names. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://github.com/jimweirich/rake +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich diff --git a/doc/release_notes/rake-0.9.6.rdoc b/doc/release_notes/rake-0.9.6.rdoc new file mode 100644 index 000000000..fb247e794 --- /dev/null +++ b/doc/release_notes/rake-0.9.6.rdoc @@ -0,0 +1,64 @@ += Rake 0.9.6 Released + +Rake version 0.9.6 contains a number of fixes mainly for merging +Rake into the Ruby source tree and fixing tests. + +== Changes + +=== Bug Fixes (0.9.6) + +* Better trace output when using a multi-threaded Rakefile. +* Arg parsing is now consistent for tasks and multitasks. +* Skip exit code test in versions of Ruby that don't support it well. + +Changes for better integration with the Ruby source tree: + +* Fix version literal for Ruby source tree build. +* Better loading of libraries for testing in Ruby build. +* Use the ruby version provided by Ruby's tests. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://github.com/jimweirich/rake +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich diff --git a/doc/release_notes/rake-10.0.0.rdoc b/doc/release_notes/rake-10.0.0.rdoc new file mode 100644 index 000000000..7bf68fb73 --- /dev/null +++ b/doc/release_notes/rake-10.0.0.rdoc @@ -0,0 +1,178 @@ += Rake 10.0 Released + + "Jim, when will Rake reach version 1.0?" + +Over the past several years I've been asked that question at +conferences, panels and over twitter. Due to historical reasons (or +maybe just plain laziness) Rake has (incorrectly) been treating the +second digit of the version as the major release number. So in my head +Rake was already at version 9. + +Well, it's time to fix things. This next version of Rake drops old, +crufty, backwards compatibility hacks such as top level constants, DSL +methods defined in Object and numerous other features that are just no +longer desired. It's also time to drop the leading zero from the +version number as well and call this new version of rake what it +really is: Version 10. + +So, welcome to Rake 10.0! + +Rake 10 is actually feature identical to the latest version of Rake 9 +(that would be the version spelled 0.9.3), *except* that Rake 10 drops +all the sundry deprecated features that have accumulated over the years. + +If your Rakefile is up to date and current with all the new features +of Rake 10, you are ready to go. If your Rakefile still uses a few +deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same +feature set. Just be aware that future features will be in Rake 10 +family line. + +== Changes in 10.0 + +As mentioned above, there are no new features in Rake 10. However, +there are a number of features missing: + +* Classic namespaces are now gone. Rake is no longer able to reflect + the options settings in the global variables ($rakefile, $show_tasks, + $show_prereqs, $trace, $dryrun and $silent). The + --classic-namespace option is no longer supported. + +* Global constants are no longer supported. This includes + Task, FileTask, FileCreationTask and + RakeApp). The constant missing hook to warn about using + global rake constants has been removed. + +* The Rake DSL methods (task, file, directory, etc) are in their own + module (Rake::DSL). The stub versions of these methods (that printed + warnings) in Object have been removed. However, the DSL methods are + added to the top-level main object. Since main is + not in the inheritance tree, the presence of the DSL methods in main + should be low impact on other libraries. + + If you want to use the Rake DSL commands from your own code, just + include Rake::DSL into your own classes and modules. + +* The deprecated syntax for task arguments (the one using + :needs) has been removed. + +* The --reduce-compat flag has been removed (it's not needed + anymore). + +* The deprecated rake/sys.rb library has been removed. + +* The deprecated rake/rdoctask.rb library has been removed. + RDoc supplies its own rake task now. + +* The deprecated rake/gempackagetask.rb library has been + removed. Gem supplies its own package task now. + +There is one small behavioral change: + +* Non-file tasks now always report the current time as their time + stamp. This is different from the previous behavior where non-file + tasks reported current time only if there were no prerequisites, and + the max prerequisite timestamp otherwise. This lead to inconsistent + and surprising behavior when adding prerequisites to tasks that in + turn were prequisites to file tasks. The new behavior is more + consistent and predictable. + +== Changes (from 0.9.3) + +Since Rake 10 includes the changes from the last version of Rake 9, +we'll repeat the changes for version 0.9.3 here. + +=== New Features + +* Multitask tasks now use a thread pool. Use -j to limit the number of + available threads. + +* Use -m to turn regular tasks into multitasks (use at your own risk). + +* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to + programatically add rake task libraries. + +* You can specific backtrace suppression patterns (see + --supress-backtrace) + +* Directory tasks can now take prerequisites and actions + +* Use --backtrace to request a full backtrace without the task trace. + +* You can say "--backtrace=stdout" and "--trace=stdout" to route trace + output to standard output rather than standard error. + +* Optional 'phony' target (enable with 'require 'rake/phony'") for + special purpose builds. + +* Task#clear now clears task comments as well as actions and + prerequisites. Task#clear_comment will specifically target comments. + +* The --all option will force -T and -D to consider all the tasks, + with and without descriptions. + +=== Bug Fixes + +* Semi-colons in windows rakefile paths now work. + +* Improved Control-C support when invoking multiple test suites. + +* egrep method now reads files in text mode (better support for + Windows) + +* Better deprecation line number reporting. + +* The -W option now works with all tasks, whether they have a + description or not. + +* File globs in rake should not be sorted alphabetically, independent + of file system and platform. + +* Numerous internal improvements. + +* Documentation typos and fixes. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://github.com/jimweirich/rake +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a lot of these changes. The +following people contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich diff --git a/doc/release_notes/rake-10.0.1.rdoc b/doc/release_notes/rake-10.0.1.rdoc new file mode 100644 index 000000000..152af25a5 --- /dev/null +++ b/doc/release_notes/rake-10.0.1.rdoc @@ -0,0 +1,58 @@ += Rake 10.0.1 Released + +== Changes in 10.0.1 + +=== Bug Fixes + +* Exit status with failing tests is not correctly set to non-zero. + +* Simplified syntax for phony task (for older versions of RDoc). + +* Stand alone FileList usage gets glob function (without loading in + extra dependencies) + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://github.com/jimweirich/rake +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a lot of these changes. The +following people contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich diff --git a/doc/release_notes/rake-10.0.2.rdoc b/doc/release_notes/rake-10.0.2.rdoc new file mode 100644 index 000000000..bb6bda874 --- /dev/null +++ b/doc/release_notes/rake-10.0.2.rdoc @@ -0,0 +1,53 @@ += Rake 10.0.2 Released + +== Changes in Rake 10.0.2 + +=== Bug Fixes + +* --trace and --backtrace no longer swallow following task names. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://github.com/jimweirich/rake +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a lot of these changes. The +following people contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich diff --git a/doc/release_notes/rake-10.0.3.rdoc b/doc/release_notes/rake-10.0.3.rdoc new file mode 100644 index 000000000..dbc84c1c1 --- /dev/null +++ b/doc/release_notes/rake-10.0.3.rdoc @@ -0,0 +1,191 @@ += Rake 10.0.3 Released + + "Jim, when will Rake reach version 1.0?" + +Over the past several years I've been asked that question at +conferences, panels and over twitter. Due to historical reasons (or +maybe just plain laziness) Rake has (incorrectly) been treating the +second digit of the version as the major release number. So in my head +Rake was already at version 9. + +Well, it's time to fix things. This next version of Rake drops old, +crufty, backwards compatibility hacks such as top level constants, DSL +methods defined in Object and numerous other features that are just no +longer desired. It's also time to drop the leading zero from the +version number as well and call this new version of rake what it +really is: Version 10. + +So, welcome to Rake 10.0! + +Rake 10 is actually feature identical to the latest version of Rake 9 +(that would be the version spelled 0.9.3), *except* that Rake 10 drops +all the sundry deprecated features that have accumulated over the years. + +If your Rakefile is up to date and current with all the new features +of Rake 10, you are ready to go. If your Rakefile still uses a few +deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same +feature set. Just be aware that future features will be in Rake 10 +family line. + +== Changes in Version 10 + +As mentioned above, there are no new features in Rake 10. However, +there are a number of features missing: + +* Classic namespaces are now gone. Rake is no longer able to reflect + the options settings in the global variables ($rakefile, $show_tasks, + $show_prereqs, $trace, $dryrun and $silent). The + --classic-namespace option is no longer supported. + +* Global constants are no longer supported. This includes + Task, FileTask, FileCreationTask and + RakeApp). The constant missing hook to warn about using + global rake constants has been removed. + +* The Rake DSL methods (task, file, directory, etc) are in their own + module (Rake::DSL). The stub versions of these methods (that printed + warnings) in Object have been removed. However, the DSL methods are + added to the top-level main object. Since main is + not in the inheritance tree, the presence of the DSL methods in main + should be low impact on other libraries. + + If you want to use the Rake DSL commands from your own code, just + include Rake::DSL into your own classes and modules. + +* The deprecated syntax for task arguments (the one using + :needs) has been removed. + +* The --reduce-compat flag has been removed (it's not needed + anymore). + +* The deprecated rake/sys.rb library has been removed. + +* The deprecated rake/rdoctask.rb library has been removed. + RDoc supplies its own rake task now. + +* The deprecated rake/gempackagetask.rb library has been + removed. Gem supplies its own package task now. + +There is one small behavioral change: + +* Non-file tasks now always report the current time as their time + stamp. This is different from the previous behavior where non-file + tasks reported current time only if there were no prerequisites, and + the max prerequisite timestamp otherwise. This lead to inconsistent + and surprising behavior when adding prerequisites to tasks that in + turn were prequisites to file tasks. The new behavior is more + consistent and predictable. + +== Changes (from 0.9.3, 0.9.4, 0.9.5) + +Since Rake 10 includes the changes from the last version of Rake 9, +we'll repeat the changes for versions 0.9.3 through 0.9.5 here. + +=== New Features (in 0.9.3) + +* Multitask tasks now use a thread pool. Use -j to limit the number of + available threads. + +* Use -m to turn regular tasks into multitasks (use at your own risk). + +* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to + programatically add rake task libraries. + +* You can specific backtrace suppression patterns (see + --supress-backtrace) + +* Directory tasks can now take prerequisites and actions + +* Use --backtrace to request a full backtrace without the task trace. + +* You can say "--backtrace=stdout" and "--trace=stdout" to route trace + output to standard output rather than standard error. + +* Optional 'phony' target (enable with 'require 'rake/phony'") for + special purpose builds. + +* Task#clear now clears task comments as well as actions and + prerequisites. Task#clear_comment will specifically target comments. + +* The --all option will force -T and -D to consider all the tasks, + with and without descriptions. + +=== Bug Fixes (in 0.9.3) + +* Semi-colons in windows rakefile paths now work. + +* Improved Control-C support when invoking multiple test suites. + +* egrep method now reads files in text mode (better support for + Windows) + +* Better deprecation line number reporting. + +* The -W option now works with all tasks, whether they have a + description or not. + +* File globs in rake should not be sorted alphabetically, independent + of file system and platform. + +* Numerous internal improvements. + +* Documentation typos and fixes. + +=== Bug Fixes (in 0.9.4) + +* Exit status with failing tests is not correctly set to non-zero. + +* Simplified syntax for phony task (for older versions of RDoc). + +* Stand alone FileList usage gets glob function (without loading in + extra dependencies) + +=== Bug Fixes (in 0.9.5) + +* --trace and --backtrace no longer swallow following task names. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more traditional places: + +Home Page:: http://github.com/jimweirich/rake +Download:: http://rubyforge.org/project/showfiles.php?group_id=50 +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a lot of these changes. The +following people contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich diff --git a/doc/release_notes/rake-10.1.0.rdoc b/doc/release_notes/rake-10.1.0.rdoc new file mode 100644 index 000000000..a9f4bb396 --- /dev/null +++ b/doc/release_notes/rake-10.1.0.rdoc @@ -0,0 +1,61 @@ += Rake 10.1.0 Released + +== Changes in Version 10.1 + +=== New Features + +* Add support for variable length task argument lists. If more actual + arguments are supplied than named arguments, then the extra + arguments values will be in args.extras. + +* Application name is not displayed in the help banner. (Previously + "rake" was hardcoded, now rake-based applications can display their + own names). + +=== Bug Fixes + +Bug fixes include: + +* Fix backtrace suppression issues. + +* Rules now explicit get task arguments passed to them. + +* Rename FileList#exclude? to FileList#exclude_from_list? to avoid + conflict with new Rails method. + +* Clean / Clobber tasks now report failure to remove files. + +* Plus heaps of internal code cleanup. + +== What is Rake + +Rake is a build tool similar to the make program in many ways. But +instead of cryptic make recipes, Rake uses standard Ruby code to +declare tasks and dependencies. You have the full power of a modern +scripting language built right into your build tool. + +== Availability + +The easiest way to get and install rake is via RubyGems ... + + gem install rake (you may need root/admin privileges) + +Otherwise, you can get it from the more from GitHub: + +GitHub:: git://github.com/jimweirich/rake.git + +== Thanks + +As usual, it was input from users that drove a lot of these changes. +The following people contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Michael Nikitochkin (general code cleanup) +* Vipul A M (general code cleanup) +* Dennis Bell (variable length task argument lists) +* Jacob Swanner (rules arguments) +* Rafael Rosa Fu (documentation typo) +* Stuart Nelson (install.rb fixes) +* Lee Hambley (application name in help banner) + +-- Jim Weirich From 89d8c6ee0142244c6c0bd1f1e481aff64291b217 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 27 Mar 2016 21:34:48 +0900 Subject: [PATCH 488/813] Remove -W option. It's unexpected change from Rake 10 --- History.rdoc | 7 +++++++ lib/rake/testtask.rb | 1 - test/test_rake_test_task.rb | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index a067fef5c..a0be0546b 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,10 @@ +=== 11.1.2 / 2016-03-28 + +Bug fixes: + +* Remove `-W` option when Rake::TestTask#verbose enabled. It's misunderstanding + specification change with Rake 11. Partly revert #67 + === 11.1.1 / 2016-03-14 Bug fixes: diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 231093be8..4e048d37e 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -128,7 +128,6 @@ def ruby_opts_string # :nodoc: opts = @ruby_opts.dup opts.unshift("-I\"#{lib_path}\"") unless @libs.empty? opts.unshift("-w") if @warning - opts.unshift('-W') if @verbose opts.join(" ") end diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index e8c767d00..bb4d43c96 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -31,7 +31,6 @@ def test_initialize_override assert_equal true, tt.warning assert_equal true, tt.verbose assert_match(/-w/, tt.ruby_opts_string) - assert_match(/-W/, tt.ruby_opts_string) assert Task.task_defined?(:example) end From 5c444e4027cc6ece0c4556acd654f3be44515645 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 27 Mar 2016 22:25:00 +0900 Subject: [PATCH 489/813] bump version to Rake 11.1.2 --- lib/rake.rb | 2 +- rake.gemspec | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/rake.rb b/lib/rake.rb index 1857fa853..e8958fa99 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -21,7 +21,7 @@ #++ module Rake - VERSION = '11.1.1' + VERSION = '11.1.2' end require 'rake/version' diff --git a/rake.gemspec b/rake.gemspec index 298bf1b55..a4e298758 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -1,14 +1,13 @@ # -*- encoding: utf-8 -*- -# stub: rake 11.0.1.20160309174104 ruby lib Gem::Specification.new do |s| s.name = "rake".freeze - s.version = "11.0.1.20160309174104" + s.version = "11.1.2" s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] - s.date = "2016-03-09" + s.date = "2016-03-27" s.description = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are\nspecified in standard Ruby syntax.\n\nRake has the following features:\n\n* Rakefiles (rake's version of Makefiles) are completely defined in\n standard Ruby syntax. No XML files to edit. No quirky Makefile\n syntax to worry about (is that a tab or a space?)\n\n* Users can specify tasks with prerequisites.\n\n* Rake supports rule patterns to synthesize implicit tasks.\n\n* Flexible FileLists that act like arrays but know about manipulating\n file names and paths.\n\n* A library of prepackaged tasks to make building rakefiles easier. For example,\n tasks for building tarballs and publishing to FTP or SSH sites. (Formerly\n tasks for building RDoc and Gems were included in rake but they're now\n available in RDoc and RubyGems respectively.)\n\n* Supports parallel execution of tasks.".freeze s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] s.executables = ["rake".freeze] From 29c7222bb268015924b77839974379fe6314d134 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 27 Mar 2016 22:28:47 +0900 Subject: [PATCH 490/813] Removed duplicates lib path --- Rakefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Rakefile b/Rakefile index 99a108ecb..dbbfeec2d 100644 --- a/Rakefile +++ b/Rakefile @@ -15,7 +15,6 @@ require 'rdoc/task' Rake::TestTask.new(:test) do |t| t.libs << "test" - t.libs << "lib" t.test_files = FileList['test/**/test_*.rb'] end From 960b56c7bd7cf3dea82eb5891e01f6ce1da1fd60 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 27 Mar 2016 22:28:57 +0900 Subject: [PATCH 491/813] enabled verbose option --- Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Rakefile b/Rakefile index dbbfeec2d..97c22a45f 100644 --- a/Rakefile +++ b/Rakefile @@ -15,6 +15,7 @@ require 'rdoc/task' Rake::TestTask.new(:test) do |t| t.libs << "test" + t.verbose = true t.test_files = FileList['test/**/test_*.rb'] end From e8a7599c5b5f474bed1618671cc3b5bb49059ae6 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 27 Mar 2016 22:29:57 +0900 Subject: [PATCH 492/813] removed old configuration file --- doc/example/.cvsignore | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 doc/example/.cvsignore diff --git a/doc/example/.cvsignore b/doc/example/.cvsignore deleted file mode 100644 index f0c9b8122..000000000 --- a/doc/example/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.o -main From 55085f307fbdbc9d44928a72737125402d0d6ff9 Mon Sep 17 00:00:00 2001 From: Tatsuya Sato Date: Mon, 28 Mar 2016 15:57:30 +0900 Subject: [PATCH 493/813] Merged all the release notes into History.rdoc --- History.rdoc | 1929 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 1703 insertions(+), 226 deletions(-) diff --git a/History.rdoc b/History.rdoc index 27f9d503e..3eb6b3e48 100644 --- a/History.rdoc +++ b/History.rdoc @@ -17,7 +17,7 @@ Bug fixes: Compatibility Changes: -* Revert to remove `last_comment`. It will remove Rake 12. +* Revert to remove `last\_comment`. It will remove Rake 12. === 11.0.1 / 2016-03-09 @@ -53,7 +53,7 @@ Compatibility Changes: * Removed constant named `RAKEVERSION` * Removed Rake::AltSystem * Removed Rake::RubyForgePublisher -* Removed Rake::TaskManager#last_comment. Use last_description. +* Removed Rake::TaskManager#last\_comment. Use last\_description. * Removed Rake::TaskLib#paste * Removed Top-level SshDirPublisher, SshFreshDirPublisher, SshFilePublisher and CompositePublisher from lib/rake/contrib/publisher.rb @@ -187,7 +187,7 @@ Bug fixes: * Clarified `rake -f` usage message. Pull request #252 by Marco Pfatschbacher. * Fixed a test failure on windows. Pull request #231 by Hiroshi Shirosaki. * Fixed corrupted rake.1.gz. Pull request #225 by Michel Boaventura. -* Fixed bug in can_detect_signals? in test. Patch from #243 by Alexey +* Fixed bug in can\_detect\_signals? in test. Patch from #243 by Alexey Borzenkov. === 10.1.1 and earlier @@ -196,291 +196,1575 @@ Additions to the old CHANGES file were not made consistently so some versions are missing from this file. These changes are usually described in the individual release notes files. +=== 10.1.0 + +==== Changes + +===== New Features + +* Add support for variable length task argument lists. If more actual + arguments are supplied than named arguments, then the extra + arguments values will be in args.extras. + +* Application name is not displayed in the help banner. (Previously + "rake" was hardcoded, now rake-based applications can display their + own names). + +===== Bug Fixes + +Bug fixes include: + +* Fix backtrace suppression issues. + +* Rules now explicit get task arguments passed to them. + +* Rename FileList#exclude? to FileList#exclude\_from\_list? to avoid + conflict with new Rails method. + +* Clean / Clobber tasks now report failure to remove files. + +* Plus heaps of internal code cleanup. + +==== Thanks + +As usual, it was input from users that drove a lot of these changes. +The following people contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Michael Nikitochkin (general code cleanup) +* Vipul A M (general code cleanup) +* Dennis Bell (variable length task argument lists) +* Jacob Swanner (rules arguments) +* Rafael Rosa Fu (documentation typo) +* Stuart Nelson (install.rb fixes) +* Lee Hambley (application name in help banner) + +-- Jim Weirich + +=== 10.0.3 + + "Jim, when will Rake reach version 1.0?" + +Over the past several years I've been asked that question at +conferences, panels and over twitter. Due to historical reasons (or +maybe just plain laziness) Rake has (incorrectly) been treating the +second digit of the version as the major release number. So in my head +Rake was already at version 9. + +Well, it's time to fix things. This next version of Rake drops old, +crufty, backwards compatibility hacks such as top level constants, DSL +methods defined in Object and numerous other features that are just no +longer desired. It's also time to drop the leading zero from the +version number as well and call this new version of rake what it +really is: Version 10. + +So, welcome to Rake 10.0! + +Rake 10 is actually feature identical to the latest version of Rake 9 +(that would be the version spelled 0.9.3), *except* that Rake 10 drops +all the sundry deprecated features that have accumulated over the years. + +If your Rakefile is up to date and current with all the new features +of Rake 10, you are ready to go. If your Rakefile still uses a few +deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same +feature set. Just be aware that future features will be in Rake 10 +family line. + +==== Changes + +As mentioned above, there are no new features in Rake 10. However, +there are a number of features missing: + +* Classic namespaces are now gone. Rake is no longer able to reflect + the options settings in the global variables ($rakefile, $show\_tasks, + $show\_prereqs, $trace, $dryrun and $silent). The + --classic-namespace option is no longer supported. + +* Global constants are no longer supported. This includes + Task, FileTask, FileCreationTask and + RakeApp). The constant missing hook to warn about using + global rake constants has been removed. + +* The Rake DSL methods (task, file, directory, etc) are in their own + module (Rake::DSL). The stub versions of these methods (that printed + warnings) in Object have been removed. However, the DSL methods are + added to the top-level main object. Since main is + not in the inheritance tree, the presence of the DSL methods in main + should be low impact on other libraries. + + If you want to use the Rake DSL commands from your own code, just + include Rake::DSL into your own classes and modules. + +* The deprecated syntax for task arguments (the one using + :needs) has been removed. + +* The --reduce-compat flag has been removed (it's not needed + anymore). + +* The deprecated rake/sys.rb library has been removed. + +* The deprecated rake/rdoctask.rb library has been removed. + RDoc supplies its own rake task now. + +* The deprecated rake/gempackagetask.rb library has been + removed. Gem supplies its own package task now. + +There is one small behavioral change: + +* Non-file tasks now always report the current time as their time + stamp. This is different from the previous behavior where non-file + tasks reported current time only if there were no prerequisites, and + the max prerequisite timestamp otherwise. This lead to inconsistent + and surprising behavior when adding prerequisites to tasks that in + turn were prequisites to file tasks. The new behavior is more + consistent and predictable. + +==== Changes (from 0.9.3, 0.9.4, 0.9.5) + +Since Rake 10 includes the changes from the last version of Rake 9, +we'll repeat the changes for versions 0.9.3 through 0.9.5 here. + +===== New Features (in 0.9.3) + +* Multitask tasks now use a thread pool. Use -j to limit the number of + available threads. + +* Use -m to turn regular tasks into multitasks (use at your own risk). + +* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to + programatically add rake task libraries. + +* You can specific backtrace suppression patterns (see + --supress-backtrace) + +* Directory tasks can now take prerequisites and actions + +* Use --backtrace to request a full backtrace without the task trace. + +* You can say "--backtrace=stdout" and "--trace=stdout" to route trace + output to standard output rather than standard error. + +* Optional 'phony' target (enable with 'require 'rake/phony'") for + special purpose builds. + +* Task#clear now clears task comments as well as actions and + prerequisites. Task#clear_comment will specifically target comments. + +* The --all option will force -T and -D to consider all the tasks, + with and without descriptions. + +===== Bug Fixes (in 0.9.3) + +* Semi-colons in windows rakefile paths now work. + +* Improved Control-C support when invoking multiple test suites. + +* egrep method now reads files in text mode (better support for + Windows) + +* Better deprecation line number reporting. + +* The -W option now works with all tasks, whether they have a + description or not. + +* File globs in rake should not be sorted alphabetically, independent + of file system and platform. + +* Numerous internal improvements. + +* Documentation typos and fixes. + +===== Bug Fixes (in 0.9.4) + +* Exit status with failing tests is not correctly set to non-zero. + +* Simplified syntax for phony task (for older versions of RDoc). + +* Stand alone FileList usage gets glob function (without loading in + extra dependencies) + +===== Bug Fixes (in 0.9.5) + +* --trace and --backtrace no longer swallow following task names. + +==== Thanks + +As usual, it was input from users that drove a lot of these changes. The +following people contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich + +=== 10.0.2 + +==== Changes + +===== Bug Fixes + +* --trace and --backtrace no longer swallow following task names. + +==== Thanks + +As usual, it was input from users that drove a lot of these changes. The +following people contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich + +=== 10.0.1 + +==== Changes + +===== Bug Fixes + +* Exit status with failing tests is not correctly set to non-zero. + +* Simplified syntax for phony task (for older versions of RDoc). + +* Stand alone FileList usage gets glob function (without loading in + extra dependencies) + +==== Thanks + +As usual, it was input from users that drove a lot of these changes. The +following people contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich + +=== 10.0.0 + + "Jim, when will Rake reach version 1.0?" + +Over the past several years I've been asked that question at +conferences, panels and over twitter. Due to historical reasons (or +maybe just plain laziness) Rake has (incorrectly) been treating the +second digit of the version as the major release number. So in my head +Rake was already at version 9. + +Well, it's time to fix things. This next version of Rake drops old, +crufty, backwards compatibility hacks such as top level constants, DSL +methods defined in Object and numerous other features that are just no +longer desired. It's also time to drop the leading zero from the +version number as well and call this new version of rake what it +really is: Version 10. + +So, welcome to Rake 10.0! + +Rake 10 is actually feature identical to the latest version of Rake 9 +(that would be the version spelled 0.9.3), *except* that Rake 10 drops +all the sundry deprecated features that have accumulated over the years. + +If your Rakefile is up to date and current with all the new features +of Rake 10, you are ready to go. If your Rakefile still uses a few +deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same +feature set. Just be aware that future features will be in Rake 10 +family line. + +==== Changes in 10.0 + +As mentioned above, there are no new features in Rake 10. However, +there are a number of features missing: + +* Classic namespaces are now gone. Rake is no longer able to reflect + the options settings in the global variables ($rakefile, $show\_tasks, + $show\_prereqs, $trace, $dryrun and $silent). The + --classic-namespace option is no longer supported. + +* Global constants are no longer supported. This includes + Task, FileTask, FileCreationTask and + RakeApp). The constant missing hook to warn about using + global rake constants has been removed. + +* The Rake DSL methods (task, file, directory, etc) are in their own + module (Rake::DSL). The stub versions of these methods (that printed + warnings) in Object have been removed. However, the DSL methods are + added to the top-level main object. Since main is + not in the inheritance tree, the presence of the DSL methods in main + should be low impact on other libraries. + + If you want to use the Rake DSL commands from your own code, just + include Rake::DSL into your own classes and modules. + +* The deprecated syntax for task arguments (the one using + :needs) has been removed. + +* The --reduce-compat flag has been removed (it's not needed + anymore). + +* The deprecated rake/sys.rb library has been removed. + +* The deprecated rake/rdoctask.rb library has been removed. + RDoc supplies its own rake task now. + +* The deprecated rake/gempackagetask.rb library has been + removed. Gem supplies its own package task now. + +There is one small behavioral change: + +* Non-file tasks now always report the current time as their time + stamp. This is different from the previous behavior where non-file + tasks reported current time only if there were no prerequisites, and + the max prerequisite timestamp otherwise. This lead to inconsistent + and surprising behavior when adding prerequisites to tasks that in + turn were prequisites to file tasks. The new behavior is more + consistent and predictable. + +==== Changes (from 0.9.3) + +Since Rake 10 includes the changes from the last version of Rake 9, +we'll repeat the changes for version 0.9.3 here. + +===== New Features + +* Multitask tasks now use a thread pool. Use -j to limit the number of + available threads. + +* Use -m to turn regular tasks into multitasks (use at your own risk). + +* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to + programatically add rake task libraries. + +* You can specific backtrace suppression patterns (see + --supress-backtrace) + +* Directory tasks can now take prerequisites and actions + +* Use --backtrace to request a full backtrace without the task trace. + +* You can say "--backtrace=stdout" and "--trace=stdout" to route trace + output to standard output rather than standard error. + +* Optional 'phony' target (enable with 'require 'rake/phony'") for + special purpose builds. + +* Task#clear now clears task comments as well as actions and + prerequisites. Task#clear_comment will specifically target comments. + +* The --all option will force -T and -D to consider all the tasks, + with and without descriptions. + +===== Bug Fixes + +* Semi-colons in windows rakefile paths now work. + +* Improved Control-C support when invoking multiple test suites. + +* egrep method now reads files in text mode (better support for + Windows) + +* Better deprecation line number reporting. + +* The -W option now works with all tasks, whether they have a + description or not. + +* File globs in rake should not be sorted alphabetically, independent + of file system and platform. + +* Numerous internal improvements. + +* Documentation typos and fixes. + + +==== Thanks + +As usual, it was input from users that drove a lot of these changes. The +following people contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich + +=== 0.9.6 + +Rake version 0.9.6 contains a number of fixes mainly for merging +Rake into the Ruby source tree and fixing tests. + +==== Changes + +===== Bug Fixes (0.9.6) + +* Better trace output when using a multi-threaded Rakefile. +* Arg parsing is now consistent for tasks and multitasks. +* Skip exit code test in versions of Ruby that don't support it well. + +Changes for better integration with the Ruby source tree: + +* Fix version literal for Ruby source tree build. +* Better loading of libraries for testing in Ruby build. +* Use the ruby version provided by Ruby's tests. + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich + +=== 0.9.5 + +Rake version 0.9.5 contains a number of bug fixes. + +==== Changes + +===== Bug Fixes (0.9.5) + +* --trace and --backtrace no longer swallow following task names. + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich + +=== 0.9.4 + +Rake version 0.9.4 contains a number of bug fixes. + +==== Changes + +===== Bug Fixes (0.9.4) + +* Exit status with failing tests is not correctly set to non-zero. + +* Simplified syntax for phony task (for older versions of RDoc). + +* Stand alone FileList usage gets glob function (without loading in + extra dependencies) + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich + === 0.9.3 -* The rake test loader now removes arguments it has processed. Issue #51 -* Rake::TaskArguments now responds to #values_at -* RakeFileUtils.verbose_flag = nil silences output the same as 0.8.7 -* Rake tests are now directory-independent -* Rake tests are no longer require flexmock -* Commands constant is no longer polluting top level namespace. -* Show only the interesting portion of the backtrace by default (James M. Lawrence). -* Added --reduce-compat optiont to remove backward compatible DSL hacks (James M. Lawrence). -* lib/rake/file_list.rb (Rake::FileList#egrep): there is no need to - open files in binary mode. (NAKAMURA Usaku) +Rake version 0.9.3 contains some new, backwards compatible features and +a number of bug fixes. + +==== Changes + +===== New Features + +* Multitask tasks now use a thread pool. Use -j to limit the number of + available threads. + +* Use -m to turn regular tasks into multitasks (use at your own risk). + +* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to + programatically add rake task libraries. + +* You can specific backtrace suppression patterns (see + --supress-backtrace) + +* Directory tasks can now take prerequisites and actions + +* Use --backtrace to request a full backtrace without the task trace. + +* You can say "--backtrace=stdout" and "--trace=stdout" to route trace + output to standard output rather than standard error. + +* Optional 'phony' target (enable with 'require 'rake/phony'") for + special purpose builds. + +* Task#clear now clears task comments as well as actions and + prerequisites. Task#clear_comment will specifically target comments. + +* The --all option will force -T and -D to consider all the tasks, + with and without descriptions. + +===== Bug Fixes + +* Semi-colons in windows rakefile paths now work. + +* Improved Control-C support when invoking multiple test suites. + +* egrep method now reads files in text mode (better support for + Windows) + +* Better deprecation line number reporting. + +* The -W option now works with all tasks, whether they have a + description or not. + +* File globs in rake should not be sorted alphabetically, independent + of file system and platform. + +* Numerous internal improvements. + +* Documentation typos and fixes. + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Aaron Patterson +* Dylan Smith +* Jo Liss +* Jonas Pfenniger +* Kazuki Tsujimoto +* Michael Bishop +* Michael Elufimov +* NAKAMURA Usaku +* Ryan Davis +* Sam Grönblom +* Sam Phippen +* Sergio Wong +* Tay Ray Chuan +* grosser +* quix + +Also, many thanks to Eric Hodel for assisting with getting this release +out the door. + +-- Jim Weirich + +=== Rake 0.9.2.2 + +Rake version 0.9.2.2 is mainly bug fixes. + +==== Changes + +* The rake test loader now removes arguments it has processed. Issue #51 +* Rake::TaskArguments now responds to #values\_at +* RakeFileUtils.verbose_flag = nil silences output the same as 0.8.7 +* Rake tests are now directory-independent +* Rake tests are no longer require flexmock +* Commands constant is no longer polluting top level namespace. +* Show only the interesting portion of the backtrace by default (James M. Lawrence). +* Added --reduce-compat option to remove backward compatible DSL hacks (James M. Lawrence). + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence (quix) +* Roger Pack +* Cezary Baginski +* Sean Scot August Moon +* R.T. Lechow +* Alex Chaffee +* James Tucker +* Matthias Lüdtke +* Santiago Pastorino + +Also, bit thanks to Eric Hodel for assisting with getting this release +out the door (where "assisting" includes, but is not by any means +limited to, "pushing" me to get it done). + +-- Jim Weirich + +=== 0.9.2 + +Rake version 0.9.2 has a few small fixes. See below for details. + +==== Changes + +* Support for Ruby 1.8.6 was fixed. +* Global DSL warnings now honor --no-deprecate + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence (quix) +* Roger Pack +* Cezary Baginski +* Sean Scot August Moon +* R.T. Lechow +* Alex Chaffee +* James Tucker +* Matthias Lüdtke +* Santiago Pastorino + +Also, bit thanks to Eric Hodel for assisting with getting this release +out the door (where "assisting" includes, but is not by any means +limited to, "pushing" me to get it done). + +-- Jim Weirich + +=== 0.9.1 + +Rake version 0.9.1 has a number of bug fixes and enhancments (see +below for more details). Additionally, the internals have be slightly +restructured and improved. + +==== Changes + +Rake 0.9.1 adds back the global DSL methods, but with deprecation +messages. This allows Rake 0.9.1 to be used with older rakefiles with +warning messages. + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence (quix) +* Roger Pack +* Cezary Baginski +* Sean Scot August Moon +* R.T. Lechow +* Alex Chaffee +* James Tucker +* Matthias Lüdtke +* Santiago Pastorino + +Also, bit thanks to Eric Hodel for assisting with getting this release +out the door (where "assisting" includes, but is not by any means +limited to, "pushing" me to get it done). + +-- Jim Weirich + +=== 0.9.0 + +Rake version 0.9.0 has a number of bug fixes and enhancments (see +below for more details). Additionally, the internals have be slightly +restructured and improved. + +==== Changes + +===== New Features / Enhancements / Bug Fixes in Version 0.9.0 + +* Rake now warns when the deprecated :needs syntax used (and suggests + the proper syntax in the warning). + +* Moved Rake DSL commands to top level ruby object 'main'. Rake DSL + commands are no longer private methods in Object. (Suggested by + James M. Lawrence/quix) + +* Rake now uses case-insensitive comparisons to find the Rakefile on Windows. + Based on patch by Roger Pack. + +* Rake now requires (instead of loads) files in the test task. Patch by Cezary + Baginski. + +* Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow. + +* Rake now prints the Rakefile directory only when it's different from the + current directory. Patch by Alex Chaffee. + +* Improved rakefile_location discovery on Windows. Patch by James Tucker. + +* Rake now recognizes "Windows Server" as a windows system. Patch by Matthias + Lüdtke + +* Rake::RDocTask is deprecated. Use RDoc::Task from RDoc 2.4.2+ (require + 'rdoc/task') + +* Rake::GemPackageTask is deprecated. Use Gem::PackageTask (require + 'rubygems/package\_task') + +* Rake now outputs various messages to $stderr instead of $stdout. + +* Rake no longer emits warnings for Config. Patch by Santiago Pastorino. + +* Removed Rake's DSL methods from the top level scope. If you need to + call 'task :xzy' in your code, include Rake::DSL into your class, or + put the code in a Rake::DSL.environment do ... end block. + +* Split rake.rb into individual files. + +* Support for the --where (-W) flag for showing where a task is defined. + +* Fixed quoting in test task. + (http://onestepback.org/redmine/issues/show/44, + http://www.pivotaltracker.com/story/show/1223138) + +* Fixed the silent option parsing problem. + (http://onestepback.org/redmine/issues/show/47) + +* Fixed :verbose=>false flag on sh and ruby commands. + +* Rake command line options may be given by default in a RAKEOPT + environment variable. + +* Errors in Rake will now display the task invocation chain in effect + at the time of the error. + +* Accepted change by warnickr to not expand test patterns in shell + (allowing more files in the test suite). + +* Fixed that file tasks did not perform prereq lookups in scope + (Redmine #57). + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence (quix) +* Roger Pack +* Cezary Baginski +* Sean Scot August Moon +* R.T. Lechow +* Alex Chaffee +* James Tucker +* Matthias Lüdtke +* Santiago Pastorino + +Also, bit thanks to Eric Hodel for assisting with getting this release +out the door (where "assisting" includes, but is not by any means +limited to, "pushing" me to get it done). + +-- Jim Weirich + + +=== 0.8.7 + +Rake version 0.8.5 introduced greatly improved support for executing +commands on Windows. The "sh" command now has the same semantics on +Windows that it has on Unix based platforms. + +Rake version 0.8.6 includes minor fixes the the RDoc generation. +Rake version 0.8.7 includes a minor fix for JRuby running on windows. + +==== Changes + +===== New Features / Enhancements in Version 0.8.5 + +* Improved implementation of the Rake system command for Windows. + (patch from James M. Lawrence/quix) + +* Support for Ruby 1.9's improved system command. (patch from James + M. Lawrence/quix) + +* Rake now includes the configured extension when invoking an + executable (Config::CONFIG['EXEEXT]) + +===== Bug Fixes in Version 0.8.5 + +* Environment variable keys are now correctly cased (it matters in + some implementations). + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Charles Nutter + +-- Jim Weirich + +=== 0.8.6 + +Rake version 0.8.5 introduced greatly improved support for executing +commands on Windows. The "sh" command now has the same semantics on +Windows that it has on Unix based platforms. + +Rake version 0.8.5 includes minor fixes the the RDoc generation. + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence/quix +* Luis Lavena + +-- Jim Weirich + +=== 0.8.5 + +Rake version 0.8.5 is a new release of Rake with greatly improved +support for executing commands on Windows. The "sh" command now has +the same semantics on Windows that it has on Unix based platforms. + +==== Changes + +===== New Features / Enhancements in Version 0.8.5 + +* Improved implementation of the Rake system command for Windows. + (patch from James M. Lawrence/quix) + +* Support for Ruby 1.9's improved system command. (patch from James + M. Lawrence/quix) + +* Rake now includes the configured extension when invoking an + executable (Config::CONFIG['EXEEXT]) + +===== Bug Fixes in Version 0.8.5 + +* Environment variable keys are now correctly cased (it matters in + some implementations). + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence/quix +* Luis Lavena + +-- Jim Weirich + +=== 0.8.4 + +Rake version 0.8.4 is a bug-fix release of rake. + +NOTE: The version of Rake that comes with Ruby 1.9 has diverged + slightly from the core Rake code base. Rake 0.8.4 will work + with Ruby 1.9, but is not a strict upgrade for the Rake that + comes with Ruby 1.9. A (near) future release of Rake will unify + those two codebases. + +==== Letter Writing Campaign + +Thanks to Aaron Patterson (@tenderlove) and Eric Hodel (@drbrain) for +their encouraging support in organizing a letter writing campaign to +lobby for the "Warning Free" release of rake 0.8.4. A special callout +goes to Jonathan D. Lord, Sr (Dr. Wingnut) whose postcard was the +first to actually reach me. (see +http://tenderlovemaking.com/2009/02/26/we-need-a-new-version-of-rake/ +for details) + +==== Changes + +===== New Features / Enhancements in Version 0.8.4 + +* Case is preserved on rakefile names. (patch from James + M. Lawrence/quix) + +* Improved Rakefile case insensitivity testing (patch from Luis + Lavena). + +* Windows system dir search order is now: HOME, HOMEDRIVE + HOMEPATH, + APPDATA, USERPROFILE (patch from Luis Lavena) + +* MingGW is now recognized as a windows platform. (patch from Luis + Lavena) + +===== Bug Fixes in Version 0.8.4 + +* Removed reference to manage_gem to fix the warning produced by the + gem package task. + +* Fixed stray ARGV option problem that was interfering with + Test::Unit::Runner. (patch from Pivotal Labs) + +===== Infrastructure Improvements in Version 0.8.4 + +* Numerous fixes to the windows test suite (patch from Luis Lavena). + +* Improved Rakefile case insensitivity testing (patch from Luis + Lavena). + +* Better support for windows paths in the test task (patch from Simon + Chiang/bahuvrihi) + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* James M. Lawrence/quix +* Luis Lavena +* Pivotal Labs +* Simon Chiang/bahuvrihi + +-- Jim Weirich + +=== 0.8.3 + +Rake version 0.8.3 is a bug-fix release of rake. + +==== Changes + +===== Bug Fixes in Version 0.8.3 + +* Enhanced the system directory detection in windows. We now check + HOMEDRIVE/HOMEPATH and USERPROFILE if APPDATA isn't found. (Patch + supplied by James Tucker). Rake no long aborts if it can't find the + directory. + +* Added fix to handle ruby installations in directories with spaces in + their name. + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +* Edwin Pratomo +* Gavin Stark +* Adam Q. Salter +* Adam Majer +* Emanuel Indermühle +* Ittay Dror +* Bheeshmar Redheendran (for spending an afternoon with me debugging + windows issues) + +-- Jim Weirich + + +=== 0.8.2 + +Rake version 0.8.2 is a new release of rake that includes a number of +new features and numerous bug fixes. + +==== Changes + +===== New Features in Version 0.8.2 + +* Switched from getoptlong to optparse (patches supplied by Edwin + Pratomo). + +* The -T option will now attempt to dynamically sense the size of the + terminal. The -T output will only self-truncate if the output is a + tty. However, if RAKE_COLUMNS is explicitly set, it will be honored + in any case. (Patch provided by Gavin Stark). + +* The following public methods have been added to rake task objects: + + * task.clear -- Clear both the prerequisites and actions of the + target rake task. + * task.clear_prerequisites -- Clear all the existing prerequisites + from the target rake task. + * task.clear_actions -- Clear all the existing actions from the + target rake task. + * task.reenable -- Re-enable a task, allowing its actions to be + executed again if the task is invoked. + +* Changed RDoc test task to have no default template. This makes it + easier for the tempate to pick up the template from the environment. + +* Default values for task arguments can easily be specified with the + :with_defaults method. (Idea for default argument merging supplied + by (Adam Q. Salter) + +===== Bug Fixes in Version 0.8.2 + +* Fixed bug in package task so that it will include the subdir + directory in the package for testing. (Bug found by Adam Majer) + +* Fixed filename dependency order bug in test\_inspect\_pending and + test\_to\_s\_pending. (Bug found by Adam Majer) -=== 0.9.2 +* Fixed check for file utils options to make them immune to the + symbol/string differences. (Patch supplied by Edwin Pratomo) -* Unknown +* Fixed bug with rules involving multiple source, where only the first + dependency of a rule has any effect (Patch supplied by Emanuel + Indermühle) -=== 0.9.1 +* FileList#clone and FileList#dup have better sematics w.r.t. taint + and freeze. -* Added deprecation warnings to the Rake DSL methods. +* Changed from using Mutex to Monitor. Evidently Mutex causes thread + join errors when Ruby is compiled with -disable-pthreads. (Patch + supplied by Ittay Dror) -=== 0.9.0 +* Fixed bug in makefile parser that had problems with extra spaces in + file task names. (Patch supplied by Ittay Dror) -* *Incompatible* *change*: Rake DSL commands ('task', 'file', etc.) are - no longer private methods in Object. If you need to call 'task :xzy' inside - your class, include Rake::DSL into the class. The DSL is still available at - the top level scope (via the top level object which extends Rake::DSL). +==== Other changes in Version 0.8.2 -* Rake now warns when the deprecated :needs syntax used. +* Added ENV var to rake's own Rakefile to prevent OS X from including + extended attribute junk in the rake package tar file. (Bug found by + Adam Majer) -* Rake history is now UTF-8 encoded. +* Added a performance patch for reading large makefile dependency + files. (Patch supplied by Ittay Dror) -* Rake now uses case-insensitive comparisons to find the Rakefile on Windows. - Based on patch by Roger Pack. +==== Task Argument Examples -* Rake now requires (instead of loads) files in the test task. Patch by Cezary - Baginski. +Prior to version 0.8.0, rake was only able to handle command line +arguments of the form NAME=VALUE that were passed into Rake via the +ENV hash. Many folks had asked for some kind of simple command line +arguments, perhaps using "--" to separate regular task names from +argument values on the command line. The problem is that there was no +easy way to associate positional arguments on the command line with +different tasks. Suppose both tasks :a and :b expect a command line +argument: does the first value go with :a? What if :b is run first? +Should it then get the first command line argument. -* Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow. +Rake 0.8.0 solves this problem by explicitly passing values directly +to the tasks that need them. For example, if I had a release task +that required a version number, I could say: -* Rake now prints the Rakefile directory only when it's different from the - current directory. Patch by Alex Chaffee. + rake release[0.8.2] -* Improved rakefile_location discovery on Windows. Patch by James Tucker. +And the string "0.8.2" will be passed to the :release task. Multiple +arguments can be passed by separating them with a comma, for example: -* Rake now recognizes "Windows Server" as a windows system. Patch by Matthias - Lüdtke + rake name[john,doe] -* Rake::RDocTask is deprecated. Use RDoc::Task from RDoc 2.4.2+ (require - 'rdoc/task') +Just a few words of caution. The rake task name and its arguments +need to be a single command line argument to rake. This generally +means no spaces. If spaces are needed, then the entire rake + +argument string should be quoted. Something like this: -* Rake::GemPackageTask is deprecated. Use Gem::PackageTask (require - 'rubygems/package_task') + rake "name[billy bob, smith]" -* Rake now outputs various messages to $stderr instead of $stdout. +(Quoting rules vary between operating systems and shells, so make sure +you consult the proper docs for your OS/shell). -* Rake no longer emits warnings for Config. Patch by Santiago Pastorino. +===== Tasks that Expect Parameters -* Split rake.rb into individual files. +Parameters are only given to tasks that are setup to expect them. In +order to handle named parameters, the task declaration syntax for +tasks has been extended slightly. -* Support for the --where (-W) flag for showing where a task is defined. +For example, a task that needs a first name and last name might be +declared as: -* Fixed quoting in test task. - (http://onestepback.org/redmine/issues/show/44, - http://www.pivotaltracker.com/story/show/1223138) + task :name, :first_name, :last_name -* Fixed the silent option parsing problem. - (http://onestepback.org/redmine/issues/show/47) +The first argument is still the name of the task (:name in this case). +The next to argumements are the names of the parameters expected by +:name (:first_name and :last_name in the example). -* Fixed :verbose=>false flag on sh and ruby commands. +To access the values of the paramters, the block defining the task +behaviour can now accept a second parameter: -* Rake command line options may be given by default in a RAKEOPT - environment variable. + task :name, :first_name, :last_name do |t, args| + puts "First name is #{args.first_name}" + puts "Last name is #{args.last_name}" + end -* Errors in Rake will now display the task invocation chain in effect - at the time of the error. +The first argument of the block "t" is always bound to the current +task object. The second argument "args" is an open-struct like object +that allows access to the task arguments. Extra command line +arguments to a task are ignored. Missing command line arguments are +given the nil value. -* Accepted change by warnickr to not expand test patterns in shell - (allowing more files in the test suite). +==== Thanks -* Fixed that file tasks did not perform prereq lookups in scope - (Redmine #57). +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... -=== 0.8.7 +* Edwin Pratomo +* Gavin Stark +* Adam Q. Salter +* Adam Majer +* Emanuel Indermühle +* Ittay Dror +* Bheeshmar Redheendran (for spending an afternoon with me debugging + windows issues) -* Fixed EXEEXT for JRuby on windows. +-- Jim Weirich -=== 0.8.6 +=== 0.8.0/0.8.1 -* Minor fixes to the RDoc generation (removed dependency on darkfish - and removed inline source option). +Rake version 0.8.0 is a new release of rake that includes serveral new +features. -* Now allow # comments to comment a task definition. +==== Changes -=== 0.8.5 +===== New Features in Version 0.8.0 -* Better support for the system command on Windows. +* Tasks can now receive command line parameters. See the examples + below for more details. -=== 0.8.4 +* Comments are limited to 80 columns on output, but full comments can + be seen by using the -D parameter. (feature suggested by Jamis + Buck). -* Preserve case when locating rakefiles (patch from James - M. Lawrence/quix) +* Explicit exit(n) calls will now set the exit status to n. (patch + provided by Stephen Touset). -* Better support for windows paths in the test task (patch from Simon - Chiang/bahuvrihi) +* Rake is now compatible with Ruby 1.9. -* Windows system dir search order is now: HOME, HOMEDRIVE + HOMEPATH, - APPDATA, USERPROFILE (patch from Luis Lavena) +Version 0.8.1 is a minor update that includes additional Ruby 1.9 +compatibility fixes. -* MingGW is now recognized as a windows platform. (patch from Luis - Lavena) +==== Task Argument Examples -* Numerous fixes to the windows test suite (patch from Luis Lavena). +Prior to version 0.8.0, rake was only able to handle command line +arguments of the form NAME=VALUE that were passed into Rake via the +ENV hash. Many folks had asked for some kind of simple command line +arguments, perhaps using "--" to separate regular task names from +argument values on the command line. The problem is that there was no +easy way to associate positional arguments on the command line with +different tasks. Suppose both tasks :a and :b expect a command line +argument: does the first value go with :a? What if :b is run first? +Should it then get the first command line argument. -* Improved Rakefile case insensitivity testing (patch from Luis - Lavena). +Rake 0.8.0 solves this problem by explicitly passing values directly +to the tasks that need them. For example, if I had a release task +that required a version number, I could say: -* Fixed stray ARGV option problem that was interfering with - Test::Unit::Runner. + rake release[0.8.0] -* Fixed default verbose mode (was accidently changed to false). +And the string "0.8.0" will be passed to the :release task. Multiple +arguments can be passed by separating them with a comma, for example: -* Removed reference to manage_gem to fix the warning produced by the - gem package task. + rake name[john,doe] -=== 0.8.3 +Just a few words of caution. The rake task name and its arguments +need to be a single command line argument to rake. This generally +means no spaces. If spaces are needed, then the entire rake + +argument string should be quoted. Something like this: -* Enhanced the system directory detection in windows. We now check - HOMEDRIVE/HOMEPATH and USERPROFILE if APPDATA isn't found. (Patch - supplied by James Tucker). Rake no long aborts if it can't find the - directory. + rake "name[billy bob, smith]" -* Added fix to handle ruby installations in directories with spaces in - their name. +(Quoting rules vary between operating systems and shells, so make sure +you consult the proper docs for your OS/shell). -=== 0.8.2 +===== Tasks that Expect Parameters -* Fixed bug in package task so that it will include the subdir - directory in the package for testing. (Bug found by Adam Majer) +Parameters are only given to tasks that are setup to expect them. In +order to handle named parameters, the task declaration syntax for +tasks has been extended slightly. -* Added ENV var to rakefile to prevent OS X from including extended - attribute junk in a tar file. (Bug found by Adam Majer) +For example, a task that needs a first name and last name might be +declared as: -* Fixed filename dependency order bug in test_inspect_pending and - test_to_s_pending. (Bug found by Adam Majer) + task :name, :first_name, :last_name -* Fixed check for file utils options to make them immune to the - symbol/string differences. (Patch supplied by Edwin Pratomo) +The first argument is still the name of the task (:name in this case). +The next to argumements are the names of the parameters expected by +:name (:first_name and :last_name in the example). -* Fixed bug with rules involving multiple source (Patch supplied by - Emanuel Indermühle) +To access the values of the paramters, the block defining the task +behaviour can now accept a second parameter: -* Switched from getoptlong to optparse (patches supplied by Edwin - Pratomo) + task :name, :first_name, :last_name do |t, args| + puts "First name is #{args.first_name}" + puts "Last name is #{args.last_name}" + end -* The -T option will now attempt to dynamically sense the size of the - terminal. RAKE_COLUMNS will override any dynamic sensing. +The first argument of the block "t" is always bound to the current +task object. The second argument "args" is an open-struct like object +that allows access to the task arguments. Extra command line +arguments to a task are ignored. Missing command line arguments are +given the nil value. -* FileList#clone and FileList#dup have better sematics w.r.t. taint - and freeze. +==== Thanks -* Added ability clear prerequisites, and/or actions from an existing - task. +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... -* Added the ability to reenable a task to be invoked a second time. +* Jamis Buck (for comment formatting suggestions) +* Stephen Touset (for exit status patch). -* Changed RDoc test task to have no default template. This makes it - easier for the tempate to pick up the template from the environment. +-- Jim Weirich -* Changed from using Mutex to Monitor. Evidently Mutex causes thread - join errors when Ruby is compiled with -disable-pthreads. (Patch - supplied by Ittay Dror) -* Fixed bug in makefile parser that had problems with extra spaces in - file task names. (Patch supplied by Ittay Dror) +=== 0.7.3 -* Added a performance patch for reading large makefile dependency - files. (Patch supplied by Ittay Dror) +Rake version 0.7.3 is a minor release that includes some refactoring to better +support custom Rake applications. -* Default values for task arguments can easily be specified with the - :with_defaults method. (Idea for default argument merging supplied - by (Adam Q. Salter) +==== Changes -* The -T output will only self-truncate if the output is a tty. - However, if RAKE_COLUMNS is explicitly set, it will be honored in - any case. (Patch provided by Gavin Stark). +===== New Features in Version 0.7.3 -* Numerous fixes for running under windows. A big thanks to Bheeshmar - Redheendran for spending a good part of the afternoon at the - Lonestar Ruby Conference to help me work out these issues. +* Added the +init+ and +top_level+ methods to make the creation of custom Rake applications a bit easier. E.g. -=== 0.8.1 + gem 'rake', ">= 0.7.3" + require 'rake' -* Removed requires on parsedate.rb (in Ftptools) -* Removed ftools from rake.rb. Made it options in sys.rb + Rake.application.init('myrake') -=== 0.8.0 + task :default do + something_interesting + end -* Added task parameters (e.g. "rake build[version7]") -* Made task parameters passable to prerequisites. -* Comments are limited to 80 columns or so (suggested by Jamis Buck). -* Added -D to display full comments (suggested by Jamis Buck). -* The rake program will set the status value used in any explicit - exit(n) calls. (patch provided by Stephen Touset) -* Fixed error in functional tests that were not including session (and - silently skipping the functionl tests. -* Removed --usage and make -h the same as -H. -* Make a prettier inspect for tasks. + Rake.application.top_level -=== 0.7.3 +==== Thanks + +As usual, it was input from users that drove a alot of these changes. The +following people either contributed patches, made suggestions or made +otherwise helpful comments. Thanks to ... + +-- Jim Weirich -* Added existing and existing! methods to FileList -* FileLists now claim to be Arrays (via is_a?) to get better support - from the FileUtil module. -* Added init and top_level for custom rake applications. === 0.7.2 + +Version 0.7.2 supplies a bug fix and a few minor enhancements. In +particular, the new version fixes an incompatibility with the soon to +be released Ruby 1.8.6. We strongly recommend upgrading to Rake 0.7.2 +in order to be compatible with the new version of Ruby. + +==== Changes + +===== Bug Fixes in 0.7.2 + +There are quite a number of bug fixes in the new 0.7.2 version of +Rake: + +* Removed dependency on internal fu_xxx functions from FileUtils. + * Error messages are now send to stderr rather than stdout (from Payton Quackenbush). + * Better error handling on invalid command line arguments (from Payton Quackenbush). -* Added rcov task and updated unit testing for better code coverage. + * Fixed some bugs where the application object was going to the global appliation instead of using its own data. + +* Fixed the method name leak from FileUtils (bug found by Glenn + Vanderburg). + +* Added test for noop, bad_option and verbose flags to sh command. + +* Added a description to the gem task in GemPackageTask. + +* Fixed a bug when rules have multiple prerequisites (patch by Joel + VanderWerf) + +* Added the handful of RakeFileUtils to the private method as well. + +===== New Features in 0.7.2 + +The following new features are available in Rake version 0.7.2: + * Added square and curly bracket patterns to FileList#include (Tilman Sauerbeck). + +* FileLists can now pass a block to FileList#exclude to exclude files + based on calculated values. + * Added plain filename support to rule dependents (suggested by Nobu Nakada). -* Added pathmap support to rule dependents. + +* Added pathmap support to rule dependents. In other words, if a + pathmap format (beginning with a '%') is given as a Rake rule + dependent, then the name of the depend will be the name of the + target with the pathmap format applied. + * Added a 'tasks' method to a namespace to get a list of tasks associated with the namespace. -* Fixed the method name leak from FileUtils (bug found by Glenn - Vanderburg). -* Added rake_extension to handle detection of extension collisions. -* Added test for noop, bad_option and verbose flags to sh command. -* Removed dependency on internal fu_xxx functions from FileUtils. -* Added a 'shame' task to the Rakefile. + * Added tar_command and zip_command options to the Package task. -* Added a description to the gem task in GemPackageTask. -* Fixed a bug when rules have multiple prerequisites (patch by Joel - VanderWerf) + +* The clean task will no longer delete 'core' if it is a directory. + +===== Internal Rake Improvements + +The following changes will are mainly internal improvements and +refactorings and have little effect on the end user. But they may be +of interest to the general public. + +* Added rcov task and updated unit testing for better code coverage. + +* Added a 'shame' task to the Rakefile. + +* Added rake_extension to handle detection of extension collisions. + * Added a protected 'require "rubygems"' to test/test_application to unbreak cruisecontrol.rb. -* Added the handful of RakeFileUtils to the private method as well. -* Added block based exclusion. -* The clean task will no longer delete 'core' if it is a directory. -* Removed rake_dup. Now we just simply rescue a bad dup. + +* Removed rake\_dup. Now we just simply rescue a bad dup. + * Refactored the FileList reject logic to remove duplication. -* Removed if __FILE__ at the end of the rake.rb file. + +* Removed if \_\_FILE\_\_ at the end of the rake.rb file. + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. +The following people either contributed patches, made suggestions or +made otherwise helpful comments. Thanks to ... + +* Payton Quackenbush -- For several error handling improvements. + +* Glenn Vanderburg -- For finding and fixing the method name leak from + FileUtils. + +* Joel VanderWerf -- for finding and fixing a bug in the handling of + multiple prerequisites. + +* Tilman Sauerbeck -- For some enhancing FileList to support more + advanced file globbing. + +* Nobu Nakada -- For suggesting plain file name support to rule dependents. + +-- Jim Weirich === 0.7.1 -* Added optional filter parameter to the --tasks command line option. -* Added flatten to allow rule transform procs to return lists of - prereqs (Joel VanderWerf provided patch). -* Added pathmap to String and FileList. -* The -r option will now load .rake files (but a straight require - doesn't yet). NOTE: This is experimental ... it may be - discontinued. +Version 0.7.1 supplies a bug fix and a few minor enhancements. + +==== Changes + +===== Bug Fixes in 0.7.1 + +* Changes in the exception reported for the FileUtils.ln caused + safe_ln to fail with a NotImplementedError. Rake 0.7.1 will now + catch that error or any StandardError and properly fall back to + using +cp+. + +===== New Features in 0.7.1 + +* You can filter the results of the --task option by supplying an + optional regular expression. This allows the user to easily find a + particular task name in a long list of possible names. + +* Transforming procs in a rule may now return a list of prerequisites. + This allows more flexible rule formation. + +* FileList and String now support a +pathmap+ melthod that makes the + transforming paths a bit easier. See the API docs for +pathmap+ for + details. + * The -f option without a value will disable the search for a - Rakefile. The assumption is that the -r files are adequate. -* Fixed the safe_ln function to fall back to cp in more error - scenarios. + Rakefile. This allows the Rakefile to be defined entirely in a + library (and loaded with the -r option). The current working + directory is not changed when this is done. + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. +The following people either contributed patches, made suggestions or +made otherwise helpful comments. Thanks to ... + +* James Britt and Assaph Mehr for reporting and helping to debug the + safe_ln issue. + +-- Jim Weirich + === 0.7.0 -* Added Rake.original_dir to return the original starting directory of - the rake application. -* Added safe_ln support for openAFS (from Ludvig Omholt). -* Added --trace reminder on short exception messages (David Heinemeier - Hansson suggestion). -* Added multitask declaration that executes prerequisites in - parallel. (Doug Young providied an initial implementation). -* Fixed missing_const hack to be compatible with Rails. (Jamis Buck - supplied test case). -* Made the RDoc task default to internal (in-process) RDoc formatting. - The old behavior is still available by setting the +external+ flag - to true. +These changes for Rake have been brewing for a long time. Here they +are, I hope you enjoy them. + +==== Changes + +===== New Features + +* Name space support for task names (see below). +* Prerequisites can be executed in parallel (see below). +* Added safe_ln support for openAFS (via Ludvig Omholt). +* RDoc defaults to internal (in-process) invocation. The old behavior + is still available by setting the +external+ flag to true. * Rakefiles are now loaded with the expanded path to prevent accidental polution from the Ruby load path. -* The +namespace+ command now returns a NameSpace object that can be - used to lookup tasks defined in that namespace. This allows for - better anonymous namespace behavior. * Task objects my now be used in prerequisite lists directly. +* Task objects (in addition to task names) may now be included in the + prerequisite list of a task. +* Internals cleanup and refactoring. + +===== Bug Fixes + +* Compatibility fixes for Ruby 1.8.4 FileUtils changes. + +===== Namespaces + +Tasks can now be nested inside their own namespaces. Tasks within one +namespace will not accidently interfer with tasks named in a different +namespace. + +For example: + + namespace "main" do + task :build do + # Build the main program + end + end + + namespace "samples" do + task :build do + # Build the sample programs + end + end + + task :build_all => ["main:build", "samples:build"] + +Even though both tasks are named :build, they are separate tasks in +their own namespaces. The :build_all task (defined in the toplevel +namespace) references both build tasks in its prerequisites. + +You may invoke each of the individual build tasks with the following +commands: + + rake main:build + rake samples:build + +Or invoke both via the :build_all command: + + rake build_all + +Namespaces may be nested arbitrarily. Since the name of file tasks +correspond to the name of a file in the external file system, +FileTasks are not affected by the namespaces. + +See the Rakefile format documentation (in the Rake API documents) for +more information. + +===== Parallel Tasks + +Sometimes you have several tasks that can be executed in parallel. By +specifying these tasks as prerequisites to a +multitask+ task. + +In the following example the tasks copy\_src, copy\_doc and copy\_bin +will all execute in parallel in their own thread. + + multitask :copy_files => [:copy_src, :copy_doc, :copy_bin] do + puts "All Copies Complete" + end + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. +The following people either contributed patches, made suggestions or +made otherwise helpful comments. Thanks to ... + +* Doug Young (inspriation for the parallel task) +* David Heinemeier Hansson (for --trace message enhancement and for + pushing for namespace support). +* Ludvig Omholt (for the openAFS fix) + +-- Jim Weirich === 0.6.1 @@ -488,52 +1772,217 @@ the individual release notes files. === 0.6.0 -* Fixed file creation bug in the unit tests (caused infinite loop on - windows). -* Fixed bug where session based functional tests were run under - windows. -* Fixed bug in directory tasks so that updating a directory will not - retrigger file tasks depending on the directory (see - FileCreationTask and EarlyTime). -* Added egrep to FileList -* ruby command now runs same ruby version as rake. -* Added investigation to task object. (suggested by Martin Fowler) -* Added ruby_opts to the test task to allow arbitrary ruby options to - be passed to the test script. (Greg Fast) -* Fixed the test loader to ignore options. (Greg Fast) -* Moved Task, FileTask, FileCreationTask and RakeApp into the Rake - module namespace. Old style namespace behavior can be invoked via - the --classic-namespace option. (requested by Kelly Felkins). -* GemTask is now sensitive to the gem platform (Masao Mutoh). -* A non-existing file prerequisite will no longer cause an exception - (Philipp Neubeck). -* Multiple prerequisites on Rake rules now allowed (initial patch - supplied by Stuart Jansen). +Its time for some long requested enhancements and lots of bug fixes +... And a whole new web page. + +==== New Web Page + +The primary documentation for rake has moved from the RubyForge based +wiki to its own Hieraki based web site. Constant spam on the wiki +made it a difficult to keep clean. The new site will be easier to +update and organize. + +Check out the new documentation at: http://docs.rubyrake.org + +We will be adding new documentation to the site as time goes on. + +In addition to the new docs page, make sure you check out Martin +Fowlers article on rake at http://martinfowler.com/articles/rake.html + +==== Changes + +===== New Features + +* Multiple prerequisites on Rake rules now allowed. However, keep the + following in mind: + + 1. All the prerequisites of a rule must be available before a rule + is triggered, where "enabled" means (a) an existing file, (b) a + defined rule, or (c) another rule which also must be + trigger-able. + 2. Rules are checked in order of definition, so it is important to + order your rules properly. If a file can be created by two + different rules, put the more specific rule first (otherwise the + more general rule will trigger first and the specific one will + never be triggered). + 3. The source method now returns the name of the first + prerequisite listed in the rule. sources returns the + names of all the rule prerequisites, ordered as they are defined + in the rule. If the task has other prerequisites not defined in + the rule (but defined in an explicit task definition), then they + will _not_ be included in the sources list. + +* FileLists may now use the egrep command. This popular enhancement + is now a core part of the FileList object. If you want to get a + list of all your to-dos, fixmes and TBD comments, add the following + to your Rakefile. + + desc "Look for TODO and FIXME tags in the code" + task :todo do + FileList['**/*.rb'].egrep /#.*(FIXME|TODO|TBD)/ + end + +* The investigation method was added to task object to dump + out some important values. This makes it a bit easier to debug Rake + tasks. + + For example, if you are having problems with a particular task, just + print it out: + + task :huh do + puts Rake::Task['huh'].investigation + end + +* The Rake::TestTask class now supports a "ruby\_opts" option to pass + arbitrary ruby options to a test subprocess. + +===== Some Incompatibilities + +* When using the ruby command to start a Ruby subprocess, the + Ruby interpreter that is currently running rake is used by default. + This makes it easier to use rake in an environment with multiple + ruby installation. (Previously, the first ruby command found in the + PATH was used). + + If you wish to chose a different Ruby interpreter, you can + explicitly choose the interpreter via the sh command. + +* The major rake classes (Task, FileTask, FileCreationTask, RakeApp) + have been moved out of the toplevel scope and are now accessible as + Rake::Task, Rake::FileTask, Rake::FileCreationTask and + Rake::Application. If your Rakefile + directly references any one of these tasks, you may: + + 1. Update your Rakefile to use the new classnames + 2. Use the --classic-namespace option on the rake command to get the + old behavior, + 3. Add require 'rake/classic_namespace' to the + Rakefile to get the old behavior. + + rake will print a rather annoying warning whenever a + deprecated class name is referenced without enabling classic + namespace. + +===== Bug Fixes + +* Several unit tests and functional tests were fixed to run better + under windows. + +* Directory tasks are now a specialized version of a File task. A + directory task will only be triggered if it doesn't exist. It will + not be triggered if it is out of date w.r.t. any of its + prerequisites. + +* Fixed a bug in the Rake::GemPackageTask class so that the gem now + properly contains the platform name. + +* Fixed a bug where a prerequisite on a file task would cause + an exception if the prerequisite did not exist. + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. +The following people either contributed patches, made suggestions or +made otherwise helpful comments. Thanks to ... + +* Greg Fast (better ruby_opt test options) +* Kelly Felkins (requested by better namespace support) +* Martin Fowler (suggested Task.investigation) +* Stuart Jansen (send initial patch for multiple prerequisites). +* Masao Mutch (better support for non-ruby Gem platforms) +* Philipp Neubeck (patch for file task exception fix) + +-- Jim Weirich === 0.5.4 -* Added double quotes to the test runner. -* Added .svn to default ignore list. +Time for some minor bug fixes and small enhancements + +==== Changes + +Here are the changes for version 0.5.4 ... + +* Added double quotes to the test runner. This allows the location of + the tests (and runner) to be in a directory path that contains + spaces (e.g. "C:/Program Files/ruby/bin"). +* Added .svn to default ignore list. Now subversion project metadata + is automatically ignored by Rake's FileList. * Updated FileList#include to support nested arrays and filelists. + FileLists are flat lists of file names. Using a FileList in an + include will flatten out the nested file names. + +== Thanks + +As usual, it was input from users that drove a alot of these changes. +Thanks to ... + +* Tilman Sauerbeck for the nested FileList suggestion. +* Josh Knowles for pointing out the spaces in directory name problem. + +-- Jim Weirich === 0.5.3 -* Added support for importing Rakefile and other dependencies. -* Fixed bug so that now rules can chain off of existing tasks as well - as existing files. -* Fixed verbose flag bug in the testing task. Shortened some failure - messages. -* Make FileUtils methods private at the top level module to avoid - accidental method leaking into other objects. -* Added test loader option to test task. "testrb" is no longer the - default test loader. It is now eating syntax errors that should - halt the unit tests. -* Revamped FileList so that it works more like and array (addressed - flatten bug). Added many tests around file list. -* Added +ext+ method to both String and FileList. +Although it has only been two weeks since the last release, we have +enough updates to the Rake program to make it time for another +release. + +==== Changes + +Here are the changes for version 0.5.3 ... + +* FileLists have been extensively changed so that they mimic the + behavior of real arrays even more closely. In particular, + operations on FileLists that return a new collection (e.g. collect, + reject) will now return a FileList rather than an array. In + addition, several places where FileLists were not properly expanded + before use have been fixed. +* A method (+ext+) to simplify the handling of file extensions was + added to String and to Array. +* The 'testrb' script in test/unit tends to silently swallow syntax + errors in test suites. Because of that, the default test loader is + now a rake-provided script. You can still use 'testrb' by setting + the loader flag in the test task to :testrb. (See the API documents + for TestTask for all the loader flag values). +* FileUtil methods (e.g. cp, mv, install) are now declared to be + private. This will cut down on the interference with user defined + methods of the same name. +* Fixed the verbose flag in the TestTask so that the test code is + controlled by the flag. Also shortened up some failure messages. + (Thanks to Tobias Luetke for the suggestion). +* Rules will now properly detect a task that can generate a source + file. Previously rules would only consider source files that were + already present. +* Added an +import+ command that allows Rake to dynamically import + dependendencies into a running Rake session. The +import+ command + can run tasks to update the dependency file before loading them. + Dependency files can be in rake or make format, allowing rake to + work with tools designed to generate dependencies for make. + +==== Thanks + +As usual, it was input from users that drove a alot of these changes. +Thanks to ... + +* Brian Gernhardt for the rules fix (especially for the patience to + explain the problem to me until I got what he was talking about). +* Stefan Lang for pointing out problems in the dark corners of the + FileList implementation. +* Alexey Verkhovsky pointing out the silently swallows syntax errors + in tests. +* Tobias Luetke for beautifying the test task output. +* Sam Roberts for some of the ideas behind dependency loading. + +-- Jim Weirich + === 0.5.0 +It has been a long time in coming, but we finally have a new version +of Rake available. + +==== Changes + * Fixed documentation that was lacking the Rake module name (Tilman Sauerbeck). * Added tar.gz and tar.bz2 support to package task (Tilman Sauerbeck). @@ -545,17 +1994,45 @@ the individual release notes files. * Added Brian Candler's fix for problems in --trace and --dry-run mode. +==== Thanks + +Lots of people provided input to this release. Thanks to Tilman +Sauerbeck for numerous patches, documentation fixes and suggestions. +And for also pushing me to get this release out. Also, thanks to +Brian Candler for the finding and fixing --trace/dry-run fix. That +was an obscure bug. Also to Eric Hodel for some good suggestions. + +-- Jim Weirich + === 0.4.15 +==== Changes + +Version 0.4.15 is a bug fix update for the Ruby 1.8.2 compatibility +changes. This release includes: + * Fixed a bug that prevented the TESTOPTS flag from working with the revised for 1.8.2 test task. * Updated the docs on --trace to indicate that it also enables a full backtrace on errors. +* Several fixes for new warnings generated. + +==== Mini-Roadmap + +I will continue to issue Rake updates in the 0.4.xx series as new +Ruby-1.8.2 issues become manifest. Once the codebase stabilizes, I +will release a 0.5.0 version incorporating all the changes. If you +are not using Ruby-1.8.2 and wish to avoid version churn, I recommend +staying with a release prior to Rake-0.4.14. === 0.4.14 -* Modified the TestTask to workaround the Ruby 1.8.2 change in - autoexecuting unit tests. +Version 0.4.14 is a compatibility fix to allow Rake's test task to +work under Ruby 1.8.2. A change in the Test::Unit autorun feature +prevented Rake from running any tests. This release fixes the +problem. + +Rake 0.4.14 is the recommended release for anyone using Ruby 1.8.2. === 0.4.13 @@ -625,7 +2102,7 @@ the individual release notes files. === 0.4.2 * Added safe_ln that falls back to a copy if a file link is not supported. -* Package builder now uses safe_ln. +* Package builder now uses safe\_ln. === 0.4.1 * Task comments are now additive, combined with "/". @@ -715,6 +2192,6 @@ presentation was being prepared. The changes include: === 0.2.3 * Added rake module for a help target -* Added 'for_files' to Sys +* Added 'for\_files' to Sys * Added a $rakefile constant * Added test for selecting proper rule with multiple targets. From 16d5cc7d30c6cdd81de173d10f88dfea74c1122e Mon Sep 17 00:00:00 2001 From: Tatsuya Sato Date: Mon, 28 Mar 2016 16:00:03 +0900 Subject: [PATCH 494/813] Put a README to make visitors go to History.rdoc --- doc/release_notes/README.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/release_notes/README.md diff --git a/doc/release_notes/README.md b/doc/release_notes/README.md new file mode 100644 index 000000000..115ce0a71 --- /dev/null +++ b/doc/release_notes/README.md @@ -0,0 +1,4 @@ +# Note: this release notes will never been updated + +The maintenance policy for release notes has been changed. +Please see [History.rdoc](https://github.com/ruby/rake/blob/master/History.rdoc). From b3198754b13c128745154073e875a5f25862a4ea Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 19 Apr 2016 13:59:20 +0900 Subject: [PATCH 495/813] Use sysctl for cpu counter on OS X --- lib/rake/cpu_counter.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index a0415f131..8aded8f13 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -37,11 +37,9 @@ def count case RbConfig::CONFIG['host_os'] when /darwin9/ count_via_hwprefs_cpu_count - when /darwin/ - count_via_hwprefs_thread_count || count_via_sysctl when /linux/ count_via_cpuinfo - when /bsd/ + when /darwin|bsd/ count_via_sysctl when /mswin|mingw/ count_via_win32 From 0d56b3874841d06740c8206868ea85b52c4d9b54 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 19 Apr 2016 14:01:47 +0900 Subject: [PATCH 496/813] removed hwprefs detection for cpu counter, It's only provide old darwin arch --- lib/rake/cpu_counter.rb | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index 8aded8f13..fc8848a5d 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -35,8 +35,6 @@ def count count_via_java_runtime else case RbConfig::CONFIG['host_os'] - when /darwin9/ - count_via_hwprefs_cpu_count when /linux/ count_via_cpuinfo when /darwin|bsd/ @@ -46,10 +44,8 @@ def count else # Try everything count_via_win32 || - count_via_sysctl || - count_via_hwprefs_thread_count || - count_via_hwprefs_cpu_count || - count_via_cpuinfo + count_via_sysctl || + count_via_cpuinfo end end end @@ -75,14 +71,6 @@ def count_via_cpuinfo nil end - def count_via_hwprefs_thread_count - run 'hwprefs', 'thread_count' - end - - def count_via_hwprefs_cpu_count - run 'hwprefs', 'cpu_count' - end - def count_via_sysctl run 'sysctl', '-n', 'hw.ncpu' end From 5093eb43a611715a2f7366527a33e90b3fc19d94 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 4 May 2016 17:54:22 +0900 Subject: [PATCH 497/813] remove trailing-whitespace. --- doc/release_notes/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release_notes/README.md b/doc/release_notes/README.md index 115ce0a71..d7079ad81 100644 --- a/doc/release_notes/README.md +++ b/doc/release_notes/README.md @@ -1,4 +1,4 @@ # Note: this release notes will never been updated -The maintenance policy for release notes has been changed. +The maintenance policy for release notes has been changed. Please see [History.rdoc](https://github.com/ruby/rake/blob/master/History.rdoc). From aa2bc02eabe6b4e0d3734fb764321055331f7543 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 4 May 2016 18:03:41 +0900 Subject: [PATCH 498/813] Removed explicitly loading of rubygems. It only needs with Ruby 1.8 --- exe/rake | 6 ------ test/helper.rb | 6 ------ 2 files changed, 12 deletions(-) diff --git a/exe/rake b/exe/rake index 4e0bbb7b7..f1ac568c6 100755 --- a/exe/rake +++ b/exe/rake @@ -22,12 +22,6 @@ # IN THE SOFTWARE. #++ -begin - require 'rubygems' - gem 'rake' -rescue LoadError -end - require 'rake' Rake.application.run diff --git a/test/helper.rb b/test/helper.rb index a0d0c2261..36ee9b050 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,11 +1,5 @@ -require 'rubygems' $:.unshift File.expand_path('../../lib', __FILE__) -begin - gem 'minitest', '~> 5' -rescue Gem::LoadError -end - require 'minitest/autorun' require 'rake' require 'tmpdir' From 596f24415d391a35be2da1b94094f24974f366f9 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 4 May 2016 22:03:49 +0900 Subject: [PATCH 499/813] unify Rake::VERSION --- lib/rake.rb | 4 +--- lib/rake/version.rb | 2 ++ rake.gemspec | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/rake.rb b/lib/rake.rb index e8958fa99..a2f1b448e 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -20,9 +20,7 @@ # IN THE SOFTWARE. #++ -module Rake - VERSION = '11.1.2' -end +module Rake; end require 'rake/version' diff --git a/lib/rake/version.rb b/lib/rake/version.rb index b9b1b2d48..354753550 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,4 +1,6 @@ module Rake + VERSION = '11.1.2' + module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split '.' diff --git a/rake.gemspec b/rake.gemspec index e6a3f25ad..dd5750e8a 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -1,10 +1,10 @@ # coding: utf-8 -lib = File.expand_path('../lib', __FILE__) -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +$LOAD_PATH.unshift File.expand_path('../lib', __FILE__) +require 'rake/version' Gem::Specification.new do |s| s.name = "rake".freeze - s.version = "11.1.2" + s.version = Rake::VERSION s.date = "2016-03-27" s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] From 23a697417b2084ecfb639abd1c20227bffa3b57e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 4 May 2016 22:05:12 +0900 Subject: [PATCH 500/813] history --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index 74913902c..5e036ecf6 100644 --- a/History.rdoc +++ b/History.rdoc @@ -5,6 +5,8 @@ Enhancements: * Allow to specify dependencies(prerequisites) for Rake::TestTask Pull request #117 by Tim Maslyuchenko * Use Bundler task instead of hoe for gem release. +* Remove explicitly load to rubygems for Ruby 1.8. +* Unify to declare `Rake::VERSION` === 11.1.2 / 2016-03-28 From b114f44a40da1b9c31239a4776afe43dd6bcc0c5 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 4 May 2016 22:55:17 +0900 Subject: [PATCH 501/813] Removed needless ignore file for rdoc --- lib/rake/contrib/.document | 1 - 1 file changed, 1 deletion(-) delete mode 100644 lib/rake/contrib/.document diff --git a/lib/rake/contrib/.document b/lib/rake/contrib/.document deleted file mode 100644 index 8b1378917..000000000 --- a/lib/rake/contrib/.document +++ /dev/null @@ -1 +0,0 @@ - From 9145b8c5968eaf08a267d9967d6dbee8e7513274 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 4 May 2016 22:55:39 +0900 Subject: [PATCH 502/813] added rbx-2 and rbx-3 and ignore their --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index e303b9dbe..070d5f339 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ rvm: - jruby-9.0.5.0 - jruby-head - rbx-2 + - rbx-3 before_install: - gem update bundler --no-document before_script: @@ -20,6 +21,8 @@ matrix: allow_failures: - rvm: ruby-head - rvm: jruby-head + - rvm: rbx-2 + - rvm: rbx-3 notifications: email: - drbrain@segment7.net From fae95984bfdfe128e97abf3a709109b2cdc4b7d0 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 4 May 2016 22:56:30 +0900 Subject: [PATCH 503/813] update latest builds of ruby --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 070d5f339..633169d8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,13 @@ sudo: false rvm: - 1.9.3 - 2.0.0 - - 2.1.8 - - 2.2.4 - - 2.3.0 + - 2.1.10 + - 2.2.5 + - 2.3.1 - ruby-head - jruby-1.7.20 - jruby-9.0.5.0 + - jruby-9.1.0.0 - jruby-head - rbx-2 - rbx-3 From d6e0b9c1822b9b2fef870833bdd83eb6147bf880 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 4 May 2016 23:02:30 +0900 Subject: [PATCH 504/813] specified to use minitest-5 for rubinius --- .travis.yml | 4 +--- test/helper.rb | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 633169d8a..9476faff1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ rvm: - jruby-9.1.0.0 - jruby-head - rbx-2 - - rbx-3 + - rbx before_install: - gem update bundler --no-document before_script: @@ -22,8 +22,6 @@ matrix: allow_failures: - rvm: ruby-head - rvm: jruby-head - - rvm: rbx-2 - - rvm: rbx-3 notifications: email: - drbrain@segment7.net diff --git a/test/helper.rb b/test/helper.rb index 36ee9b050..f8f1fe106 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,5 +1,6 @@ $:.unshift File.expand_path('../../lib', __FILE__) +gem 'minitest', '~> 5' require 'minitest/autorun' require 'rake' require 'tmpdir' From f2e7c3663fbaef5d64623e2e3102500682937251 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 4 May 2016 22:38:29 +0900 Subject: [PATCH 505/813] support xz compress format for packagetask --- lib/rake/packagetask.rb | 13 ++++++++++++- test/test_rake_package_task.rb | 3 ++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index 249ee72b1..cdb4879f5 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -63,6 +63,9 @@ class PackageTask < TaskLib # is false). attr_accessor :need_tar_bz2 + # True if a xz'd tar file (tar.xz) should be produced (default is false) + attr_accessor :need_tar_xz + # True if a zip file should be produced (default is false) attr_accessor :need_zip @@ -94,6 +97,7 @@ def init(name, version) @need_tar = false @need_tar_gz = false @need_tar_bz2 = false + @need_tar_xz = false @need_zip = false @tar_command = 'tar' @zip_command = 'zip' @@ -120,7 +124,8 @@ def define [ [need_tar, tgz_file, "z"], [need_tar_gz, tar_gz_file, "z"], - [need_tar_bz2, tar_bz2_file, "j"] + [need_tar_bz2, tar_bz2_file, "j"], + [need_tar_xz, tar_xz_file, "J"] ].each do |(need, file, flag)| if need task :package => ["#{package_dir}/#{file}"] @@ -189,6 +194,12 @@ def tar_bz2_file "#{package_name}.tar.bz2" end + # The package name with .tar.xz added + + def tar_xz_file + "#{package_name}.tar.xz" + end + # The package name with .zip added def zip_file diff --git a/test/test_rake_package_task.rb b/test/test_rake_package_task.rb index 87cb57c10..d7821e032 100644 --- a/test/test_rake_package_task.rb +++ b/test/test_rake_package_task.rb @@ -19,6 +19,7 @@ def test_initialize p.need_tar = true p.need_tar_gz = true p.need_tar_bz2 = true + p.need_tar_xz = true p.need_zip = true } @@ -32,6 +33,7 @@ def test_initialize assert Rake::Task['pkg/pkgr-1.2.3.tgz'] assert Rake::Task['pkg/pkgr-1.2.3.tar.gz'] assert Rake::Task['pkg/pkgr-1.2.3.tar.bz2'] + assert Rake::Task['pkg/pkgr-1.2.3.tar.xz'] assert Rake::Task['pkg/pkgr-1.2.3.zip'] assert Rake::Task['pkg/pkgr-1.2.3'] assert Rake::Task[:clobber_package] @@ -76,4 +78,3 @@ def test_package_name_noversion end end - From de15c1247b43ddec60d32121392f7f6482c59b07 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 5 May 2016 08:29:55 +0900 Subject: [PATCH 506/813] change allow_failures platforms --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9476faff1..6170ca280 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,8 +20,9 @@ before_script: script: ruby -Ilib exe/rake matrix: allow_failures: - - rvm: ruby-head - rvm: jruby-head + - rvm: rbx-2 + - rvm: rbx notifications: email: - drbrain@segment7.net From 2051007b9112dbe9ee4c2dc2d2a0af36eded3298 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 5 May 2016 08:51:07 +0900 Subject: [PATCH 507/813] added hsbt to notifications --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 6170ca280..f1a118c04 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,4 +25,5 @@ matrix: - rvm: rbx notifications: email: + - hsbt@ruby-lang.org - drbrain@segment7.net From 97e3ccf48dd7f0eb24f7c75f4b9cee55d2d576c5 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 5 May 2016 09:55:06 +0900 Subject: [PATCH 508/813] History --- History.rdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 5e036ecf6..006b6c71f 100644 --- a/History.rdoc +++ b/History.rdoc @@ -6,7 +6,8 @@ Enhancements: Pull request #117 by Tim Maslyuchenko * Use Bundler task instead of hoe for gem release. * Remove explicitly load to rubygems for Ruby 1.8. -* Unify to declare `Rake::VERSION` +* Unify to declare `Rake::VERSION`. +* Support xz format for PackageTask. === 11.1.2 / 2016-03-28 From fe9c12d29edf1d476699030741ec7c3f0e5680bc Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 6 May 2016 17:43:51 +0900 Subject: [PATCH 509/813] Removed unused pathname extension --- lib/rake/ext/pathname.rb | 25 ------------------------- test/test_rake_pathname_extensions.rb | 15 --------------- 2 files changed, 40 deletions(-) delete mode 100644 lib/rake/ext/pathname.rb delete mode 100644 test/test_rake_pathname_extensions.rb diff --git a/lib/rake/ext/pathname.rb b/lib/rake/ext/pathname.rb deleted file mode 100644 index 49e2cd47a..000000000 --- a/lib/rake/ext/pathname.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'rake/ext/core' -require 'pathname' - -class Pathname - - rake_extension("ext") do - # Return a new Pathname with String#ext applied to it. - # - # This Pathname extension comes from Rake - def ext(newext='') - Pathname.new(Rake.from_pathname(self).ext(newext)) - end - end - - rake_extension("pathmap") do - # Apply the pathmap spec to the Pathname, returning a - # new Pathname with the modified paths. (See String#pathmap for - # details.) - # - # This Pathname extension comes from Rake - def pathmap(spec=nil, &block) - Pathname.new(Rake.from_pathname(self).pathmap(spec, &block)) - end - end -end diff --git a/test/test_rake_pathname_extensions.rb b/test/test_rake_pathname_extensions.rb deleted file mode 100644 index 7da702d0c..000000000 --- a/test/test_rake_pathname_extensions.rb +++ /dev/null @@ -1,15 +0,0 @@ -require File.expand_path('../helper', __FILE__) -require 'rake/ext/pathname' - -class TestRakePathnameExtensions < Rake::TestCase - def test_ext_works_on_pathnames - pathname = Pathname.new("abc.foo") - assert_equal Pathname.new("abc.bar"), pathname.ext("bar") - end - - def test_path_map_works_on_pathnames - pathname = Pathname.new("this/is/a/dir/abc.rb") - assert_equal Pathname.new("abc.rb"), pathname.pathmap("%f") - assert_equal Pathname.new("this/is/a/dir"), pathname.pathmap("%d") - end -end From 81eb4b98d60d0400fa9336fc7184e8725c927f94 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 6 May 2016 18:50:48 +0900 Subject: [PATCH 510/813] Removed needless stdlibs. * shellwords didn't use Rake 11 * thread is core library --- lib/rake/application.rb | 1 - lib/rake/thread_pool.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index f27e874a7..9a21dbb22 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -1,4 +1,3 @@ -require 'shellwords' require 'optparse' require 'rake/task_manager' diff --git a/lib/rake/thread_pool.rb b/lib/rake/thread_pool.rb index 691daeabe..a11af0393 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -1,4 +1,3 @@ -require 'thread' require 'set' require 'rake/promise' From ace14c70a6d3fdabe7a9e9e8f068e5ab7a006fd5 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 6 May 2016 18:58:20 +0900 Subject: [PATCH 511/813] remove empty line --- lib/rake/rule_recursion_overflow_error.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/rake/rule_recursion_overflow_error.rb b/lib/rake/rule_recursion_overflow_error.rb index da4318da9..b71e08efb 100644 --- a/lib/rake/rule_recursion_overflow_error.rb +++ b/lib/rake/rule_recursion_overflow_error.rb @@ -1,4 +1,3 @@ - module Rake # Error indicating a recursion overflow error in task selection. From 9c733f7dfdfd4da6492525d69d11c29db6d3dd35 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 6 May 2016 20:10:28 +0900 Subject: [PATCH 512/813] remove empty line --- lib/rake/rake_test_loader.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/rake/rake_test_loader.rb b/lib/rake/rake_test_loader.rb index 7e3a6b3f3..bc4e1751e 100644 --- a/lib/rake/rake_test_loader.rb +++ b/lib/rake/rake_test_loader.rb @@ -19,4 +19,3 @@ end ARGV.replace argv - From af8c0f83a1149607439e9391c00a115d9bf0c661 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 6 May 2016 20:11:33 +0900 Subject: [PATCH 513/813] A test of default gems is obsoleted for Ruby 1.8 --- test/test_rake_test_task.rb | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 9f83d8082..9b27bfdd8 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -104,25 +104,6 @@ def test_run_code_rake Gem.loaded_specs['rake'] = rake end - def test_run_code_rake_default_gem - skip 'this ruby does not have default gems' unless - Gem::Specification.method_defined? :default_specifications_dir - - default_spec = Gem::Specification.new 'rake', 0 - default_spec.loaded_from = File.join Gem::Specification.default_specifications_dir, 'rake-0.gemspec' - begin - rake, Gem.loaded_specs['rake'] = Gem.loaded_specs['rake'], default_spec - - test_task = Rake::TestTask.new do |t| - t.loader = :rake - end - - assert_match(/\A(-I".*?" *)* ".*?"\Z/, test_task.run_code) - ensure - Gem.loaded_specs['rake'] = rake - end - end - def test_test_files_equals tt = Rake::TestTask.new do |t| t.test_files = FileList['a.rb', 'b.rb'] From c5197eed00af8b62cdb2dfeae6722cb6b5c51aae Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 6 May 2016 20:30:54 +0900 Subject: [PATCH 514/813] Removed old configuraiton of rubocop --- .rubocop.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 6d2bfcdbd..385e49289 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,15 +1,6 @@ StringLiterals: Enabled: false -MultilineBlocks: - Enabled: false - -SingleLineBlocks: - Enabled: false - -NewLambdaLiteral: - Enabled: false - SpaceAroundEqualsInParameterDefault: Enabled: false From 1a64729724fc089a9317fd7efb9bdd4c1ec43312 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 6 May 2016 20:52:24 +0900 Subject: [PATCH 515/813] use attr_writer instead of method definition --- lib/rake/application.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index f27e874a7..e8fd7eb6b 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -35,6 +35,9 @@ class Application # List of the top level task names (task names from the command line). attr_reader :top_level_tasks + # Override the detected TTY output state (mostly for testing) + attr_writer :tty_output + DEFAULT_RAKEFILES = [ 'rakefile', 'Rakefile', @@ -269,11 +272,6 @@ def tty_output? # :nodoc: @tty_output end - # Override the detected TTY output state (mostly for testing) - def tty_output=(tty_output_state) # :nodoc: - @tty_output = tty_output_state - end - # We will truncate output if we are outputting to a TTY or if we've been # given an explicit column width to honor def truncate_output? # :nodoc: From 704537d9c5f391617cf731c5233e15b6972e2199 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 7 May 2016 08:21:08 +0900 Subject: [PATCH 516/813] Removed unused block argument --- test/test_rake_application_options.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index d3ba12b78..1525bcd6a 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -72,7 +72,7 @@ def test_describe_with_pattern def test_execute $xyzzy = 0 - flags('--execute=$xyzzy=1', '-e $xyzzy=1') do |opts| + flags('--execute=$xyzzy=1', '-e $xyzzy=1') do assert_equal 1, $xyzzy assert_equal :exit, @exit $xyzzy = 0 @@ -81,7 +81,7 @@ def test_execute def test_execute_and_continue $xyzzy = 0 - flags('--execute-continue=$xyzzy=1', '-E $xyzzy=1') do |opts| + flags('--execute-continue=$xyzzy=1', '-E $xyzzy=1') do assert_equal 1, $xyzzy refute_equal :exit, @exit $xyzzy = 0 @@ -91,7 +91,7 @@ def test_execute_and_continue def test_execute_and_print $xyzzy = 0 out, = capture_io do - flags('--execute-print=$xyzzy="pugh"', '-p $xyzzy="pugh"') do |opts| + flags('--execute-print=$xyzzy="pugh"', '-p $xyzzy="pugh"') do assert_equal 'pugh', $xyzzy assert_equal :exit, @exit $xyzzy = 0 @@ -134,7 +134,7 @@ def test_jobs end def test_libdir - flags(['--libdir', 'xx'], ['-I', 'xx'], ['-Ixx']) do |opts| + flags(['--libdir', 'xx'], ['-I', 'xx'], ['-Ixx']) do $:.include?('xx') end ensure @@ -148,7 +148,7 @@ def test_multitask end def test_rakefile - flags(['--rakefile', 'RF'], ['--rakefile=RF'], ['-f', 'RF'], ['-fRF']) do |opts| + flags(['--rakefile', 'RF'], ['--rakefile=RF'], ['-f', 'RF'], ['-fRF']) do assert_equal ['RF'], @app.instance_eval { @rakefiles } end end From 4bd340fbd28769654edb3242794984b165cfb0ea Mon Sep 17 00:00:00 2001 From: leethomas Date: Sat, 14 May 2016 22:23:01 -0700 Subject: [PATCH 517/813] added test cases for new comment parsing rules --- test/test_rake_task.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 63ff86556..d9e13bd60 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -352,12 +352,24 @@ def test_comment_setting assert_equal "A Comment", t.comment end - def test_comments_with_sentences + def test_comments_with_sentences_period desc "Comment 1. Comment 2." t = task(:t, :name, :rev) assert_equal "Comment 1", t.comment end + def test_comments_with_sentences_exclamation_mark + desc "An exclamation mark! Comment." + t = task(:t, :name, :rev) + assert_equal "An exclamation mark", t.comment + end + + def test_comments_with_many_periods + desc "This is a test...I think ... testing. Comment." + t = task(:t, :name, :rev) + assert_equal "This is a test...I think ... testing", t.comment + end + def test_comments_with_tabbed_sentences desc "Comment 1.\tComment 2." t = task(:t, :name, :rev) From 355d1ace7b2b8cb669e4e0aa16115c3c84fc5309 Mon Sep 17 00:00:00 2001 From: leethomas Date: Sat, 14 May 2016 22:24:56 -0700 Subject: [PATCH 518/813] update comment parsing rules to exclude non sentence terminating periods, include exclamation marks --- lib/rake/task.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 1d3244d2b..5300b6fc4 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -304,10 +304,10 @@ def transform_comments(separator, &block) private :transform_comments # Get the first sentence in a string. The sentence is terminated - # by the first period or the end of the line. Decimal points do - # not count as periods. + # by the first period, exclamation mark, or the end of the line. + # Decimal points do not count as periods. def first_sentence(string) - string.split(/\.[ \t]|\.$|\n/).first + string.split(/(?<=\w)(\.|!)[ \t]|(\.$|!)|\n/).first end private :first_sentence From a238c0407997772ebf16be06035cc4d6957f1270 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 16 May 2016 12:06:52 +0900 Subject: [PATCH 519/813] removed rbx-2 from allow_failures. It's not fragile state --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f1a118c04..477e55fc4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,6 @@ script: ruby -Ilib exe/rake matrix: allow_failures: - rvm: jruby-head - - rvm: rbx-2 - rvm: rbx notifications: email: From 677f182ac1aaacbb6e085daca55df2f46dc8266f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 16 May 2016 12:11:37 +0900 Subject: [PATCH 520/813] History --- History.rdoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/History.rdoc b/History.rdoc index 006b6c71f..dc9304b26 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,5 +1,10 @@ === 11.2.0(dev) / 2016- +Bug fixes: + +* Fix unexpected cut-out behavior on task description using triple dots + and exclamation. Report #106 from Stephan Kämper and Pull request #134 by Lee + Enhancements: * Allow to specify dependencies(prerequisites) for Rake::TestTask From acacbcb892d62906fae23ea030117af3804eb91f Mon Sep 17 00:00:00 2001 From: Izuta Hiroyuki Date: Mon, 16 May 2016 23:51:49 +0900 Subject: [PATCH 521/813] Don't set if args are blank --- lib/rake/task_arguments.rb | 3 ++- test/test_rake_task_arguments.rb | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index d86c5d11a..4eaf2f8b9 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -17,7 +17,8 @@ def initialize(names, values, parent=nil) @hash = {} @values = values names.each_with_index { |name, i| - @hash[name.to_sym] = values[i] unless values[i].nil? + next if values[i].nil? || values[i] == '' + @hash[name.to_sym] = values[i] } end diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index abd41ebea..554c13f57 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -19,6 +19,11 @@ def test_multiple_values_in_args assert_equal({:a => :one, :b => :two, :c => :three}, ta.to_hash) end + def test_blank_values_in_args + ta = Rake::TaskArguments.new([:a, :b, :c], ['', :two, '']) + assert_equal({:b => :two}, ta.to_hash) + end + def test_has_key ta = Rake::TaskArguments.new([:a], [:one]) assert(ta.has_key?(:a)) From 89531048c1fd8f4ef719bf4b8e4d4c4cd745014b Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 9 Jun 2016 13:45:08 -0700 Subject: [PATCH 522/813] Improve output of sh with an ENV hash Given: env = { 'MESSAGE' => 'hello world', } sh env, "echo $MESSAGE" Previously `rake -t` would output: {"MESSAGE"=>"hello world"} echo $MESSAGE Now it outputs: MESSAGE=hello world echo $MESSAGE --- lib/rake/file_utils.rb | 18 ++++++++++++++++-- test/test_rake_file_utils.rb | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index ff2f45321..5f6877d1c 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -48,7 +48,7 @@ def sh(*cmd, &block) set_verbose_option(options) options[:noop] ||= Rake::FileUtilsExt.nowrite_flag Rake.rake_check_options options, :noop, :verbose - Rake.rake_output_message cmd.join(" ") if options[:verbose] + Rake.rake_output_message sh_show_command cmd if options[:verbose] unless options[:noop] res = system(*cmd) @@ -59,8 +59,9 @@ def sh(*cmd, &block) end def create_shell_runner(cmd) # :nodoc: - show_command = cmd.join(" ") + show_command = sh_show_command cmd show_command = show_command[0, 42] + "..." unless $trace + lambda do |ok, status| ok or fail "Command failed with status (#{status.exitstatus}): " + @@ -69,6 +70,19 @@ def create_shell_runner(cmd) # :nodoc: end private :create_shell_runner + def sh_show_command(cmd) # :nodoc: + cmd = cmd.dup + + if Hash === cmd.first + env = cmd.first + env = env.map { |name, value| "#{name}=#{value}" }.join " " + cmd[0] = env + end + + cmd.join " " + end + private :sh_show_command + def set_verbose_option(options) # :nodoc: unless options.key? :verbose options[:verbose] = diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 3204a5799..0f7520500 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -141,6 +141,18 @@ def test_sh_with_a_single_string_argument } end + def test_sh_with_env + check_environment + + env = { + 'RAKE_TEST_SH' => 'someval' + } + + verbose(false) { + sh env, RUBY, 'check_environment.rb', 'RAKE_TEST_SH', 'someval' + } + end + def test_sh_with_multiple_arguments skip if jruby9? # https://github.com/jruby/jruby/issues/3653 @@ -241,6 +253,20 @@ def test_ruby_with_a_single_string_argument } end + def test_sh_show_command + env = { + 'RAKE_TEST_SH' => 'someval' + } + + cmd = [env, RUBY, 'some_file.rb', 'some argument'] + + show_cmd = send :sh_show_command, cmd + + expected_cmd = "RAKE_TEST_SH=someval #{RUBY} some_file.rb some argument" + + assert_equal expected_cmd, show_cmd + end + def test_ruby_with_multiple_arguments skip if jruby9? # https://github.com/jruby/jruby/issues/3653 @@ -279,6 +305,16 @@ def check_no_expansion CHECK_EXPANSION end + def check_environment + command 'check_environment.rb', <<-CHECK_ENVIRONMENT +if ENV[ARGV[0]] != ARGV[1] + exit 1 +else + exit 0 +end + CHECK_ENVIRONMENT + end + def check_expansion command 'check_expansion.rb', <<-CHECK_EXPANSION if ARGV[0] != ARGV[1] From 226b8a0dbfca92dfb4202dcf589b53400584d6f3 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 9 Jun 2016 13:58:21 -0700 Subject: [PATCH 523/813] Allow spawn options with sh This allows any option spawn takes along with rake's special noop: and verbose:. --- lib/rake/file_utils.rb | 12 +++++++----- test/test_rake_file_utils.rb | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index 5f6877d1c..14cb092fc 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -45,13 +45,15 @@ module FileUtils def sh(*cmd, &block) options = (Hash === cmd.last) ? cmd.pop : {} shell_runner = block_given? ? block : create_shell_runner(cmd) + set_verbose_option(options) - options[:noop] ||= Rake::FileUtilsExt.nowrite_flag - Rake.rake_check_options options, :noop, :verbose - Rake.rake_output_message sh_show_command cmd if options[:verbose] + verbose = options.delete :verbose + noop = options.delete(:noop) || Rake::FileUtilsExt.nowrite_flag + + Rake.rake_output_message sh_show_command cmd if verbose - unless options[:noop] - res = system(*cmd) + unless noop + res = system(*cmd, options) status = $? status = Rake::PseudoStatus.new(1) if !res && status.nil? shell_runner.call(res, status) diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 0f7520500..888dc0ba9 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -164,6 +164,20 @@ def test_sh_with_multiple_arguments } end + def test_sh_with_spawn_options + echocommand + + r, w = IO.pipe + + verbose(false) { + sh RUBY, 'echocommand.rb', out: w + } + + w.close + + assert_equal "echocommand.rb\n", r.read + end + def test_sh_failure shellcommand @@ -325,6 +339,16 @@ def check_expansion CHECK_EXPANSION end + def echocommand + command 'echocommand.rb', <<-ECHOCOMMAND +#!/usr/bin/env ruby + +puts "echocommand.rb" + +exit 0 + ECHOCOMMAND + end + def replace_ruby ruby = FileUtils::RUBY FileUtils.send :remove_const, :RUBY From 230dc2b735a70391465191574d4ee367258c49ab Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 9 Jun 2016 15:38:35 -0700 Subject: [PATCH 524/813] Skip failing tests on JRuby due spawn options JRuby does not yet support spawn options sent to system so skip these tests. --- test/test_rake_file_utils.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 888dc0ba9..1b43a49d1 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -165,6 +165,8 @@ def test_sh_with_multiple_arguments end def test_sh_with_spawn_options + skip 'JRuby does not support spawn options' if jruby? + echocommand r, w = IO.pipe @@ -213,6 +215,10 @@ def test_sh_noop end def test_sh_bad_option + # Skip on JRuby because option checking is performed by spawn via system + # now. + skip 'JRuby does not support spawn options' if jruby? + shellcommand ex = assert_raises(ArgumentError) { From e517c18af324e6693d3938d64a67e1daf7f91226 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 11 Jun 2016 12:49:07 +0900 Subject: [PATCH 525/813] History --- History.rdoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/History.rdoc b/History.rdoc index dc9304b26..169cf0059 100644 --- a/History.rdoc +++ b/History.rdoc @@ -4,9 +4,12 @@ Bug fixes: * Fix unexpected cut-out behavior on task description using triple dots and exclamation. Report #106 from Stephan Kämper and Pull request #134 by Lee +* Fix empty argument assignment with `with_defaults` option. Pull request #135 + by bakunyo Enhancements: +* Spawn options for sh Pull equest #138 by Eric Hodel. * Allow to specify dependencies(prerequisites) for Rake::TestTask Pull request #117 by Tim Maslyuchenko * Use Bundler task instead of hoe for gem release. From 2f63b5202234f1022058f56aac2b1158f879d7ee Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 11 Jun 2016 12:54:23 +0900 Subject: [PATCH 526/813] History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 169cf0059..ba106483a 100644 --- a/History.rdoc +++ b/History.rdoc @@ -6,6 +6,7 @@ Bug fixes: and exclamation. Report #106 from Stephan Kämper and Pull request #134 by Lee * Fix empty argument assignment with `with_defaults` option. Pull request #135 by bakunyo +* Ignore to use `hwprefs` on Darwin platform. Use sysctl now. Report #128 Enhancements: From 2ed8f9c549425265aaa14a4f70455a9c2d6086a0 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 11 Jun 2016 12:54:40 +0900 Subject: [PATCH 527/813] bump version to 11.2.0 --- lib/rake/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 354753550..07f341dd7 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,5 +1,5 @@ module Rake - VERSION = '11.1.2' + VERSION = '11.2.0' module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split '.' From 7ff501a2109ecce9654a7b734372ca1db3cbe5ec Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 11 Jun 2016 18:17:32 +0900 Subject: [PATCH 528/813] History --- History.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index ba106483a..0ea9241d3 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 11.2.0(dev) / 2016- +=== 11.2.0 / 2016-06-11 Bug fixes: From 4c7bb867f6aadf45c33bbd512c94c294eff586aa Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 12 Jun 2016 09:50:50 +0900 Subject: [PATCH 529/813] Rake 11.2.0 broke dependency task of Rake::TestTask, If it's given. It needs to extract TestLib dependency --- lib/rake/testtask.rb | 4 ++++ test/test_rake_test_task.rb | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 27ad790af..9d5d88a02 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -93,6 +93,10 @@ def initialize(name=:test) @ruby_opts = [] @description = "Run tests" + (@name == :test ? "" : " for #{@name}") @deps = [] + if @name.is_a?(Hash) + @deps = @name.values + @name = @name.keys.first + end yield self if block_given? @pattern = 'test/test*.rb' if @pattern.nil? && @test_files.nil? define diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 9b27bfdd8..17167d74b 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -16,8 +16,15 @@ def test_initialize assert Task.task_defined?(:test) end + def test_initialize_deps + tt = Rake::TestTask.new(:example => :bar) + refute_nil tt + assert_equal [:bar], tt.deps + assert Task.task_defined?(:example) + end + def test_initialize_override - tt = Rake::TestTask.new(:example) do |t| + tt = Rake::TestTask.new(:example => :bar) do |t| t.description = "Run example tests" t.libs = ['src', 'ext'] t.pattern = 'test/tc_*.rb' From 5b0399a61eccf8001fcf198a6a901812710abb01 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 12 Jun 2016 10:12:38 +0900 Subject: [PATCH 530/813] History --- History.rdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/History.rdoc b/History.rdoc index 0ea9241d3..2f8c7a33f 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,9 @@ +=== 11.2.1 / 2016-06-12 + +Bug fixes: + +* Fix regression of dependencies handling on Rake::TestTask. Report #139 + === 11.2.0 / 2016-06-11 Bug fixes: From d254592bad2f805dc40fdeeb47fd596660d2a71a Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 12 Jun 2016 10:12:49 +0900 Subject: [PATCH 531/813] bump version to 11.2.1 --- lib/rake/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 07f341dd7..e9a2d23fc 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,5 +1,5 @@ module Rake - VERSION = '11.2.0' + VERSION = '11.2.1' module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split '.' From 60cf03f6ecb563731bed64a86f06de6bac72f44e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 12 Jun 2016 10:15:28 +0900 Subject: [PATCH 532/813] up to date --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index dd5750e8a..04bbd3327 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -5,7 +5,7 @@ require 'rake/version' Gem::Specification.new do |s| s.name = "rake".freeze s.version = Rake::VERSION - s.date = "2016-03-27" + s.date = "2016-06-12" s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] From 142e6cb6490b607413150636c82fef9eb8743c1f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 12 Jun 2016 10:37:55 +0900 Subject: [PATCH 533/813] fixed bug with multiple dependencies --- lib/rake/testtask.rb | 2 +- test/test_rake_test_task.rb | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 9d5d88a02..4c6f71917 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -94,7 +94,7 @@ def initialize(name=:test) @description = "Run tests" + (@name == :test ? "" : " for #{@name}") @deps = [] if @name.is_a?(Hash) - @deps = @name.values + @deps = @name.values.first @name = @name.keys.first end yield self if block_given? diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 17167d74b..8c63d791e 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -19,7 +19,14 @@ def test_initialize def test_initialize_deps tt = Rake::TestTask.new(:example => :bar) refute_nil tt - assert_equal [:bar], tt.deps + assert_equal :bar, tt.deps + assert Task.task_defined?(:example) + end + + def test_initialize_multi_deps + tt = Rake::TestTask.new(:example => [:foo, :bar]) + refute_nil tt + assert_equal [:foo, :bar], tt.deps assert Task.task_defined?(:example) end From 6378ce7fee7068d07f6e39df8b163ec8f227393e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 12 Jun 2016 10:46:04 +0900 Subject: [PATCH 534/813] History --- History.rdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/History.rdoc b/History.rdoc index 2f8c7a33f..6ff5088df 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,9 @@ +=== 11.2.2 / 2016-06-12 + +Bug fixes: + +* Fix unexpected behavior with multiple dependencies on Rake::TestTask + === 11.2.1 / 2016-06-12 Bug fixes: From 8638b497423a4d69f7155d5ef67a3aa2363762be Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 12 Jun 2016 11:00:24 +0900 Subject: [PATCH 535/813] added defensive tests --- test/test_rake_test_task.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 8c63d791e..1b15f7a8d 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -128,6 +128,24 @@ def test_test_files_equals def test_task_prerequisites Rake::TestTask.new :parent + Rake::TestTask.new :child => :parent + + task = Rake::Task[:child] + assert_includes task.prerequisites, 'parent' + end + + def test_task_prerequisites_multi + Rake::TestTask.new :parent + Rake::TestTask.new :parent2 + Rake::TestTask.new :child => [:parent, :parent2] + + task = Rake::Task[:child] + assert_includes task.prerequisites, 'parent' + assert_includes task.prerequisites, 'parent2' + end + + def test_task_prerequisites_deps + Rake::TestTask.new :parent Rake::TestTask.new :child do |t| t.deps = :parent From b63f7d33d72782f646ef95da10300d273c9b8006 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 12 Jun 2016 11:00:35 +0900 Subject: [PATCH 536/813] bump version to 11.2.2 --- lib/rake/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/version.rb b/lib/rake/version.rb index e9a2d23fc..c9660a45e 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,5 +1,5 @@ module Rake - VERSION = '11.2.1' + VERSION = '11.2.2' module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split '.' From 3a1b5bc90eac771d473e25398138b9866100b9fa Mon Sep 17 00:00:00 2001 From: ptarjan Date: Tue, 21 Jun 2016 17:31:43 -0700 Subject: [PATCH 537/813] Do not run tasks when their prerequisites fail If tasks A and B both depend on C, they race to grab the invocation lock on C. If A wins, it sets @already_invoked and executes C while holding the lock. When C completes, A releases the lock, B acquires it and immediately returns since C is @already_invoked. Unfortunately, this does not distinguish failed execution of C. Instead, if executing C raises an exception for A, we want to raise the same exception in B so it is aborted. --- lib/rake/multi_task.rb | 36 ++++++++++++++++++++++++++++++++++++ test/test_rake_multi_task.rb | 21 +++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/lib/rake/multi_task.rb b/lib/rake/multi_task.rb index 5418a7a7b..7118dc411 100644 --- a/lib/rake/multi_task.rb +++ b/lib/rake/multi_task.rb @@ -4,6 +4,42 @@ module Rake # parallel using Ruby threads. # class MultiTask < Task + + # Same as invoke, but explicitly pass a call chain to detect + # circular dependencies. This is largely copied from Rake::Task + # but has been updated such that if multiple tasks depend on this + # one in parallel, they will all fail if the first execution of + # this task fails. + def invoke_with_call_chain(task_args, invocation_chain) + new_chain = Rake::InvocationChain.append(self, invocation_chain) + @lock.synchronize do + begin + if @already_invoked + if @invocation_exception + if application.options.trace + application.trace "** Previous invocation of #{name} failed #{format_trace_flags}" + end + raise @invocation_exception + else + return + end + end + + if application.options.trace + application.trace "** Invoke #{name} #{format_trace_flags}" + end + @already_invoked = true + + invoke_prerequisites(task_args, new_chain) + execute(task_args) if needed? + rescue Exception => ex + add_chain_to(ex, new_chain) + @invocation_exception = ex + raise + end + end + end + private def invoke_prerequisites(task_args, invocation_chain) # :nodoc: invoke_prerequisites_concurrently(task_args, invocation_chain) diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index 9f8fed6d5..f7a004164 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -61,4 +61,25 @@ def test_multitasks_with_parameters assert @runs[0] == "b" assert @runs[1] == "bmt" end + + def test_cross_thread_prerequisite_failures + failed = false + + multitask :fail_once do + fail_now = !failed + failed = true + raise 'failing once' if fail_now + end + + task a: :fail_once + task b: :fail_once + + assert_raises RuntimeError do + Rake::Task[:a].invoke + end + + assert_raises RuntimeError do + Rake::Task[:b].invoke + end + end end From ddb89beb542ae1eaaa83494122eed88284ee83c1 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 22 Jun 2016 11:10:58 -0700 Subject: [PATCH 538/813] Install bundler for JRuby Travis log: $ gem update bundler --no-document jruby: warning: unknown property jruby.cext.enabled Updating installed gems Nothing to update $ bundle install --jobs=3 --retry=3 /home/travis/build.sh: line 179: bundle: command not found The command "eval bundle install --jobs=3 --retry=3" failed. Retrying, 2 of 3. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 477e55fc4..fbfa9824b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ rvm: - rbx-2 - rbx before_install: - - gem update bundler --no-document + - gem install bundler --no-document before_script: - unset JRUBY_OPTS script: ruby -Ilib exe/rake From 7520a185ab9762a5bb5bfe6d823d8cd582d95f63 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 22 Jun 2016 11:11:58 -0700 Subject: [PATCH 539/813] The rbx-2 build can fail for unknown reasons Travis log: No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index fbfa9824b..934403400 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,7 @@ matrix: allow_failures: - rvm: jruby-head - rvm: rbx + - rvm: rbx-2 notifications: email: - hsbt@ruby-lang.org From 04d48a41679857492259dcdd88ef01b14d0017d0 Mon Sep 17 00:00:00 2001 From: Hendy Tanata Date: Wed, 22 Jun 2016 11:23:06 -0700 Subject: [PATCH 540/813] Remove mention of environment variables as task argument. Related to commit 57cdf0fafb85c9f4efbcd871e094686fdc2ca753. Support for environment variables as task argument was removed on commit 5148aac8b61246432d6d87f19f26e401ace62853. --- doc/rakefile.rdoc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index d18680e51..89a28ebee 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -223,9 +223,7 @@ behaviour can now accept a second parameter: The first argument of the block "t" is always bound to the current task object. The second argument "args" is an open-struct like object that allows access to the task arguments. Extra command line -arguments to a task are ignored. Missing command line arguments are -picked up from matching environment variables. If there are no -matching environment variables, they are given the nil value. +arguments to a task are ignored. If you wish to specify default values for the arguments, you can use the with_defaults method in the task body. Here is the above example From e9ac42ca95bdb84fb4c673025bc7ddc722b64002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Sun, 26 Jun 2016 00:20:58 -0400 Subject: [PATCH 541/813] Remove trailing slash on a link in README --- README.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 889bd9785..9dd7b9cdf 100644 --- a/README.rdoc +++ b/README.rdoc @@ -2,7 +2,7 @@ home :: https://github.com/ruby/rake bugs :: https://github.com/ruby/rake/issues -docs :: http://docs.seattlerb.org/rake/ +docs :: http://docs.seattlerb.org/rake build status :: {travis-ci}[https://travis-ci.org/ruby/rake] {appveyor}[https://ci.appveyor.com/project/ruby/rake] == Description From e7e11037118a2737bdc941fe1aa244bd57aa5579 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 28 Jun 2016 15:08:28 +0900 Subject: [PATCH 542/813] added helper method for rbx --- test/helper.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/helper.rb b/test/helper.rb index f8f1fe106..7eb560eea 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -115,5 +115,9 @@ def jruby9? jruby? && (JRUBY_VERSION >= '9.0.0.0') end + def rbx? + RUBY_ENGINE == 'rbx' + end + include RakefileDefinitions end From d36cc95f294077919f0cfc693eace439e9921870 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 28 Jun 2016 15:10:53 +0900 Subject: [PATCH 543/813] skip broken test with rbx --- test/test_private_reader.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_private_reader.rb b/test/test_private_reader.rb index f86d4249b..895c6a05d 100644 --- a/test/test_private_reader.rb +++ b/test/test_private_reader.rb @@ -24,6 +24,7 @@ def setup end def test_private_reader_is_private + skip if rbx? assert_private do @sample.reader end assert_private do @sample.a end end From 6a94c543b624b48006f21b499a7802839e2315af Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 28 Jun 2016 15:12:03 +0900 Subject: [PATCH 544/813] remove allow_failures, their are skipped in tests --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 934403400..2f5898ae4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,11 +18,6 @@ before_install: before_script: - unset JRUBY_OPTS script: ruby -Ilib exe/rake -matrix: - allow_failures: - - rvm: jruby-head - - rvm: rbx - - rvm: rbx-2 notifications: email: - hsbt@ruby-lang.org From f413799b5ac5c3f443ed35c874f9e4ed8c8f3a40 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Jul 2016 20:16:17 +0900 Subject: [PATCH 545/813] Reversed restore condition for RAKE_COLUMNS. Fixed #146 --- test/test_rake_application.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index daa4a57ba..e3bc43842 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -351,9 +351,9 @@ def test_terminal_columns assert_equal 42, app.terminal_columns ensure if old_rake_columns - ENV['RAKE_COLUMNS'].delete - else ENV['RAKE_COLUMNS'] = old_rake_columns + else + ENV.delete 'RAKE_COLUMNS' end end From 7dbdf53b4d5870496b08a4eec6c4c49e61f79f2e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Jul 2016 20:51:22 +0900 Subject: [PATCH 546/813] update release date --- doc/rake.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/rake.1 b/doc/rake.1 index dbfa66b3d..2e830176a 100644 --- a/doc/rake.1 +++ b/doc/rake.1 @@ -1,6 +1,6 @@ -.Dd December 3, 2014 +.Dd June 12, 2016 .Dt RAKE 1 -.Os rake 10.4.2 +.Os rake 11.2.2 .Sh NAME .Nm rake .Nd make-like build utility for Ruby From dc4af064c8ff117e1854e761b6f7a0d6eaa2d635 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Jul 2016 21:04:18 +0900 Subject: [PATCH 547/813] removed dead-link --- README.rdoc | 1 - 1 file changed, 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 9dd7b9cdf..09ca18ca5 100644 --- a/README.rdoc +++ b/README.rdoc @@ -101,7 +101,6 @@ other projects with similar (and not so similar) goals. * http://directory.fsf.org/wiki/Bras -- Bras, one of earliest implementations of "make in a scripting language". * http://www.a-a-p.org -- Make in Python -* http://www.aromatic.com/tools/jam.txt -- JAM, Java Automated Make * http://ant.apache.org -- The Ant project * http://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System * http://www.rubydoc.info/gems/rant/0.5.7/frames -- Rant, another Ruby make tool. From 5e01167bd60856054fb9d0381836a1f4e47a458d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Jul 2016 21:13:31 +0900 Subject: [PATCH 548/813] removed commented-out code --- lib/rake/task.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 5300b6fc4..7a57a0f85 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -382,7 +382,6 @@ def create_rule(*args, &block) # this kind of task. Generic tasks will accept the scope as # part of the name. def scope_name(scope, task_name) -# (scope + [task_name]).join(':') scope.path_with_task_name(task_name) end From 3daaaef6ee6951c35aba9dff93b90414de4c8a26 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 28 Jul 2016 22:02:04 +0900 Subject: [PATCH 549/813] removed rake contrib files, It should be extracted another gem --- lib/rake/contrib/compositepublisher.rb | 21 ---- lib/rake/contrib/ftptools.rb | 137 ------------------------- lib/rake/contrib/sshpublisher.rb | 60 ----------- 3 files changed, 218 deletions(-) delete mode 100644 lib/rake/contrib/compositepublisher.rb delete mode 100644 lib/rake/contrib/ftptools.rb delete mode 100644 lib/rake/contrib/sshpublisher.rb diff --git a/lib/rake/contrib/compositepublisher.rb b/lib/rake/contrib/compositepublisher.rb deleted file mode 100644 index 69952a080..000000000 --- a/lib/rake/contrib/compositepublisher.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Rake - - # Manage several publishers as a single entity. - class CompositePublisher - def initialize - @publishers = [] - end - - # Add a publisher to the composite. - def add(pub) - @publishers << pub - end - - # Upload all the individual publishers. - def upload - @publishers.each { |p| p.upload } - end - end - -end - diff --git a/lib/rake/contrib/ftptools.rb b/lib/rake/contrib/ftptools.rb deleted file mode 100644 index b178523bc..000000000 --- a/lib/rake/contrib/ftptools.rb +++ /dev/null @@ -1,137 +0,0 @@ -# = Tools for FTP uploading. -# -# This file is still under development and is not released for general -# use. - -require 'date' -require 'net/ftp' -require 'rake/file_list' - -module Rake # :nodoc: - - class FtpFile # :nodoc: all - attr_reader :name, :size, :owner, :group, :time - - def self.date - @date_class ||= Date - end - - def self.time - @time_class ||= Time - end - - def initialize(path, entry) - @path = path - @mode, _, @owner, @group, size, d1, d2, d3, @name = entry.split(' ') - @size = size.to_i - @time = determine_time(d1, d2, d3) - end - - def path - File.join(@path, @name) - end - - def directory? - @mode[0] == ?d - end - - def mode - parse_mode(@mode) - end - - def symlink? - @mode[0] == ?l - end - - private # -------------------------------------------------------- - - def parse_mode(m) - result = 0 - (1..9).each do |i| - result = 2 * result + ((m[i] == ?-) ? 0 : 1) - end - result - end - - def determine_time(d1, d2, d3) - now = self.class.time.now - if /:/ !~ d3 - result = Time.parse("#{d1} #{d2} #{d3}") - else - result = Time.parse("#{d1} #{d2} #{now.year} #{d3}") - result = Time.parse("#{d1} #{d2} #{now.year - 1} #{d3}") if - result > now - end - result - end - end - - ## - # Manage the uploading of files to an FTP account. - class FtpUploader # :nodoc: - - # Log uploads to standard output when true. - attr_accessor :verbose - - class << FtpUploader - # Create an uploader and pass it to the given block as +up+. - # When the block is complete, close the uploader. - def connect(path, host, account, password) - up = self.new(path, host, account, password) - begin - yield(up) - ensure - up.close - end - end - end - - # Create an FTP uploader targeting the directory +path+ on +host+ - # using the given account and password. +path+ will be the root - # path of the uploader. - def initialize(path, host, account, password) - @created = Hash.new - @path = path - @ftp = Net::FTP.new(host, account, password) - makedirs(@path) - @ftp.chdir(@path) - end - - # Create the directory +path+ in the uploader root path. - def makedirs(path) - route = [] - File.split(path).each do |dir| - route << dir - current_dir = File.join(route) - if @created[current_dir].nil? - @created[current_dir] = true - $stderr.puts "Creating Directory #{current_dir}" if @verbose - @ftp.mkdir(current_dir) rescue nil - end - end - end - - # Upload all files matching +wildcard+ to the uploader's root - # path. - def upload_files(wildcard) - FileList.glob(wildcard).each do |fn| - upload(fn) - end - end - - # Close the uploader. - def close - @ftp.close - end - - private # -------------------------------------------------------- - - # Upload a single file to the uploader's root path. - def upload(file) - $stderr.puts "Uploading #{file}" if @verbose - dir = File.dirname(file) - makedirs(dir) - @ftp.putbinaryfile(file, file) unless File.directory?(file) - end - end -end diff --git a/lib/rake/contrib/sshpublisher.rb b/lib/rake/contrib/sshpublisher.rb deleted file mode 100644 index b0048307c..000000000 --- a/lib/rake/contrib/sshpublisher.rb +++ /dev/null @@ -1,60 +0,0 @@ -require 'rake/dsl_definition' -require 'rake/contrib/compositepublisher' - -module Rake - # Publish an entire directory to an existing remote directory using - # SSH. - class SshDirPublisher - include Rake::DSL - - # Creates an SSH publisher which will scp all files in +local_dir+ to - # +remote_dir+ on +host+ - - def initialize(host, remote_dir, local_dir) - @host = host - @remote_dir = remote_dir - @local_dir = local_dir - end - - # Uploads the files - - def upload - sh "scp", "-rq", "#{@local_dir}/*", "#{@host}:#{@remote_dir}" - end - end - - # Publish an entire directory to a fresh remote directory using SSH. - class SshFreshDirPublisher < SshDirPublisher - - # Uploads the files after removing the existing remote directory. - - def upload - sh "ssh", @host, "rm", "-rf", @remote_dir rescue nil - sh "ssh", @host, "mkdir", @remote_dir - super - end - end - - # Publish a list of files to an existing remote directory. - class SshFilePublisher - include Rake::DSL - - # Creates an SSH publisher which will scp all +files+ in +local_dir+ to - # +remote_dir+ on +host+. - - def initialize(host, remote_dir, local_dir, *files) - @host = host - @remote_dir = remote_dir - @local_dir = local_dir - @files = files - end - - # Uploads the files - - def upload - @files.each do |fn| - sh "scp", "-q", "#{@local_dir}/#{fn}", "#{@host}:#{@remote_dir}" - end - end - end -end From 1b0bf7334c6d5161546c88b9072a55fcdc2d2133 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 29 Jul 2016 11:39:19 +0900 Subject: [PATCH 550/813] drop to support rbx --- .travis.yml | 2 -- test/helper.rb | 4 ---- test/test_private_reader.rb | 1 - 3 files changed, 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2f5898ae4..62088270f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,6 @@ rvm: - jruby-9.0.5.0 - jruby-9.1.0.0 - jruby-head - - rbx-2 - - rbx before_install: - gem install bundler --no-document before_script: diff --git a/test/helper.rb b/test/helper.rb index 7eb560eea..f8f1fe106 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -115,9 +115,5 @@ def jruby9? jruby? && (JRUBY_VERSION >= '9.0.0.0') end - def rbx? - RUBY_ENGINE == 'rbx' - end - include RakefileDefinitions end diff --git a/test/test_private_reader.rb b/test/test_private_reader.rb index 895c6a05d..f86d4249b 100644 --- a/test/test_private_reader.rb +++ b/test/test_private_reader.rb @@ -24,7 +24,6 @@ def setup end def test_private_reader_is_private - skip if rbx? assert_private do @sample.reader end assert_private do @sample.a end end From 64a56cccf6f451783854815b584cbd04b5c95315 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 30 Jul 2016 16:23:31 +0900 Subject: [PATCH 551/813] History --- History.rdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/History.rdoc b/History.rdoc index 6ff5088df..4e90252d0 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,9 @@ +=== 12.0.0(dev) + +Compatibility Changes: + +* Removed `rake/contrib` packages. These are extracted to `rake-contrib` gem. + === 11.2.2 / 2016-06-12 Bug fixes: From 55bfef22641a11a8447e8cda84aab2d7f96bdbf1 Mon Sep 17 00:00:00 2001 From: "Mark D. Blackwell" Date: Fri, 29 Jul 2016 17:03:46 -0400 Subject: [PATCH 552/813] Add test to prompt use of TESTOPTS --- test/support/rakefile_definitions.rb | 10 ++++++++++ test/test_rake_functional.rb | 14 ++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/test/support/rakefile_definitions.rb b/test/support/rakefile_definitions.rb index d276b2fd5..b4eddb20b 100644 --- a/test/support/rakefile_definitions.rb +++ b/test/support/rakefile_definitions.rb @@ -49,6 +49,16 @@ def rakefile_test_task RAKEFILE end + def rakefile_test_task_verbose + rakefile <<-RAKEFILE + require "rake/testtask" + + Rake::TestTask.new(:unit) do |t| + t.verbose = true + end + RAKEFILE + end + def rakefile_chains rakefile <<-DEFAULT task :default => "play.app" diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index 9113d8616..0d3e1d0c0 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -384,6 +384,20 @@ def test_test_task_descriptions assert_match(/custom test task description/, @out) end + def test_test_task_when_verbose_unless_verbose_passed_not_prompt_testopts + rakefile_test_task_verbose + rake 'unit' + exp = /TESTOPTS="--verbose" to pass --verbose/ + refute_match exp, @out + end + + def test_test_task_when_verbose_passed_prompts_testopts + rakefile_test_task + rake '--verbose', 'unit' + exp = /TESTOPTS="--verbose" to pass --verbose/ + assert_match exp, @out + end + def test_comment_before_task_acts_like_desc rakefile_comments From 2a9a472a956aa952f75ef0027343aa71fbaf9fc2 Mon Sep 17 00:00:00 2001 From: "Mark D. Blackwell" Date: Fri, 29 Jul 2016 00:25:07 -0400 Subject: [PATCH 553/813] Prompt use of TESTOPTS --- lib/rake/testtask.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 4c6f71917..cf9855147 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -107,6 +107,8 @@ def define desc @description task @name => Array(deps) do FileUtilsExt.verbose(@verbose) do + puts "Use TESTOPTS=\"--verbose\" to pass --verbose" \ + ", etc. to runners." if ARGV.include? '--verbose' args = "#{ruby_opts_string} #{run_code} " + "#{file_list_string} #{option_list}" From feffec845c324a6621bf4e70560975c26096d102 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 2 Aug 2016 21:28:04 +0900 Subject: [PATCH 554/813] removed contrib description --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index 04bbd3327..1581d1a1e 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |s| s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] s.summary = "Rake is a Make-like program implemented in Ruby".freeze - s.description = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are\nspecified in standard Ruby syntax.\n\nRake has the following features:\n\n* Rakefiles (rake's version of Makefiles) are completely defined in\n standard Ruby syntax. No XML files to edit. No quirky Makefile\n syntax to worry about (is that a tab or a space?)\n\n* Users can specify tasks with prerequisites.\n\n* Rake supports rule patterns to synthesize implicit tasks.\n\n* Flexible FileLists that act like arrays but know about manipulating\n file names and paths.\n\n* A library of prepackaged tasks to make building rakefiles easier. For example,\n tasks for building tarballs and publishing to FTP or SSH sites. (Formerly\n tasks for building RDoc and Gems were included in rake but they're now\n available in RDoc and RubyGems respectively.)\n\n* Supports parallel execution of tasks.".freeze + s.description = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are\nspecified in standard Ruby syntax.\n\nRake has the following features:\n\n* Rakefiles (rake's version of Makefiles) are completely defined in\n standard Ruby syntax. No XML files to edit. No quirky Makefile\n syntax to worry about (is that a tab or a space?)\n\n* Users can specify tasks with prerequisites.\n\n* Rake supports rule patterns to synthesize implicit tasks.\n\n* Flexible FileLists that act like arrays but know about manipulating\n file names and paths.\n\n* Supports parallel execution of tasks.".freeze s.homepage = "https://github.com/ruby/rake".freeze s.licenses = ["MIT".freeze] From 3673693d484f09b74d102efd862bad4465e5d419 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 2 Aug 2016 22:35:57 +0900 Subject: [PATCH 555/813] remove needless magic comment --- rake.gemspec | 1 - 1 file changed, 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index 1581d1a1e..f5151fd1d 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -1,4 +1,3 @@ -# coding: utf-8 $LOAD_PATH.unshift File.expand_path('../lib', __FILE__) require 'rake/version' From 11bbb7c20bb9bae42310e0ab9294a76658fe158e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 2 Aug 2016 22:36:42 +0900 Subject: [PATCH 556/813] removed deprecated warnings --- lib/rake/task_manager.rb | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index e13482401..202a8a688 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -5,19 +5,6 @@ module TaskManager # Track the last comment made in the Rakefile. attr_accessor :last_description - # Remove Rake 12 - def last_comment # :nodoc: - warn "[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead." - @last_description - end - - # Remove Rake 12 - def last_comment=(comment) # :nodoc: - warn "[DEPRECATION] `last_comment=` is deprecated. Please use `last_description=` instead." - @last_description = comment - @last_description # ignore warning - end - def initialize # :nodoc: super @tasks = Hash.new From 4d73d48693d9987d308b60556d411c295e5ee091 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 2 Aug 2016 22:37:46 +0900 Subject: [PATCH 557/813] history --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 4e90252d0..188b12f34 100644 --- a/History.rdoc +++ b/History.rdoc @@ -3,6 +3,7 @@ Compatibility Changes: * Removed `rake/contrib` packages. These are extracted to `rake-contrib` gem. +* Removed to deprecated warnings for `last\_comment`. === 11.2.2 / 2016-06-12 From 4780fbeb6090237adc1a3d73609a1ffa20c01e2c Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 12 Aug 2016 14:06:25 +0900 Subject: [PATCH 558/813] Added test for duplicated tasks --- test/support/rakefile_definitions.rb | 12 ++++++++++++ test/test_rake_functional.rb | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/test/support/rakefile_definitions.rb b/test/support/rakefile_definitions.rb index b4eddb20b..82eae11ec 100644 --- a/test/support/rakefile_definitions.rb +++ b/test/support/rakefile_definitions.rb @@ -100,6 +100,18 @@ def rakefile_comments COMMENTS end + def rakefile_override + rakefile <<-OVERRIDE + task :t1 do + puts :foo + end + + task :t1 do + puts :bar + end + OVERRIDE + end + def rakefile_default rakefile <<-DEFAULT if ENV['TESTTOPSCOPE'] diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index 0d3e1d0c0..703413383 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -49,6 +49,14 @@ def test_env_available_at_task_scope assert_match(/^TASKSCOPE$/, @out) end + def test_task_override + rakefile_override + + rake 't1' + + assert_match(/foo\nbar\n/, @out) + end + def test_multi_desc ENV['RAKE_COLUMNS'] = '80' rakefile_multidesc From 1aaa53d848ed0204db9d29eef44c774c351fe0fb Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 12 Aug 2016 14:11:31 +0900 Subject: [PATCH 559/813] remove needless brackets --- lib/rake/packagetask.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index cdb4879f5..a93307849 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -126,7 +126,7 @@ def define [need_tar_gz, tar_gz_file, "z"], [need_tar_bz2, tar_bz2_file, "j"], [need_tar_xz, tar_xz_file, "J"] - ].each do |(need, file, flag)| + ].each do |need, file, flag| if need task :package => ["#{package_dir}/#{file}"] file "#{package_dir}/#{file}" => From ab83088453fca054f81bc2f0dfb8b3c440107725 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 12 Aug 2016 14:12:03 +0900 Subject: [PATCH 560/813] synvert -rruby/gsub_to_tr . --- lib/rake/application.rb | 2 +- lib/rake/backtrace.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index fc0a786d6..551980796 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -695,7 +695,7 @@ def raw_load_rakefile # :nodoc: end def glob(path, &block) # :nodoc: - FileList.glob(path.gsub("\\", '/')).each(&block) + FileList.glob(path.tr("\\", '/')).each(&block) end private :glob diff --git a/lib/rake/backtrace.rb b/lib/rake/backtrace.rb index dc1877343..9edf33ef1 100644 --- a/lib/rake/backtrace.rb +++ b/lib/rake/backtrace.rb @@ -5,7 +5,7 @@ module Backtrace # :nodoc: all [ File.join(File.dirname(__FILE__), "..") ] SUPPRESSED_PATHS = SYS_PATHS. - map { |s| s.gsub("\\", "/") }. + map { |s| s.tr("\\", "/") }. map { |f| File.expand_path(f) }. reject { |s| s.nil? || s =~ /^ *$/ } SUPPRESSED_PATHS_RE = SUPPRESSED_PATHS.map { |f| Regexp.quote(f) }.join("|") From ffd202288d8321611351cc854321d84e37f7362c Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 12 Aug 2016 14:16:20 +0900 Subject: [PATCH 561/813] use Proc for enumerable methods --- lib/rake/application.rb | 2 +- lib/rake/file_list.rb | 6 ++---- lib/rake/scope.rb | 2 +- lib/rake/task.rb | 6 +++--- test/test_rake_definitions.rb | 4 ++-- test/test_rake_file_list.rb | 4 ++-- test/test_rake_name_space.rb | 4 ++-- test/test_rake_task.rb | 4 ++-- test/test_rake_task_manager.rb | 4 ++-- test/test_rake_thread_pool.rb | 8 +++----- 10 files changed, 20 insertions(+), 24 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 551980796..23db9b890 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -375,7 +375,7 @@ def trace(*strings) # :nodoc: def sort_options(options) # :nodoc: options.sort_by { |opt| - opt.select { |o| o =~ /^-/ }.map { |o| o.downcase }.sort.reverse + opt.select { |o| o =~ /^-/ }.map(&:downcase).sort.reverse } end private :sort_options diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index a82c8d584..3b1239ad9 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -40,8 +40,7 @@ class FileList # List of array methods (that are not in +Object+) that need to be # delegated. - ARRAY_METHODS = (Array.instance_methods - Object.instance_methods). - map { |n| n.to_s } + ARRAY_METHODS = (Array.instance_methods - Object.instance_methods).map(&:to_s) # List of additional methods that must be delegated. MUST_DEFINE = %w[inspect <=>] @@ -58,8 +57,7 @@ class FileList + - & | ] - DELEGATING_METHODS = (ARRAY_METHODS + MUST_DEFINE - MUST_NOT_DEFINE). - map { |s| s.to_s }.sort.uniq + DELEGATING_METHODS = (ARRAY_METHODS + MUST_DEFINE - MUST_NOT_DEFINE).map(&:to_s).sort.uniq # Now do the delegation. DELEGATING_METHODS.each do |sym| diff --git a/lib/rake/scope.rb b/lib/rake/scope.rb index dbefcea46..b432f5f29 100644 --- a/lib/rake/scope.rb +++ b/lib/rake/scope.rb @@ -3,7 +3,7 @@ class Scope < LinkedList # :nodoc: all # Path for the scope. def path - map { |item| item.to_s }.reverse.join(":") + map(&:to_s).reverse.join(":") end # Path for the scope + the named path. diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 7a57a0f85..1f4f591d5 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -219,7 +219,7 @@ def invoke_prerequisites_concurrently(task_args, invocation_chain)# :nodoc: r.invoke_with_call_chain(prereq_args, invocation_chain) end end - futures.each { |f| f.value } + futures.each(&:value) end # Format the trace flags for display. @@ -314,7 +314,7 @@ def first_sentence(string) # Set the names of the arguments for this task. +args+ should be # an array of symbols, one for each argument name. def set_arg_names(args) - @arg_names = args.map { |a| a.to_sym } + @arg_names = args.map(&:to_sym) end # Return a string describing the internal state of a task. Useful for @@ -331,7 +331,7 @@ def investigation prereqs.each do |p| result << "--#{p.name} (#{p.timestamp})\n" end - latest_prereq = prerequisite_tasks.map { |pre| pre.timestamp }.max + latest_prereq = prerequisite_tasks.map(&:timestamp).max result << "latest-prerequisite time: #{latest_prereq}\n" result << "................................\n\n" return result diff --git a/test/test_rake_definitions.rb b/test/test_rake_definitions.rb index ee474cb7c..bc96ed266 100644 --- a/test/test_rake_definitions.rb +++ b/test/test_rake_definitions.rb @@ -34,12 +34,12 @@ def check_tasks(n1, n2, n3) t = Task[n1] assert Task === t, "Should be a Task" assert_equal n1.to_s, t.name - assert_equal [n2.to_s], t.prerequisites.map { |n| n.to_s } + assert_equal [n2.to_s], t.prerequisites.map(&:to_s) t.invoke t2 = Task[n2] assert_equal FileList[], t2.prerequisites t3 = Task[n3] - assert_equal [n1.to_s, n2.to_s], t3.prerequisites.map { |n| n.to_s } + assert_equal [n1.to_s, n2.to_s], t3.prerequisites.map(&:to_s) end def test_incremental_definitions diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 521406b6d..845e9767f 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -548,11 +548,11 @@ def test_array_equality def test_enumeration_methods a = FileList['a', 'b'] - b = a.map { |it| it.upcase } + b = a.map(&:upcase) assert_equal ['A', 'B'], b assert_equal FileList, b.class - b = a.map { |it| it.upcase } + b = a.map(&:upcase) assert_equal ['A', 'B'], b assert_equal FileList, b.class diff --git a/test/test_rake_name_space.rb b/test/test_rake_name_space.rb index d35e70e17..ceb7b412f 100644 --- a/test/test_rake_name_space.rb +++ b/test/test_rake_name_space.rb @@ -37,8 +37,8 @@ def test_namespace_reports_tasks_it_owns end assert_equal ["n:nn:z", "n:x", "n:y"], - ns.tasks.map { |tsk| tsk.name } - assert_equal ["n:nn:z"], nns.tasks.map { |t| t.name } + ns.tasks.map(&:name) + assert_equal ["n:nn:z"], nns.tasks.map(&:name) end def test_scope diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index d9e13bd60..0d008819c 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -174,7 +174,7 @@ def test_multi_invocations def test_task_list task :t2 task :t1 => [:t2] - assert_equal ["t1", "t2"], Task.tasks.map { |t| t.name } + assert_equal ["t1", "t2"], Task.tasks.map(&:name) end def test_task_gives_name_on_to_s @@ -325,7 +325,7 @@ def test_always_multitask # task should always run in order assert_equal ['a', 'b', 'c'], result - [t_a, t_b, t_c].each { |t| t.reenable } + [t_a, t_b, t_c].each(&:reenable) result.clear Rake.application.options.always_multitask = true diff --git a/test/test_rake_task_manager.rb b/test/test_rake_task_manager.rb index 1bcb7a74c..2657ac53f 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -37,7 +37,7 @@ def test_namespace_task_create t = @tm.define_task(Rake::Task, :t) assert_equal "x:t", t.name end - assert_equal ["x:t"], @tm.tasks.map { |t| t.name } + assert_equal ["x:t"], @tm.tasks.map(&:name) end def test_define_namespaced_task @@ -72,7 +72,7 @@ def test_create_filetask_in_namespace assert_equal "fn", t.name end - assert_equal ["fn"], @tm.tasks.map { |t| t.name } + assert_equal ["fn"], @tm.tasks.map(&:name) end def test_namespace_yields_same_namespace_as_returned diff --git a/test/test_rake_thread_pool.rb b/test/test_rake_thread_pool.rb index 35a1fe9d1..62dc59d00 100644 --- a/test/test_rake_thread_pool.rb +++ b/test/test_rake_thread_pool.rb @@ -25,9 +25,7 @@ def test_pool_executes_in_two_other_threads_for_pool_of_size_two sleep 0.1 Thread.current } - }.each { |f| - f.value - } + }.each(&:value) refute_equal threads[0], threads[1] refute_equal Thread.current, threads[0] @@ -111,7 +109,7 @@ def test_pool_prevents_deadlock } } - common_dependency_b = pool.future { futures_a.each { |f| f.value } } + common_dependency_b = pool.future { futures_a.each(&:value) } futures_b = 10.times.map { pool.future { common_dependency_b.value @@ -119,7 +117,7 @@ def test_pool_prevents_deadlock } } - futures_b.each { |f| f.value } + futures_b.each(&:value) pool.join end From 9470ed126abf6eccd33266d558047fe3fc437df1 Mon Sep 17 00:00:00 2001 From: rudyyazdi Date: Sun, 14 Aug 2016 14:36:57 +1000 Subject: [PATCH 562/813] cleaned up the contib stuff --- README.rdoc | 6 ++-- test/test_rake_ftp_file.rb | 74 -------------------------------------- 2 files changed, 3 insertions(+), 77 deletions(-) delete mode 100644 test/test_rake_ftp_file.rb diff --git a/README.rdoc b/README.rdoc index 09ca18ca5..584542c07 100644 --- a/README.rdoc +++ b/README.rdoc @@ -24,9 +24,9 @@ Rake has the following features: file names and paths. * A library of prepackaged tasks to make building rakefiles easier. For example, - tasks for building tarballs and publishing to FTP or SSH sites. (Formerly - tasks for building RDoc and Gems were included in rake but they're now - available in RDoc and RubyGems respectively.) + tasks for building tarballs. (Formerly + tasks for building RDoc, Gems and publishing to FTP were included in rake but they're now + available in RDoc, RubyGems and respectively.) * Supports parallel execution of tasks. diff --git a/test/test_rake_ftp_file.rb b/test/test_rake_ftp_file.rb deleted file mode 100644 index 5749b8a5e..000000000 --- a/test/test_rake_ftp_file.rb +++ /dev/null @@ -1,74 +0,0 @@ -require File.expand_path('../helper', __FILE__) -require 'date' -require 'time' -require 'rake/contrib/ftptools' - -class FakeDate - def self.today - Date.new(2003, 10, 3) - end - - def self.now - Time.local(2003, 10, 3, 12, 00, 00) - end -end - -class TestRakeFtpFile < Rake::TestCase - - def setup - super - - Rake::FtpFile.class_eval { - @date_class = FakeDate - @time_class = FakeDate - } - end - - def test_general - file = Rake::FtpFile.new( - "here", - "-rw-r--r-- 1 a279376 develop 121770 Mar 6 14:50 wiki.pl") - assert_equal "wiki.pl", file.name - assert_equal "here/wiki.pl", file.path - assert_equal "a279376", file.owner - assert_equal "develop", file.group - assert_equal 0644, file.mode - assert_equal 121_770, file.size - assert_equal Time.mktime(2003, 3, 6, 14, 50, 0, 0), file.time - assert ! file.directory? - assert ! file.symlink? - end - - def test_far_date - file = Rake::FtpFile.new( - ".", - "drwxr-xr-x 3 a279376 develop 4096 Nov 26 2001 vss") - assert_equal Time.mktime(2001, 11, 26, 0, 0, 0, 0), file.time - end - - def test_close_date - file = Rake::FtpFile.new( - ".", - "drwxr-xr-x 3 a279376 develop 4096 Nov 26 15:35 vss") - assert_equal Time.mktime(2002, 11, 26, 15, 35, 0, 0), file.time - end - - def test_directory - file = Rake::FtpFile.new( - ".", - "drwxrwxr-x 9 a279376 develop 4096 Mar 13 14:32 working") - assert file.directory? - assert !file.symlink? - end - - def test_symlink - file = Rake::FtpFile.new( - ".", - "lrwxrwxrwx 1 a279376 develop 64 Mar 26 2002 " + - "xtrac -> /home/a279376/working/ics/development/java/" + - "com/fmr/fwp/ics/xtrac") - assert_equal 'xtrac', file.name - assert file.symlink? - assert !file.directory? - end -end From 60305d4e14dbf7ee9de9b412199eec325741ecab Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 17 Aug 2016 18:13:40 +0900 Subject: [PATCH 563/813] use new hash syntax --- lib/rake/clean.rb | 2 +- lib/rake/packagetask.rb | 8 +-- lib/rake/promise.rb | 20 +++--- lib/rake/thread_history_display.rb | 4 +- lib/rake/thread_pool.rb | 22 +++---- test/test_rake_clean.rb | 8 +-- test/test_rake_definitions.rb | 16 ++--- test/test_rake_file_list.rb | 6 +- test/test_rake_file_task.rb | 8 +-- test/test_rake_file_utils.rb | 12 ++-- test/test_rake_multi_task.rb | 8 +-- test/test_rake_rules.rb | 6 +- test/test_rake_task.rb | 64 +++++++++---------- test/test_rake_task_arguments.rb | 8 +-- test/test_rake_task_manager.rb | 2 +- ...t_rake_task_manager_argument_resolution.rb | 4 +- test/test_rake_task_with_arguments.rb | 10 +-- test/test_rake_test_task.rb | 10 +-- test/test_thread_history_display.rb | 28 ++++---- 19 files changed, 123 insertions(+), 123 deletions(-) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index 514f9f9c7..a2375aa99 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -71,6 +71,6 @@ def cant_be_deleted?(path_name) CLOBBER = ::Rake::FileList.new desc "Remove any generated files." -task :clobber => [:clean] do +task clobber: [:clean] do Rake::Cleaner.cleanup_files(CLOBBER) end diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index a93307849..ae7151949 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -112,14 +112,14 @@ def define task :package desc "Force a rebuild of the package files" - task :repackage => [:clobber_package, :package] + task repackage: [:clobber_package, :package] desc "Remove package products" task :clobber_package do rm_r package_dir rescue nil end - task :clobber => [:clobber_package] + task clobber: [:clobber_package] [ [need_tar, tgz_file, "z"], @@ -128,7 +128,7 @@ def define [need_tar_xz, tar_xz_file, "J"] ].each do |need, file, flag| if need - task :package => ["#{package_dir}/#{file}"] + task package: ["#{package_dir}/#{file}"] file "#{package_dir}/#{file}" => [package_dir_path] + package_files do chdir(package_dir) do @@ -139,7 +139,7 @@ def define end if need_zip - task :package => ["#{package_dir}/#{zip_file}"] + task package: ["#{package_dir}/#{zip_file}"] file "#{package_dir}/#{zip_file}" => [package_dir_path] + package_files do chdir(package_dir) do diff --git a/lib/rake/promise.rb b/lib/rake/promise.rb index 31c456347..37221e427 100644 --- a/lib/rake/promise.rb +++ b/lib/rake/promise.rb @@ -27,11 +27,11 @@ def initialize(args, &block) # synchronously. We will wait. def value unless complete? - stat :sleeping_on, :item_id => object_id + stat :sleeping_on, item_id: object_id @mutex.synchronize do - stat :has_lock_on, :item_id => object_id + stat :has_lock_on, item_id: object_id chore - stat :releasing_lock_on, :item_id => object_id + stat :releasing_lock_on, item_id: object_id end end error? ? raise(@error) : @result @@ -39,14 +39,14 @@ def value # If no one else is working this promise, go ahead and do the chore. def work - stat :attempting_lock_on, :item_id => object_id + stat :attempting_lock_on, item_id: object_id if @mutex.try_lock - stat :has_lock_on, :item_id => object_id + stat :has_lock_on, item_id: object_id chore - stat :releasing_lock_on, :item_id => object_id + stat :releasing_lock_on, item_id: object_id @mutex.unlock else - stat :bailed_on, :item_id => object_id + stat :bailed_on, item_id: object_id end end @@ -55,16 +55,16 @@ def work # Perform the chore promised def chore if complete? - stat :found_completed, :item_id => object_id + stat :found_completed, item_id: object_id return end - stat :will_execute, :item_id => object_id + stat :will_execute, item_id: object_id begin @result = @block.call(*@args) rescue Exception => e @error = e end - stat :did_execute, :item_id => object_id + stat :did_execute, item_id: object_id discard end diff --git a/lib/rake/thread_history_display.rb b/lib/rake/thread_history_display.rb index c2af9ecef..a8158caf6 100644 --- a/lib/rake/thread_history_display.rb +++ b/lib/rake/thread_history_display.rb @@ -9,8 +9,8 @@ class ThreadHistoryDisplay # :nodoc: all def initialize(stats) @stats = stats - @items = { :_seq_ => 1 } - @threads = { :_seq_ => "A" } + @items = { _seq_: 1 } + @threads = { _seq_: "A" } end def show diff --git a/lib/rake/thread_pool.rb b/lib/rake/thread_pool.rb index a11af0393..91628259b 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -34,7 +34,7 @@ def future(*args, &block) promise.recorder = lambda { |*stats| stat(*stats) } @queue.enq promise - stat :queued, :item_id => promise.object_id + stat :queued, item_id: promise.object_id start_thread promise end @@ -82,8 +82,8 @@ def history # :nodoc: # Return a hash of always collected statistics for the thread pool. def statistics # :nodoc: { - :total_threads_in_play => @total_threads_in_play, - :max_active_threads => @max_active_threads, + total_threads_in_play: @total_threads_in_play, + max_active_threads: @max_active_threads, } end @@ -99,7 +99,7 @@ def process_queue_item #:nodoc: # is now gone. For this reason we pass true to Queue#deq # because we will sleep indefinitely if it is empty. promise = @queue.deq(true) - stat :dequeued, :item_id => promise.object_id + stat :dequeued, item_id: promise.object_id promise.work return true @@ -125,7 +125,7 @@ def start_thread # :nodoc: ensure @threads_mon.synchronize do @threads.delete Thread.current - stat :ended, :thread_count => @threads.count + stat :ended, thread_count: @threads.count @join_cond.broadcast if @threads.empty? end end @@ -134,8 +134,8 @@ def start_thread # :nodoc: @threads << t stat( :spawned, - :new_thread => t.object_id, - :thread_count => @threads.count) + new_thread: t.object_id, + thread_count: @threads.count) @total_threads_in_play = @threads.count if @threads.count > @total_threads_in_play end @@ -144,10 +144,10 @@ def start_thread # :nodoc: def stat(event, data=nil) # :nodoc: return if @history_start_time.nil? info = { - :event => event, - :data => data, - :time => Time.now, - :thread => Thread.current.object_id, + event: event, + data: data, + time: Time.now, + thread: Thread.current.object_id, } @history_mon.synchronize { @history << info } end diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index 0bce7bc0b..f94d8c31c 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -15,7 +15,7 @@ def test_cleanup file_name = create_undeletable_file out, _ = capture_io do - Rake::Cleaner.cleanup(file_name, :verbose => false) + Rake::Cleaner.cleanup(file_name, verbose: false) end assert_match(/failed to remove/i, out) @@ -27,7 +27,7 @@ def test_cleanup_ignores_missing_files file_name = File.join(@tempdir, "missing_directory", "no_such_file") out, _ = capture_io do - Rake::Cleaner.cleanup(file_name, :verbose => false) + Rake::Cleaner.cleanup(file_name, verbose: false) end refute_match(/failed to remove/i, out) end @@ -55,7 +55,7 @@ def remove_undeletable_file file_name = File.join(dir_name, "deleteme") FileUtils.chmod(0777, dir_name) FileUtils.chmod(0777, file_name) - Rake::Cleaner.cleanup(file_name, :verbose => false) - Rake::Cleaner.cleanup(dir_name, :verbose => false) + Rake::Cleaner.cleanup(file_name, verbose: false) + Rake::Cleaner.cleanup(dir_name, verbose: false) end end diff --git a/test/test_rake_definitions.rb b/test/test_rake_definitions.rb index bc96ed266..a0314621d 100644 --- a/test/test_rake_definitions.rb +++ b/test/test_rake_definitions.rb @@ -14,9 +14,9 @@ def setup def test_task done = false - task :one => [:two] do done = true end + task one: [:two] do done = true end task :two - task :three => [:one, :two] + task three: [:one, :two] check_tasks(:one, :two, :three) assert done, "Should be done" end @@ -44,9 +44,9 @@ def check_tasks(n1, n2, n3) def test_incremental_definitions runs = [] - task :t1 => [:t2] do runs << "A"; 4321 end - task :t1 => [:t3] do runs << "B"; 1234 end - task :t1 => [:t3] + task t1: [:t2] do runs << "A"; 4321 end + task t1: [:t3] do runs << "B"; 1234 end + task t1: [:t3] task :t2 task :t3 Task[:t1].invoke @@ -55,19 +55,19 @@ def test_incremental_definitions end def test_missing_dependencies - task :x => ["missing"] + task x: ["missing"] assert_raises(RuntimeError) { Task[:x].invoke } end def test_falsey_dependencies - task :x => nil + task x: nil assert_equal [], Task[:x].prerequisites end def test_implicit_file_dependencies runs = [] create_existing_file - task :y => [EXISTINGFILE] do |t| runs << t.name end + task y: [EXISTINGFILE] do |t| runs << t.name end Task[:y].invoke assert_equal runs, ['y'] end diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 845e9767f..ca881f34b 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -165,7 +165,7 @@ def test_reject def test_exclude fl = FileList['x.c', 'abc.c', 'xyz.c', 'existing'] - fl.each { |fn| touch fn, :verbose => false } + fl.each { |fn| touch fn, verbose: false } x = fl.exclude(%r{^x.+\.}) @@ -184,7 +184,7 @@ def test_exclude def test_exclude_pathname fl = FileList['x.c', 'abc.c', 'other'] - fl.each { |fn| touch fn, :verbose => false } + fl.each { |fn| touch fn, verbose: false } fl.exclude(Pathname.new('*.c')) @@ -677,7 +677,7 @@ def test_special_return_delegating_methods_object_type def test_file_utils_can_use_filelists cfiles = FileList['*.c'] - cp cfiles, @cdir, :verbose => false + cp cfiles, @cdir, verbose: false assert File.exist?(File.join(@cdir, 'abc.c')) assert File.exist?(File.join(@cdir, 'xyz.c')) diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index a24951144..6a4211559 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -76,7 +76,7 @@ def test_file_depends_on_task_depend_on_file create_timed_files(OLDFILE, NEWFILE) file NEWFILE => [:obj] do |t| @runs << t.name end - task :obj => [OLDFILE] do |t| @runs << t.name end + task obj: [OLDFILE] do |t| @runs << t.name end file OLDFILE do |t| @runs << t.name end Task[:obj].invoke @@ -150,12 +150,12 @@ def test_needed_eh_exists end def test_source_is_first_prerequisite - t = file :f => ["preqA", "preqB"] + t = file f: ["preqA", "preqB"] assert_equal "preqA", t.source end def test_sources_is_all_prerequisites - t = file :f => ["preqA", "preqB"] + t = file f: ["preqA", "preqB"] assert_equal ["preqA", "preqB"], t.sources end @@ -169,7 +169,7 @@ def test_task_can_be_pathname end def test_prerequisite_can_be_pathname - t = file :f => Pathname.new("preq") + t = file f: Pathname.new("preq") assert_equal "preq", t.source end diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 1b43a49d1..4dec00968 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -41,7 +41,7 @@ def test_rm_filelist def test_ln open("a", "w") { |f| f.puts "TEST_LN" } - Rake::FileUtilsExt.safe_ln("a", "b", :verbose => false) + Rake::FileUtilsExt.safe_ln("a", "b", verbose: false) assert_equal "TEST_LN\n", File.read('b') end @@ -210,7 +210,7 @@ def test_sh_special_handling def test_sh_noop shellcommand - verbose(false) { sh %{shellcommand.rb 1}, :noop=>true } + verbose(false) { sh %{shellcommand.rb 1}, noop: true } assert true, "should not fail" end @@ -222,7 +222,7 @@ def test_sh_bad_option shellcommand ex = assert_raises(ArgumentError) { - verbose(false) { sh %{shellcommand.rb}, :bad_option=>true } + verbose(false) { sh %{shellcommand.rb}, bad_option: true } } assert_match(/bad_option/, ex.message) end @@ -232,7 +232,7 @@ def test_sh_verbose _, err = capture_io do verbose(true) { - sh %{shellcommand.rb}, :noop=>true + sh %{shellcommand.rb}, noop: true } end @@ -244,7 +244,7 @@ def test_sh_verbose_false _, err = capture_io do verbose(false) { - sh %{shellcommand.rb}, :noop=>true + sh %{shellcommand.rb}, noop: true } end @@ -257,7 +257,7 @@ def test_sh_verbose_flag_nil RakeFileUtils.verbose_flag = nil assert_silent do - sh %{shellcommand.rb}, :noop=>true + sh %{shellcommand.rb}, noop: true end end diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index f7a004164..b2c6495a6 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -28,7 +28,7 @@ def add_run(obj) def test_running_multitasks task :a do 3.times do |i| add_run("A#{i}"); sleep 0.01; end end task :b do 3.times do |i| add_run("B#{i}"); sleep 0.01; end end - multitask :both => [:a, :b] + multitask both: [:a, :b] Task[:both].invoke assert_equal 6, @runs.size assert @runs.index("A0") < @runs.index("A1") @@ -39,9 +39,9 @@ def test_running_multitasks def test_all_multitasks_wait_on_slow_prerequisites task :slow do 3.times do |i| add_run("S#{i}"); sleep 0.05 end end - task :a => [:slow] do 3.times do |i| add_run("A#{i}"); sleep 0.01 end end - task :b => [:slow] do 3.times do |i| add_run("B#{i}"); sleep 0.01 end end - multitask :both => [:a, :b] + task a: [:slow] do 3.times do |i| add_run("A#{i}"); sleep 0.01 end end + task b: [:slow] do 3.times do |i| add_run("B#{i}"); sleep 0.01 end end + multitask both: [:a, :b] Task[:both].invoke assert_equal 9, @runs.size assert @runs.index("S0") < @runs.index("S1") diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index ece75e5d9..ee18ed7ed 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -269,7 +269,7 @@ def test_rule_with_proc_dependent_will_trigger Task['classes/jw/X.class'].invoke assert_equal [:RULE], @runs ensure - rm_r("src", :verbose=>false) rescue nil + rm_r("src", verbose: false) rescue nil end def test_proc_returning_lists_are_flattened_into_prereqs @@ -278,7 +278,7 @@ def test_proc_returning_lists_are_flattened_into_prereqs create_file("flatten/a.txt") task 'flatten/b.data' do |t| ran = true - touch t.name, :verbose => false + touch t.name, verbose: false end rule '.html' => proc { |fn| @@ -291,7 +291,7 @@ def test_proc_returning_lists_are_flattened_into_prereqs Task['flatten/a.html'].invoke assert ran, "Should have triggered flattened dependency" ensure - rm_r("flatten", :verbose=>false) rescue nil + rm_r("flatten", verbose: false) rescue nil end def test_recursive_rules_will_work_as_long_as_they_terminate diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 0d008819c..9a4c3fc23 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -33,13 +33,13 @@ def test_create end def test_inspect - t = task(:foo => [:bar, :baz]) + t = task(foo: [:bar, :baz]) assert_equal " [bar, baz]>", t.inspect end def test_invoke runlist = [] - t1 = task(:t1 => [:t2, :t3]) { |t| runlist << t.name; 3321 } + t1 = task(t1: [:t2, :t3]) { |t| runlist << t.name; 3321 } task(:t2) { |t| runlist << t.name } task(:t3) { |t| runlist << t.name } assert_equal ["t2", "t3"], t1.prerequisites @@ -49,8 +49,8 @@ def test_invoke def test_invoke_with_circular_dependencies runlist = [] - t1 = task(:t1 => [:t2]) { |t| runlist << t.name; 3321 } - t2 = task(:t2 => [:t1]) { |t| runlist << t.name } + t1 = task(t1: [:t2]) { |t| runlist << t.name; 3321 } + t2 = task(t2: [:t1]) { |t| runlist << t.name } assert_equal ["t2"], t1.prerequisites assert_equal ["t1"], t2.prerequisites ex = assert_raises RuntimeError do @@ -87,8 +87,8 @@ def test_tasks_can_be_traced def test_no_double_invoke runlist = [] - t1 = task(:t1 => [:t2, :t3]) { |t| runlist << t.name; 3321 } - task(:t2 => [:t3]) { |t| runlist << t.name } + t1 = task(t1: [:t2, :t3]) { |t| runlist << t.name; 3321 } + task(t2: [:t3]) { |t| runlist << t.name } task(:t3) { |t| runlist << t.name } t1.invoke assert_equal ["t3", "t2", "t1"], runlist @@ -134,7 +134,7 @@ def test_clear_actions def test_clear_comments desc "the original foo" - task :foo => [:x] do + task foo: [:x] do # Dummy action end @@ -164,8 +164,8 @@ def test_defined def test_multi_invocations runs = [] p = proc do |t| runs << t.name end - task({ :t1 => [:t2, :t3] }, &p) - task({ :t2 => [:t3] }, &p) + task({ t1: [:t2, :t3] }, &p) + task({ t2: [:t3] }, &p) task(:t3, &p) Task[:t1].invoke assert_equal ["t1", "t2", "t3"], runs.sort @@ -173,7 +173,7 @@ def test_multi_invocations def test_task_list task :t2 - task :t1 => [:t2] + task t1: [:t2] assert_equal ["t1", "t2"], Task.tasks.map(&:name) end @@ -183,34 +183,34 @@ def test_task_gives_name_on_to_s end def test_symbols_can_be_prerequisites - task :a => :b + task a: :b assert_equal ["b"], Task[:a].prerequisites end def test_strings_can_be_prerequisites - task :a => "b" + task a: "b" assert_equal ["b"], Task[:a].prerequisites end def test_arrays_can_be_prerequisites - task :a => ["b", "c"] + task a: ["b", "c"] assert_equal ["b", "c"], Task[:a].prerequisites end def test_filelists_can_be_prerequisites - task :a => FileList.new.include("b", "c") + task a: FileList.new.include("b", "c") assert_equal ["b", "c"], Task[:a].prerequisites end def test_prerequisite_tasks_returns_tasks_not_strings - a = task :a => ["b", "c"] + a = task a: ["b", "c"] b = task :b c = task :c assert_equal [b, c], a.prerequisite_tasks end def test_prerequisite_tasks_fails_if_prerequisites_are_undefined - a = task :a => ["b", "c"] + a = task a: ["b", "c"] task :b assert_raises(RuntimeError) do a.prerequisite_tasks @@ -221,7 +221,7 @@ def test_prerequisite_tasks_honors_namespaces task :b a = b = nil namespace "X" do - a = task :a => ["b", "c"] + a = task a: ["b", "c"] b = task :b end c = task :c @@ -232,7 +232,7 @@ def test_prerequisite_tasks_honors_namespaces def test_prerequisite_tasks_finds_tasks_with_same_name_outside_namespace b1 = nil namespace "a" do - b1 = task :b => "b" + b1 = task b: "b" end b2 = task :b @@ -246,11 +246,11 @@ def test_prerequisite_tasks_in_nested_namespaces a_m = task :m namespace "b" do - a_b_m = task :m => "m" + a_b_m = task m: "m" end namespace "c" do - a_c_m = task :m => "a:m" + a_c_m = task m: "a:m" end end @@ -259,9 +259,9 @@ def test_prerequisite_tasks_in_nested_namespaces end def test_all_prerequisite_tasks_includes_all_prerequisites - a = task :a => "b" - b = task :b => ["c", "d"] - c = task :c => "e" + a = task a: "b" + b = task b: ["c", "d"] + c = task c: "e" d = task :d e = task :e @@ -269,22 +269,22 @@ def test_all_prerequisite_tasks_includes_all_prerequisites end def test_all_prerequisite_tasks_does_not_include_duplicates - a = task :a => ["b", "c"] - b = task :b => "c" + a = task a: ["b", "c"] + b = task b: "c" c = task :c assert_equal [b, c], a.all_prerequisite_tasks.sort_by { |t| t.name } end def test_all_prerequisite_tasks_includes_self_on_cyclic_dependencies - a = task :a => "b" - b = task :b => "a" + a = task a: "b" + b = task b: "a" assert_equal [a, b], a.all_prerequisite_tasks.sort_by { |t| t.name } end def test_timestamp_returns_now_if_all_prereqs_have_no_times - a = task :a => ["b", "c"] + a = task a: ["b", "c"] task :b task :c @@ -292,7 +292,7 @@ def test_timestamp_returns_now_if_all_prereqs_have_no_times end def test_timestamp_returns_latest_prereq_timestamp - a = task :a => ["b", "c"] + a = task a: ["b", "c"] b = task :b c = task :c @@ -316,7 +316,7 @@ def test_always_multitask mx.synchronize { result << t.name } end - t_c = task(:c => [:a, :b]) do |t| + t_c = task(c: [:a, :b]) do |t| mx.synchronize { result << t.name } end @@ -336,7 +336,7 @@ def test_always_multitask end def test_investigation_output - t1 = task(:t1 => [:t2, :t3]) { |t| runlist << t.name; 3321 } + t1 = task(t1: [:t2, :t3]) { |t| runlist << t.name; 3321 } task(:t2) task(:t3) out = t1.investigation @@ -436,7 +436,7 @@ def test_interspersed_duplicate_comments end def test_source_is_first_prerequisite - t = task :t => ["preqA", "preqB"] + t = task t: ["preqA", "preqB"] assert_equal "preqA", t.source end end diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 554c13f57..bf2b4cd42 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -16,12 +16,12 @@ def test_empty_arg_list_is_empty def test_multiple_values_in_args ta = Rake::TaskArguments.new([:a, :b, :c], [:one, :two, :three]) - assert_equal({:a => :one, :b => :two, :c => :three}, ta.to_hash) + assert_equal({a: :one, b: :two, c: :three}, ta.to_hash) end def test_blank_values_in_args ta = Rake::TaskArguments.new([:a, :b, :c], ['', :two, '']) - assert_equal({:b => :two}, ta.to_hash) + assert_equal({b: :two}, ta.to_hash) end def test_has_key @@ -78,7 +78,7 @@ def test_args_do_not_reference_env_values def test_creating_new_argument_scopes parent = Rake::TaskArguments.new(['p'], [1]) child = parent.new_scope(['c', 'p']) - assert_equal({:p=>1}, child.to_hash) + assert_equal({p: 1}, child.to_hash) assert_equal 1, child.p assert_equal 1, child["p"] assert_equal 1, child[:p] @@ -93,7 +93,7 @@ def test_child_hides_parent_arg_names def test_default_arguments_values_can_be_merged ta = Rake::TaskArguments.new(["aa", "bb"], [nil, "original_val"]) - ta.with_defaults({ :aa => 'default_val' }) + ta.with_defaults({ aa: 'default_val' }) assert_equal 'default_val', ta[:aa] assert_equal 'original_val', ta[:bb] end diff --git a/test/test_rake_task_manager.rb b/test/test_rake_task_manager.rb index 2657ac53f..6f27a3d08 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -168,7 +168,7 @@ def test_correctly_scoped_prerequisites_are_invoked @tm.define_task(Rake::Task, :z) do values << "top z" end @tm.in_namespace("a") do @tm.define_task(Rake::Task, :z) do values << "next z" end - @tm.define_task(Rake::Task, :x => :z) + @tm.define_task(Rake::Task, x: :z) end @tm["a:x"].invoke diff --git a/test/test_rake_task_manager_argument_resolution.rb b/test/test_rake_task_manager_argument_resolution.rb index 43fa2ac44..2aa69aa19 100644 --- a/test/test_rake_task_manager_argument_resolution.rb +++ b/test/test_rake_task_manager_argument_resolution.rb @@ -4,8 +4,8 @@ class TestRakeTaskManagerArgumentResolution < Rake::TestCase def test_good_arg_patterns assert_equal [:t, [], []], task(:t) - assert_equal [:t, [], [:x]], task(:t => :x) - assert_equal [:t, [], [:x, :y]], task(:t => [:x, :y]) + assert_equal [:t, [], [:x]], task(t: :x) + assert_equal [:t, [], [:x, :y]], task(t: [:x, :y]) assert_equal [:t, [:a, :b], []], task(:t, [:a, :b]) assert_equal [:t, [:a, :b], [:x]], task(:t, [:a, :b] => :x) diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index 8646fc041..022854df6 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -28,7 +28,7 @@ def test_args_given end def test_name_and_needs - t = task(:t => [:pre]) + t = task(t: [:pre]) assert_equal "t", t.name assert_equal [], t.arg_names assert_equal ["pre"], t.prerequisites @@ -48,7 +48,7 @@ def test_arg_list_is_empty_if_no_args_given def test_tasks_can_access_arguments_as_hash t = task :t, :a, :b, :c do |tt, args| - assert_equal({:a => 1, :b => 2, :c => 3}, args.to_hash) + assert_equal({a: 1, b: 2, c: 3}, args.to_hash) assert_equal 1, args[:a] assert_equal 2, args[:b] assert_equal 3, args[:c] @@ -74,7 +74,7 @@ def test_actions_of_various_arity_are_ok_with_args t.enhance do |t2, args| notes << :d assert_equal t, t2 - assert_equal({:x => 1}, args.to_hash) + assert_equal({x: 1}, args.to_hash) end t.invoke(1) assert_equal [:a, :b, :c, :d], notes @@ -82,7 +82,7 @@ def test_actions_of_various_arity_are_ok_with_args def test_arguments_are_passed_to_block t = task(:t, :a, :b) { |tt, args| - assert_equal({ :a => 1, :b => 2 }, args.to_hash) + assert_equal({ a: 1, b: 2 }, args.to_hash) } t.invoke(1, 2) end @@ -155,7 +155,7 @@ def test_args_not_passed_if_no_arg_names task(:pre, :rev) { |t, args| assert_equal({}, args.to_hash) } - t = task(:t => [:pre]) + t = task(t: [:pre]) t.invoke("bill", "1.2") end diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 1b15f7a8d..caa4c3a3d 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -17,21 +17,21 @@ def test_initialize end def test_initialize_deps - tt = Rake::TestTask.new(:example => :bar) + tt = Rake::TestTask.new(example: :bar) refute_nil tt assert_equal :bar, tt.deps assert Task.task_defined?(:example) end def test_initialize_multi_deps - tt = Rake::TestTask.new(:example => [:foo, :bar]) + tt = Rake::TestTask.new(example: [:foo, :bar]) refute_nil tt assert_equal [:foo, :bar], tt.deps assert Task.task_defined?(:example) end def test_initialize_override - tt = Rake::TestTask.new(:example => :bar) do |t| + tt = Rake::TestTask.new(example: :bar) do |t| t.description = "Run example tests" t.libs = ['src', 'ext'] t.pattern = 'test/tc_*.rb' @@ -128,7 +128,7 @@ def test_test_files_equals def test_task_prerequisites Rake::TestTask.new :parent - Rake::TestTask.new :child => :parent + Rake::TestTask.new child: :parent task = Rake::Task[:child] assert_includes task.prerequisites, 'parent' @@ -137,7 +137,7 @@ def test_task_prerequisites def test_task_prerequisites_multi Rake::TestTask.new :parent Rake::TestTask.new :parent2 - Rake::TestTask.new :child => [:parent, :parent2] + Rake::TestTask.new child: [:parent, :parent2] task = Rake::Task[:child] assert_includes task.prerequisites, 'parent' diff --git a/test/test_thread_history_display.rb b/test/test_thread_history_display.rb index bb5879cff..6529302ce 100644 --- a/test/test_thread_history_display.rb +++ b/test/test_thread_history_display.rb @@ -18,7 +18,7 @@ def test_banner end def test_item_queued - @stats << event(:item_queued, :item_id => 123) + @stats << event(:item_queued, item_id: 123) out, _ = capture_io do @display.show end @@ -26,7 +26,7 @@ def test_item_queued end def test_item_dequeued - @stats << event(:item_dequeued, :item_id => 123) + @stats << event(:item_dequeued, item_id: 123) out, _ = capture_io do @display.show end @@ -34,8 +34,8 @@ def test_item_dequeued end def test_multiple_items - @stats << event(:item_queued, :item_id => 123) - @stats << event(:item_queued, :item_id => 124) + @stats << event(:item_queued, item_id: 123) + @stats << event(:item_queued, item_id: 124) out, _ = capture_io do @display.show end @@ -44,7 +44,7 @@ def test_multiple_items end def test_waiting - @stats << event(:waiting, :item_id => 123) + @stats << event(:waiting, item_id: 123) out, _ = capture_io do @display.show end @@ -52,7 +52,7 @@ def test_waiting end def test_continue - @stats << event(:continue, :item_id => 123) + @stats << event(:continue, item_id: 123) out, _ = capture_io do @display.show end @@ -62,8 +62,8 @@ def test_continue def test_thread_deleted @stats << event( :thread_deleted, - :deleted_thread => 123_456, - :thread_count => 12) + deleted_thread: 123_456, + thread_count: 12) out, _ = capture_io do @display.show end @@ -75,8 +75,8 @@ def test_thread_deleted def test_thread_created @stats << event( :thread_created, - :new_thread => 123_456, - :thread_count => 13) + new_thread: 123_456, + thread_count: 13) out, _ = capture_io do @display.show end @@ -89,10 +89,10 @@ def test_thread_created def event(type, data = {}) result = { - :event => type, - :time => @time / 1_000_000.0, - :data => data, - :thread => Thread.current.object_id + event: type, + time: @time / 1_000_000.0, + data: data, + thread: Thread.current.object_id } @time += 1 result From b1ae033a139cc7bcc029faeeb37b2ca4c60dd935 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 18 Aug 2016 15:09:01 +0900 Subject: [PATCH 564/813] use github pages for rdoc --- README.rdoc | 2 +- doc/rake.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rdoc b/README.rdoc index 584542c07..690c11d66 100644 --- a/README.rdoc +++ b/README.rdoc @@ -2,7 +2,7 @@ home :: https://github.com/ruby/rake bugs :: https://github.com/ruby/rake/issues -docs :: http://docs.seattlerb.org/rake +docs :: https://ruby.github.io/rake build status :: {travis-ci}[https://travis-ci.org/ruby/rake] {appveyor}[https://ci.appveyor.com/project/ruby/rake] == Description diff --git a/doc/rake.1 b/doc/rake.1 index 2e830176a..c6bfa25c0 100644 --- a/doc/rake.1 +++ b/doc/rake.1 @@ -141,7 +141,7 @@ The complete documentation for has been installed at .Pa /usr/share/doc/rake-doc/html/index.html . It is also available online at -.Lk http://docs.seattlerb.org/rake . +.Lk https://ruby.github.io/rake . .Sh AUTHORS .An -nosplit .Nm From 6ca29f04425a96f7d539e061ce3da543f433fb3e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 18 Aug 2016 21:27:49 +0900 Subject: [PATCH 565/813] removed duplicated release_notes --- doc/release_notes/README.md | 4 - doc/release_notes/rake-0.4.14.rdoc | 23 ---- doc/release_notes/rake-0.4.15.rdoc | 35 ----- doc/release_notes/rake-0.5.0.rdoc | 53 -------- doc/release_notes/rake-0.5.3.rdoc | 78 ------------ doc/release_notes/rake-0.5.4.rdoc | 46 ------- doc/release_notes/rake-0.6.0.rdoc | 141 -------------------- doc/release_notes/rake-0.7.0.rdoc | 119 ----------------- doc/release_notes/rake-0.7.1.rdoc | 59 --------- doc/release_notes/rake-0.7.2.rdoc | 121 ------------------ doc/release_notes/rake-0.7.3.rdoc | 47 ------- doc/release_notes/rake-0.8.0.rdoc | 114 ----------------- doc/release_notes/rake-0.8.2.rdoc | 165 ------------------------ doc/release_notes/rake-0.8.3.rdoc | 112 ---------------- doc/release_notes/rake-0.8.4.rdoc | 147 --------------------- doc/release_notes/rake-0.8.5.rdoc | 53 -------- doc/release_notes/rake-0.8.6.rdoc | 37 ------ doc/release_notes/rake-0.8.7.rdoc | 55 -------- doc/release_notes/rake-0.9.0.rdoc | 112 ---------------- doc/release_notes/rake-0.9.1.rdoc | 52 -------- doc/release_notes/rake-0.9.2.2.rdoc | 55 -------- doc/release_notes/rake-0.9.2.rdoc | 49 ------- doc/release_notes/rake-0.9.3.rdoc | 102 --------------- doc/release_notes/rake-0.9.4.rdoc | 60 --------- doc/release_notes/rake-0.9.5.rdoc | 55 -------- doc/release_notes/rake-0.9.6.rdoc | 64 ---------- doc/release_notes/rake-10.0.0.rdoc | 178 -------------------------- doc/release_notes/rake-10.0.1.rdoc | 58 --------- doc/release_notes/rake-10.0.2.rdoc | 53 -------- doc/release_notes/rake-10.0.3.rdoc | 191 ---------------------------- doc/release_notes/rake-10.1.0.rdoc | 61 --------- 31 files changed, 2499 deletions(-) delete mode 100644 doc/release_notes/README.md delete mode 100644 doc/release_notes/rake-0.4.14.rdoc delete mode 100644 doc/release_notes/rake-0.4.15.rdoc delete mode 100644 doc/release_notes/rake-0.5.0.rdoc delete mode 100644 doc/release_notes/rake-0.5.3.rdoc delete mode 100644 doc/release_notes/rake-0.5.4.rdoc delete mode 100644 doc/release_notes/rake-0.6.0.rdoc delete mode 100644 doc/release_notes/rake-0.7.0.rdoc delete mode 100644 doc/release_notes/rake-0.7.1.rdoc delete mode 100644 doc/release_notes/rake-0.7.2.rdoc delete mode 100644 doc/release_notes/rake-0.7.3.rdoc delete mode 100644 doc/release_notes/rake-0.8.0.rdoc delete mode 100644 doc/release_notes/rake-0.8.2.rdoc delete mode 100644 doc/release_notes/rake-0.8.3.rdoc delete mode 100644 doc/release_notes/rake-0.8.4.rdoc delete mode 100644 doc/release_notes/rake-0.8.5.rdoc delete mode 100644 doc/release_notes/rake-0.8.6.rdoc delete mode 100644 doc/release_notes/rake-0.8.7.rdoc delete mode 100644 doc/release_notes/rake-0.9.0.rdoc delete mode 100644 doc/release_notes/rake-0.9.1.rdoc delete mode 100644 doc/release_notes/rake-0.9.2.2.rdoc delete mode 100644 doc/release_notes/rake-0.9.2.rdoc delete mode 100644 doc/release_notes/rake-0.9.3.rdoc delete mode 100644 doc/release_notes/rake-0.9.4.rdoc delete mode 100644 doc/release_notes/rake-0.9.5.rdoc delete mode 100644 doc/release_notes/rake-0.9.6.rdoc delete mode 100644 doc/release_notes/rake-10.0.0.rdoc delete mode 100644 doc/release_notes/rake-10.0.1.rdoc delete mode 100644 doc/release_notes/rake-10.0.2.rdoc delete mode 100644 doc/release_notes/rake-10.0.3.rdoc delete mode 100644 doc/release_notes/rake-10.1.0.rdoc diff --git a/doc/release_notes/README.md b/doc/release_notes/README.md deleted file mode 100644 index d7079ad81..000000000 --- a/doc/release_notes/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Note: this release notes will never been updated - -The maintenance policy for release notes has been changed. -Please see [History.rdoc](https://github.com/ruby/rake/blob/master/History.rdoc). diff --git a/doc/release_notes/rake-0.4.14.rdoc b/doc/release_notes/rake-0.4.14.rdoc deleted file mode 100644 index b2f1f84f3..000000000 --- a/doc/release_notes/rake-0.4.14.rdoc +++ /dev/null @@ -1,23 +0,0 @@ -= Rake 0.4.14 Released - -== Changes - -Version 0.4.14 is a compatibility fix to allow Rake's test task to -work under Ruby 1.8.2. A change in the Test::Unit autorun feature -prevented Rake from running any tests. This release fixes the -problem. - -Rake 0.4.14 is the recommended release for anyone using Ruby 1.8.2. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - diff --git a/doc/release_notes/rake-0.4.15.rdoc b/doc/release_notes/rake-0.4.15.rdoc deleted file mode 100644 index 975708863..000000000 --- a/doc/release_notes/rake-0.4.15.rdoc +++ /dev/null @@ -1,35 +0,0 @@ -= Rake 0.4.15 Released - -== Changes - -Version 0.4.15 is a bug fix update for the Ruby 1.8.2 compatibility -changes. This release includes: - -* Fixed a bug that prevented the TESTOPTS flag from working with the - revised for 1.8.2 test task. - -* Updated the docs on --trace to indicate that it also enables a full - backtrace on errors. - -* Several fixes for new warnings generated. - -== Mini-Roadmap - -I will continue to issue Rake updates in the 0.4.xx series as new -Ruby-1.8.2 issues become manifest. Once the codebase stabilizes, I -will release a 0.5.0 version incorporating all the changes. If you -are not using Ruby-1.8.2 and wish to avoid version churn, I recommend -staying with a release prior to Rake-0.4.14. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - diff --git a/doc/release_notes/rake-0.5.0.rdoc b/doc/release_notes/rake-0.5.0.rdoc deleted file mode 100644 index f5cb9f307..000000000 --- a/doc/release_notes/rake-0.5.0.rdoc +++ /dev/null @@ -1,53 +0,0 @@ -= Rake 0.5.0 Released - -It has been a long time in coming, but we finally have a new version -of Rake available. - -== Changes - -* Fixed bug where missing intermediate file dependencies could cause - an abort with --trace or --dry-run. (Brian Candler) - -* Recursive rules are now supported (Tilman Sauerbeck). - -* Added tar.gz and tar.bz2 support to package task (Tilman Sauerbeck). - -* Added warning option for the Test Task (requested by Eric Hodel). - -* The jamis rdoc template is only used if it exists. - -* Added fix for Ruby 1.8.2 test/unit and rails problem. - -* Added contributed rake man file. (Jani Monoses) - -* Fixed documentation that was lacking the Rake module name (Tilman - Sauerbeck). - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -Lots of people provided input to this release. Thanks to Tilman -Sauerbeck for numerous patches, documentation fixes and suggestions. -And for also pushing me to get this release out. Also, thanks to -Brian Candler for the finding and fixing --trace/dry-run fix. That -was an obscure bug. Also to Eric Hodel for some good suggestions. - --- Jim Weirich - diff --git a/doc/release_notes/rake-0.5.3.rdoc b/doc/release_notes/rake-0.5.3.rdoc deleted file mode 100644 index 451da4a0a..000000000 --- a/doc/release_notes/rake-0.5.3.rdoc +++ /dev/null @@ -1,78 +0,0 @@ -= Rake 0.5.3 Released - -Although it has only been two weeks since the last release, we have -enough updates to the Rake program to make it time for another -release. - -== Changes - -Here are the changes for version 0.5.3 ... - -* FileLists have been extensively changed so that they mimic the - behavior of real arrays even more closely. In particular, - operations on FileLists that return a new collection (e.g. collect, - reject) will now return a FileList rather than an array. In - addition, several places where FileLists were not properly expanded - before use have been fixed. - -* A method (+ext+) to simplify the handling of file extensions was - added to String and to Array. - -* The 'testrb' script in test/unit tends to silently swallow syntax - errors in test suites. Because of that, the default test loader is - now a rake-provided script. You can still use 'testrb' by setting - the loader flag in the test task to :testrb. (See the API documents - for TestTask for all the loader flag values). - -* FileUtil methods (e.g. cp, mv, install) are now declared to be - private. This will cut down on the interference with user defined - methods of the same name. - -* Fixed the verbose flag in the TestTask so that the test code is - controlled by the flag. Also shortened up some failure messages. - (Thanks to Tobias Luetke for the suggestion). - -* Rules will now properly detect a task that can generate a source - file. Previously rules would only consider source files that were - already present. - -* Added an +import+ command that allows Rake to dynamically import - dependendencies into a running Rake session. The +import+ command - can run tasks to update the dependency file before loading them. - Dependency files can be in rake or make format, allowing rake to - work with tools designed to generate dependencies for make. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. -Thanks to ... - -* Brian Gernhardt for the rules fix (especially for the patience to - explain the problem to me until I got what he was talking about). -* Stefan Lang for pointing out problems in the dark corners of the - FileList implementation. -* Alexey Verkhovsky pointing out the silently swallows syntax errors - in tests. -* Tobias Luetke for beautifying the test task output. -* Sam Roberts for some of the ideas behind dependency loading. - --- Jim Weirich - diff --git a/doc/release_notes/rake-0.5.4.rdoc b/doc/release_notes/rake-0.5.4.rdoc deleted file mode 100644 index 112587fb9..000000000 --- a/doc/release_notes/rake-0.5.4.rdoc +++ /dev/null @@ -1,46 +0,0 @@ -= Rake 0.5.4 Released - -Time for some minor bug fixes and small enhancements - -== Changes - -Here are the changes for version 0.5.4 ... - -* Added double quotes to the test runner. This allows the location of - the tests (and runner) to be in a directory path that contains - spaces (e.g. "C:/Program Files/ruby/bin"). - -* Added .svn to default ignore list. Now subversion project metadata - is automatically ignored by Rake's FileList. - -* Updated FileList#include to support nested arrays and filelists. - FileLists are flat lists of file names. Using a FileList in an - include will flatten out the nested file names. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. -Thanks to ... - -* Tilman Sauerbeck for the nested FileList suggestion. -* Josh Knowles for pointing out the spaces in directory name problem. - --- Jim Weirich diff --git a/doc/release_notes/rake-0.6.0.rdoc b/doc/release_notes/rake-0.6.0.rdoc deleted file mode 100644 index 340c07bf7..000000000 --- a/doc/release_notes/rake-0.6.0.rdoc +++ /dev/null @@ -1,141 +0,0 @@ -= Rake 0.6.0 Released - -Its time for some long requested enhancements and lots of bug fixes -... And a whole new web page. - -== New Web Page - -The primary documentation for rake has moved from the RubyForge based -wiki to its own Hieraki based web site. Constant spam on the wiki -made it a difficult to keep clean. The new site will be easier to -update and organize. - -Check out the new documentation at: http://docs.rubyrake.org - -We will be adding new documentation to the site as time goes on. - -In addition to the new docs page, make sure you check out Martin -Fowlers article on rake at http://martinfowler.com/articles/rake.html - -== Changes - -=== New Features - -* Multiple prerequisites on Rake rules now allowed. However, keep the - following in mind: - - 1. All the prerequisites of a rule must be available before a rule - is triggered, where "enabled" means (a) an existing file, (b) a - defined rule, or (c) another rule which also must be - trigger-able. - 2. Rules are checked in order of definition, so it is important to - order your rules properly. If a file can be created by two - different rules, put the more specific rule first (otherwise the - more general rule will trigger first and the specific one will - never be triggered). - 3. The source method now returns the name of the first - prerequisite listed in the rule. sources returns the - names of all the rule prerequisites, ordered as they are defined - in the rule. If the task has other prerequisites not defined in - the rule (but defined in an explicit task definition), then they - will _not_ be included in the sources list. - -* FileLists may now use the egrep command. This popular enhancement - is now a core part of the FileList object. If you want to get a - list of all your to-dos, fixmes and TBD comments, add the following - to your Rakefile. - - desc "Look for TODO and FIXME tags in the code" - task :todo do - FileList['**/*.rb'].egrep /#.*(FIXME|TODO|TBD)/ - end - -* The investigation method was added to task object to dump - out some important values. This makes it a bit easier to debug Rake - tasks. - - For example, if you are having problems with a particular task, just - print it out: - - task :huh do - puts Rake::Task['huh'].investigation - end - -* The Rake::TestTask class now supports a "ruby_opts" option to pass - arbitrary ruby options to a test subprocess. - -=== Some Incompatibilities - -* When using the ruby command to start a Ruby subprocess, the - Ruby interpreter that is currently running rake is used by default. - This makes it easier to use rake in an environment with multiple - ruby installation. (Previously, the first ruby command found in the - PATH was used). - - If you wish to chose a different Ruby interpreter, you can - explicitly choose the interpreter via the sh command. - -* The major rake classes (Task, FileTask, FileCreationTask, RakeApp) - have been moved out of the toplevel scope and are now accessible as - Rake::Task, Rake::FileTask, Rake::FileCreationTask and - Rake::Application. If your Rakefile - directly references any one of these tasks, you may: - - 1. Update your Rakefile to use the new classnames - 2. Use the --classic-namespace option on the rake command to get the - old behavior, - 3. Add require 'rake/classic_namespace' to the - Rakefile to get the old behavior. - - rake will print a rather annoying warning whenever a - deprecated class name is referenced without enabling classic - namespace. - -=== Bug Fixes - -* Several unit tests and functional tests were fixed to run better - under windows. - -* Directory tasks are now a specialized version of a File task. A - directory task will only be triggered if it doesn't exist. It will - not be triggered if it is out of date w.r.t. any of its - prerequisites. - -* Fixed a bug in the Rake::GemPackageTask class so that the gem now - properly contains the platform name. - -* Fixed a bug where a prerequisite on a file task would cause - an exception if the prerequisite did not exist. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. -The following people either contributed patches, made suggestions or -made otherwise helpful comments. Thanks to ... - -* Greg Fast (better ruby_opt test options) -* Kelly Felkins (requested by better namespace support) -* Martin Fowler (suggested Task.investigation) -* Stuart Jansen (send initial patch for multiple prerequisites). -* Masao Mutch (better support for non-ruby Gem platforms) -* Philipp Neubeck (patch for file task exception fix) - --- Jim Weirich diff --git a/doc/release_notes/rake-0.7.0.rdoc b/doc/release_notes/rake-0.7.0.rdoc deleted file mode 100644 index b8bf56ebb..000000000 --- a/doc/release_notes/rake-0.7.0.rdoc +++ /dev/null @@ -1,119 +0,0 @@ -= Rake 0.7.0 Released - -These changes for Rake have been brewing for a long time. Here they -are, I hope you enjoy them. - -== Changes - -=== New Features - -* Name space support for task names (see below). - -* Prerequisites can be executed in parallel (see below). - -* Added safe_ln support for openAFS (via Ludvig Omholt). - -* RDoc defaults to internal (in-process) invocation. The old behavior - is still available by setting the +external+ flag to true. - -* Rakefiles are now loaded with the expanded path to prevent - accidental polution from the Ruby load path. - -* Task objects my now be used in prerequisite lists directly. - -* Task objects (in addition to task names) may now be included in the - prerequisite list of a task. - -* Internals cleanup and refactoring. - -=== Bug Fixes - -* Compatibility fixes for Ruby 1.8.4 FileUtils changes. - -=== Namespaces - -Tasks can now be nested inside their own namespaces. Tasks within one -namespace will not accidently interfer with tasks named in a different -namespace. - -For example: - - namespace "main" do - task :build do - # Build the main program - end - end - - namespace "samples" do - task :build do - # Build the sample programs - end - end - - task :build_all => ["main:build", "samples:build"] - -Even though both tasks are named :build, they are separate tasks in -their own namespaces. The :build_all task (defined in the toplevel -namespace) references both build tasks in its prerequisites. - -You may invoke each of the individual build tasks with the following -commands: - - rake main:build - rake samples:build - -Or invoke both via the :build_all command: - - rake build_all - -Namespaces may be nested arbitrarily. Since the name of file tasks -correspond to the name of a file in the external file system, -FileTasks are not affected by the namespaces. - -See the Rakefile format documentation (in the Rake API documents) for -more information. - -=== Parallel Tasks - -Sometimes you have several tasks that can be executed in parallel. By -specifying these tasks as prerequisites to a +multitask+ task. - -In the following example the tasks copy_src, copy_doc and copy_bin -will all execute in parallel in their own thread. - - multitask :copy_files => [:copy_src, :copy_doc, :copy_bin] do - puts "All Copies Complete" - end - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. -The following people either contributed patches, made suggestions or -made otherwise helpful comments. Thanks to ... - -* Doug Young (inspriation for the parallel task) - -* David Heinemeier Hansson (for --trace message enhancement and for - pushing for namespace support). - -* Ludvig Omholt (for the openAFS fix) - --- Jim Weirich diff --git a/doc/release_notes/rake-0.7.1.rdoc b/doc/release_notes/rake-0.7.1.rdoc deleted file mode 100644 index c17088ee9..000000000 --- a/doc/release_notes/rake-0.7.1.rdoc +++ /dev/null @@ -1,59 +0,0 @@ -= Rake 0.7.1 Released - -Version 0.7.1 supplies a bug fix and a few minor enhancements. - -== Changes - -=== Bug Fixes in 0.7.1 - -* Changes in the exception reported for the FileUtils.ln caused - safe_ln to fail with a NotImplementedError. Rake 0.7.1 will now - catch that error or any StandardError and properly fall back to - using +cp+. - -=== New Features in 0.7.1 - -* You can filter the results of the --task option by supplying an - optional regular expression. This allows the user to easily find a - particular task name in a long list of possible names. - -* Transforming procs in a rule may now return a list of prerequisites. - This allows more flexible rule formation. - -* FileList and String now support a +pathmap+ melthod that makes the - transforming paths a bit easier. See the API docs for +pathmap+ for - details. - -* The -f option without a value will disable the search for a - Rakefile. This allows the Rakefile to be defined entirely in a - library (and loaded with the -r option). The current working - directory is not changed when this is done. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. -The following people either contributed patches, made suggestions or -made otherwise helpful comments. Thanks to ... - -* James Britt and Assaph Mehr for reporting and helping to debug the - safe_ln issue. - --- Jim Weirich diff --git a/doc/release_notes/rake-0.7.2.rdoc b/doc/release_notes/rake-0.7.2.rdoc deleted file mode 100644 index ec99ee0c0..000000000 --- a/doc/release_notes/rake-0.7.2.rdoc +++ /dev/null @@ -1,121 +0,0 @@ -= Rake 0.7.2 Released - -Version 0.7.2 supplies a bug fix and a few minor enhancements. In -particular, the new version fixes an incompatibility with the soon to -be released Ruby 1.8.6. We strongly recommend upgrading to Rake 0.7.2 -in order to be compatible with the new version of Ruby. - -== Changes - -=== Bug Fixes in 0.7.2 - -There are quite a number of bug fixes in the new 0.7.2 version of -Rake: - -* Removed dependency on internal fu_xxx functions from FileUtils. - -* Error messages are now send to stderr rather than stdout (from - Payton Quackenbush). - -* Better error handling on invalid command line arguments (from Payton - Quackenbush). - -* Fixed some bugs where the application object was going to the global - appliation instead of using its own data. - -* Fixed the method name leak from FileUtils (bug found by Glenn - Vanderburg). - -* Added test for noop, bad_option and verbose flags to sh command. - -* Added a description to the gem task in GemPackageTask. - -* Fixed a bug when rules have multiple prerequisites (patch by Joel - VanderWerf) - -* Added the handful of RakeFileUtils to the private method as well. - -=== New Features in 0.7.2 - -The following new features are available in Rake version 0.7.2: - -* Added square and curly bracket patterns to FileList#include (Tilman - Sauerbeck). - -* FileLists can now pass a block to FileList#exclude to exclude files - based on calculated values. - -* Added plain filename support to rule dependents (suggested by Nobu - Nakada). - -* Added pathmap support to rule dependents. In other words, if a - pathmap format (beginning with a '%') is given as a Rake rule - dependent, then the name of the depend will be the name of the - target with the pathmap format applied. - -* Added a 'tasks' method to a namespace to get a list of tasks - associated with the namespace. - -* Added tar_command and zip_command options to the Package task. - -* The clean task will no longer delete 'core' if it is a directory. - -=== Internal Rake Improvements - -The following changes will are mainly internal improvements and -refactorings and have little effect on the end user. But they may be -of interest to the general public. - -* Added rcov task and updated unit testing for better code coverage. - -* Added a 'shame' task to the Rakefile. - -* Added rake_extension to handle detection of extension collisions. - -* Added a protected 'require "rubygems"' to test/test_application to - unbreak cruisecontrol.rb. - -* Removed rake_dup. Now we just simply rescue a bad dup. - -* Refactored the FileList reject logic to remove duplication. - -* Removed if __FILE__ at the end of the rake.rb file. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. -The following people either contributed patches, made suggestions or -made otherwise helpful comments. Thanks to ... - -* Payton Quackenbush -- For several error handling improvements. - -* Glenn Vanderburg -- For finding and fixing the method name leak from - FileUtils. - -* Joel VanderWerf -- for finding and fixing a bug in the handling of - multiple prerequisites. - -* Tilman Sauerbeck -- For some enhancing FileList to support more - advanced file globbing. - -* Nobu Nakada -- For suggesting plain file name support to rule dependents. - --- Jim Weirich diff --git a/doc/release_notes/rake-0.7.3.rdoc b/doc/release_notes/rake-0.7.3.rdoc deleted file mode 100644 index 7e9f92198..000000000 --- a/doc/release_notes/rake-0.7.3.rdoc +++ /dev/null @@ -1,47 +0,0 @@ -= Rake 0.7.3 Released - -Rake version 0.7.3 is a minor release that includes some refactoring to better -support custom Rake applications. - -== Changes - -=== New Features in Version 0.7.3 - -* Added the +init+ and +top_level+ methods to make the creation of custom Rake applications a bit easier. E.g. - - gem 'rake', ">= 0.7.3" - require 'rake' - - Rake.application.init('myrake') - - task :default do - something_interesting - end - - Rake.application.top_level - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But instead of -cryptic make recipes, Rake uses standard Ruby code to declare tasks and -dependencies. You have the full power of a modern scripting language built -right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.0.rdoc b/doc/release_notes/rake-0.8.0.rdoc deleted file mode 100644 index 4fc7fdd7b..000000000 --- a/doc/release_notes/rake-0.8.0.rdoc +++ /dev/null @@ -1,114 +0,0 @@ -= Rake 0.8.0/0.8.1 Released - -Rake version 0.8.0 is a new release of rake that includes serveral new -features. - -== Changes - -=== New Features in Version 0.8.0 - -* Tasks can now receive command line parameters. See the examples - below for more details. - -* Comments are limited to 80 columns on output, but full comments can - be seen by using the -D parameter. (feature suggested by Jamis - Buck). - -* Explicit exit(n) calls will now set the exit status to n. (patch - provided by Stephen Touset). - -* Rake is now compatible with Ruby 1.9. - -Version 0.8.1 is a minor update that includes additional Ruby 1.9 -compatibility fixes. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Task Argument Examples - -Prior to version 0.8.0, rake was only able to handle command line -arguments of the form NAME=VALUE that were passed into Rake via the -ENV hash. Many folks had asked for some kind of simple command line -arguments, perhaps using "--" to separate regular task names from -argument values on the command line. The problem is that there was no -easy way to associate positional arguments on the command line with -different tasks. Suppose both tasks :a and :b expect a command line -argument: does the first value go with :a? What if :b is run first? -Should it then get the first command line argument. - -Rake 0.8.0 solves this problem by explicitly passing values directly -to the tasks that need them. For example, if I had a release task -that required a version number, I could say: - - rake release[0.8.0] - -And the string "0.8.0" will be passed to the :release task. Multiple -arguments can be passed by separating them with a comma, for example: - - rake name[john,doe] - -Just a few words of caution. The rake task name and its arguments -need to be a single command line argument to rake. This generally -means no spaces. If spaces are needed, then the entire rake + -argument string should be quoted. Something like this: - - rake "name[billy bob, smith]" - -(Quoting rules vary between operating systems and shells, so make sure -you consult the proper docs for your OS/shell). - -=== Tasks that Expect Parameters - -Parameters are only given to tasks that are setup to expect them. In -order to handle named parameters, the task declaration syntax for -tasks has been extended slightly. - -For example, a task that needs a first name and last name might be -declared as: - - task :name, :first_name, :last_name - -The first argument is still the name of the task (:name in this case). -The next to argumements are the names of the parameters expected by -:name (:first_name and :last_name in the example). - -To access the values of the paramters, the block defining the task -behaviour can now accept a second parameter: - - task :name, :first_name, :last_name do |t, args| - puts "First name is #{args.first_name}" - puts "Last name is #{args.last_name}" - end - -The first argument of the block "t" is always bound to the current -task object. The second argument "args" is an open-struct like object -that allows access to the task arguments. Extra command line -arguments to a task are ignored. Missing command line arguments are -given the nil value. - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Jamis Buck (for comment formatting suggestions) -* Stephen Touset (for exit status patch). - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.2.rdoc b/doc/release_notes/rake-0.8.2.rdoc deleted file mode 100644 index a822a9497..000000000 --- a/doc/release_notes/rake-0.8.2.rdoc +++ /dev/null @@ -1,165 +0,0 @@ -= Rake 0.8.2 Released - -Rake version 0.8.2 is a new release of rake that includes a number of -new features and numerous bug fixes. - -== Changes - -=== New Features in Version 0.8.2 - -* Switched from getoptlong to optparse (patches supplied by Edwin - Pratomo). - -* The -T option will now attempt to dynamically sense the size of the - terminal. The -T output will only self-truncate if the output is a - tty. However, if RAKE_COLUMNS is explicitly set, it will be honored - in any case. (Patch provided by Gavin Stark). - -* The following public methods have been added to rake task objects: - - * task.clear -- Clear both the prerequisites and actions of the - target rake task. - * task.clear_prerequisites -- Clear all the existing prerequisites - from the target rake task. - * task.clear_actions -- Clear all the existing actions from the - target rake task. - * task.reenable -- Re-enable a task, allowing its actions to be - executed again if the task is invoked. - -* Changed RDoc test task to have no default template. This makes it - easier for the tempate to pick up the template from the environment. - -* Default values for task arguments can easily be specified with the - :with_defaults method. (Idea for default argument merging supplied - by (Adam Q. Salter) - -=== Bug Fixes in Version 0.8.2 - -* Fixed bug in package task so that it will include the subdir - directory in the package for testing. (Bug found by Adam Majer) - -* Fixed filename dependency order bug in test_inspect_pending and - test_to_s_pending. (Bug found by Adam Majer) - -* Fixed check for file utils options to make them immune to the - symbol/string differences. (Patch supplied by Edwin Pratomo) - -* Fixed bug with rules involving multiple source, where only the first - dependency of a rule has any effect (Patch supplied by Emanuel - Indermühle) - -* FileList#clone and FileList#dup have better sematics w.r.t. taint - and freeze. - -* Changed from using Mutex to Monitor. Evidently Mutex causes thread - join errors when Ruby is compiled with -disable-pthreads. (Patch - supplied by Ittay Dror) - -* Fixed bug in makefile parser that had problems with extra spaces in - file task names. (Patch supplied by Ittay Dror) - -== Other changes in Version 0.8.2 - -* Added ENV var to rake's own Rakefile to prevent OS X from including - extended attribute junk in the rake package tar file. (Bug found by - Adam Majer) - -* Added a performance patch for reading large makefile dependency - files. (Patch supplied by Ittay Dror) - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Task Argument Examples - -Prior to version 0.8.0, rake was only able to handle command line -arguments of the form NAME=VALUE that were passed into Rake via the -ENV hash. Many folks had asked for some kind of simple command line -arguments, perhaps using "--" to separate regular task names from -argument values on the command line. The problem is that there was no -easy way to associate positional arguments on the command line with -different tasks. Suppose both tasks :a and :b expect a command line -argument: does the first value go with :a? What if :b is run first? -Should it then get the first command line argument. - -Rake 0.8.0 solves this problem by explicitly passing values directly -to the tasks that need them. For example, if I had a release task -that required a version number, I could say: - - rake release[0.8.2] - -And the string "0.8.2" will be passed to the :release task. Multiple -arguments can be passed by separating them with a comma, for example: - - rake name[john,doe] - -Just a few words of caution. The rake task name and its arguments -need to be a single command line argument to rake. This generally -means no spaces. If spaces are needed, then the entire rake + -argument string should be quoted. Something like this: - - rake "name[billy bob, smith]" - -(Quoting rules vary between operating systems and shells, so make sure -you consult the proper docs for your OS/shell). - -=== Tasks that Expect Parameters - -Parameters are only given to tasks that are setup to expect them. In -order to handle named parameters, the task declaration syntax for -tasks has been extended slightly. - -For example, a task that needs a first name and last name might be -declared as: - - task :name, :first_name, :last_name - -The first argument is still the name of the task (:name in this case). -The next to argumements are the names of the parameters expected by -:name (:first_name and :last_name in the example). - -To access the values of the paramters, the block defining the task -behaviour can now accept a second parameter: - - task :name, :first_name, :last_name do |t, args| - puts "First name is #{args.first_name}" - puts "Last name is #{args.last_name}" - end - -The first argument of the block "t" is always bound to the current -task object. The second argument "args" is an open-struct like object -that allows access to the task arguments. Extra command line -arguments to a task are ignored. Missing command line arguments are -given the nil value. - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Edwin Pratomo -* Gavin Stark -* Adam Q. Salter -* Adam Majer -* Emanuel Indermühle -* Ittay Dror -* Bheeshmar Redheendran (for spending an afternoon with me debugging - windows issues) - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.3.rdoc b/doc/release_notes/rake-0.8.3.rdoc deleted file mode 100644 index 97184c390..000000000 --- a/doc/release_notes/rake-0.8.3.rdoc +++ /dev/null @@ -1,112 +0,0 @@ -= Rake 0.8.3 Released - -Rake version 0.8.3 is a bug-fix release of rake. - -== Changes - -=== Bug Fixes in Version 0.8.3 - -* Enhanced the system directory detection in windows. We now check - HOMEDRIVE/HOMEPATH and USERPROFILE if APPDATA isn't found. (Patch - supplied by James Tucker). Rake no long aborts if it can't find the - directory. - -* Added fix to handle ruby installations in directories with spaces in - their name. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 - -== Task Argument Examples - -Prior to version 0.8.0, rake was only able to handle command line -arguments of the form NAME=VALUE that were passed into Rake via the -ENV hash. Many folks had asked for some kind of simple command line -arguments, perhaps using "--" to separate regular task names from -argument values on the command line. The problem is that there was no -easy way to associate positional arguments on the command line with -different tasks. Suppose both tasks :a and :b expect a command line -argument: does the first value go with :a? What if :b is run first? -Should it then get the first command line argument. - -Rake 0.8.0 solves this problem by explicitly passing values directly -to the tasks that need them. For example, if I had a release task -that required a version number, I could say: - - rake release[0.8.3] - -And the string "0.8.3" will be passed to the :release task. Multiple -arguments can be passed by separating them with a comma, for example: - - rake name[john,doe] - -Just a few words of caution. The rake task name and its arguments -need to be a single command line argument to rake. This generally -means no spaces. If spaces are needed, then the entire rake + -argument string should be quoted. Something like this: - - rake "name[billy bob, smith]" - -(Quoting rules vary between operating systems and shells, so make sure -you consult the proper docs for your OS/shell). - -=== Tasks that Expect Parameters - -Parameters are only given to tasks that are setup to expect them. In -order to handle named parameters, the task declaration syntax for -tasks has been extended slightly. - -For example, a task that needs a first name and last name might be -declared as: - - task :name, :first_name, :last_name - -The first argument is still the name of the task (:name in this case). -The next to argumements are the names of the parameters expected by -:name (:first_name and :last_name in the example). - -To access the values of the paramters, the block defining the task -behaviour can now accept a second parameter: - - task :name, :first_name, :last_name do |t, args| - puts "First name is #{args.first_name}" - puts "Last name is #{args.last_name}" - end - -The first argument of the block "t" is always bound to the current -task object. The second argument "args" is an open-struct like object -that allows access to the task arguments. Extra command line -arguments to a task are ignored. Missing command line arguments are -given the nil value. - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Edwin Pratomo -* Gavin Stark -* Adam Q. Salter -* Adam Majer -* Emanuel Indermühle -* Ittay Dror -* Bheeshmar Redheendran (for spending an afternoon with me debugging - windows issues) - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.4.rdoc b/doc/release_notes/rake-0.8.4.rdoc deleted file mode 100644 index d27de8b27..000000000 --- a/doc/release_notes/rake-0.8.4.rdoc +++ /dev/null @@ -1,147 +0,0 @@ -= Rake 0.8.4 Released - -Rake version 0.8.4 is a bug-fix release of rake. - -NOTE: The version of Rake that comes with Ruby 1.9 has diverged - slightly from the core Rake code base. Rake 0.8.4 will work - with Ruby 1.9, but is not a strict upgrade for the Rake that - comes with Ruby 1.9. A (near) future release of Rake will unify - those two codebases. - -== Letter Writing Campaign - -Thanks to Aaron Patterson (@tenderlove) and Eric Hodel (@drbrain) for -their encouraging support in organizing a letter writing campaign to -lobby for the "Warning Free" release of rake 0.8.4. A special callout -goes to Jonathan D. Lord, Sr (Dr. Wingnut) whose postcard was the -first to actually reach me. (see -http://tenderlovemaking.com/2009/02/26/we-need-a-new-version-of-rake/ -for details) - -== Changes - -=== New Features / Enhancements in Version 0.8.4 - -* Case is preserved on rakefile names. (patch from James - M. Lawrence/quix) - -* Improved Rakefile case insensitivity testing (patch from Luis - Lavena). - -* Windows system dir search order is now: HOME, HOMEDRIVE + HOMEPATH, - APPDATA, USERPROFILE (patch from Luis Lavena) - -* MingGW is now recognized as a windows platform. (patch from Luis - Lavena) - -=== Bug Fixes in Version 0.8.4 - -* Removed reference to manage_gem to fix the warning produced by the - gem package task. - -* Fixed stray ARGV option problem that was interfering with - Test::Unit::Runner. (patch from Pivotal Labs) - -=== Infrastructure Improvements in Version 0.8.4 - -* Numerous fixes to the windows test suite (patch from Luis Lavena). - -* Improved Rakefile case insensitivity testing (patch from Luis - Lavena). - -* Better support for windows paths in the test task (patch from Simon - Chiang/bahuvrihi) - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Task Argument Examples - -Prior to version 0.8.0, rake was only able to handle command line -arguments of the form NAME=VALUE that were passed into Rake via the -ENV hash. Many folks had asked for some kind of simple command line -arguments, perhaps using "--" to separate regular task names from -argument values on the command line. The problem is that there was no -easy way to associate positional arguments on the command line with -different tasks. Suppose both tasks :a and :b expect a command line -argument: does the first value go with :a? What if :b is run first? -Should it then get the first command line argument. - -Rake 0.8.0 solves this problem by explicitly passing values directly -to the tasks that need them. For example, if I had a release task -that required a version number, I could say: - - rake release[0.8.4] - -And the string "0.8.4" will be passed to the :release task. Multiple -arguments can be passed by separating them with a comma, for example: - - rake name[john,doe] - -Just a few words of caution. The rake task name and its arguments -need to be a single command line argument to rake. This generally -means no spaces. If spaces are needed, then the entire rake + -argument string should be quoted. Something like this: - - rake "name[billy bob, smith]" - -(Quoting rules vary between operating systems and shells, so make sure -you consult the proper docs for your OS/shell). - -=== Tasks that Expect Parameters - -Parameters are only given to tasks that are setup to expect them. In -order to handle named parameters, the task declaration syntax for -tasks has been extended slightly. - -For example, a task that needs a first name and last name might be -declared as: - - task :name, :first_name, :last_name - -The first argument is still the name of the task (:name in this case). -The next to argumements are the names of the parameters expected by -:name (:first_name and :last_name in the example). - -To access the values of the paramters, the block defining the task -behaviour can now accept a second parameter: - - task :name, :first_name, :last_name do |t, args| - puts "First name is #{args.first_name}" - puts "Last name is #{args.last_name}" - end - -The first argument of the block "t" is always bound to the current -task object. The second argument "args" is an open-struct like object -that allows access to the task arguments. Extra command line -arguments to a task are ignored. Missing command line arguments are -given the nil value. - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence/quix -* Luis Lavena -* Pivotal Labs -* Simon Chiang/bahuvrihi - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.5.rdoc b/doc/release_notes/rake-0.8.5.rdoc deleted file mode 100644 index 0ee2583dd..000000000 --- a/doc/release_notes/rake-0.8.5.rdoc +++ /dev/null @@ -1,53 +0,0 @@ -= Rake 0.8.5 Released - -Rake version 0.8.5 is a new release of Rake with greatly improved -support for executing commands on Windows. The "sh" command now has -the same semantics on Windows that it has on Unix based platforms. - -== Changes - -=== New Features / Enhancements in Version 0.8.5 - -* Improved implementation of the Rake system command for Windows. - (patch from James M. Lawrence/quix) - -* Support for Ruby 1.9's improved system command. (patch from James - M. Lawrence/quix) - -* Rake now includes the configured extension when invoking an - executable (Config::CONFIG['EXEEXT]) - -=== Bug Fixes in Version 0.8.5 - -* Environment variable keys are now correctly cased (it matters in - some implementations). - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence/quix -* Luis Lavena - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.6.rdoc b/doc/release_notes/rake-0.8.6.rdoc deleted file mode 100644 index 54782ed02..000000000 --- a/doc/release_notes/rake-0.8.6.rdoc +++ /dev/null @@ -1,37 +0,0 @@ -= Rake 0.8.6 Released - -Rake version 0.8.5 introduced greatly improved support for executing -commands on Windows. The "sh" command now has the same semantics on -Windows that it has on Unix based platforms. - -Rake version 0.8.5 includes minor fixes the the RDoc generation. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence/quix -* Luis Lavena - --- Jim Weirich diff --git a/doc/release_notes/rake-0.8.7.rdoc b/doc/release_notes/rake-0.8.7.rdoc deleted file mode 100644 index 884f4c659..000000000 --- a/doc/release_notes/rake-0.8.7.rdoc +++ /dev/null @@ -1,55 +0,0 @@ -= Rake 0.8.7 Released - -Rake version 0.8.5 introduced greatly improved support for executing -commands on Windows. The "sh" command now has the same semantics on -Windows that it has on Unix based platforms. - -Rake version 0.8.6 includes minor fixes the the RDoc generation. -Rake version 0.8.7 includes a minor fix for JRuby running on windows. - -== Changes - -=== New Features / Enhancements in Version 0.8.5 - -* Improved implementation of the Rake system command for Windows. - (patch from James M. Lawrence/quix) - -* Support for Ruby 1.9's improved system command. (patch from James - M. Lawrence/quix) - -* Rake now includes the configured extension when invoking an - executable (Config::CONFIG['EXEEXT]) - -=== Bug Fixes in Version 0.8.5 - -* Environment variable keys are now correctly cased (it matters in - some implementations). - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Charles Nutter - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.0.rdoc b/doc/release_notes/rake-0.9.0.rdoc deleted file mode 100644 index 823483cc2..000000000 --- a/doc/release_notes/rake-0.9.0.rdoc +++ /dev/null @@ -1,112 +0,0 @@ -= Rake 0.9.0 Released - -Rake version 0.9.0 has a number of bug fixes and enhancments (see -below for more details). Additionally, the internals have be slightly -restructured and improved. - -== Changes - -=== New Features / Enhancements / Bug Fixes in Version 0.9.0 - -* Rake now warns when the deprecated :needs syntax used (and suggests - the proper syntax in the warning). - -* Moved Rake DSL commands to top level ruby object 'main'. Rake DSL - commands are no longer private methods in Object. (Suggested by - James M. Lawrence/quix) - -* Rake now uses case-insensitive comparisons to find the Rakefile on Windows. - Based on patch by Roger Pack. - -* Rake now requires (instead of loads) files in the test task. Patch by Cezary - Baginski. - -* Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow. - -* Rake now prints the Rakefile directory only when it's different from the - current directory. Patch by Alex Chaffee. - -* Improved rakefile_location discovery on Windows. Patch by James Tucker. - -* Rake now recognizes "Windows Server" as a windows system. Patch by Matthias - Lüdtke - -* Rake::RDocTask is deprecated. Use RDoc::Task from RDoc 2.4.2+ (require - 'rdoc/task') - -* Rake::GemPackageTask is deprecated. Use Gem::PackageTask (require - 'rubygems/package_task') - -* Rake now outputs various messages to $stderr instead of $stdout. - -* Rake no longer emits warnings for Config. Patch by Santiago Pastorino. - -* Removed Rake's DSL methods from the top level scope. If you need to - call 'task :xzy' in your code, include Rake::DSL into your class, or - put the code in a Rake::DSL.environment do ... end block. - -* Split rake.rb into individual files. - -* Support for the --where (-W) flag for showing where a task is defined. - -* Fixed quoting in test task. - (http://onestepback.org/redmine/issues/show/44, - http://www.pivotaltracker.com/story/show/1223138) - -* Fixed the silent option parsing problem. - (http://onestepback.org/redmine/issues/show/47) - -* Fixed :verbose=>false flag on sh and ruby commands. - -* Rake command line options may be given by default in a RAKEOPT - environment variable. - -* Errors in Rake will now display the task invocation chain in effect - at the time of the error. - -* Accepted change by warnickr to not expand test patterns in shell - (allowing more files in the test suite). - -* Fixed that file tasks did not perform prereq lookups in scope - (Redmine #57). - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence (quix) -* Roger Pack -* Cezary Baginski -* Sean Scot August Moon -* R.T. Lechow -* Alex Chaffee -* James Tucker -* Matthias Lüdtke -* Santiago Pastorino - -Also, bit thanks to Eric Hodel for assisting with getting this release -out the door (where "assisting" includes, but is not by any means -limited to, "pushing" me to get it done). - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.1.rdoc b/doc/release_notes/rake-0.9.1.rdoc deleted file mode 100644 index 70be8b568..000000000 --- a/doc/release_notes/rake-0.9.1.rdoc +++ /dev/null @@ -1,52 +0,0 @@ -= Rake 0.9.1 Released - -Rake version 0.9.1 has a number of bug fixes and enhancments (see -below for more details). Additionally, the internals have be slightly -restructured and improved. - -== Changes - -Rake 0.9.1 adds back the global DSL methods, but with deprecation -messages. This allows Rake 0.9.1 to be used with older rakefiles with -warning messages. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence (quix) -* Roger Pack -* Cezary Baginski -* Sean Scot August Moon -* R.T. Lechow -* Alex Chaffee -* James Tucker -* Matthias Lüdtke -* Santiago Pastorino - -Also, bit thanks to Eric Hodel for assisting with getting this release -out the door (where "assisting" includes, but is not by any means -limited to, "pushing" me to get it done). - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.2.2.rdoc b/doc/release_notes/rake-0.9.2.2.rdoc deleted file mode 100644 index d848f227b..000000000 --- a/doc/release_notes/rake-0.9.2.2.rdoc +++ /dev/null @@ -1,55 +0,0 @@ -= Rake 0.9.2.2 Released - -Rake version 0.9.2.2 is mainly bug fixes. - -== Changes - -* The rake test loader now removes arguments it has processed. Issue #51 -* Rake::TaskArguments now responds to #values_at -* RakeFileUtils.verbose_flag = nil silences output the same as 0.8.7 -* Rake tests are now directory-independent -* Rake tests are no longer require flexmock -* Commands constant is no longer polluting top level namespace. -* Show only the interesting portion of the backtrace by default (James M. Lawrence). -* Added --reduce-compat option to remove backward compatible DSL hacks (James M. Lawrence). - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence (quix) -* Roger Pack -* Cezary Baginski -* Sean Scot August Moon -* R.T. Lechow -* Alex Chaffee -* James Tucker -* Matthias Lüdtke -* Santiago Pastorino - -Also, bit thanks to Eric Hodel for assisting with getting this release -out the door (where "assisting" includes, but is not by any means -limited to, "pushing" me to get it done). - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.2.rdoc b/doc/release_notes/rake-0.9.2.rdoc deleted file mode 100644 index 2314193f5..000000000 --- a/doc/release_notes/rake-0.9.2.rdoc +++ /dev/null @@ -1,49 +0,0 @@ -= Rake 0.9.2 Released - -Rake version 0.9.2 has a few small fixes. See below for details. - -== Changes - -* Support for Ruby 1.8.6 was fixed. -* Global DSL warnings now honor --no-deprecate - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://rake.rubyforge.org/ -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* James M. Lawrence (quix) -* Roger Pack -* Cezary Baginski -* Sean Scot August Moon -* R.T. Lechow -* Alex Chaffee -* James Tucker -* Matthias Lüdtke -* Santiago Pastorino - -Also, bit thanks to Eric Hodel for assisting with getting this release -out the door (where "assisting" includes, but is not by any means -limited to, "pushing" me to get it done). - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.3.rdoc b/doc/release_notes/rake-0.9.3.rdoc deleted file mode 100644 index 4476b4f18..000000000 --- a/doc/release_notes/rake-0.9.3.rdoc +++ /dev/null @@ -1,102 +0,0 @@ -= Rake 0.9.3 Released - -Rake version 0.9.3 contains some new, backwards compatible features and -a number of bug fixes. - -== Changes - -=== New Features - -* Multitask tasks now use a thread pool. Use -j to limit the number of - available threads. - -* Use -m to turn regular tasks into multitasks (use at your own risk). - -* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to - programatically add rake task libraries. - -* You can specific backtrace suppression patterns (see - --supress-backtrace) - -* Directory tasks can now take prerequisites and actions - -* Use --backtrace to request a full backtrace without the task trace. - -* You can say "--backtrace=stdout" and "--trace=stdout" to route trace - output to standard output rather than standard error. - -* Optional 'phony' target (enable with 'require 'rake/phony'") for - special purpose builds. - -* Task#clear now clears task comments as well as actions and - prerequisites. Task#clear_comment will specifically target comments. - -* The --all option will force -T and -D to consider all the tasks, - with and without descriptions. - -=== Bug Fixes - -* Semi-colons in windows rakefile paths now work. - -* Improved Control-C support when invoking multiple test suites. - -* egrep method now reads files in text mode (better support for - Windows) - -* Better deprecation line number reporting. - -* The -W option now works with all tasks, whether they have a - description or not. - -* File globs in rake should not be sorted alphabetically, independent - of file system and platform. - -* Numerous internal improvements. - -* Documentation typos and fixes. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.4.rdoc b/doc/release_notes/rake-0.9.4.rdoc deleted file mode 100644 index 099ebc91b..000000000 --- a/doc/release_notes/rake-0.9.4.rdoc +++ /dev/null @@ -1,60 +0,0 @@ -= Rake 0.9.4 Released - -Rake version 0.9.4 contains a number of bug fixes. - -== Changes - -=== Bug Fixes (0.9.4) - -* Exit status with failing tests is not correctly set to non-zero. - -* Simplified syntax for phony task (for older versions of RDoc). - -* Stand alone FileList usage gets glob function (without loading in - extra dependencies) - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.5.rdoc b/doc/release_notes/rake-0.9.5.rdoc deleted file mode 100644 index 40c35ee69..000000000 --- a/doc/release_notes/rake-0.9.5.rdoc +++ /dev/null @@ -1,55 +0,0 @@ -= Rake 0.9.5 Released - -Rake version 0.9.5 contains a number of bug fixes. - -== Changes - -=== Bug Fixes (0.9.5) - -* --trace and --backtrace no longer swallow following task names. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-0.9.6.rdoc b/doc/release_notes/rake-0.9.6.rdoc deleted file mode 100644 index fb247e794..000000000 --- a/doc/release_notes/rake-0.9.6.rdoc +++ /dev/null @@ -1,64 +0,0 @@ -= Rake 0.9.6 Released - -Rake version 0.9.6 contains a number of fixes mainly for merging -Rake into the Ruby source tree and fixing tests. - -== Changes - -=== Bug Fixes (0.9.6) - -* Better trace output when using a multi-threaded Rakefile. -* Arg parsing is now consistent for tasks and multitasks. -* Skip exit code test in versions of Ruby that don't support it well. - -Changes for better integration with the Ruby source tree: - -* Fix version literal for Ruby source tree build. -* Better loading of libraries for testing in Ruby build. -* Use the ruby version provided by Ruby's tests. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a alot of these changes. The -following people either contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-10.0.0.rdoc b/doc/release_notes/rake-10.0.0.rdoc deleted file mode 100644 index 7bf68fb73..000000000 --- a/doc/release_notes/rake-10.0.0.rdoc +++ /dev/null @@ -1,178 +0,0 @@ -= Rake 10.0 Released - - "Jim, when will Rake reach version 1.0?" - -Over the past several years I've been asked that question at -conferences, panels and over twitter. Due to historical reasons (or -maybe just plain laziness) Rake has (incorrectly) been treating the -second digit of the version as the major release number. So in my head -Rake was already at version 9. - -Well, it's time to fix things. This next version of Rake drops old, -crufty, backwards compatibility hacks such as top level constants, DSL -methods defined in Object and numerous other features that are just no -longer desired. It's also time to drop the leading zero from the -version number as well and call this new version of rake what it -really is: Version 10. - -So, welcome to Rake 10.0! - -Rake 10 is actually feature identical to the latest version of Rake 9 -(that would be the version spelled 0.9.3), *except* that Rake 10 drops -all the sundry deprecated features that have accumulated over the years. - -If your Rakefile is up to date and current with all the new features -of Rake 10, you are ready to go. If your Rakefile still uses a few -deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same -feature set. Just be aware that future features will be in Rake 10 -family line. - -== Changes in 10.0 - -As mentioned above, there are no new features in Rake 10. However, -there are a number of features missing: - -* Classic namespaces are now gone. Rake is no longer able to reflect - the options settings in the global variables ($rakefile, $show_tasks, - $show_prereqs, $trace, $dryrun and $silent). The - --classic-namespace option is no longer supported. - -* Global constants are no longer supported. This includes - Task, FileTask, FileCreationTask and - RakeApp). The constant missing hook to warn about using - global rake constants has been removed. - -* The Rake DSL methods (task, file, directory, etc) are in their own - module (Rake::DSL). The stub versions of these methods (that printed - warnings) in Object have been removed. However, the DSL methods are - added to the top-level main object. Since main is - not in the inheritance tree, the presence of the DSL methods in main - should be low impact on other libraries. - - If you want to use the Rake DSL commands from your own code, just - include Rake::DSL into your own classes and modules. - -* The deprecated syntax for task arguments (the one using - :needs) has been removed. - -* The --reduce-compat flag has been removed (it's not needed - anymore). - -* The deprecated rake/sys.rb library has been removed. - -* The deprecated rake/rdoctask.rb library has been removed. - RDoc supplies its own rake task now. - -* The deprecated rake/gempackagetask.rb library has been - removed. Gem supplies its own package task now. - -There is one small behavioral change: - -* Non-file tasks now always report the current time as their time - stamp. This is different from the previous behavior where non-file - tasks reported current time only if there were no prerequisites, and - the max prerequisite timestamp otherwise. This lead to inconsistent - and surprising behavior when adding prerequisites to tasks that in - turn were prequisites to file tasks. The new behavior is more - consistent and predictable. - -== Changes (from 0.9.3) - -Since Rake 10 includes the changes from the last version of Rake 9, -we'll repeat the changes for version 0.9.3 here. - -=== New Features - -* Multitask tasks now use a thread pool. Use -j to limit the number of - available threads. - -* Use -m to turn regular tasks into multitasks (use at your own risk). - -* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to - programatically add rake task libraries. - -* You can specific backtrace suppression patterns (see - --supress-backtrace) - -* Directory tasks can now take prerequisites and actions - -* Use --backtrace to request a full backtrace without the task trace. - -* You can say "--backtrace=stdout" and "--trace=stdout" to route trace - output to standard output rather than standard error. - -* Optional 'phony' target (enable with 'require 'rake/phony'") for - special purpose builds. - -* Task#clear now clears task comments as well as actions and - prerequisites. Task#clear_comment will specifically target comments. - -* The --all option will force -T and -D to consider all the tasks, - with and without descriptions. - -=== Bug Fixes - -* Semi-colons in windows rakefile paths now work. - -* Improved Control-C support when invoking multiple test suites. - -* egrep method now reads files in text mode (better support for - Windows) - -* Better deprecation line number reporting. - -* The -W option now works with all tasks, whether they have a - description or not. - -* File globs in rake should not be sorted alphabetically, independent - of file system and platform. - -* Numerous internal improvements. - -* Documentation typos and fixes. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a lot of these changes. The -following people contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-10.0.1.rdoc b/doc/release_notes/rake-10.0.1.rdoc deleted file mode 100644 index 152af25a5..000000000 --- a/doc/release_notes/rake-10.0.1.rdoc +++ /dev/null @@ -1,58 +0,0 @@ -= Rake 10.0.1 Released - -== Changes in 10.0.1 - -=== Bug Fixes - -* Exit status with failing tests is not correctly set to non-zero. - -* Simplified syntax for phony task (for older versions of RDoc). - -* Stand alone FileList usage gets glob function (without loading in - extra dependencies) - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a lot of these changes. The -following people contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-10.0.2.rdoc b/doc/release_notes/rake-10.0.2.rdoc deleted file mode 100644 index bb6bda874..000000000 --- a/doc/release_notes/rake-10.0.2.rdoc +++ /dev/null @@ -1,53 +0,0 @@ -= Rake 10.0.2 Released - -== Changes in Rake 10.0.2 - -=== Bug Fixes - -* --trace and --backtrace no longer swallow following task names. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a lot of these changes. The -following people contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-10.0.3.rdoc b/doc/release_notes/rake-10.0.3.rdoc deleted file mode 100644 index dbc84c1c1..000000000 --- a/doc/release_notes/rake-10.0.3.rdoc +++ /dev/null @@ -1,191 +0,0 @@ -= Rake 10.0.3 Released - - "Jim, when will Rake reach version 1.0?" - -Over the past several years I've been asked that question at -conferences, panels and over twitter. Due to historical reasons (or -maybe just plain laziness) Rake has (incorrectly) been treating the -second digit of the version as the major release number. So in my head -Rake was already at version 9. - -Well, it's time to fix things. This next version of Rake drops old, -crufty, backwards compatibility hacks such as top level constants, DSL -methods defined in Object and numerous other features that are just no -longer desired. It's also time to drop the leading zero from the -version number as well and call this new version of rake what it -really is: Version 10. - -So, welcome to Rake 10.0! - -Rake 10 is actually feature identical to the latest version of Rake 9 -(that would be the version spelled 0.9.3), *except* that Rake 10 drops -all the sundry deprecated features that have accumulated over the years. - -If your Rakefile is up to date and current with all the new features -of Rake 10, you are ready to go. If your Rakefile still uses a few -deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same -feature set. Just be aware that future features will be in Rake 10 -family line. - -== Changes in Version 10 - -As mentioned above, there are no new features in Rake 10. However, -there are a number of features missing: - -* Classic namespaces are now gone. Rake is no longer able to reflect - the options settings in the global variables ($rakefile, $show_tasks, - $show_prereqs, $trace, $dryrun and $silent). The - --classic-namespace option is no longer supported. - -* Global constants are no longer supported. This includes - Task, FileTask, FileCreationTask and - RakeApp). The constant missing hook to warn about using - global rake constants has been removed. - -* The Rake DSL methods (task, file, directory, etc) are in their own - module (Rake::DSL). The stub versions of these methods (that printed - warnings) in Object have been removed. However, the DSL methods are - added to the top-level main object. Since main is - not in the inheritance tree, the presence of the DSL methods in main - should be low impact on other libraries. - - If you want to use the Rake DSL commands from your own code, just - include Rake::DSL into your own classes and modules. - -* The deprecated syntax for task arguments (the one using - :needs) has been removed. - -* The --reduce-compat flag has been removed (it's not needed - anymore). - -* The deprecated rake/sys.rb library has been removed. - -* The deprecated rake/rdoctask.rb library has been removed. - RDoc supplies its own rake task now. - -* The deprecated rake/gempackagetask.rb library has been - removed. Gem supplies its own package task now. - -There is one small behavioral change: - -* Non-file tasks now always report the current time as their time - stamp. This is different from the previous behavior where non-file - tasks reported current time only if there were no prerequisites, and - the max prerequisite timestamp otherwise. This lead to inconsistent - and surprising behavior when adding prerequisites to tasks that in - turn were prequisites to file tasks. The new behavior is more - consistent and predictable. - -== Changes (from 0.9.3, 0.9.4, 0.9.5) - -Since Rake 10 includes the changes from the last version of Rake 9, -we'll repeat the changes for versions 0.9.3 through 0.9.5 here. - -=== New Features (in 0.9.3) - -* Multitask tasks now use a thread pool. Use -j to limit the number of - available threads. - -* Use -m to turn regular tasks into multitasks (use at your own risk). - -* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to - programatically add rake task libraries. - -* You can specific backtrace suppression patterns (see - --supress-backtrace) - -* Directory tasks can now take prerequisites and actions - -* Use --backtrace to request a full backtrace without the task trace. - -* You can say "--backtrace=stdout" and "--trace=stdout" to route trace - output to standard output rather than standard error. - -* Optional 'phony' target (enable with 'require 'rake/phony'") for - special purpose builds. - -* Task#clear now clears task comments as well as actions and - prerequisites. Task#clear_comment will specifically target comments. - -* The --all option will force -T and -D to consider all the tasks, - with and without descriptions. - -=== Bug Fixes (in 0.9.3) - -* Semi-colons in windows rakefile paths now work. - -* Improved Control-C support when invoking multiple test suites. - -* egrep method now reads files in text mode (better support for - Windows) - -* Better deprecation line number reporting. - -* The -W option now works with all tasks, whether they have a - description or not. - -* File globs in rake should not be sorted alphabetically, independent - of file system and platform. - -* Numerous internal improvements. - -* Documentation typos and fixes. - -=== Bug Fixes (in 0.9.4) - -* Exit status with failing tests is not correctly set to non-zero. - -* Simplified syntax for phony task (for older versions of RDoc). - -* Stand alone FileList usage gets glob function (without loading in - extra dependencies) - -=== Bug Fixes (in 0.9.5) - -* --trace and --backtrace no longer swallow following task names. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more traditional places: - -Home Page:: http://github.com/jimweirich/rake -Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a lot of these changes. The -following people contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Aaron Patterson -* Dylan Smith -* Jo Liss -* Jonas Pfenniger -* Kazuki Tsujimoto -* Michael Bishop -* Michael Elufimov -* NAKAMURA Usaku -* Ryan Davis -* Sam Grönblom -* Sam Phippen -* Sergio Wong -* Tay Ray Chuan -* grosser -* quix - -Also, many thanks to Eric Hodel for assisting with getting this release -out the door. - --- Jim Weirich diff --git a/doc/release_notes/rake-10.1.0.rdoc b/doc/release_notes/rake-10.1.0.rdoc deleted file mode 100644 index a9f4bb396..000000000 --- a/doc/release_notes/rake-10.1.0.rdoc +++ /dev/null @@ -1,61 +0,0 @@ -= Rake 10.1.0 Released - -== Changes in Version 10.1 - -=== New Features - -* Add support for variable length task argument lists. If more actual - arguments are supplied than named arguments, then the extra - arguments values will be in args.extras. - -* Application name is not displayed in the help banner. (Previously - "rake" was hardcoded, now rake-based applications can display their - own names). - -=== Bug Fixes - -Bug fixes include: - -* Fix backtrace suppression issues. - -* Rules now explicit get task arguments passed to them. - -* Rename FileList#exclude? to FileList#exclude_from_list? to avoid - conflict with new Rails method. - -* Clean / Clobber tasks now report failure to remove files. - -* Plus heaps of internal code cleanup. - -== What is Rake - -Rake is a build tool similar to the make program in many ways. But -instead of cryptic make recipes, Rake uses standard Ruby code to -declare tasks and dependencies. You have the full power of a modern -scripting language built right into your build tool. - -== Availability - -The easiest way to get and install rake is via RubyGems ... - - gem install rake (you may need root/admin privileges) - -Otherwise, you can get it from the more from GitHub: - -GitHub:: git://github.com/jimweirich/rake.git - -== Thanks - -As usual, it was input from users that drove a lot of these changes. -The following people contributed patches, made suggestions or made -otherwise helpful comments. Thanks to ... - -* Michael Nikitochkin (general code cleanup) -* Vipul A M (general code cleanup) -* Dennis Bell (variable length task argument lists) -* Jacob Swanner (rules arguments) -* Rafael Rosa Fu (documentation typo) -* Stuart Nelson (install.rb fixes) -* Lee Hambley (application name in help banner) - --- Jim Weirich From 111f29554298eccc41144c10fd501012c242b348 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 18 Aug 2016 22:11:12 +0900 Subject: [PATCH 566/813] generate gh-pages task --- Rakefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Rakefile b/Rakefile index 97c22a45f..fdba19ad8 100644 --- a/Rakefile +++ b/Rakefile @@ -26,4 +26,13 @@ RDoc::Task.new do |doc| doc.rdoc_dir = 'html' end +task :ghpages => :rdoc do + `git checkout gh-pages` + require 'fileutils' + FileUtils.rm_rf '/tmp/html' + FileUtils.mv 'html', '/tmp' + FileUtils.rm_rf '*' + FileUtils.cp_r Dir.glob('/tmp/html/*'), '.' +end + task :default => :test From 0f0a870e0d74c2152d71306109f8d3db54239162 Mon Sep 17 00:00:00 2001 From: Jesse Bowes Date: Thu, 25 Aug 2016 09:54:44 -0600 Subject: [PATCH 567/813] #156 Remove arguments on clear --- lib/rake/task.rb | 9 ++++++++- test/test_rake_task.rb | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 1f4f591d5..b1356ed89 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -141,11 +141,12 @@ def reenable @already_invoked = false end - # Clear the existing prerequisites and actions of a rake task. + # Clear the existing prerequisites, actions, comments, and arguments of a rake task. def clear clear_prerequisites clear_actions clear_comments + clear_args self end @@ -167,6 +168,12 @@ def clear_comments self end + # Clear the existing arguments on a rake task. + def clear_args + @arg_names = nil + self + end + # Invoke the task if it is needed. Prerequisites are invoked first. def invoke(*args) task_args = TaskArguments.new(arg_names, args) diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 9a4c3fc23..91185257c 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -112,11 +112,12 @@ def test_can_double_invoke_with_reenable def test_clear desc "a task" - t = task("t" => "a") { } + t = task("t", ["b"] => "a") { } t.clear assert t.prerequisites.empty?, "prerequisites should be empty" assert t.actions.empty?, "actions should be empty" assert_nil t.comment, "comments should be empty" + assert_empty t.arg_names, "arg names should be empty" end def test_clear_prerequisites @@ -148,6 +149,18 @@ def test_clear_comments assert_equal 1, task(:foo).actions.size end + def test_clear_args + task :foo, [:x] do + # Dummy action + end + + task(:foo).clear_args + + task :foo + + assert_empty task(:foo).arg_names + end + def test_find task :tfind assert_equal "tfind", Task[:tfind].name From 20ae9ff3a87bfd06a6203154f5c697d19086d91f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 26 Aug 2016 11:13:47 +0900 Subject: [PATCH 568/813] History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 188b12f34..21366be0c 100644 --- a/History.rdoc +++ b/History.rdoc @@ -2,6 +2,7 @@ Compatibility Changes: +* Remove arguments on clear #157 by Jesse Bowes * Removed `rake/contrib` packages. These are extracted to `rake-contrib` gem. * Removed to deprecated warnings for `last\_comment`. From 3576c22c2e4816f1f5ff51f46ec3b6693027f6a2 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 27 Aug 2016 17:28:08 +0900 Subject: [PATCH 569/813] replaced 10.1.1 release changes --- History.rdoc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/History.rdoc b/History.rdoc index 21366be0c..f39a48728 100644 --- a/History.rdoc +++ b/History.rdoc @@ -229,11 +229,10 @@ Bug fixes: * Fixed bug in can\_detect\_signals? in test. Patch from #243 by Alexey Borzenkov. -=== 10.1.1 and earlier +=== 10.1.1 -Additions to the old CHANGES file were not made consistently so some -versions are missing from this file. These changes are usually described in -the individual release notes files. +* Use http://github.com/jimweirich/rake instead of http://rake.rubyforge.org for + canonical project url. === 10.1.0 From 9ecb16e9fef43927bd08bfb3436fb589191454e8 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 27 Aug 2016 17:30:25 +0900 Subject: [PATCH 570/813] formatting for rdoc --- History.rdoc | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/History.rdoc b/History.rdoc index f39a48728..be971eab8 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,6 +1,6 @@ === 12.0.0(dev) -Compatibility Changes: +==== Compatibility Changes * Remove arguments on clear #157 by Jesse Bowes * Removed `rake/contrib` packages. These are extracted to `rake-contrib` gem. @@ -8,19 +8,19 @@ Compatibility Changes: === 11.2.2 / 2016-06-12 -Bug fixes: +==== Bug fixes * Fix unexpected behavior with multiple dependencies on Rake::TestTask === 11.2.1 / 2016-06-12 -Bug fixes: +==== Bug fixes * Fix regression of dependencies handling on Rake::TestTask. Report #139 === 11.2.0 / 2016-06-11 -Bug fixes: +==== Bug fixes * Fix unexpected cut-out behavior on task description using triple dots and exclamation. Report #106 from Stephan Kämper and Pull request #134 by Lee @@ -28,7 +28,7 @@ Bug fixes: by bakunyo * Ignore to use `hwprefs` on Darwin platform. Use sysctl now. Report #128 -Enhancements: +==== Enhancements * Spawn options for sh Pull equest #138 by Eric Hodel. * Allow to specify dependencies(prerequisites) for Rake::TestTask @@ -40,39 +40,39 @@ Enhancements: === 11.1.2 / 2016-03-28 -Bug fixes: +==== Bug fixes * Remove `-W` option when Rake::TestTask#verbose enabled. It's misunderstanding specification change with Rake 11. Partly revert #67 === 11.1.1 / 2016-03-14 -Bug fixes: +==== Bug fixes * Use `-W` instead of `--verbose` when Rake::TestTask#verbose enabled. JRuby doesn't have `--verbose` option. === 11.1.0 / 2016-03-11 -Compatibility Changes: +==== Compatibility Changes * Revert to remove `last\_comment`. It will remove Rake 12. === 11.0.1 / 2016-03-09 -Bug fixes: +==== Bug fixes * Fixed packaging manifest. === 11.0.0 / 2016-03-09 -Bug fixes: +==== Bug fixes * Correctly handle bad encoding in exception messages. Pull request #113 by Tomer Brisker * Fix verbose option at TestTask. Pull request #67 by Mike Blumtritt -Enhancements: +==== Enhancements * Make FileList#exclude more analogous to FileList#include. * Use IO.open instead of Open3.popen3 for CPU counter. @@ -86,7 +86,7 @@ Enhancements: Pull request #12 by Chris Keathley * Use ruby warnings by default. Pull request #97 by Harold Giménez -Compatibility Changes: +==== Compatibility Changes * Removed to support Ruby 1.8.x * Removed constant named `RAKEVERSION` @@ -100,7 +100,7 @@ Compatibility Changes: === 10.5.0 / 2016-01-13 -Enhancements: +==== Enhancements * Removed monkey patching for Ruby 1.8. Pull request #46 by Pablo Herrero. * Inheritance class of Rake::FileList returns always self class. @@ -108,7 +108,7 @@ Enhancements: === 10.4.2 / 2014-12-02 -Bug fixes: +==== Bug fixes * Rake no longer edits ARGV. This allows you to re-exec rake from a rake task. Pull requset #9 by Matt Palmer. @@ -119,14 +119,14 @@ Bug fixes: === 10.4.1 / 2014-12-01 -Bug fixes: +==== Bug fixes * Reverted fix for #277 as it caused numerous issues for rake users. rails/spring issue #366 by Gustavo Dutra. === 10.4.0 / 2014-11-22 -Enhancements: +==== Enhancements * Upgraded to minitest 5. Pull request #292 by Teo Ljungberg. * Added support for Pathname in rake tasks. Pull request #271 by Randy @@ -137,7 +137,7 @@ Enhancements: task. Issue #277 by Matt Palmer. * Etc.nprocessors is used for counting the number of CPUs. -Bug fixes: +==== Bug fixes * Updated rake manpage. Issue #283 by Nathan Long, pull request #291 by skittleys. @@ -150,7 +150,7 @@ Bug fixes: === 10.3.2 / 2014-05-15 -Bug fixes: +==== Bug fixes * Rake no longer infinitely loops when showing exception causes that refer to each other. Bug #272 by Chris Bandy. @@ -158,7 +158,7 @@ Bug fixes: === 10.3.1 / 2014-04-17 -Bug fixes: +==== Bug fixes * Really stop reporting an error when cleaning already-deleted files. Pull request #269 by Randy Coulman @@ -166,13 +166,13 @@ Bug fixes: === 10.3 / 2014-04-15 -Enhancements: +==== Enhancements * Added --build-all option to rake which treats all file prerequisites as out-of-date. Pull request #254 by Andrew Gilbert. * Added Rake::NameSpace#scope. Issue #263 by Jon San Miguel. -Bug fixes: +==== Bug fixes * Suppress org.jruby package files in rake error messages for JRuby users. Issue #213 by Charles Nutter. @@ -184,13 +184,13 @@ Bug fixes: === 10.2.2 / 2014-03-27 -Bug fixes: +==== Bug fixes * Restored Ruby 1.8.7 compatibility === 10.2.1 / 2014-03-25 -Bug fixes: +==== Bug fixes * File tasks including a ':' are now top-level tasks again. Issue #262 by Josh Holtrop. @@ -199,7 +199,7 @@ Bug fixes: === 10.2.0 / 2014-03-24 -Enhancements: +==== Enhancements * Rake now requires Ruby 1.9 or newer. For me, this is a breaking change, but it seems that Jim planned to release it with Rake 10.2. See also pull @@ -217,7 +217,7 @@ Enhancements: Filip Hrbek. * Rake now prints the exception class on errors. Patch #251 by David Cornu. -Bug fixes: +==== Bug fixes * Fixed typos. Pull request #256 by Valera Rozuvan, #250 via Jake Worth, #260 by Zachary Scott. From 01657b91e0bbde0a3b1530ac165eaa8a1cb07d5d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 28 Aug 2016 08:18:36 +0900 Subject: [PATCH 571/813] Added help message for -AT combination fix GH-155 --- lib/rake/application.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 23db9b890..7e1ba9a52 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -550,7 +550,8 @@ def standard_rake_options # :nodoc: ], ['--tasks', '-T [PATTERN]', "Display the tasks (matching optional PATTERN) " + - "with descriptions, then exit.", + "with descriptions, then exit. " + + "-AT combination displays all of tasks contained no description.", lambda { |value| select_tasks_to_show(options, :tasks, value) } From 443e1cc64a0acb20aa8798b255c2779cb89ba94d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 17:19:54 +0900 Subject: [PATCH 572/813] added global configuration for rubocop --- .rubocop.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index 385e49289..860acafbb 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,9 @@ +AllCops: + TargetRubyVersion: 2.3 + DisabledByDefault: true + Exclude: + - rake.gemspec + StringLiterals: Enabled: false From deb7c2ac15fa59ebea9331f24b4859c70c25add2 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 17:20:11 +0900 Subject: [PATCH 573/813] expand line length to 120chars --- .rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 860acafbb..1c1a6fcfd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -15,7 +15,7 @@ HashSyntax: LineLength: Enabled: true - Max: 90 + Max: 120 WhileUntilModifier: Enabled: false From f8f686ec84ba4166623bcd791f608f66d0f2ad49 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 17:22:19 +0900 Subject: [PATCH 574/813] enforce to use Ruby 1.9 style hash syntax --- .rubocop.yml | 4 ++-- Rakefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 1c1a6fcfd..6e330f411 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -10,8 +10,8 @@ StringLiterals: SpaceAroundEqualsInParameterDefault: Enabled: false -HashSyntax: - Enabled: false +Style/HashSyntax: + Enabled: true LineLength: Enabled: true diff --git a/Rakefile b/Rakefile index fdba19ad8..7741400fe 100644 --- a/Rakefile +++ b/Rakefile @@ -26,7 +26,7 @@ RDoc::Task.new do |doc| doc.rdoc_dir = 'html' end -task :ghpages => :rdoc do +task ghpages: :rdoc do `git checkout gh-pages` require 'fileutils' FileUtils.rm_rf '/tmp/html' @@ -35,4 +35,4 @@ task :ghpages => :rdoc do FileUtils.cp_r Dir.glob('/tmp/html/*'), '.' end -task :default => :test +task default: :test From 7863b97587e3d4c0e3d4e5f51fb04c54f063fb39 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 17:25:29 +0900 Subject: [PATCH 575/813] prefer to use double quotes string literals --- .rubocop.yml | 5 +- Gemfile | 2 +- Rakefile | 26 +- exe/rake | 2 +- lib/rake.rb | 68 ++--- lib/rake/application.rb | 130 ++++----- lib/rake/backtrace.rb | 2 +- lib/rake/clean.rb | 4 +- lib/rake/cpu_counter.rb | 2 +- lib/rake/dsl_definition.rb | 2 +- lib/rake/ext/pathname.rb | 6 +- lib/rake/ext/string.rb | 42 +-- lib/rake/file_creation_task.rb | 4 +- lib/rake/file_list.rb | 12 +- lib/rake/file_task.rb | 4 +- lib/rake/file_utils.rb | 18 +- lib/rake/file_utils_ext.rb | 6 +- lib/rake/late_time.rb | 2 +- lib/rake/loaders/makefile.rb | 8 +- lib/rake/packagetask.rb | 10 +- lib/rake/phony.rb | 2 +- lib/rake/rake_module.rb | 2 +- lib/rake/rake_test_loader.rb | 2 +- lib/rake/rule_recursion_overflow_error.rb | 2 +- lib/rake/task.rb | 2 +- lib/rake/task_arguments.rb | 2 +- lib/rake/task_manager.rb | 6 +- lib/rake/tasklib.rb | 2 +- lib/rake/testtask.rb | 28 +- lib/rake/thread_history_display.rb | 2 +- lib/rake/thread_pool.rb | 4 +- lib/rake/version.rb | 4 +- lib/rake/win32.rb | 16 +- test/helper.rb | 76 +++--- test/support/rakefile_definitions.rb | 40 +-- test/test_private_reader.rb | 4 +- test/test_rake.rb | 16 +- test/test_rake_application.rb | 80 +++--- test/test_rake_application_options.rb | 136 +++++----- test/test_rake_backtrace.rb | 10 +- test/test_rake_clean.rb | 12 +- test/test_rake_cpu_counter.rb | 4 +- test/test_rake_definitions.rb | 6 +- test/test_rake_directory_task.rb | 28 +- test/test_rake_dsl.rb | 2 +- test/test_rake_early_time.rb | 2 +- test/test_rake_extension.rb | 4 +- test/test_rake_file_creation_task.rb | 6 +- test/test_rake_file_list.rb | 252 +++++++++--------- test/test_rake_file_list_path_map.rb | 8 +- test/test_rake_file_task.rb | 34 +-- test/test_rake_file_utils.rb | 72 ++--- test/test_rake_functional.rb | 48 ++-- test/test_rake_invocation_chain.rb | 4 +- test/test_rake_late_time.rb | 4 +- test/test_rake_linked_list.rb | 2 +- test/test_rake_makefile_loader.rb | 22 +- test/test_rake_multi_task.rb | 8 +- test/test_rake_name_space.rb | 6 +- test/test_rake_package_task.rb | 54 ++-- test/test_rake_path_map.rb | 2 +- test/test_rake_path_map_explode.rb | 26 +- test/test_rake_path_map_partial.rb | 2 +- test/test_rake_pathname_extensions.rb | 4 +- test/test_rake_pseudo_status.rb | 2 +- test/test_rake_rake_test_loader.rb | 10 +- test/test_rake_reduce_compat.rb | 4 +- test/test_rake_require.rb | 10 +- test/test_rake_rules.rb | 108 ++++---- test/test_rake_scope.rb | 2 +- test/test_rake_task.rb | 14 +- test/test_rake_task_argument_parsing.rb | 8 +- test/test_rake_task_arguments.rb | 36 +-- test/test_rake_task_manager.rb | 14 +- ...t_rake_task_manager_argument_resolution.rb | 2 +- test/test_rake_task_with_arguments.rb | 2 +- test/test_rake_test_task.rb | 54 ++-- test/test_rake_thread_pool.rb | 4 +- test/test_rake_top_level_functions.rb | 12 +- test/test_rake_win32.rb | 46 ++-- test/test_thread_history_display.rb | 4 +- test/test_trace_output.rb | 4 +- 82 files changed, 870 insertions(+), 869 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 6e330f411..0fe6f92e9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,8 +4,9 @@ AllCops: Exclude: - rake.gemspec -StringLiterals: - Enabled: false +Style/StringLiterals: + Enabled: true + EnforcedStyle: double_quotes SpaceAroundEqualsInParameterDefault: Enabled: false diff --git a/Gemfile b/Gemfile index fa75df156..b4e2a20bb 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ -source 'https://rubygems.org' +source "https://rubygems.org" gemspec diff --git a/Rakefile b/Rakefile index 7741400fe..e0d2ced3d 100644 --- a/Rakefile +++ b/Rakefile @@ -6,33 +6,33 @@ # This file may be distributed under an MIT style license. See # MIT-LICENSE for details. -lib = File.expand_path('../lib', __FILE__) +lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require 'bundler/gem_tasks' -require 'rake/testtask' -require 'rdoc/task' +require "bundler/gem_tasks" +require "rake/testtask" +require "rdoc/task" Rake::TestTask.new(:test) do |t| t.libs << "test" t.verbose = true - t.test_files = FileList['test/**/test_*.rb'] + t.test_files = FileList["test/**/test_*.rb"] end RDoc::Task.new do |doc| - doc.main = 'README.rdoc' - doc.title = 'Rake -- Ruby Make' + doc.main = "README.rdoc" + doc.title = "Rake -- Ruby Make" doc.rdoc_files = FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc] - doc.rdoc_dir = 'html' + doc.rdoc_dir = "html" end task ghpages: :rdoc do `git checkout gh-pages` - require 'fileutils' - FileUtils.rm_rf '/tmp/html' - FileUtils.mv 'html', '/tmp' - FileUtils.rm_rf '*' - FileUtils.cp_r Dir.glob('/tmp/html/*'), '.' + require "fileutils" + FileUtils.rm_rf "/tmp/html" + FileUtils.mv "html", "/tmp" + FileUtils.rm_rf "*" + FileUtils.cp_r Dir.glob("/tmp/html/*"), "." end task default: :test diff --git a/exe/rake b/exe/rake index f1ac568c6..a00975f30 100755 --- a/exe/rake +++ b/exe/rake @@ -22,6 +22,6 @@ # IN THE SOFTWARE. #++ -require 'rake' +require "rake" Rake.application.run diff --git a/lib/rake.rb b/lib/rake.rb index a2f1b448e..ece6882c6 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -22,44 +22,44 @@ module Rake; end -require 'rake/version' +require "rake/version" -require 'rbconfig' -require 'fileutils' -require 'singleton' -require 'monitor' -require 'optparse' -require 'ostruct' +require "rbconfig" +require "fileutils" +require "singleton" +require "monitor" +require "optparse" +require "ostruct" -require 'rake/ext/string' -require 'rake/ext/fixnum' +require "rake/ext/string" +require "rake/ext/fixnum" -require 'rake/win32' +require "rake/win32" -require 'rake/linked_list' -require 'rake/cpu_counter' -require 'rake/scope' -require 'rake/task_argument_error' -require 'rake/rule_recursion_overflow_error' -require 'rake/rake_module' -require 'rake/trace_output' -require 'rake/pseudo_status' -require 'rake/task_arguments' -require 'rake/invocation_chain' -require 'rake/task' -require 'rake/file_task' -require 'rake/file_creation_task' -require 'rake/multi_task' -require 'rake/dsl_definition' -require 'rake/file_utils_ext' -require 'rake/file_list' -require 'rake/default_loader' -require 'rake/early_time' -require 'rake/late_time' -require 'rake/name_space' -require 'rake/task_manager' -require 'rake/application' -require 'rake/backtrace' +require "rake/linked_list" +require "rake/cpu_counter" +require "rake/scope" +require "rake/task_argument_error" +require "rake/rule_recursion_overflow_error" +require "rake/rake_module" +require "rake/trace_output" +require "rake/pseudo_status" +require "rake/task_arguments" +require "rake/invocation_chain" +require "rake/task" +require "rake/file_task" +require "rake/file_creation_task" +require "rake/multi_task" +require "rake/dsl_definition" +require "rake/file_utils_ext" +require "rake/file_list" +require "rake/default_loader" +require "rake/early_time" +require "rake/late_time" +require "rake/name_space" +require "rake/task_manager" +require "rake/application" +require "rake/backtrace" $trace = false diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 7e1ba9a52..464b11374 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -1,11 +1,11 @@ -require 'optparse' +require "optparse" -require 'rake/task_manager' -require 'rake/file_list' -require 'rake/thread_pool' -require 'rake/thread_history_display' -require 'rake/trace_output' -require 'rake/win32' +require "rake/task_manager" +require "rake/file_list" +require "rake/thread_pool" +require "rake/thread_history_display" +require "rake/trace_output" +require "rake/win32" module Rake @@ -38,16 +38,16 @@ class Application attr_writer :tty_output DEFAULT_RAKEFILES = [ - 'rakefile', - 'Rakefile', - 'rakefile.rb', - 'Rakefile.rb' + "rakefile", + "Rakefile", + "rakefile.rb", + "Rakefile.rb" ].freeze # Initialize a Rake::Application object. def initialize super - @name = 'rake' + @name = "rake" @rakefiles = DEFAULT_RAKEFILES.dup @rakefile = nil @pending_imports = [] @@ -56,11 +56,11 @@ def initialize @default_loader = Rake::DefaultLoader.new @original_dir = Dir.pwd @top_level_tasks = [] - add_loader('rb', DefaultLoader.new) - add_loader('rf', DefaultLoader.new) - add_loader('rake', DefaultLoader.new) + add_loader("rb", DefaultLoader.new) + add_loader("rf", DefaultLoader.new) + add_loader("rake", DefaultLoader.new) @tty_output = STDOUT.tty? - @terminal_columns = ENV['RAKE_COLUMNS'].to_i + @terminal_columns = ENV["RAKE_COLUMNS"].to_i end # Run the Rake application. The run method performs the following @@ -82,7 +82,7 @@ def run end # Initialize the command line parameters and app name. - def init(app_name='rake') + def init(app_name="rake") standard_exception_handling do @name = app_name args = handle_options @@ -259,7 +259,7 @@ def have_rakefile # :nodoc: if File.exist?(fn) others = FileList.glob(fn, File::FNM_CASEFOLD) return others.size == 1 ? others.first : fn - elsif fn == '' + elsif fn == "" return fn end end @@ -342,7 +342,7 @@ def dynamic_width_tput # :nodoc: end def unix? # :nodoc: - RbConfig::CONFIG['host_os'] =~ + RbConfig::CONFIG["host_os"] =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i end @@ -385,38 +385,38 @@ def sort_options(options) # :nodoc: def standard_rake_options # :nodoc: sort_options( [ - ['--all', '-A', + ["--all", "-A", "Show all tasks, even uncommented ones (in combination with -T or -D)", lambda { |value| options.show_all_tasks = value } ], - ['--backtrace=[OUT]', + ["--backtrace=[OUT]", "Enable full backtrace. OUT can be stderr (default) or stdout.", lambda { |value| options.backtrace = true - select_trace_output(options, 'backtrace', value) + select_trace_output(options, "backtrace", value) } ], - ['--build-all', '-B', + ["--build-all", "-B", "Build all prerequisites, including those which are up-to-date.", lambda { |value| options.build_all = true } ], - ['--comments', + ["--comments", "Show commented tasks only", lambda { |value| options.show_all_tasks = !value } ], - ['--describe', '-D [PATTERN]', + ["--describe", "-D [PATTERN]", "Describe the tasks (matching optional PATTERN), then exit.", lambda { |value| select_tasks_to_show(options, :describe, value) } ], - ['--dry-run', '-n', + ["--dry-run", "-n", "Do a dry run without executing actions.", lambda { |value| Rake.verbose(true) @@ -425,30 +425,30 @@ def standard_rake_options # :nodoc: options.trace = true } ], - ['--execute', '-e CODE', + ["--execute", "-e CODE", "Execute some Ruby code and exit.", lambda { |value| eval(value) exit } ], - ['--execute-print', '-p CODE', + ["--execute-print", "-p CODE", "Execute some Ruby code, print the result, then exit.", lambda { |value| puts eval(value) exit } ], - ['--execute-continue', '-E CODE', + ["--execute-continue", "-E CODE", "Execute some Ruby code, " + "then continue with normal task processing.", lambda { |value| eval(value) } ], - ['--jobs', '-j [NUMBER]', + ["--jobs", "-j [NUMBER]", "Specifies the maximum number of tasks to execute in parallel. " + "(default is number of CPU cores + 4)", lambda { |value| - if value.nil? || value == '' + if value.nil? || value == "" value = Fixnum::MAX elsif value =~ /^\d+$/ value = value.to_i @@ -459,7 +459,7 @@ def standard_rake_options # :nodoc: options.thread_pool_size = value - 1 } ], - ['--job-stats [LEVEL]', + ["--job-stats [LEVEL]", "Display job statistics. " + "LEVEL=history displays a complete job list", lambda { |value| @@ -470,42 +470,42 @@ def standard_rake_options # :nodoc: end } ], - ['--libdir', '-I LIBDIR', + ["--libdir", "-I LIBDIR", "Include LIBDIR in the search path for required modules.", lambda { |value| $:.push(value) } ], - ['--multitask', '-m', + ["--multitask", "-m", "Treat all tasks as multitasks.", lambda { |value| options.always_multitask = true } ], - ['--no-search', '--nosearch', - '-N', "Do not search parent directories for the Rakefile.", + ["--no-search", "--nosearch", + "-N", "Do not search parent directories for the Rakefile.", lambda { |value| options.nosearch = true } ], - ['--prereqs', '-P', + ["--prereqs", "-P", "Display the tasks and dependencies, then exit.", lambda { |value| options.show_prereqs = true } ], - ['--quiet', '-q', + ["--quiet", "-q", "Do not log messages to standard output.", lambda { |value| Rake.verbose(false) } ], - ['--rakefile', '-f [FILENAME]', + ["--rakefile", "-f [FILENAME]", "Use FILENAME as the rakefile to search for.", lambda { |value| - value ||= '' + value ||= "" @rakefiles.clear @rakefiles << value } ], - ['--rakelibdir', '--rakelib', '-R RAKELIBDIR', + ["--rakelibdir", "--rakelib", "-R RAKELIBDIR", "Auto-import any .rake files in RAKELIBDIR. " + "(default is 'rakelib')", lambda { |value| options.rakelib = value.split(File::PATH_SEPARATOR) } ], - ['--require', '-r MODULE', + ["--require", "-r MODULE", "Require MODULE before executing rakefile.", lambda { |value| begin @@ -519,11 +519,11 @@ def standard_rake_options # :nodoc: end } ], - ['--rules', + ["--rules", "Trace the rules resolution.", lambda { |value| options.trace_rules = true } ], - ['--silent', '-s', + ["--silent", "-s", "Like --quiet, but also suppresses the " + "'in directory' announcement.", lambda { |value| @@ -531,24 +531,24 @@ def standard_rake_options # :nodoc: options.silent = true } ], - ['--suppress-backtrace PATTERN', + ["--suppress-backtrace PATTERN", "Suppress backtrace lines matching regexp PATTERN. " + "Ignored if --trace is on.", lambda { |value| options.suppress_backtrace_pattern = Regexp.new(value) } ], - ['--system', '-g', + ["--system", "-g", "Using system wide (global) rakefiles " + "(usually '~/.rake/*.rake').", lambda { |value| options.load_system = true } ], - ['--no-system', '--nosystem', '-G', + ["--no-system", "--nosystem", "-G", "Use standard project Rakefile search paths, " + "ignore system wide rakefiles.", lambda { |value| options.ignore_system = true } ], - ['--tasks', '-T [PATTERN]', + ["--tasks", "-T [PATTERN]", "Display the tasks (matching optional PATTERN) " + "with descriptions, then exit. " + "-AT combination displays all of tasks contained no description.", @@ -556,35 +556,35 @@ def standard_rake_options # :nodoc: select_tasks_to_show(options, :tasks, value) } ], - ['--trace=[OUT]', '-t', + ["--trace=[OUT]", "-t", "Turn on invoke/execute tracing, enable full backtrace. " + "OUT can be stderr (default) or stdout.", lambda { |value| options.trace = true options.backtrace = true - select_trace_output(options, 'trace', value) + select_trace_output(options, "trace", value) Rake.verbose(true) } ], - ['--verbose', '-v', + ["--verbose", "-v", "Log message to standard output.", lambda { |value| Rake.verbose(true) } ], - ['--version', '-V', + ["--version", "-V", "Display the program version.", lambda { |value| puts "rake, version #{Rake::VERSION}" exit } ], - ['--where', '-W [PATTERN]', + ["--where", "-W [PATTERN]", "Describe the tasks (matching optional PATTERN), then exit.", lambda { |value| select_tasks_to_show(options, :lines, value) options.show_all_tasks = true } ], - ['--no-deprecation-warnings', '-X', + ["--no-deprecation-warnings", "-X", "Disable the deprecation warnings.", lambda { |value| options.ignore_deprecate = true @@ -595,7 +595,7 @@ def standard_rake_options # :nodoc: def select_tasks_to_show(options, show_tasks, value) # :nodoc: options.show_tasks = show_tasks - options.show_task_pattern = Regexp.new(value || '') + options.show_task_pattern = Regexp.new(value || "") Rake::TaskManager.record_task_metadata = true end private :select_tasks_to_show @@ -603,9 +603,9 @@ def select_tasks_to_show(options, show_tasks, value) # :nodoc: def select_trace_output(options, trace_option, value) # :nodoc: value = value.strip unless value.nil? case value - when 'stdout' + when "stdout" options.trace_output = $stdout - when 'stderr', nil + when "stderr", nil options.trace_output = $stderr else fail CommandLineOptionError, @@ -618,7 +618,7 @@ def select_trace_output(options, trace_option, value) # :nodoc: # arguments that we didn't understand, which should (in theory) be just # task names and env vars. def handle_options # :nodoc: - options.rakelib = ['rakelib'] + options.rakelib = ["rakelib"] options.trace_output = $stderr OptionParser.new do |opts| @@ -632,7 +632,7 @@ def handle_options # :nodoc: end standard_rake_options.each { |args| opts.on(*args) } - opts.environment('RAKEOPT') + opts.environment("RAKEOPT") end.parse(ARGV) end @@ -685,7 +685,7 @@ def raw_load_rakefile # :nodoc: Dir.chdir(location) print_rakefile_directory(location) Rake.load_rakefile(File.expand_path(@rakefile)) if - @rakefile && @rakefile != '' + @rakefile && @rakefile != "" options.rakelib.each do |rlib| glob("#{rlib}/*.rake") do |name| add_import name @@ -696,7 +696,7 @@ def raw_load_rakefile # :nodoc: end def glob(path, &block) # :nodoc: - FileList.glob(path.tr("\\", '/')).each(&block) + FileList.glob(path.tr("\\", "/")).each(&block) end private :glob @@ -704,8 +704,8 @@ def glob(path, &block) # :nodoc: def system_dir # :nodoc: @system_dir ||= begin - if ENV['RAKE_SYSTEM'] - ENV['RAKE_SYSTEM'] + if ENV["RAKE_SYSTEM"] + ENV["RAKE_SYSTEM"] else standard_system_dir end @@ -719,7 +719,7 @@ def standard_system_dir #:nodoc: end else def standard_system_dir #:nodoc: - File.join(File.expand_path('~'), '.rake') + File.join(File.expand_path("~"), ".rake") end end private :standard_system_dir @@ -778,7 +778,7 @@ def rakefile_location(backtrace=caller) # :nodoc: re = /^#{@rakefile}$/ re = /#{re.source}/i if windows? - backtrace.find { |str| str =~ re } || '' + backtrace.find { |str| str =~ re } || "" end end diff --git a/lib/rake/backtrace.rb b/lib/rake/backtrace.rb index 9edf33ef1..a89dd9f4d 100644 --- a/lib/rake/backtrace.rb +++ b/lib/rake/backtrace.rb @@ -10,7 +10,7 @@ module Backtrace # :nodoc: all reject { |s| s.nil? || s =~ /^ *$/ } SUPPRESSED_PATHS_RE = SUPPRESSED_PATHS.map { |f| Regexp.quote(f) }.join("|") SUPPRESSED_PATHS_RE << "|^org\\/jruby\\/\\w+\\.java" if - Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby' + Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == "jruby" SUPPRESS_PATTERN = %r!(\A(#{SUPPRESSED_PATHS_RE})|bin/rake:\d+)!i diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index a2375aa99..1e5da81cb 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -11,7 +11,7 @@ # The intent of this task is to return a project to its # pristine, just unpacked state. -require 'rake' +require "rake" # :stopdoc: @@ -60,7 +60,7 @@ def cant_be_deleted?(path_name) CLEAN = ::Rake::FileList["**/*~", "**/*.bak", "**/core"] CLEAN.clear_exclude.exclude { |fn| - fn.pathmap("%f").downcase == 'core' && File.directory?(fn) + fn.pathmap("%f").downcase == "core" && File.directory?(fn) } desc "Remove any temporary products." diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index fc8848a5d..82a5eb8aa 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -14,7 +14,7 @@ def count_with_default(default=4) end begin - require 'etc' + require "etc" rescue LoadError else if Etc.respond_to?(:nprocessors) diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index 340cb580a..c52bd601f 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -1,5 +1,5 @@ # Rake DSL functions. -require 'rake/file_utils_ext' +require "rake/file_utils_ext" module Rake diff --git a/lib/rake/ext/pathname.rb b/lib/rake/ext/pathname.rb index 49e2cd47a..30130cd1a 100644 --- a/lib/rake/ext/pathname.rb +++ b/lib/rake/ext/pathname.rb @@ -1,5 +1,5 @@ -require 'rake/ext/core' -require 'pathname' +require "rake/ext/core" +require "pathname" class Pathname @@ -7,7 +7,7 @@ class Pathname # Return a new Pathname with String#ext applied to it. # # This Pathname extension comes from Rake - def ext(newext='') + def ext(newext="") Pathname.new(Rake.from_pathname(self).ext(newext)) end end diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb index f212223e4..37764c845 100644 --- a/lib/rake/ext/string.rb +++ b/lib/rake/ext/string.rb @@ -1,4 +1,4 @@ -require 'rake/ext/core' +require "rake/ext/core" class String @@ -10,9 +10,9 @@ class String # +ext+ is a user added method for the String class. # # This String extension comes from Rake - def ext(newext='') - return self.dup if ['.', '..'].include? self - if newext != '' + def ext(newext="") + return self.dup if [".", ".."].include? self + if newext != "" newext = "." + newext unless newext =~ /^\./ end self.chomp(File.extname(self)) << newext @@ -26,8 +26,8 @@ def ext(newext='') def pathmap_explode head, tail = File.split(self) return [self] if head == self - return [tail] if head == '.' || tail == '/' - return [head, tail] if head == '/' + return [tail] if head == "." || tail == "/" + return [head, tail] if head == "/" return head.pathmap_explode + [tail] end protected :pathmap_explode @@ -57,15 +57,15 @@ def pathmap_partial(n) # This String extension comes from Rake def pathmap_replace(patterns, &block) result = self - patterns.split(';').each do |pair| - pattern, replacement = pair.split(',') + patterns.split(";").each do |pair| + pattern, replacement = pair.split(",") pattern = Regexp.new(pattern) - if replacement == '*' && block_given? + if replacement == "*" && block_given? result = result.sub(pattern, &block) elsif replacement result = result.sub(pattern, replacement) else - result = result.sub(pattern, '') + result = result.sub(pattern, "") end end result @@ -136,32 +136,32 @@ def pathmap_replace(patterns, &block) # This String extension comes from Rake def pathmap(spec=nil, &block) return self if spec.nil? - result = '' + result = "" spec.scan(/%\{[^}]*\}-?\d*[sdpfnxX%]|%-?\d+d|%.|[^%]+/) do |frag| case frag - when '%f' + when "%f" result << File.basename(self) - when '%n' + when "%n" result << File.basename(self).ext - when '%d' + when "%d" result << File.dirname(self) - when '%x' + when "%x" result << File.extname(self) - when '%X' + when "%X" result << self.ext - when '%p' + when "%p" result << self - when '%s' + when "%s" result << (File::ALT_SEPARATOR || File::SEPARATOR) - when '%-' + when "%-" # do nothing - when '%%' + when "%%" result << "%" when /%(-?\d+)d/ result << pathmap_partial($1.to_i) when /^%\{([^}]*)\}(\d*[dpfnxX])/ patterns, operator = $1, $2 - result << pathmap('%' + operator).pathmap_replace(patterns, &block) + result << pathmap("%" + operator).pathmap_replace(patterns, &block) when /^%/ fail ArgumentError, "Unknown pathmap specifier #{frag} in '#{spec}'" else diff --git a/lib/rake/file_creation_task.rb b/lib/rake/file_creation_task.rb index c87e2192b..f3c5c78a1 100644 --- a/lib/rake/file_creation_task.rb +++ b/lib/rake/file_creation_task.rb @@ -1,5 +1,5 @@ -require 'rake/file_task' -require 'rake/early_time' +require "rake/file_task" +require "rake/early_time" module Rake diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index 3b1239ad9..a30c6338c 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -1,6 +1,6 @@ -require 'rake/cloneable' -require 'rake/file_utils_ext' -require 'rake/ext/string' +require "rake/cloneable" +require "rake/file_utils_ext" +require "rake/ext/string" module Rake @@ -280,7 +280,7 @@ def pathmap(spec=nil, &block) # array.collect { |item| item.ext(newext) } # # +ext+ is a user added method for the Array class. - def ext(newext='') + def ext(newext="") collect { |fn| fn.ext(newext) } end @@ -342,7 +342,7 @@ def partition(&block) # :nodoc: # Convert a FileList to a string by joining all elements with a space. def to_s resolve - self.join(' ') + self.join(" ") end # Add matching glob patterns. @@ -416,7 +416,7 @@ class << self # Yield each file or directory component. def each_dir_parent(dir) # :nodoc: old_length = nil - while dir != '.' && dir.length != old_length + while dir != "." && dir.length != old_length yield(dir) old_length = dir.length dir = File.dirname(dir) diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index 4c9b04074..6656e7095 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -1,5 +1,5 @@ -require 'rake/task.rb' -require 'rake/early_time' +require "rake/task.rb" +require "rake/early_time" module Rake diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index 14cb092fc..6bb41940d 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -1,18 +1,18 @@ -require 'rbconfig' -require 'fileutils' +require "rbconfig" +require "fileutils" #-- # This a FileUtils extension that defines several additional commands to be # added to the FileUtils utility functions. module FileUtils # Path to the currently running Ruby program - RUBY = ENV['RUBY'] || File.join( - RbConfig::CONFIG['bindir'], - RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT']). + RUBY = ENV["RUBY"] || File.join( + RbConfig::CONFIG["bindir"], + RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]). sub(/.*\s.*/m, '"\&"') - OPT_TABLE['sh'] = %w(noop verbose) - OPT_TABLE['ruby'] = %w(noop verbose) + OPT_TABLE["sh"] = %w(noop verbose) + OPT_TABLE["ruby"] = %w(noop verbose) # Run the system command +cmd+. If multiple arguments are given the command # is run directly (without the shell, same semantics as Kernel::exec and @@ -132,8 +132,8 @@ def safe_ln(*args) # def split_all(path) head, tail = File.split(path) - return [tail] if head == '.' || tail == '/' - return [head, tail] if head == '/' + return [tail] if head == "." || tail == "/" + return [head, tail] if head == "/" return split_all(head) + [tail] end end diff --git a/lib/rake/file_utils_ext.rb b/lib/rake/file_utils_ext.rb index 309159aec..e5930d4ab 100644 --- a/lib/rake/file_utils_ext.rb +++ b/lib/rake/file_utils_ext.rb @@ -1,4 +1,4 @@ -require 'rake/file_utils' +require "rake/file_utils" module Rake # @@ -22,10 +22,10 @@ class << self opts = FileUtils.options_of name default_options = [] if opts.include?("verbose") - default_options << ':verbose => FileUtilsExt.verbose_flag' + default_options << ":verbose => FileUtilsExt.verbose_flag" end if opts.include?("noop") - default_options << ':noop => FileUtilsExt.nowrite_flag' + default_options << ":noop => FileUtilsExt.nowrite_flag" end next if default_options.empty? diff --git a/lib/rake/late_time.rb b/lib/rake/late_time.rb index d959a7821..d1d9470ec 100644 --- a/lib/rake/late_time.rb +++ b/lib/rake/late_time.rb @@ -9,7 +9,7 @@ def <=>(other) end def to_s - '' + "" end end diff --git a/lib/rake/loaders/makefile.rb b/lib/rake/loaders/makefile.rb index 2c4b2632a..d0436bb79 100644 --- a/lib/rake/loaders/makefile.rb +++ b/lib/rake/loaders/makefile.rb @@ -24,7 +24,7 @@ def load(fn) # :nodoc: lines = File.read fn lines.gsub!(/\\ /, SPACE_MARK) lines.gsub!(/#[^\n]*\n/m, "") - lines.gsub!(/\\\n/, ' ') + lines.gsub!(/\\\n/, " ") lines.each_line do |line| process_line(line) end @@ -34,7 +34,7 @@ def load(fn) # :nodoc: # Process one logical line of makefile data. def process_line(line) # :nodoc: - file_tasks, args = line.split(':', 2) + file_tasks, args = line.split(":", 2) return if args.nil? dependents = args.split.map { |d| respace(d) } file_tasks.scan(/\S+/) do |file_task| @@ -44,10 +44,10 @@ def process_line(line) # :nodoc: end def respace(str) # :nodoc: - str.tr SPACE_MARK, ' ' + str.tr SPACE_MARK, " " end end # Install the handler - Rake.application.add_loader('mf', MakefileLoader.new) + Rake.application.add_loader("mf", MakefileLoader.new) end diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index ae7151949..034b8e9e8 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -1,8 +1,8 @@ # Define a package task library to aid in the definition of # redistributable package files. -require 'rake' -require 'rake/tasklib' +require "rake" +require "rake/tasklib" module Rake @@ -93,14 +93,14 @@ def init(name, version) @name = name @version = version @package_files = Rake::FileList.new - @package_dir = 'pkg' + @package_dir = "pkg" @need_tar = false @need_tar_gz = false @need_tar_bz2 = false @need_tar_xz = false @need_zip = false - @tar_command = 'tar' - @zip_command = 'zip' + @tar_command = "tar" + @zip_command = "zip" end # Create the tasks defined by this task library. diff --git a/lib/rake/phony.rb b/lib/rake/phony.rb index 29633ae06..a172f9c60 100644 --- a/lib/rake/phony.rb +++ b/lib/rake/phony.rb @@ -4,7 +4,7 @@ # # See FileTask#out_of_date? and Task#timestamp for more info. -require 'rake' +require "rake" task :phony diff --git a/lib/rake/rake_module.rb b/lib/rake/rake_module.rb index 369275343..75feb1261 100644 --- a/lib/rake/rake_module.rb +++ b/lib/rake/rake_module.rb @@ -1,4 +1,4 @@ -require 'rake/application' +require "rake/application" module Rake diff --git a/lib/rake/rake_test_loader.rb b/lib/rake/rake_test_loader.rb index bc4e1751e..d299efe35 100644 --- a/lib/rake/rake_test_loader.rb +++ b/lib/rake/rake_test_loader.rb @@ -1,4 +1,4 @@ -require 'rake' +require "rake" # Load the test files from the command line. argv = ARGV.select do |argument| diff --git a/lib/rake/rule_recursion_overflow_error.rb b/lib/rake/rule_recursion_overflow_error.rb index b71e08efb..39d44aac6 100644 --- a/lib/rake/rule_recursion_overflow_error.rb +++ b/lib/rake/rule_recursion_overflow_error.rb @@ -12,7 +12,7 @@ def add_target(target) end def message - super + ": [" + @targets.reverse.join(' => ') + "]" + super + ": [" + @targets.reverse.join(" => ") + "]" end end diff --git a/lib/rake/task.rb b/lib/rake/task.rb index b1356ed89..18c09eefd 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -1,4 +1,4 @@ -require 'rake/invocation_exception_mixin' +require "rake/invocation_exception_mixin" module Rake diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index 4eaf2f8b9..7d6275f44 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -17,7 +17,7 @@ def initialize(names, values, parent=nil) @hash = {} @values = values names.each_with_index { |name, i| - next if values[i].nil? || values[i] == '' + next if values[i].nil? || values[i] == "" @hash[name.to_sym] = values[i] } end diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 202a8a688..960d70654 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -15,7 +15,7 @@ def initialize # :nodoc: def create_rule(*args, &block) # :nodoc: pattern, args, deps = resolve_args(args) - pattern = Regexp.new(Regexp.quote(pattern) + '$') if String === pattern + pattern = Regexp.new(Regexp.quote(pattern) + "$") if String === pattern @rules << [pattern, args, deps, block] end @@ -167,10 +167,10 @@ def lookup(task_name, initial_scope=nil) task_name = task_name.to_s if task_name =~ /^rake:/ scopes = Scope.make - task_name = task_name.sub(/^rake:/, '') + task_name = task_name.sub(/^rake:/, "") elsif task_name =~ /^(\^+)/ scopes = initial_scope.trim($1.size) - task_name = task_name.sub(/^(\^+)/, '') + task_name = task_name.sub(/^(\^+)/, "") else scopes = initial_scope end diff --git a/lib/rake/tasklib.rb b/lib/rake/tasklib.rb index b65ae7a6c..7bcda1789 100644 --- a/lib/rake/tasklib.rb +++ b/lib/rake/tasklib.rb @@ -1,4 +1,4 @@ -require 'rake' +require "rake" module Rake diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index cf9855147..4fb871e46 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -1,5 +1,5 @@ -require 'rake' -require 'rake/tasklib' +require "rake" +require "rake/tasklib" module Rake @@ -98,7 +98,7 @@ def initialize(name=:test) @name = @name.keys.first end yield self if block_given? - @pattern = 'test/test*.rb' if @pattern.nil? && @test_files.nil? + @pattern = "test/test*.rb" if @pattern.nil? && @test_files.nil? define end @@ -108,7 +108,7 @@ def define task @name => Array(deps) do FileUtilsExt.verbose(@verbose) do puts "Use TESTOPTS=\"--verbose\" to pass --verbose" \ - ", etc. to runners." if ARGV.include? '--verbose' + ", etc. to runners." if ARGV.include? "--verbose" args = "#{ruby_opts_string} #{run_code} " + "#{file_list_string} #{option_list}" @@ -126,10 +126,10 @@ def define end def option_list # :nodoc: - (ENV['TESTOPTS'] || - ENV['TESTOPT'] || - ENV['TEST_OPTS'] || - ENV['TEST_OPT'] || + (ENV["TESTOPTS"] || + ENV["TESTOPT"] || + ENV["TEST_OPTS"] || + ENV["TEST_OPT"] || @options || "") end @@ -146,12 +146,12 @@ def lib_path # :nodoc: end def file_list_string # :nodoc: - file_list.map { |fn| "\"#{fn}\"" }.join(' ') + file_list.map { |fn| "\"#{fn}\"" }.join(" ") end def file_list # :nodoc: - if ENV['TEST'] - FileList[ENV['TEST']] + if ENV["TEST"] + FileList[ENV["TEST"]] else result = [] result += @test_files.to_a if @test_files @@ -176,7 +176,7 @@ def run_code # :nodoc: end def rake_loader # :nodoc: - find_file('rake/rake_test_loader') or + find_file("rake/rake_test_loader") or fail "unable to find rake test loader" end @@ -189,7 +189,7 @@ def find_file(fn) # :nodoc: end def rake_include_arg # :nodoc: - spec = Gem.loaded_specs['rake'] + spec = Gem.loaded_specs["rake"] if spec.respond_to?(:default_gem?) && spec.default_gem? "" else @@ -198,7 +198,7 @@ def rake_include_arg # :nodoc: end def rake_lib_dir # :nodoc: - find_dir('rake') or + find_dir("rake") or fail "unable to find rake lib" end diff --git a/lib/rake/thread_history_display.rb b/lib/rake/thread_history_display.rb index a8158caf6..04273541e 100644 --- a/lib/rake/thread_history_display.rb +++ b/lib/rake/thread_history_display.rb @@ -1,4 +1,4 @@ -require 'rake/private_reader' +require "rake/private_reader" module Rake diff --git a/lib/rake/thread_pool.rb b/lib/rake/thread_pool.rb index 91628259b..370caa18c 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -1,6 +1,6 @@ -require 'set' +require "set" -require 'rake/promise' +require "rake/promise" module Rake diff --git a/lib/rake/version.rb b/lib/rake/version.rb index c9660a45e..636c5cea1 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,8 +1,8 @@ module Rake - VERSION = '11.2.2' + VERSION = "11.2.2" module Version # :nodoc: all - MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split '.' + MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "." NUMBERS = [MAJOR, MINOR, BUILD, *OTHER] end diff --git a/lib/rake/win32.rb b/lib/rake/win32.rb index cf497a43d..1fc02a5ae 100644 --- a/lib/rake/win32.rb +++ b/lib/rake/win32.rb @@ -1,4 +1,4 @@ -require 'rbconfig' +require "rbconfig" module Rake # Win 32 interface methods for Rake. Windows specific functionality @@ -27,22 +27,22 @@ def windows? # # If the above are not defined, the return nil. def win32_system_dir #:nodoc: - win32_shared_path = ENV['HOME'] - if win32_shared_path.nil? && ENV['HOMEDRIVE'] && ENV['HOMEPATH'] - win32_shared_path = ENV['HOMEDRIVE'] + ENV['HOMEPATH'] + win32_shared_path = ENV["HOME"] + if win32_shared_path.nil? && ENV["HOMEDRIVE"] && ENV["HOMEPATH"] + win32_shared_path = ENV["HOMEDRIVE"] + ENV["HOMEPATH"] end - win32_shared_path ||= ENV['APPDATA'] - win32_shared_path ||= ENV['USERPROFILE'] + win32_shared_path ||= ENV["APPDATA"] + win32_shared_path ||= ENV["USERPROFILE"] raise Win32HomeError, "Unable to determine home path environment variable." if win32_shared_path.nil? or win32_shared_path.empty? - normalize(File.join(win32_shared_path, 'Rake')) + normalize(File.join(win32_shared_path, "Rake")) end # Normalize a win32 path so that the slashes are all forward slashes. def normalize(path) - path.gsub(/\\/, '/') + path.gsub(/\\/, "/") end end diff --git a/test/helper.rb b/test/helper.rb index f8f1fe106..7736da72f 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,13 +1,13 @@ -$:.unshift File.expand_path('../../lib', __FILE__) +$:.unshift File.expand_path("../../lib", __FILE__) -gem 'minitest', '~> 5' -require 'minitest/autorun' -require 'rake' -require 'tmpdir' +gem "minitest", "~> 5" +require "minitest/autorun" +require "rake" +require "tmpdir" -require_relative 'support/file_creation' -require_relative 'support/ruby_runner' -require_relative 'support/rakefile_definitions' +require_relative "support/file_creation" +require_relative "support/ruby_runner" +require_relative "support/rakefile_definitions" class Rake::TestCase < Minitest::Test include FileCreation @@ -23,25 +23,25 @@ class TaskManager def setup ARGV.clear - @verbose = ENV['VERBOSE'] + @verbose = ENV["VERBOSE"] - @rake_root = File.expand_path '../../', __FILE__ - @rake_exec = File.join @rake_root, 'exe', 'rake' - @rake_lib = File.join @rake_root, 'lib' + @rake_root = File.expand_path "../../", __FILE__ + @rake_exec = File.join @rake_root, "exe", "rake" + @rake_lib = File.join @rake_root, "lib" @ruby_options = ["-I#{@rake_lib}", "-I."] @orig_pwd = Dir.pwd - @orig_appdata = ENV['APPDATA'] - @orig_home = ENV['HOME'] - @orig_homedrive = ENV['HOMEDRIVE'] - @orig_homepath = ENV['HOMEPATH'] - @orig_rake_columns = ENV['RAKE_COLUMNS'] - @orig_rake_system = ENV['RAKE_SYSTEM'] - @orig_rakeopt = ENV['RAKEOPT'] - @orig_userprofile = ENV['USERPROFILE'] - ENV.delete 'RAKE_COLUMNS' - ENV.delete 'RAKE_SYSTEM' - ENV.delete 'RAKEOPT' + @orig_appdata = ENV["APPDATA"] + @orig_home = ENV["HOME"] + @orig_homedrive = ENV["HOMEDRIVE"] + @orig_homepath = ENV["HOMEPATH"] + @orig_rake_columns = ENV["RAKE_COLUMNS"] + @orig_rake_system = ENV["RAKE_SYSTEM"] + @orig_rakeopt = ENV["RAKEOPT"] + @orig_userprofile = ENV["USERPROFILE"] + ENV.delete "RAKE_COLUMNS" + ENV.delete "RAKE_SYSTEM" + ENV.delete "RAKEOPT" tmpdir = Dir.chdir Dir.tmpdir do Dir.pwd end @tempdir = File.join tmpdir, "test_rake_#{$$}" @@ -60,18 +60,18 @@ def teardown FileUtils.rm_rf @tempdir if @orig_appdata - ENV['APPDATA'] = @orig_appdata + ENV["APPDATA"] = @orig_appdata else - ENV.delete 'APPDATA' + ENV.delete "APPDATA" end - ENV['HOME'] = @orig_home - ENV['HOMEDRIVE'] = @orig_homedrive - ENV['HOMEPATH'] = @orig_homepath - ENV['RAKE_COLUMNS'] = @orig_rake_columns - ENV['RAKE_SYSTEM'] = @orig_rake_system - ENV['RAKEOPT'] = @orig_rakeopt - ENV['USERPROFILE'] = @orig_userprofile + ENV["HOME"] = @orig_home + ENV["HOMEDRIVE"] = @orig_homedrive + ENV["HOMEPATH"] = @orig_homepath + ENV["RAKE_COLUMNS"] = @orig_rake_columns + ENV["RAKE_SYSTEM"] = @orig_rake_system + ENV["RAKEOPT"] = @orig_rakeopt + ENV["USERPROFILE"] = @orig_userprofile end def ignore_deprecations @@ -82,11 +82,11 @@ def ignore_deprecations end def rake_system_dir - @system_dir = 'system' + @system_dir = "system" FileUtils.mkdir_p @system_dir - open File.join(@system_dir, 'sys1.rake'), 'w' do |io| + open File.join(@system_dir, "sys1.rake"), "w" do |io| io << <<-SYS task "sys1" do puts "SYS1" @@ -94,11 +94,11 @@ def rake_system_dir SYS end - ENV['RAKE_SYSTEM'] = @system_dir + ENV["RAKE_SYSTEM"] = @system_dir end def rakefile(contents) - open 'Rakefile', 'w' do |io| + open "Rakefile", "w" do |io| io << contents end end @@ -108,11 +108,11 @@ def jruby? end def jruby17? - jruby? && (JRUBY_VERSION < '9.0.0.0') + jruby? && (JRUBY_VERSION < "9.0.0.0") end def jruby9? - jruby? && (JRUBY_VERSION >= '9.0.0.0') + jruby? && (JRUBY_VERSION >= "9.0.0.0") end include RakefileDefinitions diff --git a/test/support/rakefile_definitions.rb b/test/support/rakefile_definitions.rb index 82eae11ec..e0af05a67 100644 --- a/test/support/rakefile_definitions.rb +++ b/test/support/rakefile_definitions.rb @@ -158,16 +158,16 @@ def rakefile_dryrun end DRYRUN - FileUtils.touch 'temp_main' - FileUtils.touch 'temp_two' + FileUtils.touch "temp_main" + FileUtils.touch "temp_two" end def rakefile_extra - rakefile 'task :default' + rakefile "task :default" - FileUtils.mkdir_p 'rakelib' + FileUtils.mkdir_p "rakelib" - open File.join('rakelib', 'extra.rake'), 'w' do |io| + open File.join("rakelib", "extra.rake"), "w" do |io| io << <<-EXTRA_RAKE # Added for testing @@ -236,7 +236,7 @@ def rakefile_imports puts "FIRST" IMPORTS - open 'deps.mf', 'w' do |io| + open "deps.mf", "w" do |io| io << <<-DEPS default: other DEPS @@ -361,14 +361,14 @@ def rakefile_namespace end def rakefile_nosearch - FileUtils.touch 'dummy' + FileUtils.touch "dummy" end def rakefile_rakelib - FileUtils.mkdir_p 'rakelib' + FileUtils.mkdir_p "rakelib" - Dir.chdir 'rakelib' do - open 'test1.rb', 'w' do |io| + Dir.chdir "rakelib" do + open "test1.rb", "w" do |io| io << <<-TEST1 task :default do puts "TEST1" @@ -376,7 +376,7 @@ def rakefile_rakelib TEST1 end - open 'test2.rake', 'w' do |io| + open "test2.rake", "w" do |io| io << <<-TEST1 task :default do puts "TEST2" @@ -387,15 +387,15 @@ def rakefile_rakelib end def rakefile_rbext - open 'rakefile.rb', 'w' do |io| + open "rakefile.rb", "w" do |io| io << 'task :default do puts "OK" end' end end def rakefile_unittest - rakefile '# Empty Rakefile for Unit Test' + rakefile "# Empty Rakefile for Unit Test" - readme = File.join 'subdir', 'README' + readme = File.join "subdir", "README" FileUtils.mkdir_p File.dirname readme FileUtils.touch readme @@ -458,14 +458,14 @@ def rakefile_test_signal task :default => :test TEST_SIGNAL - open 'a_test.rb', 'w' do |io| + open "a_test.rb", "w" do |io| io << 'puts "ATEST"' << "\n" - io << '$stdout.flush' << "\n" + io << "$stdout.flush" << "\n" io << 'Process.kill("TERM", $$)' << "\n" end - open 'b_test.rb', 'w' do |io| + open "b_test.rb", "w" do |io| io << 'puts "BTEST"' << "\n" - io << '$stdout.flush' << "\n" + io << "$stdout.flush" << "\n" end end @@ -478,7 +478,7 @@ def rakefile_failing_test_task t.test_files = ['a_test.rb'] end TEST_TASK - open 'a_test.rb', 'w' do |io| + open "a_test.rb", "w" do |io| io << "require 'minitest/autorun'\n" io << "class ExitTaskTest < Minitest::Test\n" io << " def test_exit\n" @@ -489,7 +489,7 @@ def rakefile_failing_test_task end def rakefile_stand_alone_filelist - open 'stand_alone_filelist.rb', 'w' do |io| + open "stand_alone_filelist.rb", "w" do |io| io << "require 'rake/file_list'\n" io << "FL = Rake::FileList['*.rb']\n" io << "puts FL\n" diff --git a/test/test_private_reader.rb b/test/test_private_reader.rb index f86d4249b..56160f062 100644 --- a/test/test_private_reader.rb +++ b/test/test_private_reader.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'rake/private_reader' +require File.expand_path("../helper", __FILE__) +require "rake/private_reader" class TestPrivateAttrs < Rake::TestCase diff --git a/test/test_rake.rb b/test/test_rake.rb index b2a3928b2..dfbb7d232 100644 --- a/test/test_rake.rb +++ b/test/test_rake.rb @@ -1,18 +1,18 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRake < Rake::TestCase def test_each_dir_parent - assert_equal ['a'], alldirs('a') - assert_equal ['a/b', 'a'], alldirs('a/b') - assert_equal ['/a/b', '/a', '/'], alldirs('/a/b') + assert_equal ["a"], alldirs("a") + assert_equal ["a/b", "a"], alldirs("a/b") + assert_equal ["/a/b", "/a", "/"], alldirs("/a/b") if File.dirname("c:/foo") == "c:" # Under Unix - assert_equal ['c:/a/b', 'c:/a', 'c:'], alldirs('c:/a/b') - assert_equal ['c:a/b', 'c:a'], alldirs('c:a/b') + assert_equal ["c:/a/b", "c:/a", "c:"], alldirs("c:/a/b") + assert_equal ["c:a/b", "c:a"], alldirs("c:a/b") else # Under Windows - assert_equal ['c:/a/b', 'c:/a', 'c:/'], alldirs('c:/a/b') - assert_equal ['c:a/b', 'c:a'], alldirs('c:a/b') + assert_equal ["c:/a/b", "c:/a", "c:/"], alldirs("c:/a/b") + assert_equal ["c:a/b", "c:a"], alldirs("c:a/b") end end diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index e3bc43842..740579737 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -1,5 +1,5 @@ #encoding: UTF-8 -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeApplication < Rake::TestCase @@ -31,13 +31,13 @@ def test_display_exception_details assert_empty out - assert_match 'rake aborted!', err + assert_match "rake aborted!", err assert_match __method__.to_s, err end def test_display_exception_details_bad_encoding begin - raise 'El Niño is coming!'.force_encoding('US-ASCII') + raise "El Niño is coming!".force_encoding("US-ASCII") rescue => ex end @@ -46,18 +46,18 @@ def test_display_exception_details_bad_encoding end assert_empty out - assert_match 'El Niño is coming!', err.force_encoding('UTF-8') + assert_match "El Niño is coming!", err.force_encoding("UTF-8") end def test_display_exception_details_cause - skip 'Exception#cause not implemented' unless + skip "Exception#cause not implemented" unless Exception.method_defined? :cause begin - raise 'cause a' + raise "cause a" rescue begin - raise 'cause b' + raise "cause b" rescue => ex end end @@ -68,21 +68,21 @@ def test_display_exception_details_cause assert_empty out - assert_match 'cause a', err - assert_match 'cause b', err + assert_match "cause a", err + assert_match "cause b", err end def test_display_exception_details_cause_loop - skip 'Exception#cause not implemented' unless + skip "Exception#cause not implemented" unless Exception.method_defined? :cause skip if jruby9? # https://github.com/jruby/jruby/issues/3654 begin begin - raise 'cause a' + raise "cause a" rescue => a begin - raise 'cause b' + raise "cause b" rescue raise a end @@ -96,8 +96,8 @@ def test_display_exception_details_cause_loop assert_empty out - assert_match 'cause a', err - assert_match 'cause b', err + assert_match "cause a", err + assert_match "cause b", err end def test_display_tasks @@ -194,7 +194,7 @@ def test_show_lines @app.options.show_task_pattern = // @app.last_description = "COMMENT" @app.define_task(Rake::Task, "t") - @app['t'].locations << "HERE:1" + @app["t"].locations << "HERE:1" out, = capture_io do @app.instance_eval { display_tasks_and_comments } end assert_match(/^rake t +[^:]+:\d+ *$/, out) end @@ -206,7 +206,7 @@ def test_finding_rakefile end def test_not_finding_rakefile - @app.instance_eval { @rakefiles = ['NEVER_FOUND'] } + @app.instance_eval { @rakefiles = ["NEVER_FOUND"] } assert(! @app.instance_eval do have_rakefile end) assert_nil @app.rakefile end @@ -240,7 +240,7 @@ def test_load_rakefile_doesnt_print_rakefile_directory_from_same_dir def test_load_rakefile_from_subdir rakefile_unittest - Dir.chdir 'subdir' + Dir.chdir "subdir" @app.instance_eval do handle_options @@ -254,7 +254,7 @@ def test_load_rakefile_from_subdir def test_load_rakefile_prints_rakefile_directory_from_subdir rakefile_unittest - Dir.chdir 'subdir' + Dir.chdir "subdir" app = Rake::Application.new app.options.rakelib = [] @@ -270,7 +270,7 @@ def test_load_rakefile_prints_rakefile_directory_from_subdir def test_load_rakefile_doesnt_print_rakefile_directory_from_subdir_if_silent rakefile_unittest - Dir.chdir 'subdir' + Dir.chdir "subdir" _, err = capture_io do @app.instance_eval do @@ -286,7 +286,7 @@ def test_load_rakefile_doesnt_print_rakefile_directory_from_subdir_if_silent def test_load_rakefile_not_found ARGV.clear Dir.chdir @tempdir - ENV['RAKE_SYSTEM'] = 'not_exist' + ENV["RAKE_SYSTEM"] = "not_exist" @app.instance_eval do handle_options @@ -317,7 +317,7 @@ def test_load_from_system_rakefile assert_equal @system_dir, @app.system_dir assert_nil @app.rakefile rescue SystemExit - flunk 'failed to load rakefile' + flunk "failed to load rakefile" end def test_load_from_calculated_system_rakefile @@ -326,7 +326,7 @@ def @app.standard_system_dir "__STD_SYS_DIR__" end - ENV['RAKE_SYSTEM'] = nil + ENV["RAKE_SYSTEM"] = nil @app.instance_eval do handle_options @@ -338,22 +338,22 @@ def @app.standard_system_dir assert_equal "__STD_SYS_DIR__", @app.system_dir rescue SystemExit - flunk 'failed to find system rakefile' + flunk "failed to find system rakefile" end def test_terminal_columns - old_rake_columns = ENV['RAKE_COLUMNS'] + old_rake_columns = ENV["RAKE_COLUMNS"] - ENV['RAKE_COLUMNS'] = '42' + ENV["RAKE_COLUMNS"] = "42" app = Rake::Application.new assert_equal 42, app.terminal_columns ensure if old_rake_columns - ENV['RAKE_COLUMNS'] = old_rake_columns + ENV["RAKE_COLUMNS"] = old_rake_columns else - ENV.delete 'RAKE_COLUMNS' + ENV.delete "RAKE_COLUMNS" end end @@ -389,7 +389,7 @@ def test_building_imported_files_on_demand def test_handle_options_should_not_strip_options_from_argv assert !@app.options.trace - valid_option = '--trace' + valid_option = "--trace" setup_command_line(valid_option) @app.handle_options @@ -450,7 +450,7 @@ def test_good_run def test_display_task_run ran = false - setup_command_line('-f', '-s', '--tasks', '--rakelib=""') + setup_command_line("-f", "-s", "--tasks", '--rakelib=""') @app.last_description = "COMMENT" @app.define_task(Rake::Task, "default") out, = capture_io { @app.run } @@ -462,7 +462,7 @@ def test_display_task_run def test_display_prereqs ran = false - setup_command_line('-f', '-s', '--prereqs', '--rakelib=""') + setup_command_line("-f", "-s", "--prereqs", '--rakelib=""') @app.last_description = "COMMENT" t = @app.define_task(Rake::Task, "default") t.enhance([:a, :b]) @@ -478,7 +478,7 @@ def test_display_prereqs def test_bad_run @app.intern(Rake::Task, "default").enhance { fail } - setup_command_line('-f', '-s', '--rakelib=""') + setup_command_line("-f", "-s", '--rakelib=""') _, err = capture_io { assert_raises(SystemExit){ @app.run } } @@ -489,7 +489,7 @@ def test_bad_run def test_bad_run_with_trace @app.intern(Rake::Task, "default").enhance { fail } - setup_command_line('-f', '-s', '-t') + setup_command_line("-f", "-s", "-t") _, err = capture_io { assert_raises(SystemExit) { @app.run } } @@ -500,7 +500,7 @@ def test_bad_run_with_trace def test_bad_run_with_backtrace @app.intern(Rake::Task, "default").enhance { fail } - setup_command_line('-f', '-s', '--backtrace') + setup_command_line("-f", "-s", "--backtrace") _, err = capture_io { assert_raises(SystemExit) { @app.run @@ -517,7 +517,7 @@ def test_bad_run_includes_exception_name @app.intern(Rake::Task, "default").enhance { raise CustomError, "intentional" } - setup_command_line('-f', '-s') + setup_command_line("-f", "-s") _, err = capture_io { assert_raises(SystemExit) { @app.run @@ -530,7 +530,7 @@ def test_rake_error_excludes_exception_name @app.intern(Rake::Task, "default").enhance { fail "intentional" } - setup_command_line('-f', '-s') + setup_command_line("-f", "-s") _, err = capture_io { assert_raises(SystemExit) { @app.run @@ -554,7 +554,7 @@ def test_printing_original_exception_cause raise custom_error, "Secondary Error" end } - setup_command_line('-f', '-s') + setup_command_line("-f", "-s") _ ,err = capture_io { assert_raises(SystemExit) { @app.run @@ -570,7 +570,7 @@ def test_printing_original_exception_cause def test_run_with_bad_options @app.intern(Rake::Task, "default").enhance { fail } - setup_command_line('-f', '-s', '--xyzzy') + setup_command_line("-f", "-s", "--xyzzy") assert_raises(SystemExit) { capture_io { @app.run } } @@ -582,7 +582,7 @@ def test_standard_exception_handling_invalid_option out, err = capture_io do e = assert_raises SystemExit do @app.standard_exception_handling do - raise OptionParser::InvalidOption, 'blah' + raise OptionParser::InvalidOption, "blah" end end @@ -597,7 +597,7 @@ def test_standard_exception_handling_other out, err = capture_io do e = assert_raises SystemExit do @app.standard_exception_handling do - raise 'blah' + raise "blah" end end @@ -644,7 +644,7 @@ def util_loader loader.instance_variable_set :@load_called, false def loader.load arg - raise ArgumentError, arg unless arg == 'x.dummy' + raise ArgumentError, arg unless arg == "x.dummy" @load_called = true end diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index 1525bcd6a..4c9a8bf31 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) TESTING_REQUIRE = [] @@ -7,7 +7,7 @@ class TestRakeApplicationOptions < Rake::TestCase def setup super - @testkey = ENV['TESTKEY'] + @testkey = ENV["TESTKEY"] clear_argv Rake::FileUtilsExt.verbose_flag = false Rake::FileUtilsExt.nowrite_flag = false @@ -15,7 +15,7 @@ def setup end def teardown - ENV['TESTKEY'] = @testkey + ENV["TESTKEY"] = @testkey clear_argv Rake::FileUtilsExt.verbose_flag = false Rake::FileUtilsExt.nowrite_flag = false @@ -35,20 +35,20 @@ def test_default_options assert_nil opts.load_system assert_nil opts.always_multitask assert_nil opts.nosearch - assert_equal ['rakelib'], opts.rakelib + assert_equal ["rakelib"], opts.rakelib assert_nil opts.show_prereqs assert_nil opts.show_task_pattern assert_nil opts.show_tasks assert_nil opts.silent assert_nil opts.trace assert_nil opts.thread_pool_size - assert_equal ['rakelib'], opts.rakelib + assert_equal ["rakelib"], opts.rakelib assert ! Rake::FileUtilsExt.verbose_flag assert ! Rake::FileUtilsExt.nowrite_flag end def test_dry_run - flags('--dry-run', '-n') do |opts| + flags("--dry-run", "-n") do |opts| assert opts.dryrun assert opts.trace assert Rake::FileUtilsExt.verbose_flag @@ -57,14 +57,14 @@ def test_dry_run end def test_describe - flags('--describe') do |opts| + flags("--describe") do |opts| assert_equal :describe, opts.show_tasks assert_equal(//.to_s, opts.show_task_pattern.to_s) end end def test_describe_with_pattern - flags('--describe=X') do |opts| + flags("--describe=X") do |opts| assert_equal :describe, opts.show_tasks assert_equal(/X/.to_s, opts.show_task_pattern.to_s) end @@ -72,7 +72,7 @@ def test_describe_with_pattern def test_execute $xyzzy = 0 - flags('--execute=$xyzzy=1', '-e $xyzzy=1') do + flags("--execute=$xyzzy=1", "-e $xyzzy=1") do assert_equal 1, $xyzzy assert_equal :exit, @exit $xyzzy = 0 @@ -81,7 +81,7 @@ def test_execute def test_execute_and_continue $xyzzy = 0 - flags('--execute-continue=$xyzzy=1', '-E $xyzzy=1') do + flags("--execute-continue=$xyzzy=1", "-E $xyzzy=1") do assert_equal 1, $xyzzy refute_equal :exit, @exit $xyzzy = 0 @@ -92,7 +92,7 @@ def test_execute_and_print $xyzzy = 0 out, = capture_io do flags('--execute-print=$xyzzy="pugh"', '-p $xyzzy="pugh"') do - assert_equal 'pugh', $xyzzy + assert_equal "pugh", $xyzzy assert_equal :exit, @exit $xyzzy = 0 end @@ -103,7 +103,7 @@ def test_execute_and_print def test_help out, = capture_io do - flags '--help', '-H', '-h' + flags "--help", "-H", "-h" end assert_match(/\Arake/, out) @@ -116,62 +116,62 @@ def test_jobs flags([]) do |opts| assert_nil opts.thread_pool_size end - flags(['--jobs', '0'], ['-j', '0']) do |opts| + flags(["--jobs", "0"], ["-j", "0"]) do |opts| assert_equal 0, opts.thread_pool_size end - flags(['--jobs', '1'], ['-j', '1']) do |opts| + flags(["--jobs", "1"], ["-j", "1"]) do |opts| assert_equal 0, opts.thread_pool_size end - flags(['--jobs', '4'], ['-j', '4']) do |opts| + flags(["--jobs", "4"], ["-j", "4"]) do |opts| assert_equal 3, opts.thread_pool_size end - flags(['--jobs', 'asdas'], ['-j', 'asdas']) do |opts| + flags(["--jobs", "asdas"], ["-j", "asdas"]) do |opts| assert_equal Rake.suggested_thread_count-1, opts.thread_pool_size end - flags('--jobs', '-j') do |opts| + flags("--jobs", "-j") do |opts| assert opts.thread_pool_size > 1_000_000, "thread pool size should be huge (was #{opts.thread_pool_size})" end end def test_libdir - flags(['--libdir', 'xx'], ['-I', 'xx'], ['-Ixx']) do - $:.include?('xx') + flags(["--libdir", "xx"], ["-I", "xx"], ["-Ixx"]) do + $:.include?("xx") end ensure - $:.delete('xx') + $:.delete("xx") end def test_multitask - flags('--multitask', '-m') do |opts| + flags("--multitask", "-m") do |opts| assert_equal opts.always_multitask, true end end def test_rakefile - flags(['--rakefile', 'RF'], ['--rakefile=RF'], ['-f', 'RF'], ['-fRF']) do - assert_equal ['RF'], @app.instance_eval { @rakefiles } + flags(["--rakefile", "RF"], ["--rakefile=RF"], ["-f", "RF"], ["-fRF"]) do + assert_equal ["RF"], @app.instance_eval { @rakefiles } end end def test_rakelib dirs = %w(A B C).join(File::PATH_SEPARATOR) flags( - ['--rakelibdir', dirs], + ["--rakelibdir", dirs], ["--rakelibdir=#{dirs}"], - ['-R', dirs], + ["-R", dirs], ["-R#{dirs}"]) do |opts| - assert_equal ['A', 'B', 'C'], opts.rakelib + assert_equal ["A", "B", "C"], opts.rakelib end end def test_require $LOAD_PATH.unshift @tempdir - open 'reqfile.rb', 'w' do |io| io << 'TESTING_REQUIRE << 1' end - open 'reqfile2.rb', 'w' do |io| io << 'TESTING_REQUIRE << 2' end - open 'reqfile3.rake', 'w' do |io| io << 'TESTING_REQUIRE << 3' end + open "reqfile.rb", "w" do |io| io << "TESTING_REQUIRE << 1" end + open "reqfile2.rb", "w" do |io| io << "TESTING_REQUIRE << 2" end + open "reqfile3.rake", "w" do |io| io << "TESTING_REQUIRE << 3" end - flags(['--require', 'reqfile'], '-rreqfile2', '-rreqfile3') + flags(["--require", "reqfile"], "-rreqfile2", "-rreqfile3") assert_includes TESTING_REQUIRE, 1 assert_includes TESTING_REQUIRE, 2 @@ -184,7 +184,7 @@ def test_require def test_missing_require ex = assert_raises(LoadError) do - flags(['--require', 'test/missing']) do |opts| + flags(["--require", "test/missing"]) do |opts| end end assert_match(/such file/, ex.message) @@ -192,47 +192,47 @@ def test_missing_require end def test_prereqs - flags('--prereqs', '-P') do |opts| + flags("--prereqs", "-P") do |opts| assert opts.show_prereqs end end def test_quiet Rake::FileUtilsExt.verbose_flag = true - flags('--quiet', '-q') do |opts| + flags("--quiet", "-q") do |opts| assert ! Rake::FileUtilsExt.verbose_flag, "verbose flag should be false" assert ! opts.silent, "should not be silent" end end def test_no_search - flags('--nosearch', '--no-search', '-N') do |opts| + flags("--nosearch", "--no-search", "-N") do |opts| assert opts.nosearch end end def test_silent Rake::FileUtilsExt.verbose_flag = true - flags('--silent', '-s') do |opts| + flags("--silent", "-s") do |opts| assert ! Rake::FileUtilsExt.verbose_flag, "verbose flag should be false" assert opts.silent, "should be silent" end end def test_system - flags('--system', '-g') do |opts| + flags("--system", "-g") do |opts| assert opts.load_system end end def test_no_system - flags('--no-system', '-G') do |opts| + flags("--no-system", "-G") do |opts| assert opts.ignore_system end end def test_trace - flags('--trace', '-t') do |opts| + flags("--trace", "-t") do |opts| assert opts.trace, "should enable trace option" assert opts.backtrace, "should enabled backtrace option" assert_equal $stderr, opts.trace_output @@ -242,7 +242,7 @@ def test_trace end def test_trace_with_stdout - flags('--trace=stdout', '-tstdout') do |opts| + flags("--trace=stdout", "-tstdout") do |opts| assert opts.trace, "should enable trace option" assert opts.backtrace, "should enabled backtrace option" assert_equal $stdout, opts.trace_output @@ -252,7 +252,7 @@ def test_trace_with_stdout end def test_trace_with_stderr - flags('--trace=stderr', '-tstderr') do |opts| + flags("--trace=stderr", "-tstderr") do |opts| assert opts.trace, "should enable trace option" assert opts.backtrace, "should enabled backtrace option" assert_equal $stderr, opts.trace_output @@ -263,23 +263,23 @@ def test_trace_with_stderr def test_trace_with_error ex = assert_raises(Rake::CommandLineOptionError) do - flags('--trace=xyzzy') do |opts| end + flags("--trace=xyzzy") do |opts| end end assert_match(/un(known|recognized).*\btrace\b.*xyzzy/i, ex.message) end def test_trace_with_following_task_name - flags(['--trace', 'taskname'], ['-t', 'taskname']) do |opts| + flags(["--trace", "taskname"], ["-t", "taskname"]) do |opts| assert opts.trace, "should enable trace option" assert opts.backtrace, "should enabled backtrace option" assert_equal $stderr, opts.trace_output assert Rake::FileUtilsExt.verbose_flag - assert_equal ['taskname'], @app.top_level_tasks + assert_equal ["taskname"], @app.top_level_tasks end end def test_backtrace - flags('--backtrace') do |opts| + flags("--backtrace") do |opts| assert opts.backtrace, "should enable backtrace option" assert_equal $stderr, opts.trace_output assert ! opts.trace, "should not enable trace option" @@ -287,7 +287,7 @@ def test_backtrace end def test_backtrace_with_stdout - flags('--backtrace=stdout') do |opts| + flags("--backtrace=stdout") do |opts| assert opts.backtrace, "should enable backtrace option" assert_equal $stdout, opts.trace_output assert ! opts.trace, "should not enable trace option" @@ -295,7 +295,7 @@ def test_backtrace_with_stdout end def test_backtrace_with_stderr - flags('--backtrace=stderr') do |opts| + flags("--backtrace=stderr") do |opts| assert opts.backtrace, "should enable backtrace option" assert_equal $stderr, opts.trace_output assert ! opts.trace, "should not enable trace option" @@ -304,38 +304,38 @@ def test_backtrace_with_stderr def test_backtrace_with_error ex = assert_raises(Rake::CommandLineOptionError) do - flags('--backtrace=xyzzy') do |opts| end + flags("--backtrace=xyzzy") do |opts| end end assert_match(/un(known|recognized).*\bbacktrace\b.*xyzzy/i, ex.message) end def test_backtrace_with_following_task_name - flags(['--backtrace', 'taskname']) do |opts| + flags(["--backtrace", "taskname"]) do |opts| assert ! opts.trace, "should enable trace option" assert opts.backtrace, "should enabled backtrace option" assert_equal $stderr, opts.trace_output - assert_equal ['taskname'], @app.top_level_tasks + assert_equal ["taskname"], @app.top_level_tasks end end def test_trace_rules - flags('--rules') do |opts| + flags("--rules") do |opts| assert opts.trace_rules end end def test_tasks - flags('--tasks', '-T') do |opts| + flags("--tasks", "-T") do |opts| assert_equal :tasks, opts.show_tasks assert_equal(//.to_s, opts.show_task_pattern.to_s) assert_equal nil, opts.show_all_tasks end - flags(['--tasks', 'xyz'], ['-Txyz']) do |opts| + flags(["--tasks", "xyz"], ["-Txyz"]) do |opts| assert_equal :tasks, opts.show_tasks assert_equal(/xyz/.to_s, opts.show_task_pattern.to_s) assert_equal nil, opts.show_all_tasks end - flags(['--tasks', 'xyz', '--comments']) do |opts| + flags(["--tasks", "xyz", "--comments"]) do |opts| assert_equal :tasks, opts.show_tasks assert_equal(/xyz/.to_s, opts.show_task_pattern.to_s) assert_equal false, opts.show_all_tasks @@ -343,17 +343,17 @@ def test_tasks end def test_where - flags('--where', '-W') do |opts| + flags("--where", "-W") do |opts| assert_equal :lines, opts.show_tasks assert_equal(//.to_s, opts.show_task_pattern.to_s) assert_equal true, opts.show_all_tasks end - flags(['--where', 'xyz'], ['-Wxyz']) do |opts| + flags(["--where", "xyz"], ["-Wxyz"]) do |opts| assert_equal :lines, opts.show_tasks assert_equal(/xyz/.to_s, opts.show_task_pattern.to_s) assert_equal true, opts.show_all_tasks end - flags(['--where', 'xyz', '--comments'], ['-Wxyz', '--comments']) do |opts| + flags(["--where", "xyz", "--comments"], ["-Wxyz", "--comments"]) do |opts| assert_equal :lines, opts.show_tasks assert_equal(/xyz/.to_s, opts.show_task_pattern.to_s) assert_equal false, opts.show_all_tasks @@ -361,14 +361,14 @@ def test_where end def test_no_deprecated_messages - flags('--no-deprecation-warnings', '-X') do |opts| + flags("--no-deprecation-warnings", "-X") do |opts| assert opts.ignore_deprecate end end def test_verbose capture_io do - flags('--verbose', '-v') do |opts| + flags("--verbose", "-v") do |opts| assert Rake::FileUtilsExt.verbose_flag, "verbose should be true" assert ! opts.silent, "opts should not be silent" end @@ -377,7 +377,7 @@ def test_verbose def test_version out, _ = capture_io do - flags '--version', '-V' + flags "--version", "-V" end assert_match(/\bversion\b/, out) @@ -388,7 +388,7 @@ def test_version def test_bad_option _, err = capture_io do ex = assert_raises(OptionParser::InvalidOption) do - flags('--bad-option') + flags("--bad-option") end if ex.message =~ /^While/ # Ruby 1.9 error message @@ -399,7 +399,7 @@ def test_bad_option end end - assert_equal '', err + assert_equal "", err end def test_task_collection @@ -413,26 +413,26 @@ def test_default_task_collection end def test_environment_definition - ENV.delete('TESTKEY') + ENV.delete("TESTKEY") command_line("TESTKEY=12") - assert_equal '12', ENV['TESTKEY'] + assert_equal "12", ENV["TESTKEY"] end def test_multiline_environment_definition - ENV.delete('TESTKEY') + ENV.delete("TESTKEY") command_line("TESTKEY=a\nb\n") - assert_equal "a\nb\n", ENV['TESTKEY'] + assert_equal "a\nb\n", ENV["TESTKEY"] end def test_environment_and_tasks_together - ENV.delete('TESTKEY') + ENV.delete("TESTKEY") command_line("a", "b", "TESTKEY=12") assert_equal ["a", "b"], @tasks.sort - assert_equal '12', ENV['TESTKEY'] + assert_equal "12", ENV["TESTKEY"] end def test_rake_explicit_task_library - Rake.add_rakelib 'app/task', 'other' + Rake.add_rakelib "app/task", "other" libs = Rake.application.options.rakelib diff --git a/test/test_rake_backtrace.rb b/test/test_rake_backtrace.rb index 78eaa8d52..ec727a292 100644 --- a/test/test_rake_backtrace.rb +++ b/test/test_rake_backtrace.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'open3' +require File.expand_path("../helper", __FILE__) +require "open3" class TestBacktraceSuppression < Rake::TestCase def test_bin_rake_suppressed @@ -11,7 +11,7 @@ def test_bin_rake_suppressed end def test_system_dir_suppressed - path = RbConfig::CONFIG['rubylibprefix'] + path = RbConfig::CONFIG["rubylibprefix"] skip if path.nil? path = File.expand_path path @@ -23,7 +23,7 @@ def test_system_dir_suppressed end def test_near_system_dir_isnt_suppressed - path = RbConfig::CONFIG['rubylibprefix'] + path = RbConfig::CONFIG["rubylibprefix"] skip if path.nil? path = File.expand_path path @@ -41,7 +41,7 @@ class TestRakeBacktrace < Rake::TestCase def setup super - skip 'tmpdir is suppressed in backtrace' if + skip "tmpdir is suppressed in backtrace" if Rake::Backtrace::SUPPRESS_PATTERN =~ Dir.pwd end diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index f94d8c31c..04367907a 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -1,13 +1,13 @@ -require File.expand_path('../helper', __FILE__) -require 'rake/clean' +require File.expand_path("../helper", __FILE__) +require "rake/clean" class TestRakeClean < Rake::TestCase def test_clean - load 'rake/clean.rb', true + load "rake/clean.rb", true - assert Rake::Task['clean'], "Should define clean" - assert Rake::Task['clobber'], "Should define clobber" - assert Rake::Task['clobber'].prerequisites.include?("clean"), + assert Rake::Task["clean"], "Should define clean" + assert Rake::Task["clobber"], "Should define clobber" + assert Rake::Task["clobber"].prerequisites.include?("clean"), "Clobber should require clean" end diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb index 87d0601c6..aac16b2d7 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeCpuCounter < Rake::TestCase @@ -10,7 +10,7 @@ def setup def test_count num = @cpu_counter.count - skip 'cannot count CPU' if num == nil + skip "cannot count CPU" if num == nil assert_kind_of Numeric, num assert_operator num, :>=, 1 end diff --git a/test/test_rake_definitions.rb b/test/test_rake_definitions.rb index a0314621d..464cc6309 100644 --- a/test/test_rake_definitions.rb +++ b/test/test_rake_definitions.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'fileutils' +require File.expand_path("../helper", __FILE__) +require "fileutils" class TestRakeDefinitions < Rake::TestCase include Rake @@ -69,7 +69,7 @@ def test_implicit_file_dependencies create_existing_file task y: [EXISTINGFILE] do |t| runs << t.name end Task[:y].invoke - assert_equal runs, ['y'] + assert_equal runs, ["y"] end private # ---------------------------------------------------------- diff --git a/test/test_rake_directory_task.rb b/test/test_rake_directory_task.rb index 0014d1c15..e42bd9c77 100644 --- a/test/test_rake_directory_task.rb +++ b/test/test_rake_directory_task.rb @@ -1,6 +1,6 @@ -require File.expand_path('../helper', __FILE__) -require 'fileutils' -require 'pathname' +require File.expand_path("../helper", __FILE__) +require "fileutils" +require "pathname" class TestRakeDirectoryTask < Rake::TestCase include Rake @@ -19,7 +19,7 @@ def test_directory assert_equal "DESC", Task["a/b/c"].comment verbose(false) { - Task['a/b'].invoke + Task["a/b"].invoke } assert File.exist?("a/b") @@ -29,20 +29,20 @@ def test_directory def test_directory_colon directory "a:b" - assert_equal FileCreationTask, Task['a:b'].class + assert_equal FileCreationTask, Task["a:b"].class end unless Rake::Win32.windows? if Rake::Win32.windows? def test_directory_win32 desc "WIN32 DESC" - directory 'c:/a/b/c' - assert_equal FileTask, Task['c:'].class - assert_equal FileCreationTask, Task['c:/a'].class - assert_equal FileCreationTask, Task['c:/a/b'].class - assert_equal FileCreationTask, Task['c:/a/b/c'].class - assert_nil Task['c:/'].comment - assert_equal "WIN32 DESC", Task['c:/a/b/c'].comment - assert_nil Task['c:/a/b'].comment + directory "c:/a/b/c" + assert_equal FileTask, Task["c:"].class + assert_equal FileCreationTask, Task["c:/a"].class + assert_equal FileCreationTask, Task["c:/a/b"].class + assert_equal FileCreationTask, Task["c:/a/b/c"].class + assert_nil Task["c:/"].comment + assert_equal "WIN32 DESC", Task["c:/a/b/c"].comment + assert_nil Task["c:/a/b"].comment end end @@ -68,7 +68,7 @@ def test_can_use_pathname assert_equal FileCreationTask, Task["a/b/c"].class verbose(false) { - Task['a/b/c'].invoke + Task["a/b/c"].invoke } assert File.directory?("a/b/c") diff --git a/test/test_rake_dsl.rb b/test/test_rake_dsl.rb index ad52f760b..7f82c6afa 100644 --- a/test/test_rake_dsl.rb +++ b/test/test_rake_dsl.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeDsl < Rake::TestCase diff --git a/test/test_rake_early_time.rb b/test/test_rake_early_time.rb index 18c4dad32..71ee3e157 100644 --- a/test/test_rake_early_time.rb +++ b/test/test_rake_early_time.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeEarlyTime < Rake::TestCase def test_create diff --git a/test/test_rake_extension.rb b/test/test_rake_extension.rb index 18d55f19f..f9b2e2885 100644 --- a/test/test_rake_extension.rb +++ b/test/test_rake_extension.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'stringio' +require File.expand_path("../helper", __FILE__) +require "stringio" class TestRakeExtension < Rake::TestCase diff --git a/test/test_rake_file_creation_task.rb b/test/test_rake_file_creation_task.rb index d8dcd965a..3e2d4726b 100644 --- a/test/test_rake_file_creation_task.rb +++ b/test/test_rake_file_creation_task.rb @@ -1,12 +1,12 @@ -require File.expand_path('../helper', __FILE__) -require 'fileutils' +require File.expand_path("../helper", __FILE__) +require "fileutils" ###################################################################### class TestRakeFileCreationTask < Rake::TestCase include Rake include Rake::DSL - DUMMY_DIR = 'dummy_dir' + DUMMY_DIR = "dummy_dir" def setup super diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index ca881f34b..aaf818b86 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'pathname' +require File.expand_path("../helper", __FILE__) +require "pathname" class TestRakeFileList < Rake::TestCase FileList = Rake::FileList @@ -22,9 +22,9 @@ def setup FileUtils.touch "abc.x" FileUtils.touch "existing" - open 'xyzzy.txt', 'w' do |io| - io.puts 'x' - io.puts 'XYZZY' + open "xyzzy.txt", "w" do |io| + io.puts "x" + io.puts "XYZZY" end end @@ -90,21 +90,21 @@ def test_include_with_pathname def test_append fl = FileList.new fl << "a.rb" << "b.rb" - assert_equal ['a.rb', 'b.rb'], fl + assert_equal ["a.rb", "b.rb"], fl end def test_append_pathname fl = FileList.new fl << Pathname.new("a.rb") - assert_equal ['a.rb'], fl + assert_equal ["a.rb"], fl end def test_add_many fl = FileList.new fl.include %w(a d c) - fl.include('x', 'y') - assert_equal ['a', 'd', 'c', 'x', 'y'], fl - assert_equal ['a', 'd', 'c', 'x', 'y'], fl.resolve + fl.include("x", "y") + assert_equal ["a", "d", "c", "x", "y"], fl + assert_equal ["a", "d", "c", "x", "y"], fl.resolve end def test_add_return @@ -117,7 +117,7 @@ def test_add_return def test_match fl = FileList.new - fl.include '*.c' + fl.include "*.c" assert_equal %w[abc.c x.c xyz.c], fl.sort end @@ -125,18 +125,18 @@ def test_match def test_add_matching fl = FileList.new fl << "a.java" - fl.include '*.c' + fl.include "*.c" assert_equal %w[a.java abc.c x.c xyz.c], fl.sort end def test_multiple_patterns fl = FileList.new - fl.include('*.z', '*foo*') + fl.include("*.z", "*foo*") assert_equal [], fl - fl.include('*.c', '*xist*') + fl.include("*.c", "*xist*") assert_equal %w[x.c xyz.c abc.c existing].sort, fl.sort end @@ -164,7 +164,7 @@ def test_reject end def test_exclude - fl = FileList['x.c', 'abc.c', 'xyz.c', 'existing'] + fl = FileList["x.c", "abc.c", "xyz.c", "existing"] fl.each { |fn| touch fn, verbose: false } x = fl.exclude(%r{^x.+\.}) @@ -173,57 +173,57 @@ def test_exclude assert_equal %w(x.c abc.c existing), fl assert_equal fl.object_id, x.object_id - fl.exclude('*.c') + fl.exclude("*.c") - assert_equal ['existing'], fl + assert_equal ["existing"], fl - fl.exclude('existing') + fl.exclude("existing") assert_equal [], fl end def test_exclude_pathname - fl = FileList['x.c', 'abc.c', 'other'] + fl = FileList["x.c", "abc.c", "other"] fl.each { |fn| touch fn, verbose: false } - fl.exclude(Pathname.new('*.c')) + fl.exclude(Pathname.new("*.c")) - assert_equal ['other'], fl + assert_equal ["other"], fl end def test_excluding_via_block - fl = FileList['a.c', 'b.c', 'xyz.c'] - fl.exclude { |fn| fn.pathmap('%n') == 'xyz' } + fl = FileList["a.c", "b.c", "xyz.c"] + fl.exclude { |fn| fn.pathmap("%n") == "xyz" } assert fl.excluded_from_list?("xyz.c"), "Should exclude xyz.c" - assert_equal ['a.c', 'b.c'], fl + assert_equal ["a.c", "b.c"], fl end def test_exclude_return_on_create - fl = FileList['*'].exclude(/.*\.[hcx]$/) + fl = FileList["*"].exclude(/.*\.[hcx]$/) assert_equal %w[cfiles existing xyzzy.txt], fl.sort assert_equal FileList, fl.class end def test_exclude_with_string_return_on_create - fl = FileList['*'].exclude('abc.c') + fl = FileList["*"].exclude("abc.c") assert_equal %w[abc.h abc.x cfiles existing x.c xyz.c xyzzy.txt], fl.sort assert_equal FileList, fl.class end def test_exclude_curly_bracket_pattern - skip 'brace pattern matches not supported' unless defined? File::FNM_EXTGLOB - fl = FileList['*'].exclude('{abc,xyz}.c') + skip "brace pattern matches not supported" unless defined? File::FNM_EXTGLOB + fl = FileList["*"].exclude("{abc,xyz}.c") assert_equal %w[abc.h abc.x cfiles existing x.c xyzzy.txt], fl end def test_exclude_an_array - fl = FileList['*'].exclude(['existing', '*.c']) + fl = FileList["*"].exclude(["existing", "*.c"]) assert_equal %w[abc.h abc.x cfiles xyzzy.txt], fl end def test_exclude_a_filelist - excluded = FileList['existing', '*.c'] - fl = FileList['*'].exclude(excluded) + excluded = FileList["existing", "*.c"] + fl = FileList["*"].exclude(excluded) assert_equal %w[abc.h abc.x cfiles xyzzy.txt], fl end @@ -238,9 +238,9 @@ def test_default_exclude def test_unique fl = FileList.new fl << "x.c" << "a.c" << "b.rb" << "a.c" - assert_equal ['x.c', 'a.c', 'b.rb', 'a.c'], fl + assert_equal ["x.c", "a.c", "b.rb", "a.c"], fl fl.uniq! - assert_equal ['x.c', 'a.c', 'b.rb'], fl + assert_equal ["x.c", "a.c", "b.rb"], fl end def test_to_string @@ -251,15 +251,15 @@ def test_to_string end def test_to_array - fl = FileList['a.java', 'b.java'] - assert_equal ['a.java', 'b.java'], fl.to_a + fl = FileList["a.java", "b.java"] + assert_equal ["a.java", "b.java"], fl.to_a assert_equal Array, fl.to_a.class - assert_equal ['a.java', 'b.java'], fl.to_ary + assert_equal ["a.java", "b.java"], fl.to_ary assert_equal Array, fl.to_ary.class end def test_to_s_pending - fl = FileList['abc.*'] + fl = FileList["abc.*"] result = fl.to_s assert_match(%r{abc\.c}, result) assert_match(%r{abc\.h}, result) @@ -268,7 +268,7 @@ def test_to_s_pending end def test_inspect_pending - fl = FileList['abc.*'] + fl = FileList["abc.*"] result = fl.inspect assert_match(%r{"abc\.c"}, result) assert_match(%r{"abc\.h"}, result) @@ -289,24 +289,24 @@ def test_sub end def test_claim_to_be_a_kind_of_array - fl = FileList['*.c'] + fl = FileList["*.c"] assert fl.is_a?(Array) assert fl.kind_of?(Array) end def test_claim_to_be_a_kind_of_filelist - fl = FileList['*.c'] + fl = FileList["*.c"] assert fl.is_a?(FileList) assert fl.kind_of?(FileList) end def test_claim_to_be_a_filelist_instance - fl = FileList['*.c'] + fl = FileList["*.c"] assert fl.instance_of?(FileList) end def test_dont_claim_to_be_an_array_instance - fl = FileList['*.c'] + fl = FileList["*.c"] assert ! fl.instance_of?(Array) end @@ -343,7 +343,7 @@ def test_string_ext assert_equal ".onerc.net", ".onerc.dot".ext("net") assert_equal ".onerc.net", ".onerc".ext("net") assert_equal ".a/.onerc.net", ".a/.onerc".ext("net") - assert_equal "one", "one.two".ext('') + assert_equal "one", "one.two".ext("") assert_equal "one", "one.two".ext assert_equal ".one", ".one.two".ext assert_equal ".one", ".one".ext @@ -357,8 +357,8 @@ def test_string_ext end def test_filelist_ext - assert_equal FileList['one.c', '.one.c'], - FileList['one.net', '.one'].ext('c') + assert_equal FileList["one.c", ".one.c"], + FileList["one.net", ".one"].ext("c") end def test_gsub @@ -376,12 +376,12 @@ def test_gsub! end def test_egrep_returns_0_if_no_matches - files = FileList['test/lib/*_test.rb'].exclude("test/lib/filelist_test.rb") + files = FileList["test/lib/*_test.rb"].exclude("test/lib/filelist_test.rb") assert_equal 0, files.egrep(/XYZZY/) { } end def test_egrep_with_output - files = FileList['*.txt'] + files = FileList["*.txt"] out, = capture_io do files.egrep(/XYZZY/) @@ -391,7 +391,7 @@ def test_egrep_with_output end def test_egrep_with_block - files = FileList['*.txt'] + files = FileList["*.txt"] found = nil files.egrep(/XYZZY/) do |fn, ln, line| @@ -402,7 +402,7 @@ def test_egrep_with_block end def test_egrep_with_error - files = FileList['*.txt'] + files = FileList["*.txt"] _, err = capture_io do files.egrep(/XYZZY/) do |fn, ln, line | @@ -414,20 +414,20 @@ def test_egrep_with_error end def test_existing - fl = FileList['abc.c', 'notthere.c'] + fl = FileList["abc.c", "notthere.c"] assert_equal ["abc.c"], fl.existing assert fl.existing.is_a?(FileList) end def test_existing! - fl = FileList['abc.c', 'notthere.c'] + fl = FileList["abc.c", "notthere.c"] result = fl.existing! assert_equal ["abc.c"], fl assert_equal fl.object_id, result.object_id end def test_ignore_special - f = FileList['*'] + f = FileList["*"] assert ! f.include?("CVS"), "Should not contain CVS" assert ! f.include?(".svn"), "Should not contain .svn" assert ! f.include?(".dummy"), "Should not contain dot files" @@ -437,7 +437,7 @@ def test_ignore_special end def test_clear_ignore_patterns - f = FileList['*', '.svn'] + f = FileList["*", ".svn"] f.clear_exclude assert f.include?("abc.c") assert f.include?("xyz.c") @@ -470,34 +470,34 @@ def test_add_default_exclude_list end def test_basic_array_functions - f = FileList['b', 'c', 'a'] - assert_equal 'b', f.first - assert_equal 'b', f[0] - assert_equal 'a', f.last - assert_equal 'a', f[2] - assert_equal 'a', f[-1] - assert_equal ['a', 'b', 'c'], f.sort + f = FileList["b", "c", "a"] + assert_equal "b", f.first + assert_equal "b", f[0] + assert_equal "a", f.last + assert_equal "a", f[2] + assert_equal "a", f[-1] + assert_equal ["a", "b", "c"], f.sort f.sort! - assert_equal ['a', 'b', 'c'], f + assert_equal ["a", "b", "c"], f end def test_flatten - assert_equal ['a', 'x.c', 'xyz.c', 'abc.c'].sort, - ['a', FileList['*.c']].flatten.sort + assert_equal ["a", "x.c", "xyz.c", "abc.c"].sort, + ["a", FileList["*.c"]].flatten.sort end def test_clone_and_dup - a = FileList['a', 'b', 'c'] + a = FileList["a", "b", "c"] c = a.clone d = a.dup - a << 'd' - assert_equal ['a', 'b', 'c', 'd'], a - assert_equal ['a', 'b', 'c'], c - assert_equal ['a', 'b', 'c'], d + a << "d" + assert_equal ["a", "b", "c", "d"], a + assert_equal ["a", "b", "c"], c + assert_equal ["a", "b", "c"], d end def test_dup_and_clone_replicate_taint - a = FileList['a', 'b', 'c'] + a = FileList["a", "b", "c"] a.taint c = a.clone d = a.dup @@ -506,27 +506,27 @@ def test_dup_and_clone_replicate_taint end def test_duped_items_will_thaw - a = FileList['a', 'b', 'c'] + a = FileList["a", "b", "c"] a.freeze d = a.dup - d << 'more' - assert_equal ['a', 'b', 'c', 'more'], d + d << "more" + assert_equal ["a", "b", "c", "more"], d end def test_cloned_items_stay_frozen - a = FileList['a', 'b', 'c'] + a = FileList["a", "b", "c"] a.freeze c = a.clone assert_raises(TypeError, RuntimeError) do - c << 'more' + c << "more" end end def test_array_comparisons - fl = FileList['b', 'b'] - a = ['b', 'a'] - b = ['b', 'b'] - c = ['b', 'c'] + fl = FileList["b", "b"] + a = ["b", "a"] + b = ["b", "b"] + c = ["b", "c"] assert_equal(1, fl <=> a) assert_equal(0, fl <=> b) assert_equal(-1, fl <=> c) @@ -536,8 +536,8 @@ def test_array_comparisons end def test_array_equality - a = FileList['a', 'b'] - b = ['a', 'b'] + a = FileList["a", "b"] + b = ["a", "b"] assert a == b assert b == a # assert a.eql?(b) @@ -547,115 +547,115 @@ def test_array_equality end def test_enumeration_methods - a = FileList['a', 'b'] + a = FileList["a", "b"] b = a.map(&:upcase) - assert_equal ['A', 'B'], b + assert_equal ["A", "B"], b assert_equal FileList, b.class b = a.map(&:upcase) - assert_equal ['A', 'B'], b + assert_equal ["A", "B"], b assert_equal FileList, b.class b = a.sort - assert_equal ['a', 'b'], b + assert_equal ["a", "b"], b assert_equal FileList, b.class b = a.sort_by { |it| it } - assert_equal ['a', 'b'], b + assert_equal ["a", "b"], b assert_equal FileList, b.class - b = a.select { |it| it == 'b' } - assert_equal ['b'], b + b = a.select { |it| it == "b" } + assert_equal ["b"], b assert_equal FileList, b.class b = a.select { |it| it.size == 1 } - assert_equal ['a', 'b'], b + assert_equal ["a", "b"], b assert_equal FileList, b.class - b = a.reject { |it| it == 'b' } - assert_equal ['a'], b + b = a.reject { |it| it == "b" } + assert_equal ["a"], b assert_equal FileList, b.class b = a.grep(/./) - assert_equal ['a', 'b'], b + assert_equal ["a", "b"], b assert_equal FileList, b.class - b = a.partition { |it| it == 'b' } - assert_equal [['b'], ['a']], b + b = a.partition { |it| it == "b" } + assert_equal [["b"], ["a"]], b assert_equal Array, b.class assert_equal FileList, b[0].class assert_equal FileList, b[1].class - b = a.zip(['x', 'y']).to_a - assert_equal [['a', 'x'], ['b', 'y']], b + b = a.zip(["x", "y"]).to_a + assert_equal [["a", "x"], ["b", "y"]], b assert_equal Array, b.class assert_equal Array, b[0].class assert_equal Array, b[1].class end def test_array_operators - a = ['a', 'b'] - b = ['c', 'd'] - f = FileList['x', 'y'] - g = FileList['w', 'z'] + a = ["a", "b"] + b = ["c", "d"] + f = FileList["x", "y"] + g = FileList["w", "z"] r = f + g - assert_equal ['x', 'y', 'w', 'z'], r + assert_equal ["x", "y", "w", "z"], r assert_equal FileList, r.class r = a + g - assert_equal ['a', 'b', 'w', 'z'], r + assert_equal ["a", "b", "w", "z"], r assert_equal Array, r.class r = f + b - assert_equal ['x', 'y', 'c', 'd'], r + assert_equal ["x", "y", "c", "d"], r assert_equal FileList, r.class - r = FileList['w', 'x', 'y', 'z'] - f - assert_equal ['w', 'z'], r + r = FileList["w", "x", "y", "z"] - f + assert_equal ["w", "z"], r assert_equal FileList, r.class - r = FileList['w', 'x', 'y', 'z'] & f - assert_equal ['x', 'y'], r + r = FileList["w", "x", "y", "z"] & f + assert_equal ["x", "y"], r assert_equal FileList, r.class r = f * 2 - assert_equal ['x', 'y', 'x', 'y'], r + assert_equal ["x", "y", "x", "y"], r assert_equal FileList, r.class - r = f * ',' - assert_equal 'x,y', r + r = f * "," + assert_equal "x,y", r assert_equal String, r.class - r = f | ['a', 'x'] - assert_equal ['a', 'x', 'y'].sort, r.sort + r = f | ["a", "x"] + assert_equal ["a", "x", "y"].sort, r.sort assert_equal FileList, r.class end def test_other_array_returning_methods - f = FileList['a', nil, 'b'] + f = FileList["a", nil, "b"] r = f.compact - assert_equal ['a', 'b'], r + assert_equal ["a", "b"], r assert_equal FileList, r.class - f = FileList['a', 'b'] - r = f.concat(['x', 'y']) - assert_equal ['a', 'b', 'x', 'y'], r + f = FileList["a", "b"] + r = f.concat(["x", "y"]) + assert_equal ["a", "b", "x", "y"], r assert_equal FileList, r.class - f = FileList['a', ['b', 'c'], FileList['d', 'e']] + f = FileList["a", ["b", "c"], FileList["d", "e"]] r = f.flatten - assert_equal ['a', 'b', 'c', 'd', 'e'], r + assert_equal ["a", "b", "c", "d", "e"], r assert_equal FileList, r.class - f = FileList['a', 'b', 'a'] + f = FileList["a", "b", "a"] r = f.uniq - assert_equal ['a', 'b'], r + assert_equal ["a", "b"], r assert_equal FileList, r.class - f = FileList['a', 'b', 'c', 'd'] + f = FileList["a", "b", "c", "d"] r = f.values_at(1, 3) - assert_equal ['b', 'd'], r + assert_equal ["b", "d"], r assert_equal FileList, r.class end @@ -675,13 +675,13 @@ def test_special_return_delegating_methods_object_type end def test_file_utils_can_use_filelists - cfiles = FileList['*.c'] + cfiles = FileList["*.c"] cp cfiles, @cdir, verbose: false - assert File.exist?(File.join(@cdir, 'abc.c')) - assert File.exist?(File.join(@cdir, 'xyz.c')) - assert File.exist?(File.join(@cdir, 'x.c')) + assert File.exist?(File.join(@cdir, "abc.c")) + assert File.exist?(File.join(@cdir, "xyz.c")) + assert File.exist?(File.join(@cdir, "x.c")) end end diff --git a/test/test_rake_file_list_path_map.rb b/test/test_rake_file_list_path_map.rb index 7881a3f10..b75d040d7 100644 --- a/test/test_rake_file_list_path_map.rb +++ b/test/test_rake_file_list_path_map.rb @@ -1,15 +1,15 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeFileListPathMap < Rake::TestCase def test_file_list_supports_pathmap - assert_equal ['a', 'b'], FileList['dir/a.rb', 'dir/b.rb'].pathmap("%n") + assert_equal ["a", "b"], FileList["dir/a.rb", "dir/b.rb"].pathmap("%n") end def test_file_list_supports_pathmap_with_a_block - mapped = FileList['dir/a.rb', 'dir/b.rb'].pathmap("%{.*,*}n") do |name| + mapped = FileList["dir/a.rb", "dir/b.rb"].pathmap("%{.*,*}n") do |name| name.upcase end - assert_equal ['A', 'B'], mapped + assert_equal ["A", "B"], mapped end end diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index 6a4211559..e6caf2a46 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -1,6 +1,6 @@ -require File.expand_path('../helper', __FILE__) -require 'fileutils' -require 'pathname' +require File.expand_path("../helper", __FILE__) +require "fileutils" +require "pathname" class TestRakeFileTask < Rake::TestCase include Rake @@ -96,11 +96,11 @@ def test_existing_file_depends_on_non_existing_file end def test_needed_eh_build_all - create_file 'a' + create_file "a" - file 'a' + file "a" - a_task = Task['a'] + a_task = Task["a"] refute a_task.needed? @@ -108,30 +108,30 @@ def test_needed_eh_build_all assert a_task.needed? ensure - delete_file 'a' + delete_file "a" end def test_needed_eh_dependency - create_file 'a', Time.now - create_file 'b', Time.now - 60 + create_file "a", Time.now + create_file "b", Time.now - 60 - create_file 'c', Time.now - create_file 'd', Time.now - 60 + create_file "c", Time.now + create_file "d", Time.now - 60 - file 'b' => 'a' + file "b" => "a" - b_task = Task['b'] + b_task = Task["b"] assert b_task.needed? - file 'c' => 'd' + file "c" => "d" - c_task = Task['c'] + c_task = Task["c"] refute c_task.needed? ensure - delete_file 'old' - delete_file 'new' + delete_file "old" + delete_file "new" end def test_needed_eh_exists diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 4dec00968..218c25415 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -1,17 +1,17 @@ -require File.expand_path('../helper', __FILE__) -require 'fileutils' -require 'stringio' +require File.expand_path("../helper", __FILE__) +require "fileutils" +require "stringio" class TestRakeFileUtils < Rake::TestCase def setup super - @rake_test_sh = ENV['RAKE_TEST_SH'] + @rake_test_sh = ENV["RAKE_TEST_SH"] end def teardown FileUtils::LN_SUPPORTED[0] = true RakeFileUtils.verbose_flag = Rake::FileUtilsExt::DEFAULT - ENV['RAKE_TEST_SH'] = @rake_test_sh + ENV["RAKE_TEST_SH"] = @rake_test_sh super end @@ -43,7 +43,7 @@ def test_ln Rake::FileUtilsExt.safe_ln("a", "b", verbose: false) - assert_equal "TEST_LN\n", File.read('b') + assert_equal "TEST_LN\n", File.read("b") end class BadLink @@ -69,16 +69,16 @@ def test_safe_ln_failover_to_cp_on_standard_error FileUtils::LN_SUPPORTED[0] = true c = BadLink.new(StandardError) c.safe_ln "a", "b" - assert_equal ['a', 'b'], c.cp_args + assert_equal ["a", "b"], c.cp_args c.safe_ln "x", "y" - assert_equal ['x', 'y'], c.cp_args + assert_equal ["x", "y"], c.cp_args end def test_safe_ln_failover_to_cp_on_not_implemented_error FileUtils::LN_SUPPORTED[0] = true c = BadLink.new(NotImplementedError) c.safe_ln "a", "b" - assert_equal ['a', 'b'], c.cp_args + assert_equal ["a", "b"], c.cp_args end def test_safe_ln_fails_on_script_error @@ -135,7 +135,7 @@ def test_sh def test_sh_with_a_single_string_argument check_expansion - ENV['RAKE_TEST_SH'] = 'someval' + ENV["RAKE_TEST_SH"] = "someval" verbose(false) { sh %{#{RUBY} check_expansion.rb #{env_var} someval} } @@ -145,11 +145,11 @@ def test_sh_with_env check_environment env = { - 'RAKE_TEST_SH' => 'someval' + "RAKE_TEST_SH" => "someval" } verbose(false) { - sh env, RUBY, 'check_environment.rb', 'RAKE_TEST_SH', 'someval' + sh env, RUBY, "check_environment.rb", "RAKE_TEST_SH", "someval" } end @@ -157,22 +157,22 @@ def test_sh_with_multiple_arguments skip if jruby9? # https://github.com/jruby/jruby/issues/3653 check_no_expansion - ENV['RAKE_TEST_SH'] = 'someval' + ENV["RAKE_TEST_SH"] = "someval" verbose(false) { - sh RUBY, 'check_no_expansion.rb', env_var, 'someval' + sh RUBY, "check_no_expansion.rb", env_var, "someval" } end def test_sh_with_spawn_options - skip 'JRuby does not support spawn options' if jruby? + skip "JRuby does not support spawn options" if jruby? echocommand r, w = IO.pipe verbose(false) { - sh RUBY, 'echocommand.rb', out: w + sh RUBY, "echocommand.rb", out: w } w.close @@ -217,7 +217,7 @@ def test_sh_noop def test_sh_bad_option # Skip on JRuby because option checking is performed by spawn via system # now. - skip 'JRuby does not support spawn options' if jruby? + skip "JRuby does not support spawn options" if jruby? shellcommand @@ -248,7 +248,7 @@ def test_sh_verbose_false } end - assert_equal '', err + assert_equal "", err end def test_sh_verbose_flag_nil @@ -264,7 +264,7 @@ def test_sh_verbose_flag_nil def test_ruby_with_a_single_string_argument check_expansion - ENV['RAKE_TEST_SH'] = 'someval' + ENV["RAKE_TEST_SH"] = "someval" verbose(false) { replace_ruby { @@ -275,10 +275,10 @@ def test_ruby_with_a_single_string_argument def test_sh_show_command env = { - 'RAKE_TEST_SH' => 'someval' + "RAKE_TEST_SH" => "someval" } - cmd = [env, RUBY, 'some_file.rb', 'some argument'] + cmd = [env, RUBY, "some_file.rb", "some argument"] show_cmd = send :sh_show_command, cmd @@ -292,31 +292,31 @@ def test_ruby_with_multiple_arguments check_no_expansion - ENV['RAKE_TEST_SH'] = 'someval' + ENV["RAKE_TEST_SH"] = "someval" verbose(false) { replace_ruby { - ruby 'check_no_expansion.rb', env_var, 'someval' + ruby "check_no_expansion.rb", env_var, "someval" } } end def test_split_all - assert_equal ['a'], Rake::FileUtilsExt.split_all('a') - assert_equal ['..'], Rake::FileUtilsExt.split_all('..') - assert_equal ['/'], Rake::FileUtilsExt.split_all('/') - assert_equal ['a', 'b'], Rake::FileUtilsExt.split_all('a/b') - assert_equal ['/', 'a', 'b'], Rake::FileUtilsExt.split_all('/a/b') - assert_equal ['..', 'a', 'b'], Rake::FileUtilsExt.split_all('../a/b') + assert_equal ["a"], Rake::FileUtilsExt.split_all("a") + assert_equal [".."], Rake::FileUtilsExt.split_all("..") + assert_equal ["/"], Rake::FileUtilsExt.split_all("/") + assert_equal ["a", "b"], Rake::FileUtilsExt.split_all("a/b") + assert_equal ["/", "a", "b"], Rake::FileUtilsExt.split_all("/a/b") + assert_equal ["..", "a", "b"], Rake::FileUtilsExt.split_all("../a/b") end def command(name, text) - open name, 'w', 0750 do |io| + open name, "w", 0750 do |io| io << text end end def check_no_expansion - command 'check_no_expansion.rb', <<-CHECK_EXPANSION + command "check_no_expansion.rb", <<-CHECK_EXPANSION if ARGV[0] != ARGV[1] exit 0 else @@ -326,7 +326,7 @@ def check_no_expansion end def check_environment - command 'check_environment.rb', <<-CHECK_ENVIRONMENT + command "check_environment.rb", <<-CHECK_ENVIRONMENT if ENV[ARGV[0]] != ARGV[1] exit 1 else @@ -336,7 +336,7 @@ def check_environment end def check_expansion - command 'check_expansion.rb', <<-CHECK_EXPANSION + command "check_expansion.rb", <<-CHECK_EXPANSION if ARGV[0] != ARGV[1] exit 1 else @@ -346,7 +346,7 @@ def check_expansion end def echocommand - command 'echocommand.rb', <<-ECHOCOMMAND + command "echocommand.rb", <<-ECHOCOMMAND #!/usr/bin/env ruby puts "echocommand.rb" @@ -366,7 +366,7 @@ def replace_ruby end def shellcommand - command 'shellcommand.rb', <<-SHELLCOMMAND + command "shellcommand.rb", <<-SHELLCOMMAND #!/usr/bin/env ruby exit((ARGV[0] || "0").to_i) @@ -374,7 +374,7 @@ def shellcommand end def env_var - windows? ? '%RAKE_TEST_SH%' : '$RAKE_TEST_SH' + windows? ? "%RAKE_TEST_SH%" : "$RAKE_TEST_SH" end def windows? diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index 703413383..55e141728 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -1,6 +1,6 @@ -require File.expand_path('../helper', __FILE__) -require 'fileutils' -require 'open3' +require File.expand_path("../helper", __FILE__) +require "fileutils" +require "open3" class TestRakeFunctional < Rake::TestCase include RubyRunner @@ -11,9 +11,9 @@ def setup if @verbose puts puts - puts '-' * 80 + puts "-" * 80 puts @__name__ - puts '-' * 80 + puts "-" * 80 end end @@ -28,7 +28,7 @@ def test_rake_default def test_rake_error_on_bad_task rakefile_default - rake '-t', 'xyz' + rake "-t", "xyz" assert_match(/rake aborted/, @err) end @@ -44,7 +44,7 @@ def test_env_available_at_top_scope def test_env_available_at_task_scope rakefile_default - rake 'TESTTASKSCOPE=1', 'task_scope' + rake "TESTTASKSCOPE=1", "task_scope" assert_match(/^TASKSCOPE$/, @out) end @@ -52,13 +52,13 @@ def test_env_available_at_task_scope def test_task_override rakefile_override - rake 't1' + rake "t1" assert_match(/foo\nbar\n/, @out) end def test_multi_desc - ENV['RAKE_COLUMNS'] = '80' + ENV["RAKE_COLUMNS"] = "80" rakefile_multidesc rake "-T" @@ -99,7 +99,7 @@ def test_rbext def test_system rake_system_dir - rake '-g', "sys1" + rake "-g", "sys1" assert_match %r{^SYS1}, @out end @@ -107,7 +107,7 @@ def test_system def test_system_excludes_rakelib_files_too rake_system_dir - rake '-g', "sys1", '-T', 'extra' + rake "-g", "sys1", "-T", "extra" refute_match %r{extra:extra}, @out end @@ -116,7 +116,7 @@ def test_by_default_rakelib_files_are_included rake_system_dir rakefile_extra - rake '-T', 'extra', '--trace' + rake "-T", "extra", "--trace" assert_match %r{extra:extra}, @out end @@ -134,7 +134,7 @@ def test_no_system rake_system_dir rakefile_extra - rake '-G', "sys1" + rake "-G", "sys1" assert_match %r{^Don't know how to build task}, @err # emacs wart: ' end @@ -158,7 +158,7 @@ def test_nosearch_without_rakefile_finds_system def test_nosearch_without_rakefile_and_no_system_fails rakefile_nosearch - ENV['RAKE_SYSTEM'] = 'not_exist' + ENV["RAKE_SYSTEM"] = "not_exist" rake "--nosearch" @@ -246,7 +246,7 @@ def test_dry_run_bug rake - FileUtils.rm_f 'temp_one' + FileUtils.rm_f "temp_one" rake "--dry-run" @@ -259,7 +259,7 @@ def test_trace_bug rake - FileUtils.rm_f 'temp_one' + FileUtils.rm_f "temp_one" rake "--trace" @@ -271,7 +271,7 @@ def test_imports rake - assert File.exist?(File.join(@tempdir, 'dynamic_deps')), + assert File.exist?(File.join(@tempdir, "dynamic_deps")), "'dynamic_deps' file should exist" assert_match(/^FIRST$\s+^DYNAMIC$\s+^STATIC$\s+^OTHER$/, @out) end @@ -289,7 +289,7 @@ def test_rules_chaining_to_file_task rake - assert File.exist?(File.join(@tempdir, 'play.app')), + assert File.exist?(File.join(@tempdir, "play.app")), "'play.app' file should exist" end @@ -306,7 +306,7 @@ def test_file_creation_task def test_dash_f_with_no_arg_foils_rakefile_lookup rakefile_rakelib - rake '-I', 'rakelib', '-rtest1', '-f' + rake "-I", "rakelib", "-rtest1", "-f" assert_match(/^TEST1$/, @out) end @@ -314,7 +314,7 @@ def test_dash_f_with_no_arg_foils_rakefile_lookup def test_dot_rake_files_can_be_loaded_with_dash_r rakefile_rakelib - rake '-I', 'rakelib', '-rtest2', '-f' + rake "-I", "rakelib", "-rtest2", "-f" assert_empty @err assert_match(/^TEST2$/, @out) @@ -394,14 +394,14 @@ def test_test_task_descriptions def test_test_task_when_verbose_unless_verbose_passed_not_prompt_testopts rakefile_test_task_verbose - rake 'unit' + rake "unit" exp = /TESTOPTS="--verbose" to pass --verbose/ refute_match exp, @out end def test_test_task_when_verbose_passed_prompts_testopts rakefile_test_task - rake '--verbose', 'unit' + rake "--verbose", "unit" exp = /TESTOPTS="--verbose" to pass --verbose/ assert_match exp, @out end @@ -449,12 +449,12 @@ def test_correct_number_of_tasks_reported def test_file_list_is_requirable_separately skip if jruby9? # https://github.com/jruby/jruby/issues/3655 - ruby '-rrake/file_list', '-e', 'puts Rake::FileList["a"].size' + ruby "-rrake/file_list", "-e", 'puts Rake::FileList["a"].size' assert_equal "1\n", @out end def can_detect_signals? - system RUBY, '-e', 'Process.kill "TERM", $$' + system RUBY, "-e", 'Process.kill "TERM", $$' status = $? if @verbose puts " SIG status = #{$?.inspect}" diff --git a/test/test_rake_invocation_chain.rb b/test/test_rake_invocation_chain.rb index 0176339bd..ba5f8724f 100644 --- a/test/test_rake_invocation_chain.rb +++ b/test/test_rake_invocation_chain.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeInvocationChain < Rake::TestCase include Rake @@ -29,7 +29,7 @@ def test_make_on_invocation_chains def test_append_with_one_argument chain = @empty.append("A") - assert_equal 'TOP => A', chain.to_s # HACK + assert_equal "TOP => A", chain.to_s # HACK end def test_append_one_circular diff --git a/test/test_rake_late_time.rb b/test/test_rake_late_time.rb index 4b910a708..a88826da7 100644 --- a/test/test_rake_late_time.rb +++ b/test/test_rake_late_time.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeLateTime < Rake::TestCase def test_late_time_comparisons @@ -13,6 +13,6 @@ def test_late_time_comparisons end def test_to_s - assert_equal '', Rake::LATE.to_s + assert_equal "", Rake::LATE.to_s end end diff --git a/test/test_rake_linked_list.rb b/test/test_rake_linked_list.rb index 32d730626..a3c4d1972 100644 --- a/test/test_rake_linked_list.rb +++ b/test/test_rake_linked_list.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestLinkedList < Rake::TestCase include Rake diff --git a/test/test_rake_makefile_loader.rb b/test/test_rake_makefile_loader.rb index 9e9265ad1..bd70fd3b6 100644 --- a/test/test_rake_makefile_loader.rb +++ b/test/test_rake_makefile_loader.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'rake/loaders/makefile' +require File.expand_path("../helper", __FILE__) +require "rake/loaders/makefile" class TestRakeMakefileLoader < Rake::TestCase include Rake @@ -7,7 +7,7 @@ class TestRakeMakefileLoader < Rake::TestCase def test_parse Dir.chdir @tempdir - open 'sample.mf', 'w' do |io| + open "sample.mf", "w" do |io| io << <<-'SAMPLE_MF' # Comments a: a1 a2 a3 a4 @@ -28,19 +28,19 @@ def test_parse Task.clear loader = Rake::MakefileLoader.new - loader.load 'sample.mf' + loader.load "sample.mf" %w(a b c d).each do |t| assert Task.task_defined?(t), "#{t} should be a defined task" end - assert_equal %w(a1 a2 a3 a4 a5 a6 a7).sort, Task['a'].prerequisites.sort - assert_equal %w(b1 b2 b3 b4 b5 b6 b7).sort, Task['b'].prerequisites.sort - assert_equal %w(c1).sort, Task['c'].prerequisites.sort - assert_equal %w(d1 d2).sort, Task['d'].prerequisites.sort - assert_equal %w(e1 f1).sort, Task['e'].prerequisites.sort - assert_equal %w(e1 f1).sort, Task['f'].prerequisites.sort + assert_equal %w(a1 a2 a3 a4 a5 a6 a7).sort, Task["a"].prerequisites.sort + assert_equal %w(b1 b2 b3 b4 b5 b6 b7).sort, Task["b"].prerequisites.sort + assert_equal %w(c1).sort, Task["c"].prerequisites.sort + assert_equal %w(d1 d2).sort, Task["d"].prerequisites.sort + assert_equal %w(e1 f1).sort, Task["e"].prerequisites.sort + assert_equal %w(e1 f1).sort, Task["f"].prerequisites.sort assert_equal( ["g1", "g 2", "g 3", "g4"].sort, - Task['g 0'].prerequisites.sort) + Task["g 0"].prerequisites.sort) assert_equal 7, Task.tasks.size end end diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index b2c6495a6..bab25b158 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'thread' +require File.expand_path("../helper", __FILE__) +require "thread" class TestRakeMultiTask < Rake::TestCase include Rake @@ -56,7 +56,7 @@ def test_all_multitasks_wait_on_slow_prerequisites def test_multitasks_with_parameters task :a, [:arg] do |t, args| add_run(args[:arg]) end - multitask :b, [:arg] => [:a] do |t, args| add_run(args[:arg] + 'mt') end + multitask :b, [:arg] => [:a] do |t, args| add_run(args[:arg] + "mt") end Task[:b].invoke "b" assert @runs[0] == "b" assert @runs[1] == "bmt" @@ -68,7 +68,7 @@ def test_cross_thread_prerequisite_failures multitask :fail_once do fail_now = !failed failed = true - raise 'failing once' if fail_now + raise "failing once" if fail_now end task a: :fail_once diff --git a/test/test_rake_name_space.rb b/test/test_rake_name_space.rb index ceb7b412f..e043c07fa 100644 --- a/test/test_rake_name_space.rb +++ b/test/test_rake_name_space.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeNameSpace < Rake::TestCase @@ -44,8 +44,8 @@ def test_namespace_reports_tasks_it_owns def test_scope mgr = TM.new - scope = Rake::LinkedList.new 'b' - scope = scope.conj 'a' + scope = Rake::LinkedList.new "b" + scope = scope.conj "a" ns = Rake::NameSpace.new mgr, scope diff --git a/test/test_rake_package_task.rb b/test/test_rake_package_task.rb index d7821e032..6a8b73f4c 100644 --- a/test/test_rake_package_task.rb +++ b/test/test_rake_package_task.rb @@ -1,21 +1,21 @@ -require File.expand_path('../helper', __FILE__) -require 'rake/packagetask' +require File.expand_path("../helper", __FILE__) +require "rake/packagetask" class TestRakePackageTask < Rake::TestCase def test_initialize - touch 'install.rb' - touch 'a.c' - touch 'b.c' - mkdir 'CVS' - touch 'a.rb~' + touch "install.rb" + touch "a.c" + touch "b.c" + mkdir "CVS" + touch "a.rb~" pkg = Rake::PackageTask.new("pkgr", "1.2.3") { |p| p.package_files << "install.rb" - p.package_files.include '*.c' + p.package_files.include "*.c" p.package_files.exclude(/\bCVS\b/) p.package_files.exclude(/~$/) - p.package_dir = 'pkg' + p.package_dir = "pkg" p.need_tar = true p.need_tar_gz = true p.need_tar_bz2 = true @@ -25,34 +25,34 @@ def test_initialize assert_equal "pkg", pkg.package_dir - assert_includes pkg.package_files, 'a.c' + assert_includes pkg.package_files, "a.c" - assert_equal 'pkgr', pkg.name - assert_equal '1.2.3', pkg.version + assert_equal "pkgr", pkg.name + assert_equal "1.2.3", pkg.version assert Rake::Task[:package] - assert Rake::Task['pkg/pkgr-1.2.3.tgz'] - assert Rake::Task['pkg/pkgr-1.2.3.tar.gz'] - assert Rake::Task['pkg/pkgr-1.2.3.tar.bz2'] - assert Rake::Task['pkg/pkgr-1.2.3.tar.xz'] - assert Rake::Task['pkg/pkgr-1.2.3.zip'] - assert Rake::Task['pkg/pkgr-1.2.3'] + assert Rake::Task["pkg/pkgr-1.2.3.tgz"] + assert Rake::Task["pkg/pkgr-1.2.3.tar.gz"] + assert Rake::Task["pkg/pkgr-1.2.3.tar.bz2"] + assert Rake::Task["pkg/pkgr-1.2.3.tar.xz"] + assert Rake::Task["pkg/pkgr-1.2.3.zip"] + assert Rake::Task["pkg/pkgr-1.2.3"] assert Rake::Task[:clobber_package] assert Rake::Task[:repackage] end def test_initialize_no_version e = assert_raises RuntimeError do - Rake::PackageTask.new 'pkgr' + Rake::PackageTask.new "pkgr" end - assert_equal 'Version required (or :noversion)', e.message + assert_equal "Version required (or :noversion)", e.message end def test_initialize_noversion - pkg = Rake::PackageTask.new 'pkgr', :noversion + pkg = Rake::PackageTask.new "pkgr", :noversion - assert_equal 'pkg', pkg.package_dir - assert_equal 'pkgr', pkg.name + assert_equal "pkg", pkg.package_dir + assert_equal "pkgr", pkg.name assert_equal nil, pkg.version end @@ -66,15 +66,15 @@ def test_clone end def test_package_name - pkg = Rake::PackageTask.new 'a', '1' + pkg = Rake::PackageTask.new "a", "1" - assert_equal 'a-1', pkg.package_name + assert_equal "a-1", pkg.package_name end def test_package_name_noversion - pkg = Rake::PackageTask.new 'a', :noversion + pkg = Rake::PackageTask.new "a", :noversion - assert_equal 'a', pkg.package_name + assert_equal "a", pkg.package_name end end diff --git a/test/test_rake_path_map.rb b/test/test_rake_path_map.rb index 98e8df062..040692930 100644 --- a/test/test_rake_path_map.rb +++ b/test/test_rake_path_map.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakePathMap < Rake::TestCase diff --git a/test/test_rake_path_map_explode.rb b/test/test_rake_path_map_explode.rb index a79235ee7..5845abf90 100644 --- a/test/test_rake_path_map_explode.rb +++ b/test/test_rake_path_map_explode.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakePathMapExplode < Rake::TestCase def setup @@ -14,20 +14,20 @@ def teardown end def test_explode - assert_equal ['a'], 'a'.pathmap_explode - assert_equal ['a', 'b'], 'a/b'.pathmap_explode - assert_equal ['a', 'b', 'c'], 'a/b/c'.pathmap_explode - assert_equal ['/', 'a'], '/a'.pathmap_explode - assert_equal ['/', 'a', 'b'], '/a/b'.pathmap_explode - assert_equal ['/', 'a', 'b', 'c'], '/a/b/c'.pathmap_explode + assert_equal ["a"], "a".pathmap_explode + assert_equal ["a", "b"], "a/b".pathmap_explode + assert_equal ["a", "b", "c"], "a/b/c".pathmap_explode + assert_equal ["/", "a"], "/a".pathmap_explode + assert_equal ["/", "a", "b"], "/a/b".pathmap_explode + assert_equal ["/", "a", "b", "c"], "/a/b/c".pathmap_explode if File::ALT_SEPARATOR - assert_equal ['c:.', 'a'], 'c:a'.pathmap_explode - assert_equal ['c:.', 'a', 'b'], 'c:a/b'.pathmap_explode - assert_equal ['c:.', 'a', 'b', 'c'], 'c:a/b/c'.pathmap_explode - assert_equal ['c:/', 'a'], 'c:/a'.pathmap_explode - assert_equal ['c:/', 'a', 'b'], 'c:/a/b'.pathmap_explode - assert_equal ['c:/', 'a', 'b', 'c'], 'c:/a/b/c'.pathmap_explode + assert_equal ["c:.", "a"], "c:a".pathmap_explode + assert_equal ["c:.", "a", "b"], "c:a/b".pathmap_explode + assert_equal ["c:.", "a", "b", "c"], "c:a/b/c".pathmap_explode + assert_equal ["c:/", "a"], "c:/a".pathmap_explode + assert_equal ["c:/", "a", "b"], "c:/a/b".pathmap_explode + assert_equal ["c:/", "a", "b", "c"], "c:/a/b/c".pathmap_explode end end end diff --git a/test/test_rake_path_map_partial.rb b/test/test_rake_path_map_partial.rb index 566e681bb..2a71239fe 100644 --- a/test/test_rake_path_map_partial.rb +++ b/test/test_rake_path_map_partial.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakePathMapPartial < Rake::TestCase def test_pathmap_partial diff --git a/test/test_rake_pathname_extensions.rb b/test/test_rake_pathname_extensions.rb index 7da702d0c..c0d8410d6 100644 --- a/test/test_rake_pathname_extensions.rb +++ b/test/test_rake_pathname_extensions.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'rake/ext/pathname' +require File.expand_path("../helper", __FILE__) +require "rake/ext/pathname" class TestRakePathnameExtensions < Rake::TestCase def test_ext_works_on_pathnames diff --git a/test/test_rake_pseudo_status.rb b/test/test_rake_pseudo_status.rb index 51b3fef34..d9fe42216 100644 --- a/test/test_rake_pseudo_status.rb +++ b/test/test_rake_pseudo_status.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakePseudoStatus < Rake::TestCase def test_with_zero_exit_status diff --git a/test/test_rake_rake_test_loader.rb b/test/test_rake_rake_test_loader.rb index 0485c4c8a..21c494ffe 100644 --- a/test/test_rake_rake_test_loader.rb +++ b/test/test_rake_rake_test_loader.rb @@ -1,16 +1,16 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeRakeTestLoader < Rake::TestCase def test_pattern orig_loaded_features = $:.dup - FileUtils.touch 'foo.rb' - FileUtils.touch 'test_a.rb' - FileUtils.touch 'test_b.rb' + FileUtils.touch "foo.rb" + FileUtils.touch "test_a.rb" + FileUtils.touch "test_b.rb" ARGV.replace %w[foo.rb test_*.rb -v] - load File.join(@rake_lib, 'rake/rake_test_loader.rb') + load File.join(@rake_lib, "rake/rake_test_loader.rb") assert_equal %w[-v], ARGV ensure diff --git a/test/test_rake_reduce_compat.rb b/test/test_rake_reduce_compat.rb index d29526654..de81b474b 100644 --- a/test/test_rake_reduce_compat.rb +++ b/test/test_rake_reduce_compat.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'open3' +require File.expand_path("../helper", __FILE__) +require "open3" class TestRakeReduceCompat < Rake::TestCase include RubyRunner diff --git a/test/test_rake_require.rb b/test/test_rake_require.rb index 80b5f0f1c..c77344cc3 100644 --- a/test/test_rake_require.rb +++ b/test/test_rake_require.rb @@ -1,9 +1,9 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeRequire < Rake::TestCase def setup super - $LOAD_PATH.unshift '.' if jruby17? + $LOAD_PATH.unshift "." if jruby17? end def test_can_load_rake_library @@ -11,7 +11,7 @@ def test_can_load_rake_library app = Rake::Application.new assert app.instance_eval { - rake_require("test2", ['rakelib'], []) + rake_require("test2", ["rakelib"], []) } end @@ -19,7 +19,7 @@ def test_wont_reload_rake_library rakefile_rakelib app = Rake::Application.new - paths = ['rakelib'] + paths = ["rakelib"] loaded_files = [] app.rake_require("test2", paths, loaded_files) @@ -34,7 +34,7 @@ def test_throws_error_if_library_not_found app = Rake::Application.new ex = assert_raises(LoadError) { assert app.instance_eval { - rake_require("testx", ['rakelib'], []) + rake_require("testx", ["rakelib"], []) } } assert_match(/(can *not|can't)\s+find/i, ex.message) diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index ee18ed7ed..6608b038b 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'fileutils' +require File.expand_path("../helper", __FILE__) +require "fileutils" class TestRakeRules < Rake::TestCase include Rake @@ -22,8 +22,8 @@ def test_multiple_rules1 create_file(FTNFILE) delete_file(SRCFILE) delete_file(OBJFILE) - rule(/\.o$/ => ['.c']) do @runs << :C end - rule(/\.o$/ => ['.f']) do @runs << :F end + rule(/\.o$/ => [".c"]) do @runs << :C end + rule(/\.o$/ => [".f"]) do @runs << :F end t = Task[OBJFILE] t.invoke Task[OBJFILE].invoke @@ -34,15 +34,15 @@ def test_multiple_rules2 create_file(FTNFILE) delete_file(SRCFILE) delete_file(OBJFILE) - rule(/\.o$/ => ['.f']) do @runs << :F end - rule(/\.o$/ => ['.c']) do @runs << :C end + rule(/\.o$/ => [".f"]) do @runs << :F end + rule(/\.o$/ => [".c"]) do @runs << :C end Task[OBJFILE].invoke assert_equal [:F], @runs end def test_create_with_source create_file(SRCFILE) - rule(/\.o$/ => ['.c']) do |t| + rule(/\.o$/ => [".c"]) do |t| @runs << t.name assert_equal OBJFILE, t.name assert_equal SRCFILE, t.source @@ -53,7 +53,7 @@ def test_create_with_source def test_single_dependent create_file(SRCFILE) - rule(/\.o$/ => '.c') do |t| + rule(/\.o$/ => ".c") do |t| @runs << t.name end Task[OBJFILE].invoke @@ -62,7 +62,7 @@ def test_single_dependent def test_rule_can_be_created_by_string create_file(SRCFILE) - rule '.o' => ['.c'] do |t| + rule ".o" => [".c"] do |t| @runs << t.name end Task[OBJFILE].invoke @@ -71,7 +71,7 @@ def test_rule_can_be_created_by_string def test_rule_prereqs_can_be_created_by_string create_file(SRCFILE) - rule '.o' => '.c' do |t| + rule ".o" => ".c" do |t| @runs << t.name end Task[OBJFILE].invoke @@ -80,7 +80,7 @@ def test_rule_prereqs_can_be_created_by_string def test_plain_strings_as_dependents_refer_to_files create_file(SRCFILE) - rule '.o' => SRCFILE do |t| + rule ".o" => SRCFILE do |t| @runs << t.name end Task[OBJFILE].invoke @@ -89,8 +89,8 @@ def test_plain_strings_as_dependents_refer_to_files def test_file_names_beginning_with_dot_can_be_tricked_into_referring_to_file verbose(false) do - create_file('.foo') - rule '.o' => "./.foo" do |t| + create_file(".foo") + rule ".o" => "./.foo" do |t| @runs << t.name end Task[OBJFILE].invoke @@ -102,7 +102,7 @@ def test_file_names_beginning_with_dot_can_be_wrapped_in_lambda verbose(false) do create_file(".foo") - rule '.o' => lambda { ".foo" } do |t| + rule ".o" => lambda { ".foo" } do |t| @runs << "#{t.name} - #{t.source}" end Task[OBJFILE].invoke @@ -113,7 +113,7 @@ def test_file_names_beginning_with_dot_can_be_wrapped_in_lambda def test_file_names_containing_percent_can_be_wrapped_in_lambda verbose(false) do create_file("foo%x") - rule '.o' => lambda { "foo%x" } do |t| + rule ".o" => lambda { "foo%x" } do |t| @runs << "#{t.name} - #{t.source}" end Task[OBJFILE].invoke @@ -124,7 +124,7 @@ def test_file_names_containing_percent_can_be_wrapped_in_lambda def test_non_extension_rule_name_refers_to_file verbose(false) do create_file("abc.c") - rule "abc" => '.c' do |t| + rule "abc" => ".c" do |t| @runs << t.name end Task["abc"].invoke @@ -135,7 +135,7 @@ def test_non_extension_rule_name_refers_to_file def test_pathmap_automatically_applies_to_name verbose(false) do create_file("zzabc.c") - rule ".o" => 'zz%{x,a}n.c' do |t| + rule ".o" => "zz%{x,a}n.c" do |t| @runs << "#{t.name} - #{t.source}" end Task["xbc.o"].invoke @@ -146,7 +146,7 @@ def test_pathmap_automatically_applies_to_name def test_plain_strings_are_just_filenames verbose(false) do create_file("plainname") - rule ".o" => 'plainname' do |t| + rule ".o" => "plainname" do |t| @runs << "#{t.name} - #{t.source}" end Task["xbc.o"].invoke @@ -158,7 +158,7 @@ def test_rule_runs_when_explicit_task_has_no_actions create_file(SRCFILE) create_file(SRCFILE2) delete_file(OBJFILE) - rule '.o' => '.c' do |t| + rule ".o" => ".c" do |t| @runs << t.source end file OBJFILE => [SRCFILE2] @@ -168,16 +168,16 @@ def test_rule_runs_when_explicit_task_has_no_actions def test_close_matches_on_name_do_not_trigger_rule create_file("x.c") - rule '.o' => ['.c'] do |t| + rule ".o" => [".c"] do |t| @runs << t.name end - assert_raises(RuntimeError) { Task['x.obj'].invoke } - assert_raises(RuntimeError) { Task['x.xyo'].invoke } + assert_raises(RuntimeError) { Task["x.obj"].invoke } + assert_raises(RuntimeError) { Task["x.xyo"].invoke } end def test_rule_rebuilds_obj_when_source_is_newer create_timed_files(OBJFILE, SRCFILE) - rule(/\.o$/ => ['.c']) do + rule(/\.o$/ => [".c"]) do @runs << :RULE end Task[OBJFILE].invoke @@ -204,15 +204,15 @@ def test_rule_with_two_sources_but_one_missing_does_not_run end def test_rule_with_two_sources_builds_both_sources - task 'x.aa' - task 'x.bb' - rule '.a' => '.aa' do + task "x.aa" + task "x.bb" + rule ".a" => ".aa" do @runs << "A" end - rule '.b' => '.bb' do + rule ".b" => ".bb" do @runs << "B" end - rule ".c" => ['.a', '.b'] do + rule ".c" => [".a", ".b"] do @runs << "C" end Task["x.c"].invoke @@ -262,11 +262,11 @@ def test_rule_with_proc_dependent_will_trigger rule %r(classes/.*\.class) => [ proc { |fn| fn.pathmap("%{classes,src}d/%n.java") } ] do |task| - assert_equal task.name, 'classes/jw/X.class' - assert_equal task.source, 'src/jw/X.java' + assert_equal task.name, "classes/jw/X.class" + assert_equal task.source, "src/jw/X.java" @runs << :RULE end - Task['classes/jw/X.class'].invoke + Task["classes/jw/X.class"].invoke assert_equal [:RULE], @runs ensure rm_r("src", verbose: false) rescue nil @@ -276,11 +276,11 @@ def test_proc_returning_lists_are_flattened_into_prereqs ran = false mkdir_p("flatten") create_file("flatten/a.txt") - task 'flatten/b.data' do |t| + task "flatten/b.data" do |t| ran = true touch t.name, verbose: false end - rule '.html' => + rule ".html" => proc { |fn| [ fn.ext("txt"), @@ -288,7 +288,7 @@ def test_proc_returning_lists_are_flattened_into_prereqs ] } do |task| end - Task['flatten/a.html'].invoke + Task["flatten/a.html"].invoke assert ran, "Should have triggered flattened dependency" ensure rm_r("flatten", verbose: false) rescue nil @@ -297,18 +297,18 @@ def test_proc_returning_lists_are_flattened_into_prereqs def test_recursive_rules_will_work_as_long_as_they_terminate actions = [] create_file("abc.xml") - rule '.y' => '.xml' do actions << 'y' end - rule '.c' => '.y' do actions << 'c'end - rule '.o' => '.c' do actions << 'o'end - rule '.exe' => '.o' do actions << 'exe'end + rule ".y" => ".xml" do actions << "y" end + rule ".c" => ".y" do actions << "c"end + rule ".o" => ".c" do actions << "o"end + rule ".exe" => ".o" do actions << "exe"end Task["abc.exe"].invoke - assert_equal ['y', 'c', 'o', 'exe'], actions + assert_equal ["y", "c", "o", "exe"], actions end def test_recursive_rules_that_dont_terminate_will_overflow create_file("a.a") - prev = 'a' - ('b'..'z').each do |letter| + prev = "a" + ("b".."z").each do |letter| rule ".#{letter}" => ".#{prev}" do |t| puts "#{t.name}" end prev = letter end @@ -320,43 +320,43 @@ def test_recursive_rules_that_dont_terminate_will_overflow def test_rules_with_bad_dependents_will_fail rule "a" => [1] do |t| puts t.name end - assert_raises(RuntimeError) do Task['a'].invoke end + assert_raises(RuntimeError) do Task["a"].invoke end end def test_string_rule_with_args delete_file(OBJFILE) create_file(SRCFILE) - rule '.o', [:a] => SRCFILE do |t, args| - assert_equal 'arg', args.a + rule ".o", [:a] => SRCFILE do |t, args| + assert_equal "arg", args.a end - Task[OBJFILE].invoke('arg') + Task[OBJFILE].invoke("arg") end def test_regex_rule_with_args delete_file(OBJFILE) create_file(SRCFILE) rule(/.o$/, [:a] => SRCFILE) do |t, args| - assert_equal 'arg', args.a + assert_equal "arg", args.a end - Task[OBJFILE].invoke('arg') + Task[OBJFILE].invoke("arg") end def test_string_rule_with_args_and_lambda_prereq delete_file(OBJFILE) create_file(SRCFILE) - rule '.o', [:a] => [lambda{SRCFILE}]do |t, args| - assert_equal 'arg', args.a + rule ".o", [:a] => [lambda{SRCFILE}]do |t, args| + assert_equal "arg", args.a end - Task[OBJFILE].invoke('arg') + Task[OBJFILE].invoke("arg") end def test_regex_rule_with_args_and_lambda_prereq delete_file(OBJFILE) create_file(SRCFILE) rule(/.o$/, [:a] => [lambda{SRCFILE}]) do |t, args| - assert_equal 'arg', args.a + assert_equal "arg", args.a end - Task[OBJFILE].invoke('arg') + Task[OBJFILE].invoke("arg") end def test_rule_with_method_prereq @@ -365,7 +365,7 @@ def test_rule_with_method_prereq def obj.find_prereq ".foo" end - rule '.o' => obj.method(:find_prereq) do |t| + rule ".o" => obj.method(:find_prereq) do |t| @runs << "#{t.name} - #{t.source}" end Task[OBJFILE].invoke @@ -378,7 +378,7 @@ def test_rule_with_one_arg_method_prereq def obj.find_prereq(task_name) task_name.ext(".c") end - rule '.o' => obj.method(:find_prereq) do |t| + rule ".o" => obj.method(:find_prereq) do |t| @runs << "#{t.name} - #{t.source}" end Task[OBJFILE].invoke diff --git a/test/test_rake_scope.rb b/test/test_rake_scope.rb index ef06618ba..169c0d9f9 100644 --- a/test/test_rake_scope.rb +++ b/test/test_rake_scope.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeScope < Rake::TestCase include Rake diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 91185257c..80243d83d 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'fileutils' +require File.expand_path("../helper", __FILE__) +require "fileutils" class TestRakeTask < Rake::TestCase include Rake @@ -122,7 +122,7 @@ def test_clear def test_clear_prerequisites t = task("t" => ["a", "b"]) - assert_equal ['a', 'b'], t.prerequisites + assert_equal ["a", "b"], t.prerequisites t.clear_prerequisites assert_equal [], t.prerequisites end @@ -301,7 +301,7 @@ def test_timestamp_returns_now_if_all_prereqs_have_no_times task :b task :c - assert_in_delta Time.now, a.timestamp, 0.1, 'computer too slow?' + assert_in_delta Time.now, a.timestamp, 0.1, "computer too slow?" end def test_timestamp_returns_latest_prereq_timestamp @@ -313,7 +313,7 @@ def test_timestamp_returns_latest_prereq_timestamp def b.timestamp() Time.now + 10 end def c.timestamp() Time.now + 5 end - assert_in_delta now, a.timestamp, 0.1, 'computer too slow?' + assert_in_delta now, a.timestamp, 0.1, "computer too slow?" end def test_always_multitask @@ -336,7 +336,7 @@ def test_always_multitask t_c.invoke # task should always run in order - assert_equal ['a', 'b', 'c'], result + assert_equal ["a", "b", "c"], result [t_a, t_b, t_c].each(&:reenable) result.clear @@ -345,7 +345,7 @@ def test_always_multitask t_c.invoke # with multitask, task 'b' should grab the mutex first - assert_equal ['b', 'a', 'c'], result + assert_equal ["b", "a", "c"], result end def test_investigation_output diff --git a/test/test_rake_task_argument_parsing.rb b/test/test_rake_task_argument_parsing.rb index 3cb5d9cfe..4bc0ff0ae 100644 --- a/test/test_rake_task_argument_parsing.rb +++ b/test/test_rake_task_argument_parsing.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeTaskArgumentParsing < Rake::TestCase def setup @@ -95,21 +95,21 @@ def @app.unix?() raise end end def test_no_rakeopt - ARGV << '--trace' + ARGV << "--trace" app = Rake::Application.new app.init assert !app.options.silent end def test_rakeopt_with_blank_options - ARGV << '--trace' + ARGV << "--trace" app = Rake::Application.new app.init assert !app.options.silent end def test_rakeopt_with_silent_options - ENV['RAKEOPT'] = '-s' + ENV["RAKEOPT"] = "-s" app = Rake::Application.new app.init diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index bf2b4cd42..22e84c448 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -1,10 +1,10 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) ###################################################################### class TestRakeTaskArguments < Rake::TestCase def teardown - ENV.delete('rev') - ENV.delete('VER') + ENV.delete("rev") + ENV.delete("VER") super end @@ -20,7 +20,7 @@ def test_multiple_values_in_args end def test_blank_values_in_args - ta = Rake::TaskArguments.new([:a, :b, :c], ['', :two, '']) + ta = Rake::TaskArguments.new([:a, :b, :c], ["", :two, ""]) assert_equal({b: :two}, ta.to_hash) end @@ -69,15 +69,15 @@ def test_extra_names_are_nil def test_args_do_not_reference_env_values ta = Rake::TaskArguments.new(["aa"], [1]) - ENV['rev'] = "1.2" - ENV['VER'] = "2.3" + ENV["rev"] = "1.2" + ENV["VER"] = "2.3" assert_nil ta.rev assert_nil ta.ver end def test_creating_new_argument_scopes - parent = Rake::TaskArguments.new(['p'], [1]) - child = parent.new_scope(['c', 'p']) + parent = Rake::TaskArguments.new(["p"], [1]) + child = parent.new_scope(["c", "p"]) assert_equal({p: 1}, child.to_hash) assert_equal 1, child.p assert_equal 1, child["p"] @@ -86,16 +86,16 @@ def test_creating_new_argument_scopes end def test_child_hides_parent_arg_names - parent = Rake::TaskArguments.new(['aa'], [1]) - child = Rake::TaskArguments.new(['aa'], [2], parent) + parent = Rake::TaskArguments.new(["aa"], [1]) + child = Rake::TaskArguments.new(["aa"], [2], parent) assert_equal 2, child.aa end def test_default_arguments_values_can_be_merged ta = Rake::TaskArguments.new(["aa", "bb"], [nil, "original_val"]) - ta.with_defaults({ aa: 'default_val' }) - assert_equal 'default_val', ta[:aa] - assert_equal 'original_val', ta[:bb] + ta.with_defaults({ aa: "default_val" }) + assert_equal "default_val", ta[:aa] + assert_equal "original_val", ta[:bb] end def test_default_arguments_that_dont_match_names_are_ignored @@ -109,8 +109,8 @@ def test_all_and_extra_arguments_without_named_arguments _, args = app.parse_task_string("task[1,two,more]") ta = Rake::TaskArguments.new([], args) assert_equal [], ta.names - assert_equal ['1', 'two', 'more'], ta.to_a - assert_equal ['1', 'two', 'more'], ta.extras + assert_equal ["1", "two", "more"], ta.to_a + assert_equal ["1", "two", "more"], ta.extras end def test_all_and_extra_arguments_with_named_arguments @@ -120,8 +120,8 @@ def test_all_and_extra_arguments_with_named_arguments assert_equal [:first, :second], ta.names assert_equal "1", ta[:first] assert_equal "two", ta[:second] - assert_equal ['1', 'two', 'more', 'still more'], ta.to_a - assert_equal ['more', 'still more'], ta.extras + assert_equal ["1", "two", "more", "still more"], ta.to_a + assert_equal ["more", "still more"], ta.extras end def test_extra_args_with_less_than_named_arguments @@ -132,7 +132,7 @@ def test_extra_args_with_less_than_named_arguments assert_equal "1", ta[:first] assert_equal "two", ta[:second] assert_equal nil, ta[:third] - assert_equal ['1', 'two'], ta.to_a + assert_equal ["1", "two"], ta.to_a assert_equal [], ta.extras end diff --git a/test/test_rake_task_manager.rb b/test/test_rake_task_manager.rb index 6f27a3d08..a611bd737 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeTaskManager < Rake::TestCase @@ -21,7 +21,7 @@ def test_define_task def test_index e = assert_raises RuntimeError do - @tm['bad'] + @tm["bad"] end assert_equal "Don't know how to build task 'bad' (see --tasks)", e.message @@ -41,7 +41,7 @@ def test_namespace_task_create end def test_define_namespaced_task - t = @tm.define_task(Rake::Task, 'n:a:m:e:t') + t = @tm.define_task(Rake::Task, "n:a:m:e:t") assert_equal Rake::Scope.make("e", "m", "a", "n"), t.scope assert_equal "n:a:m:e:t", t.name assert_equal @tm, t.application @@ -50,7 +50,7 @@ def test_define_namespaced_task def test_define_namespace_in_namespace t = nil @tm.in_namespace("n") do - t = @tm.define_task(Rake::Task, 'a:m:e:t') + t = @tm.define_task(Rake::Task, "a:m:e:t") end assert_equal Rake::Scope.make("e", "m", "a", "n"), t.scope assert_equal "n:a:m:e:t", t.name @@ -84,7 +84,7 @@ def test_namespace_yields_same_namespace_as_returned end def test_name_lookup_with_implicit_file_tasks - FileUtils.touch 'README.rdoc' + FileUtils.touch "README.rdoc" t = @tm["README.rdoc"] @@ -141,8 +141,8 @@ def test_name_lookup_in_multiple_scopes assert_equal Rake::Scope.make, @tm.current_scope assert_equal Rake::Scope.make, xx.scope - assert_equal Rake::Scope.make('a'), aa.scope - assert_equal Rake::Scope.make('b', 'a'), bb.scope + assert_equal Rake::Scope.make("a"), aa.scope + assert_equal Rake::Scope.make("b", "a"), bb.scope end def test_lookup_with_explicit_scopes diff --git a/test/test_rake_task_manager_argument_resolution.rb b/test/test_rake_task_manager_argument_resolution.rb index 2aa69aa19..6d292816d 100644 --- a/test/test_rake_task_manager_argument_resolution.rb +++ b/test/test_rake_task_manager_argument_resolution.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeTaskManagerArgumentResolution < Rake::TestCase diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index 022854df6..64001c5a9 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeTaskWithArguments < Rake::TestCase include Rake diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index caa4c3a3d..9b3450334 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'rake/testtask' +require File.expand_path("../helper", __FILE__) +require "rake/testtask" class TestRakeTestTask < Rake::TestCase include Rake @@ -8,8 +8,8 @@ def test_initialize tt = Rake::TestTask.new do |t| end refute_nil tt assert_equal :test, tt.name - assert_equal ['lib'], tt.libs - assert_equal 'test/test*.rb', tt.pattern + assert_equal ["lib"], tt.libs + assert_equal "test/test*.rb", tt.pattern assert_equal false, tt.verbose assert_equal true, tt.warning assert_equal [], tt.deps @@ -33,8 +33,8 @@ def test_initialize_multi_deps def test_initialize_override tt = Rake::TestTask.new(example: :bar) do |t| t.description = "Run example tests" - t.libs = ['src', 'ext'] - t.pattern = 'test/tc_*.rb' + t.libs = ["src", "ext"] + t.pattern = "test/tc_*.rb" t.warning = true t.verbose = true t.deps = [:env] @@ -42,8 +42,8 @@ def test_initialize_override refute_nil tt assert_equal "Run example tests", tt.description assert_equal :example, tt.name - assert_equal ['src', 'ext'], tt.libs - assert_equal 'test/tc_*.rb', tt.pattern + assert_equal ["src", "ext"], tt.libs + assert_equal "test/tc_*.rb", tt.pattern assert_equal true, tt.warning assert_equal true, tt.verbose assert_equal [:env], tt.deps @@ -52,14 +52,14 @@ def test_initialize_override end def test_file_list_env_test - ENV['TEST'] = 'testfile.rb' + ENV["TEST"] = "testfile.rb" tt = Rake::TestTask.new do |t| - t.pattern = '*' + t.pattern = "*" end assert_equal ["testfile.rb"], tt.file_list.to_a ensure - ENV.delete 'TEST' + ENV.delete "TEST" end def test_libs_equals @@ -78,22 +78,22 @@ def test_libs_equals_empty t.warning = false end - assert_equal '', test_task.ruby_opts_string + assert_equal "", test_task.ruby_opts_string end def test_pattern_equals tt = Rake::TestTask.new do |t| - t.pattern = '*.rb' + t.pattern = "*.rb" end - assert_equal ['*.rb'], tt.file_list.to_a + assert_equal ["*.rb"], tt.file_list.to_a end def test_pattern_equals_test_files_equals tt = Rake::TestTask.new do |t| - t.test_files = FileList['a.rb', 'b.rb'] - t.pattern = '*.rb' + t.test_files = FileList["a.rb", "b.rb"] + t.pattern = "*.rb" end - assert_equal ['a.rb', 'b.rb', '*.rb'], tt.file_list.to_a + assert_equal ["a.rb", "b.rb", "*.rb"], tt.file_list.to_a end def test_run_code_direct @@ -105,9 +105,9 @@ def test_run_code_direct end def test_run_code_rake - spec = Gem::Specification.new 'rake', 0 - spec.loaded_from = File.join Gem::Specification.dirs.last, 'rake-0.gemspec' - rake, Gem.loaded_specs['rake'] = Gem.loaded_specs['rake'], spec + spec = Gem::Specification.new "rake", 0 + spec.loaded_from = File.join Gem::Specification.dirs.last, "rake-0.gemspec" + rake, Gem.loaded_specs["rake"] = Gem.loaded_specs["rake"], spec test_task = Rake::TestTask.new do |t| t.loader = :rake @@ -115,15 +115,15 @@ def test_run_code_rake assert_match(/\A-I".*?" ".*?"\Z/, test_task.run_code) ensure - Gem.loaded_specs['rake'] = rake + Gem.loaded_specs["rake"] = rake end def test_test_files_equals tt = Rake::TestTask.new do |t| - t.test_files = FileList['a.rb', 'b.rb'] + t.test_files = FileList["a.rb", "b.rb"] end - assert_equal ["a.rb", 'b.rb'], tt.file_list.to_a + assert_equal ["a.rb", "b.rb"], tt.file_list.to_a end def test_task_prerequisites @@ -131,7 +131,7 @@ def test_task_prerequisites Rake::TestTask.new child: :parent task = Rake::Task[:child] - assert_includes task.prerequisites, 'parent' + assert_includes task.prerequisites, "parent" end def test_task_prerequisites_multi @@ -140,8 +140,8 @@ def test_task_prerequisites_multi Rake::TestTask.new child: [:parent, :parent2] task = Rake::Task[:child] - assert_includes task.prerequisites, 'parent' - assert_includes task.prerequisites, 'parent2' + assert_includes task.prerequisites, "parent" + assert_includes task.prerequisites, "parent2" end def test_task_prerequisites_deps @@ -152,6 +152,6 @@ def test_task_prerequisites_deps end task = Rake::Task[:child] - assert_includes task.prerequisites, 'parent' + assert_includes task.prerequisites, "parent" end end diff --git a/test/test_rake_thread_pool.rb b/test/test_rake_thread_pool.rb index 62dc59d00..d365574ba 100644 --- a/test/test_rake_thread_pool.rb +++ b/test/test_rake_thread_pool.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'rake/thread_pool' +require File.expand_path("../helper", __FILE__) +require "rake/thread_pool" class TestRakeTestThreadPool < Rake::TestCase include Rake diff --git a/test/test_rake_top_level_functions.rb b/test/test_rake_top_level_functions.rb index fee702dc1..a3bb2fbb8 100644 --- a/test/test_rake_top_level_functions.rb +++ b/test/test_rake_top_level_functions.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeTopLevelFunctions < Rake::TestCase @@ -26,19 +26,19 @@ def test_namespace namespace("xyz", &block) expected = [ - [[:in_namespace, 'xyz'], block] + [[:in_namespace, "xyz"], block] ] assert_equal expected, @app.called end def test_import - import('x', 'y', 'z') + import("x", "y", "z") expected = [ - [[:add_import, 'x'], nil], - [[:add_import, 'y'], nil], - [[:add_import, 'z'], nil], + [[:add_import, "x"], nil], + [[:add_import, "y"], nil], + [[:add_import, "z"], nil], ] assert_equal expected, @app.called diff --git a/test/test_rake_win32.rb b/test/test_rake_win32.rb index fc2746a0a..decb18f08 100644 --- a/test/test_rake_win32.rb +++ b/test/test_rake_win32.rb @@ -1,50 +1,50 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) class TestRakeWin32 < Rake::TestCase Win32 = Rake::Win32 def test_win32_system_dir_uses_home_if_defined - ENV['HOME'] = 'C:\\HP' + ENV["HOME"] = 'C:\\HP' assert_equal "C:/HP/Rake", Win32.win32_system_dir end def test_win32_system_dir_uses_homedrive_homepath_when_no_home_defined - ENV['HOME'] = nil - ENV['HOMEDRIVE'] = 'C:' - ENV['HOMEPATH'] = '\\HP' + ENV["HOME"] = nil + ENV["HOMEDRIVE"] = "C:" + ENV["HOMEPATH"] = '\\HP' assert_equal "C:/HP/Rake", Win32.win32_system_dir end def test_win32_system_dir_uses_appdata_when_no_home_or_home_combo - ENV['APPDATA'] = "C:\\Documents and Settings\\HP\\Application Data" - ENV['HOME'] = nil - ENV['HOMEDRIVE'] = nil - ENV['HOMEPATH'] = nil + ENV["APPDATA"] = "C:\\Documents and Settings\\HP\\Application Data" + ENV["HOME"] = nil + ENV["HOMEDRIVE"] = nil + ENV["HOMEPATH"] = nil assert_equal "C:/Documents and Settings/HP/Application Data/Rake", Win32.win32_system_dir end def test_win32_system_dir_fallback_to_userprofile_otherwise - ENV['HOME'] = nil - ENV['HOMEDRIVE'] = nil - ENV['HOMEPATH'] = nil - ENV['APPDATA'] = nil - ENV['USERPROFILE'] = "C:\\Documents and Settings\\HP" + ENV["HOME"] = nil + ENV["HOMEDRIVE"] = nil + ENV["HOMEPATH"] = nil + ENV["APPDATA"] = nil + ENV["USERPROFILE"] = "C:\\Documents and Settings\\HP" assert_equal "C:/Documents and Settings/HP/Rake", Win32.win32_system_dir end def test_win32_system_dir_nil_of_no_env_vars - ENV['APPDATA'] = nil - ENV['HOME'] = nil - ENV['HOMEDRIVE'] = nil - ENV['HOMEPATH'] = nil - ENV['RAKE_SYSTEM'] = nil - ENV['USERPROFILE'] = nil + ENV["APPDATA"] = nil + ENV["HOME"] = nil + ENV["HOMEDRIVE"] = nil + ENV["HOMEPATH"] = nil + ENV["RAKE_SYSTEM"] = nil + ENV["USERPROFILE"] = nil assert_raises(Rake::Win32::Win32HomeError) do Win32.win32_system_dir @@ -54,15 +54,15 @@ def test_win32_system_dir_nil_of_no_env_vars def test_win32_backtrace_with_different_case ex = nil begin - raise 'test exception' + raise "test exception" rescue => ex end - ex.set_backtrace ['abc', 'rakefile'] + ex.set_backtrace ["abc", "rakefile"] rake = Rake::Application.new rake.options.trace = true - rake.instance_variable_set(:@rakefile, 'Rakefile') + rake.instance_variable_set(:@rakefile, "Rakefile") _, err = capture_io { rake.display_error_message(ex) } diff --git a/test/test_thread_history_display.rb b/test/test_thread_history_display.rb index 6529302ce..f3466cef7 100644 --- a/test/test_thread_history_display.rb +++ b/test/test_thread_history_display.rb @@ -1,6 +1,6 @@ -require File.expand_path('../helper', __FILE__) +require File.expand_path("../helper", __FILE__) -require 'rake/thread_history_display' +require "rake/thread_history_display" class TestThreadHistoryDisplay < Rake::TestCase def setup diff --git a/test/test_trace_output.rb b/test/test_trace_output.rb index f9aead989..18d2eee0f 100644 --- a/test/test_trace_output.rb +++ b/test/test_trace_output.rb @@ -1,5 +1,5 @@ -require File.expand_path('../helper', __FILE__) -require 'stringio' +require File.expand_path("../helper", __FILE__) +require "stringio" class TestTraceOutput < Rake::TestCase include Rake::TraceOutput From b061c4cd24d61952b1357028da6a154bd7d84e80 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 17:25:51 +0900 Subject: [PATCH 576/813] order --- .rubocop.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 0fe6f92e9..538cd67e4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,19 +4,19 @@ AllCops: Exclude: - rake.gemspec -Style/StringLiterals: +LineLength: Enabled: true - EnforcedStyle: double_quotes - -SpaceAroundEqualsInParameterDefault: - Enabled: false + Max: 120 Style/HashSyntax: Enabled: true -LineLength: +Style/StringLiterals: Enabled: true - Max: 120 + EnforcedStyle: double_quotes + +SpaceAroundEqualsInParameterDefault: + Enabled: false WhileUntilModifier: Enabled: false From c4f34774136e376aa44358f51c0161bc05fb2c4d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 17:34:13 +0900 Subject: [PATCH 577/813] adjust indentations --- .rubocop.yml | 7 +++++++ lib/rake/thread_pool.rb | 2 +- test/test_rake_application.rb | 4 ++-- test/test_rake_file_task.rb | 8 ++++---- test/test_rake_win32.rb | 2 +- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 538cd67e4..9a18ef736 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,6 +2,7 @@ AllCops: TargetRubyVersion: 2.3 DisabledByDefault: true Exclude: + - doc/**/*.rb - rake.gemspec LineLength: @@ -15,6 +16,12 @@ Style/StringLiterals: Enabled: true EnforcedStyle: double_quotes +Style/IndentationWidth: + Enabled: true + +Style/Tab: + Enabled: true + SpaceAroundEqualsInParameterDefault: Enabled: false diff --git a/lib/rake/thread_pool.rb b/lib/rake/thread_pool.rb index 370caa18c..1c2f5f50f 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -103,7 +103,7 @@ def process_queue_item #:nodoc: promise.work return true - rescue ThreadError # this means the queue is empty + rescue ThreadError # this means the queue is empty false end diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 740579737..e5b7aa0e7 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -515,7 +515,7 @@ def test_bad_run_with_backtrace def test_bad_run_includes_exception_name @app.intern(Rake::Task, "default").enhance { - raise CustomError, "intentional" + raise CustomError, "intentional" } setup_command_line("-f", "-s") _, err = capture_io { @@ -535,7 +535,7 @@ def test_rake_error_excludes_exception_name assert_raises(SystemExit) { @app.run } - } + } refute_match(/RuntimeError/, err) assert_match(/intentional/, err) end diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index e6caf2a46..6330886d9 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -160,12 +160,12 @@ def test_sources_is_all_prerequisites end def test_task_can_be_pathname - name = "dummy" - file Pathname.new name + name = "dummy" + file Pathname.new name - ftask = Task[name] + ftask = Task[name] - assert_equal name.to_s, ftask.name + assert_equal name.to_s, ftask.name end def test_prerequisite_can_be_pathname diff --git a/test/test_rake_win32.rb b/test/test_rake_win32.rb index decb18f08..be95adb92 100644 --- a/test/test_rake_win32.rb +++ b/test/test_rake_win32.rb @@ -54,7 +54,7 @@ def test_win32_system_dir_nil_of_no_env_vars def test_win32_backtrace_with_different_case ex = nil begin - raise "test exception" + raise "test exception" rescue => ex end From 468d03a660b9ddf0e63863b83ed3e54bf4946fe2 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 17:34:42 +0900 Subject: [PATCH 578/813] full name --- .rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 9a18ef736..2f710f12d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,7 +5,7 @@ AllCops: - doc/**/*.rb - rake.gemspec -LineLength: +Style/LineLength: Enabled: true Max: 120 From c969db3abc80da65f7985761149a21ff722d453e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 17:38:55 +0900 Subject: [PATCH 579/813] removed extra white lines --- .rubocop.yml | 9 +++++++++ lib/rake/name_space.rb | 1 - test/test_rake_application.rb | 1 - test/test_rake_extension.rb | 1 - test/test_rake_file_list_path_map.rb | 1 - test/test_rake_path_map_explode.rb | 1 - test/test_rake_path_map_partial.rb | 1 - 7 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 2f710f12d..fd03511ba 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -22,6 +22,15 @@ Style/IndentationWidth: Style/Tab: Enabled: true +Style/EmptyLines: + Enabled: true + +Style/TrailingBlankLines: + Enabled: true + +Style/TrailingWhitespace: + Enabled: true + SpaceAroundEqualsInParameterDefault: Enabled: false diff --git a/lib/rake/name_space.rb b/lib/rake/name_space.rb index 58f911e43..0d7eb80b6 100644 --- a/lib/rake/name_space.rb +++ b/lib/rake/name_space.rb @@ -35,4 +35,3 @@ def tasks end end - diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index e5b7aa0e7..8e932214a 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -293,7 +293,6 @@ def test_load_rakefile_not_found options.silent = true end - ex = assert_raises(RuntimeError) do @app.instance_eval do raw_load_rakefile diff --git a/test/test_rake_extension.rb b/test/test_rake_extension.rb index f9b2e2885..293ec1304 100644 --- a/test/test_rake_extension.rb +++ b/test/test_rake_extension.rb @@ -29,7 +29,6 @@ def ok_method end end - DUP_ERRS = error_redirect do rake_extension("duplicate_method") do def duplicate_method diff --git a/test/test_rake_file_list_path_map.rb b/test/test_rake_file_list_path_map.rb index b75d040d7..28953a97a 100644 --- a/test/test_rake_file_list_path_map.rb +++ b/test/test_rake_file_list_path_map.rb @@ -12,4 +12,3 @@ def test_file_list_supports_pathmap_with_a_block assert_equal ["A", "B"], mapped end end - diff --git a/test/test_rake_path_map_explode.rb b/test/test_rake_path_map_explode.rb index 5845abf90..554a02266 100644 --- a/test/test_rake_path_map_explode.rb +++ b/test/test_rake_path_map_explode.rb @@ -31,4 +31,3 @@ def test_explode end end end - diff --git a/test/test_rake_path_map_partial.rb b/test/test_rake_path_map_partial.rb index 2a71239fe..0adc24313 100644 --- a/test/test_rake_path_map_partial.rb +++ b/test/test_rake_path_map_partial.rb @@ -15,4 +15,3 @@ def @path.call(n) assert_equal("1/2", @path.call(-3)) end end - From a652a3b23ff9f9e029193152cfbec28f5e9877f6 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 17:40:37 +0900 Subject: [PATCH 580/813] removed unused cops --- .rubocop.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index fd03511ba..5aad6f666 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -30,12 +30,3 @@ Style/TrailingBlankLines: Style/TrailingWhitespace: Enabled: true - -SpaceAroundEqualsInParameterDefault: - Enabled: false - -WhileUntilModifier: - Enabled: false - -IfUnlessModifier: - Enabled: false From 63191d51f38374329ee1222b8973dd3d5bda4314 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 17:47:34 +0900 Subject: [PATCH 581/813] added space cop inside/outside blocks --- .rubocop.yml | 9 +++++++++ lib/rake/task_manager.rb | 2 +- test/support/ruby_runner.rb | 4 ++-- test/test_rake_application.rb | 2 +- test/test_rake_file_list.rb | 2 +- test/test_rake_rules.rb | 4 ++-- test/test_rake_task.rb | 4 ++-- test/test_rake_task_arguments.rb | 6 +++--- test/test_rake_task_with_arguments.rb | 6 +++--- 9 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 5aad6f666..299794a46 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -30,3 +30,12 @@ Style/TrailingBlankLines: Style/TrailingWhitespace: Enabled: true + +Style/SpaceBeforeBlockBraces: + Enabled: true + +Style/SpaceInsideBlockBraces: + Enabled: true + +Style/SpaceInsideHashLiteralBraces: + Enabled: true diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 960d70654..9b3c0efb3 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -256,7 +256,7 @@ def attempt_rule(task_name, args, extensions, block, level) return nil end } - task = FileTask.define_task(task_name, {args => prereqs}, &block) + task = FileTask.define_task(task_name, { args => prereqs }, &block) task.sources = prereqs task end diff --git a/test/support/ruby_runner.rb b/test/support/ruby_runner.rb index d51dd24b8..199f60dd6 100644 --- a/test/support/ruby_runner.rb +++ b/test/support/ruby_runner.rb @@ -18,13 +18,13 @@ def rake(*rake_options) def run_ruby(option_list) puts "COMMAND: [#{RUBY} #{option_list.join ' '}]" if @verbose - Open3.popen3(RUBY, *option_list) {|inn, out, err, wait| + Open3.popen3(RUBY, *option_list) do |inn, out, err, wait| inn.close @exit = wait ? wait.value : $? @out = out.read @err = err.read - } + end puts "OUTPUT: [#{@out}]" if @verbose puts "ERROR: [#{@err}]" if @verbose diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 8e932214a..85b55b013 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -479,7 +479,7 @@ def test_bad_run @app.intern(Rake::Task, "default").enhance { fail } setup_command_line("-f", "-s", '--rakelib=""') _, err = capture_io { - assert_raises(SystemExit){ @app.run } + assert_raises(SystemExit) { @app.run } } assert_match(/see full trace/i, err) ensure diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index aaf818b86..b910b7b9f 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -377,7 +377,7 @@ def test_gsub! def test_egrep_returns_0_if_no_matches files = FileList["test/lib/*_test.rb"].exclude("test/lib/filelist_test.rb") - assert_equal 0, files.egrep(/XYZZY/) { } + assert_equal 0, files.egrep(/XYZZY/) {} end def test_egrep_with_output diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index 6608b038b..7806ed11c 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -344,7 +344,7 @@ def test_regex_rule_with_args def test_string_rule_with_args_and_lambda_prereq delete_file(OBJFILE) create_file(SRCFILE) - rule ".o", [:a] => [lambda{SRCFILE}]do |t, args| + rule ".o", [:a] => [lambda { SRCFILE }]do |t, args| assert_equal "arg", args.a end Task[OBJFILE].invoke("arg") @@ -353,7 +353,7 @@ def test_string_rule_with_args_and_lambda_prereq def test_regex_rule_with_args_and_lambda_prereq delete_file(OBJFILE) create_file(SRCFILE) - rule(/.o$/, [:a] => [lambda{SRCFILE}]) do |t, args| + rule(/.o$/, [:a] => [lambda { SRCFILE }]) do |t, args| assert_equal "arg", args.a end Task[OBJFILE].invoke("arg") diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 80243d83d..36d50fe9f 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -112,7 +112,7 @@ def test_can_double_invoke_with_reenable def test_clear desc "a task" - t = task("t", ["b"] => "a") { } + t = task("t", ["b"] => "a") {} t.clear assert t.prerequisites.empty?, "prerequisites should be empty" assert t.actions.empty?, "actions should be empty" @@ -128,7 +128,7 @@ def test_clear_prerequisites end def test_clear_actions - t = task("t") { } + t = task("t") {} t.clear_actions assert t.actions.empty?, "actions should be empty" end diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 22e84c448..abf010c81 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -16,12 +16,12 @@ def test_empty_arg_list_is_empty def test_multiple_values_in_args ta = Rake::TaskArguments.new([:a, :b, :c], [:one, :two, :three]) - assert_equal({a: :one, b: :two, c: :three}, ta.to_hash) + assert_equal({ a: :one, b: :two, c: :three }, ta.to_hash) end def test_blank_values_in_args ta = Rake::TaskArguments.new([:a, :b, :c], ["", :two, ""]) - assert_equal({b: :two}, ta.to_hash) + assert_equal({ b: :two }, ta.to_hash) end def test_has_key @@ -78,7 +78,7 @@ def test_args_do_not_reference_env_values def test_creating_new_argument_scopes parent = Rake::TaskArguments.new(["p"], [1]) child = parent.new_scope(["c", "p"]) - assert_equal({p: 1}, child.to_hash) + assert_equal({ p: 1 }, child.to_hash) assert_equal 1, child.p assert_equal 1, child["p"] assert_equal 1, child[:p] diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index 64001c5a9..ba28d11f9 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -48,7 +48,7 @@ def test_arg_list_is_empty_if_no_args_given def test_tasks_can_access_arguments_as_hash t = task :t, :a, :b, :c do |tt, args| - assert_equal({a: 1, b: 2, c: 3}, args.to_hash) + assert_equal({ a: 1, b: 2, c: 3 }, args.to_hash) assert_equal 1, args[:a] assert_equal 2, args[:b] assert_equal 3, args[:c] @@ -74,7 +74,7 @@ def test_actions_of_various_arity_are_ok_with_args t.enhance do |t2, args| notes << :d assert_equal t, t2 - assert_equal({x: 1}, args.to_hash) + assert_equal({ x: 1 }, args.to_hash) end t.invoke(1) assert_equal [:a, :b, :c, :d], notes @@ -111,7 +111,7 @@ def test_arguments_are_passed_to_all_blocks end def test_block_with_no_parameters_is_ok - t = task(:t) { } + t = task(:t) {} t.invoke(1, 2) end From e5f59e5c1a71fc29e2625f7a37c30c0c622d98db Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 17:53:47 +0900 Subject: [PATCH 582/813] adopt condition indentation and end alignment --- .rubocop.yml | 7 +++++++ test/test_rake_file_list.rb | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 299794a46..8fd6b5bfe 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -39,3 +39,10 @@ Style/SpaceInsideBlockBraces: Style/SpaceInsideHashLiteralBraces: Enabled: true + +Style/CaseIndentation: + Enabled: true + +Lint/EndAlignment: + Enabled: true + AlignWith: variable diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index b910b7b9f..32ca7a8e3 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -665,10 +665,10 @@ def test_special_return_delegating_methods_object_type FileList::SPECIAL_RETURN.each do |m| r = if [].method(m).arity == 1 - f.send(m, []) - else - f.send(m) - end + f.send(m, []) + else + f.send(m) + end assert_equal custom_file_list, r.class end From e824318a287818ec70cdec0c91b0ebad31b9bad7 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 17:55:47 +0900 Subject: [PATCH 583/813] use parentheses on method definitions --- .rubocop.yml | 3 +++ test/test_rake_application.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 8fd6b5bfe..0b69061f9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -43,6 +43,9 @@ Style/SpaceInsideHashLiteralBraces: Style/CaseIndentation: Enabled: true +Style/MethodDefParentheses: + Enabled: true + Lint/EndAlignment: Enabled: true AlignWith: variable diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 85b55b013..c60dd8e4e 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -642,7 +642,7 @@ def util_loader loader = Object.new loader.instance_variable_set :@load_called, false - def loader.load arg + def loader.load(arg) raise ArgumentError, arg unless arg == "x.dummy" @load_called = true end From bc3ec67b6c76762ffeb5d1c4533ae235566d459e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 17:58:25 +0900 Subject: [PATCH 584/813] removed redundant braces --- .rubocop.yml | 3 +++ test/test_rake_task_arguments.rb | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 0b69061f9..2c89933e7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -46,6 +46,9 @@ Style/CaseIndentation: Style/MethodDefParentheses: Enabled: true +Style/BracesAroundHashParameters: + Enabled: true + Lint/EndAlignment: Enabled: true AlignWith: variable diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index abf010c81..fd7165a3d 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -93,14 +93,14 @@ def test_child_hides_parent_arg_names def test_default_arguments_values_can_be_merged ta = Rake::TaskArguments.new(["aa", "bb"], [nil, "original_val"]) - ta.with_defaults({ aa: "default_val" }) + ta.with_defaults(aa: "default_val") assert_equal "default_val", ta[:aa] assert_equal "original_val", ta[:bb] end def test_default_arguments_that_dont_match_names_are_ignored ta = Rake::TaskArguments.new(["aa", "bb"], [nil, "original_val"]) - ta.with_defaults({ "cc" => "default_val" }) + ta.with_defaults("cc" => "default_val") assert_nil ta[:cc] end From 3352b5f2cd9b0964f6eb7926f95ab642e37c5782 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Sep 2016 18:03:51 +0900 Subject: [PATCH 585/813] removed then --- .rubocop.yml | 3 +++ lib/rake/task_manager.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 2c89933e7..acdf2e117 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -43,6 +43,9 @@ Style/SpaceInsideHashLiteralBraces: Style/CaseIndentation: Enabled: true +Style/MultilineIfThen: + Enabled: true + Style/MethodDefParentheses: Enabled: true diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 9b3c0efb3..b62edc8e3 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -24,7 +24,7 @@ def define_task(task_class, *args, &block) # :nodoc: original_scope = @scope if String === task_name and - not task_class.ancestors.include? Rake::FileTask then + not task_class.ancestors.include? Rake::FileTask task_name, *definition_scope = *(task_name.split(":").reverse) @scope = Scope.make(*(definition_scope + @scope.to_a)) end From 126d3ad412f8bf4a1e12f2ad324bdc70d9ea3ce4 Mon Sep 17 00:00:00 2001 From: jimweirich Date: Sun, 25 Jul 2004 03:59:46 +0000 Subject: [PATCH 586/813] Revert 0712aed to 0f28752 --- lib/rake/testtask.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 4fb871e46..40218ae53 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -155,7 +155,7 @@ def file_list # :nodoc: else result = [] result += @test_files.to_a if @test_files - result << @pattern if @pattern + result += FileList[@pattern].to_a if @pattern result end end From c04b7bf32fefc760a046084923bc371ddeb1b20e Mon Sep 17 00:00:00 2001 From: Code Ass Date: Fri, 2 Sep 2016 04:36:23 +0900 Subject: [PATCH 587/813] Fix t.pattern test, it supports glob --- test/test_rake_test_task.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 9b3450334..8d25c3d05 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -82,18 +82,24 @@ def test_libs_equals_empty end def test_pattern_equals + ['gl.rb', 'ob.rb'].each do |f| + create_file(f) + end tt = Rake::TestTask.new do |t| t.pattern = "*.rb" end - assert_equal ["*.rb"], tt.file_list.to_a + assert_equal ["gl.rb", "ob.rb"], tt.file_list.to_a end def test_pattern_equals_test_files_equals + ['gl.rb', 'ob.rb'].each do |f| + create_file(f) + end tt = Rake::TestTask.new do |t| t.test_files = FileList["a.rb", "b.rb"] t.pattern = "*.rb" end - assert_equal ["a.rb", "b.rb", "*.rb"], tt.file_list.to_a + assert_equal ["a.rb", "b.rb", "gl.rb", "ob.rb"], tt.file_list.to_a end def test_run_code_direct From 038cef6eaa2c94b650f512d510ef2b4ba0037fe1 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 9 Sep 2016 13:32:15 +0900 Subject: [PATCH 588/813] multiline --- rake.gemspec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index f5151fd1d..21c3f9cde 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -9,7 +9,17 @@ Gem::Specification.new do |s| s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] s.summary = "Rake is a Make-like program implemented in Ruby".freeze - s.description = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are\nspecified in standard Ruby syntax.\n\nRake has the following features:\n\n* Rakefiles (rake's version of Makefiles) are completely defined in\n standard Ruby syntax. No XML files to edit. No quirky Makefile\n syntax to worry about (is that a tab or a space?)\n\n* Users can specify tasks with prerequisites.\n\n* Rake supports rule patterns to synthesize implicit tasks.\n\n* Flexible FileLists that act like arrays but know about manipulating\n file names and paths.\n\n* Supports parallel execution of tasks.".freeze + s.description = <<-DESCRIPTION +Rake is a Make-like program implemented in Ruby. Tasks and dependencies are +specified in standard Ruby syntax. +Rake has the following features: + * Rakefiles (rake's version of Makefiles) are completely defined in standard Ruby syntax. + No XML files to edit. No quirky Makefile syntax to worry about (is that a tab or a space?) + * Users can specify tasks with prerequisites. + * Rake supports rule patterns to synthesize implicit tasks. + * Flexible FileLists that act like arrays but know about manipulating file names and paths. + * Supports parallel execution of tasks. + DESCRIPTION s.homepage = "https://github.com/ruby/rake".freeze s.licenses = ["MIT".freeze] From 65b643209d82e7f04f5568aa1c22d3969fef3f2a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 10 Sep 2016 10:51:57 +0900 Subject: [PATCH 589/813] No Fixnum --- lib/rake.rb | 1 - lib/rake/application.rb | 2 +- lib/rake/ext/fixnum.rb | 18 ------------------ 3 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 lib/rake/ext/fixnum.rb diff --git a/lib/rake.rb b/lib/rake.rb index ece6882c6..07b03284b 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -32,7 +32,6 @@ module Rake; end require "ostruct" require "rake/ext/string" -require "rake/ext/fixnum" require "rake/win32" diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 464b11374..e94f17290 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -449,7 +449,7 @@ def standard_rake_options # :nodoc: "(default is number of CPU cores + 4)", lambda { |value| if value.nil? || value == "" - value = Fixnum::MAX + value = Float::INFINITY elsif value =~ /^\d+$/ value = value.to_i else diff --git a/lib/rake/ext/fixnum.rb b/lib/rake/ext/fixnum.rb deleted file mode 100644 index 56079ee6d..000000000 --- a/lib/rake/ext/fixnum.rb +++ /dev/null @@ -1,18 +0,0 @@ -#-- -# Extensions to fixnum to define some constants missing from Ruby itself - -class Fixnum - - unless constants.include? :MAX - - # future versions of Ruby may end up defining this constant - # in a more portable way, as documented by Matz himself in: - # - # https://bugs.ruby-lang.org/issues/7517 - # - # ... but until such time, we define the constant ourselves - MAX = (2**(0.size * 8 - 2) - 1) # :nodoc: - - end - -end From 9d82a27d0c13bfb287fdb892d264362aa032de7d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 10 Sep 2016 12:26:16 +0900 Subject: [PATCH 590/813] avoid to test fail caused by bundler-1.13.0 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 62088270f..85b036757 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ rvm: - jruby-9.1.0.0 - jruby-head before_install: + - gem update --system - gem install bundler --no-document before_script: - unset JRUBY_OPTS From b82883f641b849f478cd46c29a8b108275a99d62 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 10 Sep 2016 14:00:38 +0900 Subject: [PATCH 591/813] use bundler-1.12.x --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 85b036757..32dc1880c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,8 @@ rvm: - jruby-9.1.0.0 - jruby-head before_install: - - gem update --system - - gem install bundler --no-document + - gem install bundler -v '~> 1.12.5' --no-document + before_script: - unset JRUBY_OPTS script: ruby -Ilib exe/rake From f6e54ca1a862dd5f126582db3a741af6970cc9c1 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 10 Sep 2016 15:26:04 +0900 Subject: [PATCH 592/813] removed latest bundler --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 32dc1880c..33ab17188 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ rvm: - jruby-9.1.0.0 - jruby-head before_install: + - gem uninstall bundler - gem install bundler -v '~> 1.12.5' --no-document before_script: From 5123a749b9a98adfe61373e0cfb7aea35ac10b9f Mon Sep 17 00:00:00 2001 From: Code Ass Date: Mon, 12 Sep 2016 01:49:15 +0900 Subject: [PATCH 593/813] Add test for Rake::TestTask#loader is :direct and file set not given --- test/test_rake_test_task.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 8d25c3d05..196c7fb54 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -103,11 +103,19 @@ def test_pattern_equals_test_files_equals end def test_run_code_direct + globbed = ['test_gl.rb', 'test_ob.rb'].map { |f| File.join('test', f) } + others = ['a.rb', 'b.rb'].map { |f| File.join('test', f) } + (globbed + others).each do |f| + create_file(f) + end test_task = Rake::TestTask.new do |t| t.loader = :direct + # if t.pettern and t.test_files are nil, + # t.pettern is "test/test*.rb" end assert_equal '-e "ARGV.each{|f| require f}"', test_task.run_code + assert_equal globbed, test_task.file_list.to_a end def test_run_code_rake From 65c55b0af15fd35b3807c3d102eeaaa1d6a38052 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 14 Sep 2016 07:20:35 +0900 Subject: [PATCH 594/813] try to 1.13.1 --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 33ab17188..62088270f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,7 @@ rvm: - jruby-9.1.0.0 - jruby-head before_install: - - gem uninstall bundler - - gem install bundler -v '~> 1.12.5' --no-document - + - gem install bundler --no-document before_script: - unset JRUBY_OPTS script: ruby -Ilib exe/rake From 1aa2db80f5b4a16f4db9b7d23fbfc516402a69df Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 15 Sep 2016 17:04:00 +0900 Subject: [PATCH 595/813] Try to ~> 1.12.x --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 62088270f..92ba4e650 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ rvm: - jruby-9.1.0.0 - jruby-head before_install: - - gem install bundler --no-document + - gem install bundler -v '~> 1.12.5' --no-document before_script: - unset JRUBY_OPTS script: ruby -Ilib exe/rake From 2d7668d00f2aea67e813e7279717b2db40301cdb Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 15 Sep 2016 22:24:26 +0900 Subject: [PATCH 596/813] added workaround for bundler internal --- .travis.yml | 2 +- Rakefile | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 92ba4e650..62088270f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ rvm: - jruby-9.1.0.0 - jruby-head before_install: - - gem install bundler -v '~> 1.12.5' --no-document + - gem install bundler --no-document before_script: - unset JRUBY_OPTS script: ruby -Ilib exe/rake diff --git a/Rakefile b/Rakefile index e0d2ced3d..6179be099 100644 --- a/Rakefile +++ b/Rakefile @@ -9,6 +9,9 @@ lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +# XXX: https://github.com/bundler/bundler/pull/4981 +require "bundler/plugin/api/source" + require "bundler/gem_tasks" require "rake/testtask" require "rdoc/task" From 36866f924de9421c25fe286e9e4d275b799d9475 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 15 Sep 2016 22:39:35 +0900 Subject: [PATCH 597/813] tweak bundler --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2710426ad..a2761f8ce 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,9 +4,8 @@ clone_depth: 10 install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - ruby --version - - gem update --system - gem --version - - gem install minitest --no-document + - gem install minitest bundler --no-document build_script: - net user - net localgroup From b4ddc3ab1592f024af7289850389a3aac066420d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 16 Sep 2016 07:31:19 +0900 Subject: [PATCH 598/813] style --- appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a2761f8ce..62378b53a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,7 +11,6 @@ build_script: - net localgroup test_script: - ruby -Ilib exe/rake - environment: matrix: - ruby_version: "193" From 24cafd5a48096bb526a1180d7067b472f412fc50 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 10 Sep 2016 10:51:57 +0900 Subject: [PATCH 599/813] cherry-picked 65b643209d82e7f04f5568aa1c22d3969fef3f2a --- lib/rake.rb | 1 - lib/rake/application.rb | 2 +- lib/rake/ext/fixnum.rb | 18 ------------------ 3 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 lib/rake/ext/fixnum.rb diff --git a/lib/rake.rb b/lib/rake.rb index a2f1b448e..2466e3992 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -32,7 +32,6 @@ module Rake; end require 'ostruct' require 'rake/ext/string' -require 'rake/ext/fixnum' require 'rake/win32' diff --git a/lib/rake/application.rb b/lib/rake/application.rb index fc0a786d6..8c93a8d4f 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -449,7 +449,7 @@ def standard_rake_options # :nodoc: "(default is number of CPU cores + 4)", lambda { |value| if value.nil? || value == '' - value = Fixnum::MAX + value = Float::INFINITY elsif value =~ /^\d+$/ value = value.to_i else diff --git a/lib/rake/ext/fixnum.rb b/lib/rake/ext/fixnum.rb deleted file mode 100644 index 56079ee6d..000000000 --- a/lib/rake/ext/fixnum.rb +++ /dev/null @@ -1,18 +0,0 @@ -#-- -# Extensions to fixnum to define some constants missing from Ruby itself - -class Fixnum - - unless constants.include? :MAX - - # future versions of Ruby may end up defining this constant - # in a more portable way, as documented by Matz himself in: - # - # https://bugs.ruby-lang.org/issues/7517 - # - # ... but until such time, we define the constant ourselves - MAX = (2**(0.size * 8 - 2) - 1) # :nodoc: - - end - -end From 050c7d4900a691215e953b1de122d1bd60d32254 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 20 Sep 2016 16:00:35 +0900 Subject: [PATCH 600/813] History --- History.rdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/History.rdoc b/History.rdoc index 6ff5088df..c306c2108 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,9 @@ +=== 11.3.0 / 2016-09-20 + +Enhancements: + +* Remove to reference `Fixnum` constant. Pull request #160 by nobu + === 11.2.2 / 2016-06-12 Bug fixes: From 08576365d9acb9a76ce36a4448953be21f001b5f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 20 Sep 2016 16:01:03 +0900 Subject: [PATCH 601/813] bump version to 11.3.0 --- lib/rake/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/version.rb b/lib/rake/version.rb index c9660a45e..003f0176a 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,5 +1,5 @@ module Rake - VERSION = '11.2.2' + VERSION = '11.3.0' module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split '.' From 2a15e60f3437f494754097523318af8360c5ccf9 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 20 Sep 2016 16:04:35 +0900 Subject: [PATCH 602/813] up to date --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index 04bbd3327..6234bd553 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -5,7 +5,7 @@ require 'rake/version' Gem::Specification.new do |s| s.name = "rake".freeze s.version = Rake::VERSION - s.date = "2016-06-12" + s.date = "2016-09-20" s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] From 477535e2e11386ae661a0a881d331f735713d48c Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 20 Sep 2016 17:19:26 +0900 Subject: [PATCH 603/813] workaround for bundler-1.13.1 --- Rakefile | 4 ++++ appveyor.yml | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 97c22a45f..a2526132a 100644 --- a/Rakefile +++ b/Rakefile @@ -9,6 +9,10 @@ lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +# XXX: https://github.com/bundler/bundler/pull/4981 +require 'bundler/plugin/api/source' + require 'bundler/gem_tasks' require 'rake/testtask' require 'rdoc/task' diff --git a/appveyor.yml b/appveyor.yml index 2710426ad..62378b53a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,15 +4,13 @@ clone_depth: 10 install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - ruby --version - - gem update --system - gem --version - - gem install minitest --no-document + - gem install minitest bundler --no-document build_script: - net user - net localgroup test_script: - ruby -Ilib exe/rake - environment: matrix: - ruby_version: "193" From 21130fe15db191d4a097c4d150f7e17e8c56ad56 Mon Sep 17 00:00:00 2001 From: Brett Sykes Date: Tue, 20 Sep 2016 11:25:07 -0400 Subject: [PATCH 604/813] show extended output on testtask fail only with verbose or trace --- lib/rake/testtask.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 4fb871e46..85dd8552b 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -116,8 +116,9 @@ def define if !ok && status.respond_to?(:signaled?) && status.signaled? raise SignalException.new(status.termsig) elsif !ok - fail "Command failed with status (#{status.exitstatus}): " + - "[ruby #{args}]" + status = "Command failed with status (#{status.exitstatus})" + details = ": [ruby #{args}]" + fail (ARGV.include?('--trace') || @verbose) ? (status + details) : status end end end From b878500058fd7ac669d9988b3ef242188a14c1ba Mon Sep 17 00:00:00 2001 From: Brett Sykes Date: Tue, 20 Sep 2016 14:27:46 -0400 Subject: [PATCH 605/813] updates based on comments from drbrain --- lib/rake/testtask.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 85dd8552b..1a83c30ec 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -118,7 +118,14 @@ def define elsif !ok status = "Command failed with status (#{status.exitstatus})" details = ": [ruby #{args}]" - fail (ARGV.include?('--trace') || @verbose) ? (status + details) : status + message = + if Rake.application.options.trace or @verbose then + status + details + else + status + end + + fail message end end end From 59e4a0945e5296b748b696d7352a9f4263b77638 Mon Sep 17 00:00:00 2001 From: ogawatti Date: Fri, 30 Sep 2016 17:20:38 +0900 Subject: [PATCH 606/813] fix to_hash bug TaskArguments#to_hash is return @hash object. The method should be return duplicated object like a "to_a". --- lib/rake/task_arguments.rb | 2 +- test/test_rake_task_arguments.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index 7d6275f44..bbadf305b 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -68,7 +68,7 @@ def method_missing(sym, *args) # Returns a Hash of arguments and their values def to_hash - @hash + @hash.dup end def to_s # :nodoc: diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index fd7165a3d..262637b3d 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -43,6 +43,14 @@ def test_to_s assert_equal ta.to_hash.inspect, ta.inspect end + def test_to_hash + ta = Rake::TaskArguments.new([:one], [1]) + h = ta.to_hash + h[:one] = 0 + assert_equal 1, ta.fetch(:one) + assert_equal 0, h.fetch(:one) + end + def test_enumerable_behavior ta = Rake::TaskArguments.new([:a, :b, :c], [1, 2, 3]) assert_equal [10, 20, 30], ta.map { |k, v| v * 10 }.sort From 491888997385179f82e12daeccec51539c35b4e5 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 30 Sep 2016 17:28:45 +0900 Subject: [PATCH 607/813] Workaround for Ruby 2.4 --- rake.gemspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rake.gemspec b/rake.gemspec index 21c3f9cde..cedfc520d 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -33,7 +33,7 @@ Rake has the following features: s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] - s.add_development_dependency(%q.freeze, ["~> 1.11"]) - s.add_development_dependency(%q.freeze, ["~> 5.8"]) - s.add_development_dependency(%q.freeze, ["~> 4.0"]) + s.add_development_dependency(%q.freeze) + s.add_development_dependency(%q.freeze) + s.add_development_dependency(%q.freeze, ["~> 5.0.0.beta2"]) end From 913d4a2c7a54a8cdfe5d44124b52ff1cc7a8a046 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 30 Sep 2016 17:31:05 +0900 Subject: [PATCH 608/813] Removed old JRuby version and use latest version --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 62088270f..4351b5673 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,7 @@ rvm: - 2.3.1 - ruby-head - jruby-1.7.20 - - jruby-9.0.5.0 - - jruby-9.1.0.0 + - jruby-9.1.5.0 - jruby-head before_install: - gem install bundler --no-document From 23c1be9bf0ce400867fb2c76263366dd02ca059b Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 30 Sep 2016 17:56:18 +0900 Subject: [PATCH 609/813] skip tests with JRuby 9k. https://travis-ci.org/ruby/rake/jobs/163951069 --- test/test_rake_application.rb | 2 ++ test/test_rake_functional.rb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index c60dd8e4e..62bb4c6ac 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -284,6 +284,8 @@ def test_load_rakefile_doesnt_print_rakefile_directory_from_subdir_if_silent end def test_load_rakefile_not_found + skip if jruby9? + ARGV.clear Dir.chdir @tempdir ENV["RAKE_SYSTEM"] = "not_exist" diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index 55e141728..7c2bd3266 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -122,6 +122,8 @@ def test_by_default_rakelib_files_are_included end def test_implicit_system + skip if jruby9? + rake_system_dir Dir.chdir @tempdir From b4282f6ea714ddfac3d380b032b70d01b2717bbd Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Tue, 27 Sep 2016 15:56:45 -0700 Subject: [PATCH 610/813] Fix typo. --- test/test_rake_clean.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index 04367907a..aac45cae3 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -46,7 +46,7 @@ def create_undeletable_file rescue file_name else - skip "Permission to delete files is different on thie system" + skip "Permission to delete files is different on this system" end end From f2a38bcfd7f0b993a7e2626100e39db2d57f1999 Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Tue, 27 Sep 2016 16:00:16 -0700 Subject: [PATCH 611/813] Teach cleanup to respect the trace option. --- lib/rake/clean.rb | 1 + test/test_rake_clean.rb | 60 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index 1e5da81cb..e3c3b3a4a 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -29,6 +29,7 @@ def cleanup_files(file_names) def cleanup(file_name, opts={}) begin + opts = {:verbose => Rake.application.options.trace}.merge(opts) rm_r file_name, opts rescue StandardError => ex puts "Failed to remove #{file_name}: #{ex}" unless file_already_gone?(file_name) diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index aac45cae3..36ca5305a 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -32,8 +32,56 @@ def test_cleanup_ignores_missing_files refute_match(/failed to remove/i, out) end + def test_cleanup_trace + file_name = create_file + + assert_output "", "rm -r #{file_name}\n" do + with_trace true do + Rake::Cleaner.cleanup(file_name) + end + end + end + + def test_cleanup_without_trace + file_name = create_file + + assert_output "", "" do + with_trace false do + Rake::Cleaner.cleanup(file_name) + end + end + end + + def test_cleanup_opt_overrides_trace_silent + file_name = create_file + + assert_output "", "" do + with_trace true do + Rake::Cleaner.cleanup(file_name, verbose: false) + end + end + end + + def test_cleanup_opt_overrides_trace_verbose + file_name = create_file + + assert_output "", "rm -r #{file_name}\n" do + with_trace false do + Rake::Cleaner.cleanup(file_name, verbose: true) + end + end + end + private + def create_file + dir_name = File.join(@tempdir, "deletedir") + file_name = File.join(dir_name, "deleteme") + FileUtils.mkdir(dir_name) + FileUtils.touch(file_name) + file_name + end + def create_undeletable_file dir_name = File.join(@tempdir, "deletedir") file_name = File.join(dir_name, "deleteme") @@ -58,4 +106,16 @@ def remove_undeletable_file Rake::Cleaner.cleanup(file_name, verbose: false) Rake::Cleaner.cleanup(dir_name, verbose: false) end + + def with_trace value + old, Rake.application.options.trace = + Rake.application.options.trace, value + + # FileUtils caches the $stderr object, which breaks capture_io et. al. + # We hack it here where it's convenient to do so. + Rake::Cleaner.instance_variable_set :@fileutils_output, nil + yield + ensure + Rake.application.options.trace = old + end end From 8641a713de079445f667f9cdb18ea7e22a78c554 Mon Sep 17 00:00:00 2001 From: ogawatti Date: Fri, 30 Sep 2016 17:20:38 +0900 Subject: [PATCH 612/813] fix to_hash bug TaskArguments#to_hash is return @hash object. The method should be return duplicated object like a "to_a". --- lib/rake/task_arguments.rb | 2 +- test/test_rake_task_arguments.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index 7d6275f44..bbadf305b 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -68,7 +68,7 @@ def method_missing(sym, *args) # Returns a Hash of arguments and their values def to_hash - @hash + @hash.dup end def to_s # :nodoc: diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index fd7165a3d..262637b3d 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -43,6 +43,14 @@ def test_to_s assert_equal ta.to_hash.inspect, ta.inspect end + def test_to_hash + ta = Rake::TaskArguments.new([:one], [1]) + h = ta.to_hash + h[:one] = 0 + assert_equal 1, ta.fetch(:one) + assert_equal 0, h.fetch(:one) + end + def test_enumerable_behavior ta = Rake::TaskArguments.new([:a, :b, :c], [1, 2, 3]) assert_equal [10, 20, 30], ta.map { |k, v| v * 10 }.sort From 258a7682dc44d43c81c8d64c275aaa4704631d74 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 3 Oct 2016 18:42:56 +0900 Subject: [PATCH 613/813] picked Rake-11.3.0 history --- History.rdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/History.rdoc b/History.rdoc index be971eab8..4900cf280 100644 --- a/History.rdoc +++ b/History.rdoc @@ -6,6 +6,12 @@ * Removed `rake/contrib` packages. These are extracted to `rake-contrib` gem. * Removed to deprecated warnings for `last\_comment`. +=== 11.3.0 / 2016-09-20 + +Enhancements: + +* Remove to reference `Fixnum` constant. Pull request #160 by nobu + === 11.2.2 / 2016-06-12 ==== Bug fixes From 8da383f23026428d528af9a426dbc98bbf9f92af Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 3 Oct 2016 18:43:22 +0900 Subject: [PATCH 614/813] style --- History.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 4900cf280..a2392fa81 100644 --- a/History.rdoc +++ b/History.rdoc @@ -8,7 +8,7 @@ === 11.3.0 / 2016-09-20 -Enhancements: +==== Enhancements: * Remove to reference `Fixnum` constant. Pull request #160 by nobu From 40d1f629dbc5e4f7e98a8cdb033fdf653107d1a1 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 3 Oct 2016 18:45:18 +0900 Subject: [PATCH 615/813] History #164 --- History.rdoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/History.rdoc b/History.rdoc index a2392fa81..414f3b435 100644 --- a/History.rdoc +++ b/History.rdoc @@ -6,6 +6,10 @@ * Removed `rake/contrib` packages. These are extracted to `rake-contrib` gem. * Removed to deprecated warnings for `last\_comment`. +==== Enhancements: + +* Re-use trace option on `cleanup` task. #164 by Brian Henderson + === 11.3.0 / 2016-09-20 ==== Enhancements: From f9a1b4ab1340f62009b49a834a17dd936208d738 Mon Sep 17 00:00:00 2001 From: chocolateboy Date: Sun, 28 Aug 2016 21:33:20 +0100 Subject: [PATCH 616/813] remove obsolete OPT_TABLE entries As of #138, the `OPT_TABLE` entries for `sh` and `ruby` are no longer used internally, and a GitHub search for these entries suggests that they are not used externally: https://git.io/v6hpi --- lib/rake/file_utils.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index 6bb41940d..aa065e8b4 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -11,9 +11,6 @@ module FileUtils RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]). sub(/.*\s.*/m, '"\&"') - OPT_TABLE["sh"] = %w(noop verbose) - OPT_TABLE["ruby"] = %w(noop verbose) - # Run the system command +cmd+. If multiple arguments are given the command # is run directly (without the shell, same semantics as Kernel::exec and # Kernel::system). From eb5612d1aafb212218b38aa202ded33d67ce9581 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 7 Oct 2016 19:37:20 +0900 Subject: [PATCH 617/813] added ruby 2.3 to appveyor --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 62378b53a..b103fe30d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,3 +20,5 @@ environment: - ruby_version: "21-x64" - ruby_version: "22" - ruby_version: "22-x64" + - ruby_version: "23" + - ruby_version: "23-x64" From 40d9bd09fdfbcff3a50b499324169f21c84e1567 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 7 Oct 2016 19:42:01 +0900 Subject: [PATCH 618/813] tweak appveyor --- appveyor.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b103fe30d..671f63f8b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,16 +1,12 @@ --- -version: "{build}" clone_depth: 10 install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - - ruby --version - - gem --version - - gem install minitest bundler --no-document -build_script: - - net user - - net localgroup + - bundle install +build: off test_script: - ruby -Ilib exe/rake +deploy: off environment: matrix: - ruby_version: "193" From 708ea7197b406a0271dc9e4e7b0ad29b1a804935 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 7 Oct 2016 20:52:26 +0900 Subject: [PATCH 619/813] needs bundler-1.13.x --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 671f63f8b..79847873c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,6 +2,7 @@ clone_depth: 10 install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% + - gem install bundler --no-document - bundle install build: off test_script: From 39bc450f0d6f839e20a0015a6b10e32d636bde0a Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 11 Oct 2016 09:55:32 +0900 Subject: [PATCH 620/813] removed workaround for bundler-1.13.1 --- .travis.yml | 2 +- Rakefile | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4351b5673..d62aebe88 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ rvm: - jruby-9.1.5.0 - jruby-head before_install: - - gem install bundler --no-document + - gem install bundler --no-document -v '~> 1.13.3' before_script: - unset JRUBY_OPTS script: ruby -Ilib exe/rake diff --git a/Rakefile b/Rakefile index 6179be099..e0d2ced3d 100644 --- a/Rakefile +++ b/Rakefile @@ -9,9 +9,6 @@ lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -# XXX: https://github.com/bundler/bundler/pull/4981 -require "bundler/plugin/api/source" - require "bundler/gem_tasks" require "rake/testtask" require "rdoc/task" From 4e7ad163714c304d6c13ec71ceb5d3976d20cf2b Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Thu, 20 Oct 2016 15:20:21 -0700 Subject: [PATCH 621/813] Represent a TaskArgument object such that it's not confused with a hash. --- lib/rake/task_arguments.rb | 8 ++++++-- test/test_rake_task_arguments.rb | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index bbadf305b..4b168f0e2 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -72,11 +72,15 @@ def to_hash end def to_s # :nodoc: - @hash.inspect + inspect end def inspect # :nodoc: - to_s + inspection = @hash.map do |k,v| + "#{k.to_s}: #{v.to_s}" + end.join(", ") + + "#<#{self.class} #{inspection}>" end # Returns true if +key+ is one of the arguments diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 262637b3d..8fcba7424 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -39,8 +39,9 @@ def test_fetch def test_to_s ta = Rake::TaskArguments.new([:a, :b, :c], [1, 2, 3]) - assert_equal ta.to_hash.inspect, ta.to_s - assert_equal ta.to_hash.inspect, ta.inspect + expectation = "#" + assert_equal expectation, ta.to_s + assert_equal expectation, ta.inspect end def test_to_hash From 2511d56aa368fda2de3575e00ffed10ea68593fe Mon Sep 17 00:00:00 2001 From: Josh Cheek Date: Mon, 28 Nov 2016 09:48:50 -0600 Subject: [PATCH 622/813] Actions adore keyword arguments Consider this task: ```ruby task :t, [:arg] do |task, arg: 'default_value'| emotion = "\e[32m^_^\e[0m" emotion = "\e[31mt.t\e[0m" if ARGV[0] =~ /t\[(.*)\]$/ && $1 != arg puts "task #{task.name.inspect} got #{arg.inspect} #{emotion}" end ``` Run this on your machine right now, you'll see the task is in tears. But this commit turns tearful eyes into smiling ones, observe: ```sh $ rake t task "t" got "default_value" ^_^ $ rake t[custom_value] task "t" got "default_value" t.t $ ruby -Ilib exe/rake t task "t" got "default_value" ^_^ $ ruby -Ilib exe/rake t[custom_value] task "t" got "custom_value" ^_^ ``` It accomplishes this by always invoking the action in the same way. Previously, Rake invoke the action with different argument structures based the arity https://github.com/ruby/rake/blob/59856100815b841624269f817c815f54921bf321/lib/rake/task.rb#L251-L256 ```ruby case act.arity when 1 act.call(self) else act.call(self, args) end ``` I assume it's expecting one of these: ```ruby proc { |task| }.arity # => 1 proc { |task, options| }.arity # => 2 ``` However this leads numerous task signatures to be invoked incorrectly. Eg, consider the case of our tearful task above, here is why it cries. ```ruby proc { |task, arg: 'default_value'| }.arity # => 1 ``` The solution is nice and easy: always invoke the block the same way. Why was this ever a thing at all, then? Looks like it was added in 2007 about a month after Ruby 1.8.6 was released. https://github.com/ruby/rake/commit/925fbb80e890029ac9310bc60270890699efc073 Probably something was just different back then, eg the difference between lambdas and procs was whether you did `prc.call` or `prc.yield` https://github.com/ruby/ruby/blob/9b383bd/eval.c#L8356-L8415 --- lib/rake/task.rb | 9 +-------- test/test_rake_task_with_arguments.rb | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 18c09eefd..23faf96e5 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -247,14 +247,7 @@ def execute(args=nil) end application.trace "** Execute #{name}" if application.options.trace application.enhance_with_matching_rule(name) if @actions.empty? - @actions.each do |act| - case act.arity - when 1 - act.call(self) - else - act.call(self, args) - end - end + @actions.each { |act| act.call(self, args) } end # Is this task needed? diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index ba28d11f9..33ec2ca08 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -80,6 +80,31 @@ def test_actions_of_various_arity_are_ok_with_args assert_equal [:a, :b, :c, :d], notes end + + def test_actions_adore_keywords + notes = [] + t = task :t, [:reqr, :ovrd, :dflt] # required, overridden-optional, default-optional + verify = lambda do |name, expecteds, actuals| + notes << name + assert_equal expecteds.length, actuals.length + expecteds.zip(actuals) { |e, a| assert_equal e, a, "(TEST #{name})" } + end + + t.enhance { |dflt: 'd', **| verify.call :a, ['d'], [dflt] } + t.enhance { |ovrd: '-', **| verify.call :b, ['o'], [ovrd] } + t.enhance { |reqr: , **| verify.call :c, ['r'], [reqr] } + + t.enhance { |t2, dflt: 'd', **| verify.call :d, [t,'d'], [t2,dflt] } + t.enhance { |t2, ovrd: 'd', **| verify.call :e, [t,'o'], [t2,ovrd] } + t.enhance { |t2, reqr: , **| verify.call :f, [t,'r'], [t2,reqr] } + + t.enhance { |t2, dflt: 'd', reqr:, **| verify.call :g, [t,'d','r'], [t2,dflt,reqr] } + t.enhance { |t2, ovrd: '-', reqr:, **| verify.call :h, [t,'o','r'], [t2,ovrd,reqr] } + + t.invoke('r', 'o') + assert_equal [*:a..:h], notes + end + def test_arguments_are_passed_to_block t = task(:t, :a, :b) { |tt, args| assert_equal({ a: 1, b: 2 }, args.to_hash) From 57869cd4e3c674a58d2045c14c6e1d202f904110 Mon Sep 17 00:00:00 2001 From: Josh Cheek Date: Mon, 28 Nov 2016 17:38:40 -0600 Subject: [PATCH 623/813] Skip test of Ruby 2.1+ features when run in older environments https://ci.appveyor.com/project/ruby/rake/build/1.0.301 --- test/test_rake_task_with_arguments.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index 33ec2ca08..61f63c121 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -82,6 +82,10 @@ def test_actions_of_various_arity_are_ok_with_args def test_actions_adore_keywords + # A brutish trick to avoid parsing. Remove it once support for 1.9 and 2.0 is dropped + # https://ci.appveyor.com/project/ruby/rake/build/1.0.301 + skip 'Keywords aren\'t a feature in this version' if RUBY_VERSION =~ /^1|^2\.0/ + eval <<-RUBY, binding, __FILE__, __LINE__ notes = [] t = task :t, [:reqr, :ovrd, :dflt] # required, overridden-optional, default-optional verify = lambda do |name, expecteds, actuals| @@ -103,6 +107,7 @@ def test_actions_adore_keywords t.invoke('r', 'o') assert_equal [*:a..:h], notes + RUBY end def test_arguments_are_passed_to_block From 7d664a02ca210fb7c73f99b79a67e833bb0a6457 Mon Sep 17 00:00:00 2001 From: Josh Cheek Date: Mon, 28 Nov 2016 23:32:30 -0600 Subject: [PATCH 624/813] Fix test per https://github.com/ruby/rake/pull/174#discussion_r89925443 --- test/test_rake_task_with_arguments.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index 61f63c121..9c396d3b2 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -85,13 +85,13 @@ def test_actions_adore_keywords # A brutish trick to avoid parsing. Remove it once support for 1.9 and 2.0 is dropped # https://ci.appveyor.com/project/ruby/rake/build/1.0.301 skip 'Keywords aren\'t a feature in this version' if RUBY_VERSION =~ /^1|^2\.0/ - eval <<-RUBY, binding, __FILE__, __LINE__ + eval <<-RUBY, binding, __FILE__, __LINE__+1 notes = [] t = task :t, [:reqr, :ovrd, :dflt] # required, overridden-optional, default-optional verify = lambda do |name, expecteds, actuals| notes << name assert_equal expecteds.length, actuals.length - expecteds.zip(actuals) { |e, a| assert_equal e, a, "(TEST #{name})" } + expecteds.zip(actuals) { |e, a| assert_equal e, a, "(TEST \#{name})" } end t.enhance { |dflt: 'd', **| verify.call :a, ['d'], [dflt] } From 85211d714530627f4290a1800bed9e5d1e44ff16 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 2 Dec 2016 18:05:40 +0900 Subject: [PATCH 625/813] History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 414f3b435..909ebf7b2 100644 --- a/History.rdoc +++ b/History.rdoc @@ -9,6 +9,7 @@ ==== Enhancements: * Re-use trace option on `cleanup` task. #164 by Brian Henderson +* Actions adore keyword arguments #174 by Josh Cheek === 11.3.0 / 2016-09-20 From b85038d0cdbade00488470489bc7048efe3efd77 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 2 Dec 2016 18:05:49 +0900 Subject: [PATCH 626/813] bump version to 12.0.0.beta1 --- lib/rake/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 636c5cea1..c15d7ec99 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,5 +1,5 @@ module Rake - VERSION = "11.2.2" + VERSION = "12.0.0.beta1" module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "." From 2dca36ef169379c5a6b860471c6832fed90b54b6 Mon Sep 17 00:00:00 2001 From: Paul Annesley Date: Tue, 6 Dec 2016 18:05:06 +1100 Subject: [PATCH 627/813] Rake::TaskArguments#key? alias of #has_key? --- lib/rake/task_arguments.rb | 1 + test/test_rake_task_arguments.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index 4b168f0e2..c98057c8f 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -87,6 +87,7 @@ def inspect # :nodoc: def has_key?(key) @hash.has_key?(key) end + alias key? has_key? def fetch(*args, &block) @hash.fetch(*args, &block) diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 8fcba7424..b994862b6 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -27,7 +27,9 @@ def test_blank_values_in_args def test_has_key ta = Rake::TaskArguments.new([:a], [:one]) assert(ta.has_key?(:a)) + assert(ta.key?(:a)) refute(ta.has_key?(:b)) + refute(ta.key?(:b)) end def test_fetch From 4b7762399a20a22ab6d79755f73a7d7de1de41d2 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 6 Dec 2016 16:43:50 +0900 Subject: [PATCH 628/813] added dependency for rubocop --- rake.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/rake.gemspec b/rake.gemspec index cedfc520d..c479a00d9 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -36,4 +36,5 @@ Rake has the following features: s.add_development_dependency(%q.freeze) s.add_development_dependency(%q.freeze) s.add_development_dependency(%q.freeze, ["~> 5.0.0.beta2"]) + s.add_development_dependency(%q.freeze) end From 6835d65e00aa910fcf9f1445c1d95a1c24ab8047 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 6 Dec 2016 16:44:10 +0900 Subject: [PATCH 629/813] use release version of rdoc --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index c479a00d9..ade0454f9 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -35,6 +35,6 @@ Rake has the following features: s.add_development_dependency(%q.freeze) s.add_development_dependency(%q.freeze) - s.add_development_dependency(%q.freeze, ["~> 5.0.0.beta2"]) + s.add_development_dependency(%q.freeze) s.add_development_dependency(%q.freeze) end From 94500607b3052e84455e8a2e9d1add5a73ed09a9 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 6 Dec 2016 16:45:41 +0900 Subject: [PATCH 630/813] formatting --- lib/rake/clean.rb | 2 +- lib/rake/testtask.rb | 2 +- test/test_rake_clean.rb | 2 +- test/test_rake_task_with_arguments.rb | 1 - test/test_rake_test_task.rb | 8 ++++---- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index e3c3b3a4a..f66353a0a 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -29,7 +29,7 @@ def cleanup_files(file_names) def cleanup(file_name, opts={}) begin - opts = {:verbose => Rake.application.options.trace}.merge(opts) + opts = { verbose: Rake.application.options.trace }.merge(opts) rm_r file_name, opts rescue StandardError => ex puts "Failed to remove #{file_name}: #{ex}" unless file_already_gone?(file_name) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 49f9e55f4..bb7f0ee8a 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -119,7 +119,7 @@ def define status = "Command failed with status (#{status.exitstatus})" details = ": [ruby #{args}]" message = - if Rake.application.options.trace or @verbose then + if Rake.application.options.trace or @verbose status + details else status diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index 36ca5305a..5439a415f 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -107,7 +107,7 @@ def remove_undeletable_file Rake::Cleaner.cleanup(dir_name, verbose: false) end - def with_trace value + def with_trace(value) old, Rake.application.options.trace = Rake.application.options.trace, value diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index 9c396d3b2..443b33792 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -80,7 +80,6 @@ def test_actions_of_various_arity_are_ok_with_args assert_equal [:a, :b, :c, :d], notes end - def test_actions_adore_keywords # A brutish trick to avoid parsing. Remove it once support for 1.9 and 2.0 is dropped # https://ci.appveyor.com/project/ruby/rake/build/1.0.301 diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 196c7fb54..8e422f164 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -82,7 +82,7 @@ def test_libs_equals_empty end def test_pattern_equals - ['gl.rb', 'ob.rb'].each do |f| + ["gl.rb", "ob.rb"].each do |f| create_file(f) end tt = Rake::TestTask.new do |t| @@ -92,7 +92,7 @@ def test_pattern_equals end def test_pattern_equals_test_files_equals - ['gl.rb', 'ob.rb'].each do |f| + ["gl.rb", "ob.rb"].each do |f| create_file(f) end tt = Rake::TestTask.new do |t| @@ -103,8 +103,8 @@ def test_pattern_equals_test_files_equals end def test_run_code_direct - globbed = ['test_gl.rb', 'test_ob.rb'].map { |f| File.join('test', f) } - others = ['a.rb', 'b.rb'].map { |f| File.join('test', f) } + globbed = ["test_gl.rb", "test_ob.rb"].map { |f| File.join("test", f) } + others = ["a.rb", "b.rb"].map { |f| File.join("test", f) } (globbed + others).each do |f| create_file(f) end From 1da4dbb04a6d567a1cea7afed68be8ac5fa09b5c Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 6 Dec 2016 19:46:35 +0900 Subject: [PATCH 631/813] use JRuby 9.1.6.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d62aebe88..6e1db29fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ rvm: - 2.3.1 - ruby-head - jruby-1.7.20 - - jruby-9.1.5.0 + - jruby-9.1.6.0 - jruby-head before_install: - gem install bundler --no-document -v '~> 1.13.3' From b5d17e0e6fb4dbe2b01db91fc8fdb2f8c45acca1 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 6 Dec 2016 19:56:10 +0900 Subject: [PATCH 632/813] skip test for jruby bug --- test/test_rake_task_with_arguments.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index 443b33792..5f71b6b1a 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -84,6 +84,8 @@ def test_actions_adore_keywords # A brutish trick to avoid parsing. Remove it once support for 1.9 and 2.0 is dropped # https://ci.appveyor.com/project/ruby/rake/build/1.0.301 skip 'Keywords aren\'t a feature in this version' if RUBY_VERSION =~ /^1|^2\.0/ + # https://github.com/ruby/rake/pull/174#issuecomment-263460761 + skip if jruby9? eval <<-RUBY, binding, __FILE__, __LINE__+1 notes = [] t = task :t, [:reqr, :ovrd, :dflt] # required, overridden-optional, default-optional From ae6f6c6b2d34346c21fcc66c226cb46e863a13fd Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 6 Dec 2016 20:09:52 +0900 Subject: [PATCH 633/813] use assert_nil instead of "assert_equal nil" --- test/test_rake_application_options.rb | 4 ++-- test/test_rake_file_creation_task.rb | 2 +- test/test_rake_file_task.rb | 2 +- test/test_rake_package_task.rb | 2 +- test/test_rake_task.rb | 4 ++-- test/test_rake_task_arguments.rb | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index 4c9a8bf31..149d8dcfd 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -328,12 +328,12 @@ def test_tasks flags("--tasks", "-T") do |opts| assert_equal :tasks, opts.show_tasks assert_equal(//.to_s, opts.show_task_pattern.to_s) - assert_equal nil, opts.show_all_tasks + assert_nil opts.show_all_tasks end flags(["--tasks", "xyz"], ["-Txyz"]) do |opts| assert_equal :tasks, opts.show_tasks assert_equal(/xyz/.to_s, opts.show_task_pattern.to_s) - assert_equal nil, opts.show_all_tasks + assert_nil opts.show_all_tasks end flags(["--tasks", "xyz", "--comments"]) do |opts| assert_equal :tasks, opts.show_tasks diff --git a/test/test_rake_file_creation_task.rb b/test/test_rake_file_creation_task.rb index 3e2d4726b..714e3245b 100644 --- a/test/test_rake_file_creation_task.rb +++ b/test/test_rake_file_creation_task.rb @@ -21,7 +21,7 @@ def test_file_needed FileUtils.rm_rf fc_task.name assert fc_task.needed?, "file should be needed" FileUtils.mkdir fc_task.name - assert_equal nil, fc_task.prerequisites.map { |n| Task[n].timestamp }.max + assert_nil fc_task.prerequisites.map { |n| Task[n].timestamp }.max assert ! fc_task.needed?, "file should not be needed" end diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index 6330886d9..24614dabe 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -28,7 +28,7 @@ def test_file_need open(ftask.name, "w") { |f| f.puts "HI" } - assert_equal nil, ftask.prerequisites.map { |n| Task[n].timestamp }.max + assert_nil ftask.prerequisites.map { |n| Task[n].timestamp }.max assert ! ftask.needed?, "file should not be needed" ensure File.delete(ftask.name) rescue nil diff --git a/test/test_rake_package_task.rb b/test/test_rake_package_task.rb index 6a8b73f4c..7bacb7a52 100644 --- a/test/test_rake_package_task.rb +++ b/test/test_rake_package_task.rb @@ -53,7 +53,7 @@ def test_initialize_noversion assert_equal "pkg", pkg.package_dir assert_equal "pkgr", pkg.name - assert_equal nil, pkg.version + assert_nil pkg.version end def test_clone diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 36d50fe9f..5f5a63e30 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -397,13 +397,13 @@ def test_comments_with_decimal_points def test_comments_do_not_set t = task(:t, :name, :rev) - assert_equal nil, t.comment + assert_nil t.comment end def test_comments_is_nil t = task(:t, :name, :rev) t.comment = nil - assert_equal nil, t.comment + assert_nil t.comment end def test_extended_comments diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index b994862b6..294b11018 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -142,7 +142,7 @@ def test_extra_args_with_less_than_named_arguments assert_equal [:first, :second, :third], ta.names assert_equal "1", ta[:first] assert_equal "two", ta[:second] - assert_equal nil, ta[:third] + assert_nil ta[:third] assert_equal ["1", "two"], ta.to_a assert_equal [], ta.extras end From 6b15f2fa82c0d1ce9215dee0a433b9e42b0e2551 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 6 Dec 2016 20:13:19 +0900 Subject: [PATCH 634/813] cleanup --- test/test_rake_file_creation_task.rb | 1 - test/test_rake_task_arguments.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/test/test_rake_file_creation_task.rb b/test/test_rake_file_creation_task.rb index 714e3245b..35f843e9e 100644 --- a/test/test_rake_file_creation_task.rb +++ b/test/test_rake_file_creation_task.rb @@ -1,7 +1,6 @@ require File.expand_path("../helper", __FILE__) require "fileutils" -###################################################################### class TestRakeFileCreationTask < Rake::TestCase include Rake include Rake::DSL diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 294b11018..383d4a172 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -1,6 +1,5 @@ require File.expand_path("../helper", __FILE__) -###################################################################### class TestRakeTaskArguments < Rake::TestCase def teardown ENV.delete("rev") From 000873f21ef3eaa1b8dd063a138436d22b7fce5c Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 6 Dec 2016 20:14:47 +0900 Subject: [PATCH 635/813] History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index 909ebf7b2..d712e6ae5 100644 --- a/History.rdoc +++ b/History.rdoc @@ -10,6 +10,7 @@ * Re-use trace option on `cleanup` task. #164 by Brian Henderson * Actions adore keyword arguments #174 by Josh Cheek +* Rake::TaskArguments#key? alias of #has_key? #175 by Paul Annesley === 11.3.0 / 2016-09-20 From c1e83191f0b1e7af94aabb36e8dc92f72d3d685d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 6 Dec 2016 20:20:08 +0900 Subject: [PATCH 636/813] remove rubocop, because it needs Ruby 2.0 later. I will drop Ruby 1.9 and JRuby 1.7 at 2017/3 --- rake.gemspec | 1 - 1 file changed, 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index ade0454f9..cb43b7c6b 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -36,5 +36,4 @@ Rake has the following features: s.add_development_dependency(%q.freeze) s.add_development_dependency(%q.freeze) s.add_development_dependency(%q.freeze) - s.add_development_dependency(%q.freeze) end From cd71a538394b751e5ce60801af14fb381239bf9f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 6 Dec 2016 20:25:20 +0900 Subject: [PATCH 637/813] bump version to 12.0.0 --- History.rdoc | 2 +- lib/rake/version.rb | 2 +- rake.gemspec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/History.rdoc b/History.rdoc index d712e6ae5..16c62c8b2 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 12.0.0(dev) +=== 12.0.0 ==== Compatibility Changes diff --git a/lib/rake/version.rb b/lib/rake/version.rb index c15d7ec99..1908ff855 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,5 +1,5 @@ module Rake - VERSION = "12.0.0.beta1" + VERSION = "12.0.0" module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "." diff --git a/rake.gemspec b/rake.gemspec index cb43b7c6b..8479b9314 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -4,7 +4,7 @@ require 'rake/version' Gem::Specification.new do |s| s.name = "rake".freeze s.version = Rake::VERSION - s.date = "2016-06-12" + s.date = "2016-12-06" s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] From 083267f77dbaff199460f6fd11ef6e8ffeca7643 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 6 Dec 2016 21:39:18 +0900 Subject: [PATCH 638/813] Fixed grammers --- History.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index 16c62c8b2..53288e44f 100644 --- a/History.rdoc +++ b/History.rdoc @@ -2,9 +2,9 @@ ==== Compatibility Changes -* Remove arguments on clear #157 by Jesse Bowes +* Removed arguments on clear #157 by Jesse Bowes * Removed `rake/contrib` packages. These are extracted to `rake-contrib` gem. -* Removed to deprecated warnings for `last\_comment`. +* Removed deprecated method named `last\_comment`. ==== Enhancements: From 8524523cf93682be9f717d5ae364dbb36ee6c3d3 Mon Sep 17 00:00:00 2001 From: Yuta Kurotaki Date: Tue, 13 Dec 2016 16:14:06 +0900 Subject: [PATCH 639/813] Fixes documentation typo in rakefile.rdoc --- doc/rakefile.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index 89a28ebee..4014306a1 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -410,7 +410,7 @@ display a list of tasks that have a description. If you use +desc+ to describe your major tasks, you have a semi-automatic way of generating a summary of your Rake file. - traken$ rake -T + $ rake -T (in /home/.../rake) rake clean # Remove any temporary products. rake clobber # Remove any generated file. From 9341b11836b3ad341741d286cf7e7456449cdbc2 Mon Sep 17 00:00:00 2001 From: Lukas Zapletal Date: Fri, 23 Dec 2016 13:30:34 +0100 Subject: [PATCH 640/813] When pattern is nil, enhance_with_matching_rule will not fail --- lib/rake/task_manager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index b62edc8e3..7844f9ed9 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -126,7 +126,7 @@ def enhance_with_matching_rule(task_name, level=0) fail Rake::RuleRecursionOverflowError, "Rule Recursion Too Deep" if level >= 16 @rules.each do |pattern, args, extensions, block| - if pattern.match(task_name) + if pattern && pattern.match(task_name) task = attempt_rule(task_name, args, extensions, block, level) return task if task end From e8000957394a11436c3a1af2c569330778b1f1cb Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Thu, 29 Dec 2016 09:14:51 +0100 Subject: [PATCH 641/813] Travis: add 2.4.0 to matrix, update patch versions --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6e1db29fe..5bfd89097 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,11 @@ rvm: - 1.9.3 - 2.0.0 - 2.1.10 - - 2.2.5 - - 2.3.1 + - 2.2.6 + - 2.3.3 + - 2.4.0 - ruby-head - - jruby-1.7.20 + - jruby-1.7.26 - jruby-9.1.6.0 - jruby-head before_install: From e65f3dba9ca9a496b3c380e22f9e88232924e886 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 4 Jan 2017 15:03:57 +0900 Subject: [PATCH 642/813] Remove an extra assertion As the result of https://bugs.ruby-lang.org/issues/13043, now Exception#cause should not have a loop. In the example https://github.com/jimweirich/rake/issues/272, the code doesn't seem to intend the loop itself but just re-raising the first exception instead of the next exception. Therefore I consider the last assertion superfluous. --- test/test_rake_application.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 62bb4c6ac..cb3a86c07 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -97,7 +97,6 @@ def test_display_exception_details_cause_loop assert_empty out assert_match "cause a", err - assert_match "cause b", err end def test_display_tasks From 25f2e3bc37c90515564498fbc6511e736053075d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 6 Jan 2017 12:54:11 +0900 Subject: [PATCH 643/813] Removed duplicated test. `test_display_exception_details_cause_loop` is same as `test_display_exception_details_cause`. Fixed #185 --- test/test_rake_application.rb | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index cb3a86c07..cd8feebbc 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -72,33 +72,6 @@ def test_display_exception_details_cause assert_match "cause b", err end - def test_display_exception_details_cause_loop - skip "Exception#cause not implemented" unless - Exception.method_defined? :cause - skip if jruby9? # https://github.com/jruby/jruby/issues/3654 - - begin - begin - raise "cause a" - rescue => a - begin - raise "cause b" - rescue - raise a - end - end - rescue => ex - end - - out, err = capture_io do - @app.display_error_message ex - end - - assert_empty out - - assert_match "cause a", err - end - def test_display_tasks @app.options.show_tasks = :tasks @app.options.show_task_pattern = // From 260ba43fecf438b851267959c22e8e972d7776f4 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 6 Jan 2017 17:31:04 +0900 Subject: [PATCH 644/813] Added coveralls gem again --- rake.gemspec | 1 + test/helper.rb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/rake.gemspec b/rake.gemspec index 8479b9314..911384c46 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -36,4 +36,5 @@ Rake has the following features: s.add_development_dependency(%q.freeze) s.add_development_dependency(%q.freeze) s.add_development_dependency(%q.freeze) + s.add_development_dependency(%q.freeze) end diff --git a/test/helper.rb b/test/helper.rb index 7736da72f..532745319 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,5 +1,8 @@ $:.unshift File.expand_path("../../lib", __FILE__) +require 'coveralls' +Coveralls.wear! + gem "minitest", "~> 5" require "minitest/autorun" require "rake" From 98d21c12c9b298095713a4b263ba8b034c3e412f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 6 Jan 2017 17:43:58 +0900 Subject: [PATCH 645/813] To remove Ruby 1.9.3 from travis --- .travis.yml | 1 - appveyor.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5bfd89097..b169da82f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: ruby sudo: false rvm: - - 1.9.3 - 2.0.0 - 2.1.10 - 2.2.6 diff --git a/appveyor.yml b/appveyor.yml index 79847873c..44b19a2de 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,7 +10,6 @@ test_script: deploy: off environment: matrix: - - ruby_version: "193" - ruby_version: "200" - ruby_version: "200-x64" - ruby_version: "21" From 34f5e2e27d2c49431b7c84d0787eaf6afcddf794 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 6 Jan 2017 17:47:20 +0900 Subject: [PATCH 646/813] Remove old version of JRuby 1.7.x --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b169da82f..3ce147993 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,6 @@ rvm: - 2.3.3 - 2.4.0 - ruby-head - - jruby-1.7.26 - jruby-9.1.6.0 - jruby-head before_install: From b0c268ec29979ac646a6ce664b54d99e01576b11 Mon Sep 17 00:00:00 2001 From: Code Ass Date: Wed, 7 Dec 2016 01:06:55 +0900 Subject: [PATCH 647/813] Add rakefile_file_chains for test --- test/support/rakefile_definitions.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/support/rakefile_definitions.rb b/test/support/rakefile_definitions.rb index e0af05a67..9a19d43fc 100644 --- a/test/support/rakefile_definitions.rb +++ b/test/support/rakefile_definitions.rb @@ -77,6 +77,24 @@ def rakefile_chains DEFAULT end + def rakefile_file_chains + rakefile <<-RAKEFILE +file "fileA" do |t| + sh "echo contentA >\#{t.name}" +end + +file "fileB" => "fileA" do |t| + sh "(cat fileA; echo transformationB) >\#{t.name}" +end + +file "fileC" => "fileB" do |t| + sh "(cat fileB; echo transformationC) >\#{t.name}" +end + +task default: "fileC" + RAKEFILE + end + def rakefile_comments rakefile <<-COMMENTS # comment for t1 From 06bea3c17e904aec82c7bb5dbffc4c349e12a33a Mon Sep 17 00:00:00 2001 From: Code Ass Date: Wed, 7 Dec 2016 01:07:28 +0900 Subject: [PATCH 648/813] Add test for dry-run file task --- test/test_rake_functional.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index 7c2bd3266..bc0675795 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -295,6 +295,25 @@ def test_rules_chaining_to_file_task "'play.app' file should exist" end + def dryrun_tasks + @err.split("\n").select { |line| + line.match(/^\*\* Execute/) + }.map { |line| + line.gsub(/^\*\* Execute \(dry run\) /, "") + } + end + + def test_update_midway_through_chaining_to_file_task + rakefile_file_chains + + rake "-n" + assert_equal(%w{fileA fileB fileC default}, dryrun_tasks) + rake + FileUtils.touch("fileA") + rake "-n" + assert_equal(%w{fileB fileC default}, dryrun_tasks) + end + def test_file_creation_task rakefile_file_creation From 462e403aa796ecb3105b88f598948c7c496e8325 Mon Sep 17 00:00:00 2001 From: Code Ass Date: Thu, 29 Dec 2016 06:20:23 +0900 Subject: [PATCH 649/813] Check nested FileTask#out_of_date? --- lib/rake/file_task.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index 6656e7095..afec0c724 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -29,7 +29,14 @@ def timestamp # Are there any prerequisites with a later time than the given time stamp? def out_of_date?(stamp) - @prerequisites.any? { |n| application[n, @scope].timestamp > stamp } + @prerequisites.any? { |p| + ptask = application[p, @scope] + if ptask.instance_of?(Rake::FileTask) + ptask.timestamp > stamp || ptask.needed? + else + ptask.timestamp > stamp + end + } end # ---------------------------------------------------------------- From b2d52fdd55ebc447a8544adb26d4119422a5243b Mon Sep 17 00:00:00 2001 From: Code Ass Date: Thu, 29 Dec 2016 10:10:48 +0900 Subject: [PATCH 650/813] Add 'sleep 1' for stride seconds surely for timestamp --- test/test_rake_functional.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index bc0675795..012f9bfbb 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -309,6 +309,7 @@ def test_update_midway_through_chaining_to_file_task rake "-n" assert_equal(%w{fileA fileB fileC default}, dryrun_tasks) rake + sleep 1 # for stride seconds surely for timestamp FileUtils.touch("fileA") rake "-n" assert_equal(%w{fileB fileC default}, dryrun_tasks) From 7be2c7829ea39cc698ea52ab488924bfd710e124 Mon Sep 17 00:00:00 2001 From: Code Ass Date: Thu, 29 Dec 2016 21:38:23 +0900 Subject: [PATCH 651/813] Use prereq instead of p for variable name https://github.com/ruby/rake/pull/183/files/a094e2584295005c7b1ee1419b7bf9136b9f4411#r94092645 --- lib/rake/file_task.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index afec0c724..cbb978e7f 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -29,12 +29,12 @@ def timestamp # Are there any prerequisites with a later time than the given time stamp? def out_of_date?(stamp) - @prerequisites.any? { |p| - ptask = application[p, @scope] - if ptask.instance_of?(Rake::FileTask) - ptask.timestamp > stamp || ptask.needed? + @prerequisites.any? { |prereq| + prereq_task = application[prereq, @scope] + if prereq_task.instance_of?(Rake::FileTask) + prereq_task.timestamp > stamp || prereq_task.needed? else - ptask.timestamp > stamp + prereq_task.timestamp > stamp end } end From 2346bc82a9a89e2e22b890349f00a6d75fd4fe60 Mon Sep 17 00:00:00 2001 From: Code Ass Date: Tue, 24 Jan 2017 10:12:50 +0900 Subject: [PATCH 652/813] Fix comment to make it less ambiguous --- test/test_rake_functional.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index 012f9bfbb..3496bc12d 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -309,7 +309,7 @@ def test_update_midway_through_chaining_to_file_task rake "-n" assert_equal(%w{fileA fileB fileC default}, dryrun_tasks) rake - sleep 1 # for stride seconds surely for timestamp + sleep 1 # Ensure the timestamp is on a new second FileUtils.touch("fileA") rake "-n" assert_equal(%w{fileB fileC default}, dryrun_tasks) From af15762f972a3f8322a9b5904d56fe2ff3dd8352 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 9 Feb 2017 11:03:16 +0900 Subject: [PATCH 653/813] Fix typos --- History.rdoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/History.rdoc b/History.rdoc index 53288e44f..b7ef2e691 100644 --- a/History.rdoc +++ b/History.rdoc @@ -385,7 +385,7 @@ we'll repeat the changes for versions 0.9.3 through 0.9.5 here. programatically add rake task libraries. * You can specific backtrace suppression patterns (see - --supress-backtrace) + --suppress-backtrace) * Directory tasks can now take prerequisites and actions @@ -633,7 +633,7 @@ we'll repeat the changes for version 0.9.3 here. programatically add rake task libraries. * You can specific backtrace suppression patterns (see - --supress-backtrace) + --suppress-backtrace) * Directory tasks can now take prerequisites and actions @@ -843,7 +843,7 @@ a number of bug fixes. programatically add rake task libraries. * You can specific backtrace suppression patterns (see - --supress-backtrace) + --suppress-backtrace) * Directory tasks can now take prerequisites and actions @@ -1415,7 +1415,7 @@ The first argument is still the name of the task (:name in this case). The next to argumements are the names of the parameters expected by :name (:first_name and :last_name in the example). -To access the values of the paramters, the block defining the task +To access the values of the parameters, the block defining the task behaviour can now accept a second parameter: task :name, :first_name, :last_name do |t, args| @@ -1518,7 +1518,7 @@ The first argument is still the name of the task (:name in this case). The next to argumements are the names of the parameters expected by :name (:first_name and :last_name in the example). -To access the values of the paramters, the block defining the task +To access the values of the parameters, the block defining the task behaviour can now accept a second parameter: task :name, :first_name, :last_name do |t, args| @@ -1738,7 +1738,7 @@ are, I hope you enjoy them. * RDoc defaults to internal (in-process) invocation. The old behavior is still available by setting the +external+ flag to true. * Rakefiles are now loaded with the expanded path to prevent - accidental polution from the Ruby load path. + accidental pollution from the Ruby load path. * Task objects my now be used in prerequisite lists directly. * Task objects (in addition to task names) may now be included in the prerequisite list of a task. @@ -1751,7 +1751,7 @@ are, I hope you enjoy them. ===== Namespaces Tasks can now be nested inside their own namespaces. Tasks within one -namespace will not accidently interfer with tasks named in a different +namespace will not accidentally interfer with tasks named in a different namespace. For example: @@ -1809,7 +1809,7 @@ As usual, it was input from users that drove a alot of these changes. The following people either contributed patches, made suggestions or made otherwise helpful comments. Thanks to ... -* Doug Young (inspriation for the parallel task) +* Doug Young (inspiration for the parallel task) * David Heinemeier Hansson (for --trace message enhancement and for pushing for namespace support). * Ludvig Omholt (for the openAFS fix) From 48a9c463ab534df2229f80e7bc13ad61928d3883 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 23 Feb 2017 10:44:49 -0800 Subject: [PATCH 654/813] Make LoadError from running tests more obvious --- lib/rake/rake_test_loader.rb | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/lib/rake/rake_test_loader.rb b/lib/rake/rake_test_loader.rb index d299efe35..1fedfa74d 100644 --- a/lib/rake/rake_test_loader.rb +++ b/lib/rake/rake_test_loader.rb @@ -2,19 +2,23 @@ # Load the test files from the command line. argv = ARGV.select do |argument| - case argument - when /^-/ then - argument - when /\*/ then - FileList[argument].to_a.each do |file| - require File.expand_path file - end + begin + case argument + when /^-/ then + argument + when /\*/ then + FileList[argument].to_a.each do |file| + require File.expand_path file + end - false - else - require File.expand_path argument + false + else + require File.expand_path argument - false + false + end + rescue LoadError => e + abort "\n#{e.message}\n\n" end end From 66ec746a9e85c6ec7e7d2e682b3a5b08914a5033 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 23 Feb 2017 11:04:11 -0800 Subject: [PATCH 655/813] Test LoadError behavior --- test/test_rake_rake_test_loader.rb | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/test/test_rake_rake_test_loader.rb b/test/test_rake_rake_test_loader.rb index 21c494ffe..d284a3c92 100644 --- a/test/test_rake_rake_test_loader.rb +++ b/test/test_rake_rake_test_loader.rb @@ -2,6 +2,12 @@ class TestRakeRakeTestLoader < Rake::TestCase + def setup + super + + @loader = File.join @rake_lib, 'rake/rake_test_loader.rb' + end + def test_pattern orig_loaded_features = $:.dup FileUtils.touch "foo.rb" @@ -10,11 +16,26 @@ def test_pattern ARGV.replace %w[foo.rb test_*.rb -v] - load File.join(@rake_lib, "rake/rake_test_loader.rb") + load @loader assert_equal %w[-v], ARGV ensure $:.replace orig_loaded_features end + def test_load_error + expected = <<-EXPECTED + +cannot load such file -- #{File.join @tempdir, 'no_such_test_file.rb'} + + EXPECTED + + assert_output nil, expected do + ARGV.replace %w[no_such_test_file.rb] + + assert_raises SystemExit do + load @loader + end + end + end end From fdc443a7562cb45c4e085b3de8c94e28371e4a24 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 23 Feb 2017 11:18:01 -0800 Subject: [PATCH 656/813] Provide our own message JRuby uses a different error message for LoadError than CRuby --- lib/rake/rake_test_loader.rb | 2 +- test/test_rake_rake_test_loader.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/rake_test_loader.rb b/lib/rake/rake_test_loader.rb index 1fedfa74d..98dcced06 100644 --- a/lib/rake/rake_test_loader.rb +++ b/lib/rake/rake_test_loader.rb @@ -18,7 +18,7 @@ false end rescue LoadError => e - abort "\n#{e.message}\n\n" + abort "\nFile does not exist: #{e.path}\n\n" end end diff --git a/test/test_rake_rake_test_loader.rb b/test/test_rake_rake_test_loader.rb index d284a3c92..15e122dc2 100644 --- a/test/test_rake_rake_test_loader.rb +++ b/test/test_rake_rake_test_loader.rb @@ -26,7 +26,7 @@ def test_pattern def test_load_error expected = <<-EXPECTED -cannot load such file -- #{File.join @tempdir, 'no_such_test_file.rb'} +File does not exist: #{File.join @tempdir, 'no_such_test_file.rb'} EXPECTED From 8d3a682c2aaba3d459c02b19768750b7ffd67c1f Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 23 Feb 2017 11:46:48 -0800 Subject: [PATCH 657/813] Ignore ".rb" on JRuby in tests JRuby uses a different path for LoadError than CRuby --- test/test_rake_rake_test_loader.rb | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/test/test_rake_rake_test_loader.rb b/test/test_rake_rake_test_loader.rb index 15e122dc2..855606d4d 100644 --- a/test/test_rake_rake_test_loader.rb +++ b/test/test_rake_rake_test_loader.rb @@ -24,18 +24,23 @@ def test_pattern end def test_load_error - expected = <<-EXPECTED - -File does not exist: #{File.join @tempdir, 'no_such_test_file.rb'} - - EXPECTED - - assert_output nil, expected do + out, err = capture_io do ARGV.replace %w[no_such_test_file.rb] assert_raises SystemExit do load @loader end end + + assert_empty out + + no_such_path = File.join @tempdir, 'no_such_test_file' + + expected = + /\A\n + File\ does\ not\ exist:\ #{no_such_path}(\.rb)? # JRuby is different + \n\n\Z/x + + assert_match expected, err end end From 86bdba1babc852294d9321410f7807f31131c1a7 Mon Sep 17 00:00:00 2001 From: Code Ass Date: Tue, 28 Mar 2017 12:25:25 +0900 Subject: [PATCH 658/813] Use Ruby 2.4.1 for Travis CI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3ce147993..8c259f622 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ rvm: - 2.1.10 - 2.2.6 - 2.3.3 - - 2.4.0 + - 2.4.1 - ruby-head - jruby-9.1.6.0 - jruby-head From c2ab781e33a27ae2dfd50060a117c834a969c263 Mon Sep 17 00:00:00 2001 From: Petr Skocik Date: Mon, 3 Apr 2017 14:56:23 +0200 Subject: [PATCH 659/813] fix = alignment --- test/test_rake_rules.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index ef1fa7228..0f19a808f 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -10,7 +10,7 @@ class TestRakeRules < Rake::TestCase OBJFILE = "abc.o" FOOFILE = "foo" DOTFOOFILE = ".foo" - MINFILE = 'abc.min.o' + MINFILE = 'abc.min.o' def setup super From 9be0171a3d722402bc3574c6e02a85cf18194bea Mon Sep 17 00:00:00 2001 From: Kuniaki IGARASHI Date: Tue, 2 May 2017 11:23:58 +0900 Subject: [PATCH 660/813] Change FileUtils#sh to adopt with hash style option. --- lib/rake/file_utils.rb | 2 +- test/test_rake_file_utils.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index aa065e8b4..3e56710e2 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -50,7 +50,7 @@ def sh(*cmd, &block) Rake.rake_output_message sh_show_command cmd if verbose unless noop - res = system(*cmd, options) + res = (Hash === cmd.last) ? system(*cmd) : system(*cmd, options) status = $? status = Rake::PseudoStatus.new(1) if !res && status.nil? shell_runner.call(res, status) diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 218c25415..00ef76e41 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -180,6 +180,15 @@ def test_sh_with_spawn_options assert_equal "echocommand.rb\n", r.read end + def test_sh_with_hash_option + skip "JRuby does not support spawn options" if jruby? + check_expansion + + verbose(false) { + sh "#{RUBY} check_expansion.rb", {chdir: "."}, { verbose: false } + } + end + def test_sh_failure shellcommand From e0198444af8f41724d34b3709cdcfbecc6fbace9 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 2 May 2017 16:52:40 +0900 Subject: [PATCH 661/813] History --- History.rdoc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/History.rdoc b/History.rdoc index b7ef2e691..d1bf4b85f 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,19 @@ +=== 12.1.0(development) + +==== Enhancements: + +* Enabled to dependency chained by extensions. Pull request #39 by Petr Skocik. + +==== Bug fixes + +* Typo fixes in rakefile.rdoc. Pull request #180 by Yuta Kurotaki. +* Fix unexpected behavior of file task with dryrun option. + Pull request #183 by @aycabta. +* Make LoadError from running tests more obvious. Pull request #195 + by Eric Hodel. +* Fix unexpected TypeError with hash stayle option. Pull request #202 + by Kuniaki IGARASHI. + === 12.0.0 ==== Compatibility Changes From 9fe2e43ccbefda6a2290242a6f88934b88d040fc Mon Sep 17 00:00:00 2001 From: Code Ahss Date: Sun, 4 Jun 2017 03:37:47 +0900 Subject: [PATCH 662/813] Update to latest versions of Ruby 2.2, 2.3 and JRuby 9k --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8c259f622..b64da9a66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,11 +3,11 @@ sudo: false rvm: - 2.0.0 - 2.1.10 - - 2.2.6 - - 2.3.3 + - 2.2.7 + - 2.3.4 - 2.4.1 - ruby-head - - jruby-9.1.6.0 + - jruby-9.1.9.0 - jruby-head before_install: - gem install bundler --no-document -v '~> 1.13.3' From 4839e58c5ef288d924b094d044901dbf6dd64928 Mon Sep 17 00:00:00 2001 From: Code Ass Date: Tue, 13 Jun 2017 16:26:08 +0900 Subject: [PATCH 663/813] Add ruby_version 24 and 24-x64 to appveyor.yml --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 44b19a2de..456c13d9e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,3 +18,5 @@ environment: - ruby_version: "22-x64" - ruby_version: "23" - ruby_version: "23-x64" + - ruby_version: "24" + - ruby_version: "24-x64" From 8f6206bfc84dbf719dcfdfbf034fffff2473e15a Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 20 Jun 2017 09:24:13 +0900 Subject: [PATCH 664/813] Specify frozen_string_literal: false --- doc/jamis.rb | 1 + lib/rake.rb | 1 + lib/rake/application.rb | 1 + lib/rake/backtrace.rb | 1 + lib/rake/clean.rb | 1 + lib/rake/cloneable.rb | 1 + lib/rake/cpu_counter.rb | 1 + lib/rake/default_loader.rb | 1 + lib/rake/dsl_definition.rb | 1 + lib/rake/early_time.rb | 1 + lib/rake/ext/core.rb | 1 + lib/rake/ext/string.rb | 1 + lib/rake/file_creation_task.rb | 1 + lib/rake/file_list.rb | 1 + lib/rake/file_task.rb | 1 + lib/rake/file_utils.rb | 1 + lib/rake/file_utils_ext.rb | 1 + lib/rake/invocation_chain.rb | 1 + lib/rake/invocation_exception_mixin.rb | 1 + lib/rake/late_time.rb | 1 + lib/rake/linked_list.rb | 1 + lib/rake/loaders/makefile.rb | 1 + lib/rake/multi_task.rb | 1 + lib/rake/name_space.rb | 1 + lib/rake/packagetask.rb | 1 + lib/rake/phony.rb | 1 + lib/rake/private_reader.rb | 1 + lib/rake/promise.rb | 1 + lib/rake/pseudo_status.rb | 1 + lib/rake/rake_module.rb | 1 + lib/rake/rake_test_loader.rb | 1 + lib/rake/rule_recursion_overflow_error.rb | 1 + lib/rake/scope.rb | 1 + lib/rake/task.rb | 1 + lib/rake/task_argument_error.rb | 1 + lib/rake/task_arguments.rb | 1 + lib/rake/task_manager.rb | 1 + lib/rake/tasklib.rb | 1 + lib/rake/testtask.rb | 1 + lib/rake/thread_history_display.rb | 1 + lib/rake/thread_pool.rb | 1 + lib/rake/trace_output.rb | 1 + lib/rake/version.rb | 1 + lib/rake/win32.rb | 1 + test/helper.rb | 1 + test/support/file_creation.rb | 1 + test/support/rakefile_definitions.rb | 1 + test/support/ruby_runner.rb | 1 + test/test_private_reader.rb | 1 + test/test_rake.rb | 1 + test/test_rake_application.rb | 2 +- test/test_rake_application_options.rb | 1 + test/test_rake_backtrace.rb | 1 + test/test_rake_clean.rb | 1 + test/test_rake_cpu_counter.rb | 1 + test/test_rake_definitions.rb | 1 + test/test_rake_directory_task.rb | 1 + test/test_rake_dsl.rb | 1 + test/test_rake_early_time.rb | 1 + test/test_rake_extension.rb | 1 + test/test_rake_file_creation_task.rb | 1 + test/test_rake_file_list.rb | 1 + test/test_rake_file_list_path_map.rb | 1 + test/test_rake_file_task.rb | 1 + test/test_rake_file_utils.rb | 1 + test/test_rake_functional.rb | 1 + test/test_rake_invocation_chain.rb | 1 + test/test_rake_late_time.rb | 1 + test/test_rake_linked_list.rb | 1 + test/test_rake_makefile_loader.rb | 1 + test/test_rake_multi_task.rb | 1 + test/test_rake_name_space.rb | 1 + test/test_rake_package_task.rb | 1 + test/test_rake_path_map.rb | 1 + test/test_rake_path_map_explode.rb | 1 + test/test_rake_path_map_partial.rb | 1 + test/test_rake_pseudo_status.rb | 1 + test/test_rake_rake_test_loader.rb | 1 + test/test_rake_reduce_compat.rb | 1 + test/test_rake_require.rb | 1 + test/test_rake_rules.rb | 1 + test/test_rake_scope.rb | 1 + test/test_rake_task.rb | 1 + test/test_rake_task_argument_parsing.rb | 1 + test/test_rake_task_arguments.rb | 1 + test/test_rake_task_manager.rb | 1 + test/test_rake_task_manager_argument_resolution.rb | 1 + test/test_rake_task_with_arguments.rb | 1 + test/test_rake_test_task.rb | 1 + test/test_rake_thread_pool.rb | 1 + test/test_rake_top_level_functions.rb | 1 + test/test_rake_win32.rb | 1 + test/test_thread_history_display.rb | 1 + test/test_trace_output.rb | 1 + 94 files changed, 94 insertions(+), 1 deletion(-) diff --git a/doc/jamis.rb b/doc/jamis.rb index c7bc84ac5..6917016e4 100644 --- a/doc/jamis.rb +++ b/doc/jamis.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module RDoc module Page diff --git a/lib/rake.rb b/lib/rake.rb index 07b03284b..68e6badf3 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false #-- # Copyright 2003-2010 by Jim Weirich (jim.weirich@gmail.com) # diff --git a/lib/rake/application.rb b/lib/rake/application.rb index e94f17290..576d0f278 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "optparse" require "rake/task_manager" diff --git a/lib/rake/backtrace.rb b/lib/rake/backtrace.rb index a89dd9f4d..b08c3e0c6 100644 --- a/lib/rake/backtrace.rb +++ b/lib/rake/backtrace.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake module Backtrace # :nodoc: all SYS_KEYS = RbConfig::CONFIG.keys.grep(/(?:[a-z]prefix|libdir)\z/) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index f66353a0a..92e2025e7 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false # The 'rake/clean' file defines two file lists (CLEAN and CLOBBER) and # two rake tasks (:clean and :clobber). # diff --git a/lib/rake/cloneable.rb b/lib/rake/cloneable.rb index d53645f2f..37dd6d9e2 100644 --- a/lib/rake/cloneable.rb +++ b/lib/rake/cloneable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake ## # Mixin for creating easily cloned objects. diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index 82a5eb8aa..369e1a41f 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Based on a script at: diff --git a/lib/rake/default_loader.rb b/lib/rake/default_loader.rb index 6154408f4..2d1115e20 100644 --- a/lib/rake/default_loader.rb +++ b/lib/rake/default_loader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Default Rakefile loader used by +import+. diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index c52bd601f..203dc0b17 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false # Rake DSL functions. require "rake/file_utils_ext" diff --git a/lib/rake/early_time.rb b/lib/rake/early_time.rb index abcb1872b..6c6919135 100644 --- a/lib/rake/early_time.rb +++ b/lib/rake/early_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # EarlyTime is a fake timestamp that occurs _before_ any other time value. diff --git a/lib/rake/ext/core.rb b/lib/rake/ext/core.rb index 7575df15a..82ad823bf 100644 --- a/lib/rake/ext/core.rb +++ b/lib/rake/ext/core.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false class Module # Check for an existing method in the current class before extending. If # the method already exists, then a warning is printed and the extension is diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb index 37764c845..1020de5f9 100644 --- a/lib/rake/ext/string.rb +++ b/lib/rake/ext/string.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/ext/core" class String diff --git a/lib/rake/file_creation_task.rb b/lib/rake/file_creation_task.rb index f3c5c78a1..a3bf78b0e 100644 --- a/lib/rake/file_creation_task.rb +++ b/lib/rake/file_creation_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/file_task" require "rake/early_time" diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index a30c6338c..6928333ff 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/cloneable" require "rake/file_utils_ext" require "rake/ext/string" diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index cbb978e7f..1f64530ff 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/task.rb" require "rake/early_time" diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index 3e56710e2..764c10d29 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rbconfig" require "fileutils" diff --git a/lib/rake/file_utils_ext.rb b/lib/rake/file_utils_ext.rb index e5930d4ab..b3ea9b9a4 100644 --- a/lib/rake/file_utils_ext.rb +++ b/lib/rake/file_utils_ext.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/file_utils" module Rake diff --git a/lib/rake/invocation_chain.rb b/lib/rake/invocation_chain.rb index 540628957..84a19b1f5 100644 --- a/lib/rake/invocation_chain.rb +++ b/lib/rake/invocation_chain.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # InvocationChain tracks the chain of task invocations to detect diff --git a/lib/rake/invocation_exception_mixin.rb b/lib/rake/invocation_exception_mixin.rb index 84ff3353b..c252361b2 100644 --- a/lib/rake/invocation_exception_mixin.rb +++ b/lib/rake/invocation_exception_mixin.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake module InvocationExceptionMixin # Return the invocation chain (list of Rake tasks) that were in diff --git a/lib/rake/late_time.rb b/lib/rake/late_time.rb index d1d9470ec..39d00c10b 100644 --- a/lib/rake/late_time.rb +++ b/lib/rake/late_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # LateTime is a fake timestamp that occurs _after_ any other time value. class LateTime diff --git a/lib/rake/linked_list.rb b/lib/rake/linked_list.rb index 54d0c1287..32aa79bfd 100644 --- a/lib/rake/linked_list.rb +++ b/lib/rake/linked_list.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Polylithic linked list structure used to implement several data diff --git a/lib/rake/loaders/makefile.rb b/lib/rake/loaders/makefile.rb index d0436bb79..f1be393d6 100644 --- a/lib/rake/loaders/makefile.rb +++ b/lib/rake/loaders/makefile.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Makefile loader to be used with the import file loader. Use this to diff --git a/lib/rake/multi_task.rb b/lib/rake/multi_task.rb index 7118dc411..60480b240 100644 --- a/lib/rake/multi_task.rb +++ b/lib/rake/multi_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Same as a regular task, but the immediate prerequisites are done in diff --git a/lib/rake/name_space.rb b/lib/rake/name_space.rb index 0d7eb80b6..39b376fd6 100644 --- a/lib/rake/name_space.rb +++ b/lib/rake/name_space.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false ## # The NameSpace class will lookup task names in the scope defined by a # +namespace+ command. diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index 034b8e9e8..b7c96b32b 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false # Define a package task library to aid in the definition of # redistributable package files. diff --git a/lib/rake/phony.rb b/lib/rake/phony.rb index a172f9c60..aac793a42 100644 --- a/lib/rake/phony.rb +++ b/lib/rake/phony.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false # Defines a :phony task that you can use as a dependency. This allows # file-based tasks to use non-file-based tasks as prerequisites # without forcing them to rebuild. diff --git a/lib/rake/private_reader.rb b/lib/rake/private_reader.rb index 162097857..121b105c1 100644 --- a/lib/rake/private_reader.rb +++ b/lib/rake/private_reader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Include PrivateReader to use +private_reader+. diff --git a/lib/rake/promise.rb b/lib/rake/promise.rb index 37221e427..c5f2b3f10 100644 --- a/lib/rake/promise.rb +++ b/lib/rake/promise.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # A Promise object represents a promise to do work (a chore) in the diff --git a/lib/rake/pseudo_status.rb b/lib/rake/pseudo_status.rb index 16e1903bd..f5f4fe991 100644 --- a/lib/rake/pseudo_status.rb +++ b/lib/rake/pseudo_status.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake ## diff --git a/lib/rake/rake_module.rb b/lib/rake/rake_module.rb index 75feb1261..bb97ec5cd 100644 --- a/lib/rake/rake_module.rb +++ b/lib/rake/rake_module.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/application" module Rake diff --git a/lib/rake/rake_test_loader.rb b/lib/rake/rake_test_loader.rb index 98dcced06..88b5cacdc 100644 --- a/lib/rake/rake_test_loader.rb +++ b/lib/rake/rake_test_loader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake" # Load the test files from the command line. diff --git a/lib/rake/rule_recursion_overflow_error.rb b/lib/rake/rule_recursion_overflow_error.rb index 39d44aac6..7a5eab0ae 100644 --- a/lib/rake/rule_recursion_overflow_error.rb +++ b/lib/rake/rule_recursion_overflow_error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Error indicating a recursion overflow error in task selection. diff --git a/lib/rake/scope.rb b/lib/rake/scope.rb index b432f5f29..540219c7a 100644 --- a/lib/rake/scope.rb +++ b/lib/rake/scope.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake class Scope < LinkedList # :nodoc: all diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 23faf96e5..dc7066466 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/invocation_exception_mixin" module Rake diff --git a/lib/rake/task_argument_error.rb b/lib/rake/task_argument_error.rb index 3e1dda64d..277b8b9c7 100644 --- a/lib/rake/task_argument_error.rb +++ b/lib/rake/task_argument_error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Error indicating an ill-formed task declaration. diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index c98057c8f..885d76909 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake ## diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 971984ca5..4e59b63f0 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # The TaskManager module is a mixin for managing tasks. diff --git a/lib/rake/tasklib.rb b/lib/rake/tasklib.rb index 7bcda1789..7a25d0839 100644 --- a/lib/rake/tasklib.rb +++ b/lib/rake/tasklib.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake" module Rake diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index bb7f0ee8a..4986e0c9f 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake" require "rake/tasklib" diff --git a/lib/rake/thread_history_display.rb b/lib/rake/thread_history_display.rb index 04273541e..2d04e4c98 100644 --- a/lib/rake/thread_history_display.rb +++ b/lib/rake/thread_history_display.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/private_reader" module Rake diff --git a/lib/rake/thread_pool.rb b/lib/rake/thread_pool.rb index 1c2f5f50f..43ac9f358 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "set" require "rake/promise" diff --git a/lib/rake/trace_output.rb b/lib/rake/trace_output.rb index c740b9e23..319ee4471 100644 --- a/lib/rake/trace_output.rb +++ b/lib/rake/trace_output.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake module TraceOutput # :nodoc: all diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 1908ff855..f9a0169df 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake VERSION = "12.0.0" diff --git a/lib/rake/win32.rb b/lib/rake/win32.rb index 1fc02a5ae..94f6935d0 100644 --- a/lib/rake/win32.rb +++ b/lib/rake/win32.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rbconfig" module Rake diff --git a/test/helper.rb b/test/helper.rb index 532745319..0c3afc92d 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false $:.unshift File.expand_path("../../lib", __FILE__) require 'coveralls' diff --git a/test/support/file_creation.rb b/test/support/file_creation.rb index facc57a03..7631fa663 100644 --- a/test/support/file_creation.rb +++ b/test/support/file_creation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module FileCreation OLDFILE = "old" NEWFILE = "new" diff --git a/test/support/rakefile_definitions.rb b/test/support/rakefile_definitions.rb index 9a19d43fc..8632b8d7d 100644 --- a/test/support/rakefile_definitions.rb +++ b/test/support/rakefile_definitions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module RakefileDefinitions include FileUtils diff --git a/test/support/ruby_runner.rb b/test/support/ruby_runner.rb index 199f60dd6..60d48abfe 100644 --- a/test/support/ruby_runner.rb +++ b/test/support/ruby_runner.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module RubyRunner include FileUtils diff --git a/test/test_private_reader.rb b/test/test_private_reader.rb index 56160f062..7fdbf17b5 100644 --- a/test/test_private_reader.rb +++ b/test/test_private_reader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/private_reader" diff --git a/test/test_rake.rb b/test/test_rake.rb index dfbb7d232..61fec24f7 100644 --- a/test/test_rake.rb +++ b/test/test_rake.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRake < Rake::TestCase diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index cd8feebbc..9dc140c3b 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -1,4 +1,4 @@ -#encoding: UTF-8 +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeApplication < Rake::TestCase diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index 149d8dcfd..466bb2beb 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) TESTING_REQUIRE = [] diff --git a/test/test_rake_backtrace.rb b/test/test_rake_backtrace.rb index ec727a292..60aed4658 100644 --- a/test/test_rake_backtrace.rb +++ b/test/test_rake_backtrace.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "open3" diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index 5439a415f..d4f0dae67 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/clean" diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb index aac16b2d7..a55b5731d 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeCpuCounter < Rake::TestCase diff --git a/test/test_rake_definitions.rb b/test/test_rake_definitions.rb index 464cc6309..86517b1cd 100644 --- a/test/test_rake_definitions.rb +++ b/test/test_rake_definitions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_directory_task.rb b/test/test_rake_directory_task.rb index e42bd9c77..3121f7b6e 100644 --- a/test/test_rake_directory_task.rb +++ b/test/test_rake_directory_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" require "pathname" diff --git a/test/test_rake_dsl.rb b/test/test_rake_dsl.rb index 7f82c6afa..d105c4755 100644 --- a/test/test_rake_dsl.rb +++ b/test/test_rake_dsl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeDsl < Rake::TestCase diff --git a/test/test_rake_early_time.rb b/test/test_rake_early_time.rb index 71ee3e157..39a9eadf3 100644 --- a/test/test_rake_early_time.rb +++ b/test/test_rake_early_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeEarlyTime < Rake::TestCase diff --git a/test/test_rake_extension.rb b/test/test_rake_extension.rb index 293ec1304..dafa291c1 100644 --- a/test/test_rake_extension.rb +++ b/test/test_rake_extension.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "stringio" diff --git a/test/test_rake_file_creation_task.rb b/test/test_rake_file_creation_task.rb index 35f843e9e..e4f1c1253 100644 --- a/test/test_rake_file_creation_task.rb +++ b/test/test_rake_file_creation_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 32ca7a8e3..f220e07f6 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "pathname" diff --git a/test/test_rake_file_list_path_map.rb b/test/test_rake_file_list_path_map.rb index 28953a97a..46f59273e 100644 --- a/test/test_rake_file_list_path_map.rb +++ b/test/test_rake_file_list_path_map.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeFileListPathMap < Rake::TestCase diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index 24614dabe..74840d308 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" require "pathname" diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 00ef76e41..39d4dff61 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" require "stringio" diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index 3496bc12d..e6e010b5f 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" require "open3" diff --git a/test/test_rake_invocation_chain.rb b/test/test_rake_invocation_chain.rb index ba5f8724f..61eba3487 100644 --- a/test/test_rake_invocation_chain.rb +++ b/test/test_rake_invocation_chain.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeInvocationChain < Rake::TestCase diff --git a/test/test_rake_late_time.rb b/test/test_rake_late_time.rb index a88826da7..1641da61d 100644 --- a/test/test_rake_late_time.rb +++ b/test/test_rake_late_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeLateTime < Rake::TestCase diff --git a/test/test_rake_linked_list.rb b/test/test_rake_linked_list.rb index a3c4d1972..975befc73 100644 --- a/test/test_rake_linked_list.rb +++ b/test/test_rake_linked_list.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestLinkedList < Rake::TestCase diff --git a/test/test_rake_makefile_loader.rb b/test/test_rake_makefile_loader.rb index bd70fd3b6..42ce0f604 100644 --- a/test/test_rake_makefile_loader.rb +++ b/test/test_rake_makefile_loader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/loaders/makefile" diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index bab25b158..c614e15af 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "thread" diff --git a/test/test_rake_name_space.rb b/test/test_rake_name_space.rb index e043c07fa..274d71c4c 100644 --- a/test/test_rake_name_space.rb +++ b/test/test_rake_name_space.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeNameSpace < Rake::TestCase diff --git a/test/test_rake_package_task.rb b/test/test_rake_package_task.rb index 7bacb7a52..a3ce632ec 100644 --- a/test/test_rake_package_task.rb +++ b/test/test_rake_package_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/packagetask" diff --git a/test/test_rake_path_map.rb b/test/test_rake_path_map.rb index 040692930..1f20ad27b 100644 --- a/test/test_rake_path_map.rb +++ b/test/test_rake_path_map.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakePathMap < Rake::TestCase diff --git a/test/test_rake_path_map_explode.rb b/test/test_rake_path_map_explode.rb index 554a02266..18f85a11b 100644 --- a/test/test_rake_path_map_explode.rb +++ b/test/test_rake_path_map_explode.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakePathMapExplode < Rake::TestCase diff --git a/test/test_rake_path_map_partial.rb b/test/test_rake_path_map_partial.rb index 0adc24313..c62694545 100644 --- a/test/test_rake_path_map_partial.rb +++ b/test/test_rake_path_map_partial.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakePathMapPartial < Rake::TestCase diff --git a/test/test_rake_pseudo_status.rb b/test/test_rake_pseudo_status.rb index d9fe42216..9c8c3bee3 100644 --- a/test/test_rake_pseudo_status.rb +++ b/test/test_rake_pseudo_status.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakePseudoStatus < Rake::TestCase diff --git a/test/test_rake_rake_test_loader.rb b/test/test_rake_rake_test_loader.rb index 855606d4d..4c84c1bd8 100644 --- a/test/test_rake_rake_test_loader.rb +++ b/test/test_rake_rake_test_loader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeRakeTestLoader < Rake::TestCase diff --git a/test/test_rake_reduce_compat.rb b/test/test_rake_reduce_compat.rb index de81b474b..71aeabd62 100644 --- a/test/test_rake_reduce_compat.rb +++ b/test/test_rake_reduce_compat.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "open3" diff --git a/test/test_rake_require.rb b/test/test_rake_require.rb index c77344cc3..8b8757f64 100644 --- a/test/test_rake_require.rb +++ b/test/test_rake_require.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeRequire < Rake::TestCase diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index 35f0b45db..2e4f341e5 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_scope.rb b/test/test_rake_scope.rb index 169c0d9f9..54a32e07a 100644 --- a/test/test_rake_scope.rb +++ b/test/test_rake_scope.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeScope < Rake::TestCase diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 5f5a63e30..b1952db1f 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_task_argument_parsing.rb b/test/test_rake_task_argument_parsing.rb index 4bc0ff0ae..684de7e27 100644 --- a/test/test_rake_task_argument_parsing.rb +++ b/test/test_rake_task_argument_parsing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeTaskArgumentParsing < Rake::TestCase diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 383d4a172..77d5deb05 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeTaskArguments < Rake::TestCase diff --git a/test/test_rake_task_manager.rb b/test/test_rake_task_manager.rb index a611bd737..d7b3ae669 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeTaskManager < Rake::TestCase diff --git a/test/test_rake_task_manager_argument_resolution.rb b/test/test_rake_task_manager_argument_resolution.rb index 6d292816d..ee0b77f9a 100644 --- a/test/test_rake_task_manager_argument_resolution.rb +++ b/test/test_rake_task_manager_argument_resolution.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeTaskManagerArgumentResolution < Rake::TestCase diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index 5f71b6b1a..cf359daca 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeTaskWithArguments < Rake::TestCase diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 8e422f164..76e69982d 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/testtask" diff --git a/test/test_rake_thread_pool.rb b/test/test_rake_thread_pool.rb index d365574ba..8314ac553 100644 --- a/test/test_rake_thread_pool.rb +++ b/test/test_rake_thread_pool.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/thread_pool" diff --git a/test/test_rake_top_level_functions.rb b/test/test_rake_top_level_functions.rb index a3bb2fbb8..7082caad7 100644 --- a/test/test_rake_top_level_functions.rb +++ b/test/test_rake_top_level_functions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeTopLevelFunctions < Rake::TestCase diff --git a/test/test_rake_win32.rb b/test/test_rake_win32.rb index be95adb92..15f6663c9 100644 --- a/test/test_rake_win32.rb +++ b/test/test_rake_win32.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeWin32 < Rake::TestCase diff --git a/test/test_thread_history_display.rb b/test/test_thread_history_display.rb index f3466cef7..304471e71 100644 --- a/test/test_thread_history_display.rb +++ b/test/test_thread_history_display.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/thread_history_display" diff --git a/test/test_trace_output.rb b/test/test_trace_output.rb index 18d2eee0f..a55296f7f 100644 --- a/test/test_trace_output.rb +++ b/test/test_trace_output.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "stringio" From 68ef9140c11d083d8bb7ee5da5b0543e3a7df73d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 20 Jun 2017 09:26:16 +0900 Subject: [PATCH 665/813] Specify frozen_string_literal: true --- doc/jamis.rb | 2 +- lib/rake.rb | 2 +- lib/rake/application.rb | 2 +- lib/rake/backtrace.rb | 2 +- lib/rake/clean.rb | 2 +- lib/rake/cloneable.rb | 2 +- lib/rake/cpu_counter.rb | 2 +- lib/rake/default_loader.rb | 2 +- lib/rake/dsl_definition.rb | 2 +- lib/rake/early_time.rb | 2 +- lib/rake/ext/core.rb | 2 +- lib/rake/ext/string.rb | 2 +- lib/rake/file_creation_task.rb | 2 +- lib/rake/file_list.rb | 2 +- lib/rake/file_task.rb | 2 +- lib/rake/file_utils.rb | 2 +- lib/rake/file_utils_ext.rb | 2 +- lib/rake/invocation_chain.rb | 2 +- lib/rake/invocation_exception_mixin.rb | 2 +- lib/rake/late_time.rb | 2 +- lib/rake/linked_list.rb | 2 +- lib/rake/loaders/makefile.rb | 2 +- lib/rake/multi_task.rb | 2 +- lib/rake/name_space.rb | 2 +- lib/rake/packagetask.rb | 2 +- lib/rake/phony.rb | 2 +- lib/rake/private_reader.rb | 2 +- lib/rake/promise.rb | 2 +- lib/rake/pseudo_status.rb | 2 +- lib/rake/rake_module.rb | 2 +- lib/rake/rake_test_loader.rb | 2 +- lib/rake/rule_recursion_overflow_error.rb | 2 +- lib/rake/scope.rb | 2 +- lib/rake/task.rb | 2 +- lib/rake/task_argument_error.rb | 2 +- lib/rake/task_arguments.rb | 2 +- lib/rake/task_manager.rb | 2 +- lib/rake/tasklib.rb | 2 +- lib/rake/testtask.rb | 2 +- lib/rake/thread_history_display.rb | 2 +- lib/rake/thread_pool.rb | 2 +- lib/rake/trace_output.rb | 2 +- lib/rake/version.rb | 2 +- lib/rake/win32.rb | 2 +- test/helper.rb | 2 +- test/support/file_creation.rb | 2 +- test/support/rakefile_definitions.rb | 2 +- test/support/ruby_runner.rb | 2 +- test/test_private_reader.rb | 2 +- test/test_rake.rb | 2 +- test/test_rake_application.rb | 2 +- test/test_rake_application_options.rb | 2 +- test/test_rake_backtrace.rb | 2 +- test/test_rake_clean.rb | 2 +- test/test_rake_cpu_counter.rb | 2 +- test/test_rake_definitions.rb | 2 +- test/test_rake_directory_task.rb | 2 +- test/test_rake_dsl.rb | 2 +- test/test_rake_early_time.rb | 2 +- test/test_rake_extension.rb | 2 +- test/test_rake_file_creation_task.rb | 2 +- test/test_rake_file_list.rb | 2 +- test/test_rake_file_list_path_map.rb | 2 +- test/test_rake_file_task.rb | 2 +- test/test_rake_file_utils.rb | 2 +- test/test_rake_functional.rb | 2 +- test/test_rake_invocation_chain.rb | 2 +- test/test_rake_late_time.rb | 2 +- test/test_rake_linked_list.rb | 2 +- test/test_rake_makefile_loader.rb | 2 +- test/test_rake_multi_task.rb | 2 +- test/test_rake_name_space.rb | 2 +- test/test_rake_package_task.rb | 2 +- test/test_rake_path_map.rb | 2 +- test/test_rake_path_map_explode.rb | 2 +- test/test_rake_path_map_partial.rb | 2 +- test/test_rake_pseudo_status.rb | 2 +- test/test_rake_rake_test_loader.rb | 2 +- test/test_rake_reduce_compat.rb | 2 +- test/test_rake_require.rb | 2 +- test/test_rake_rules.rb | 2 +- test/test_rake_scope.rb | 2 +- test/test_rake_task.rb | 2 +- test/test_rake_task_argument_parsing.rb | 2 +- test/test_rake_task_arguments.rb | 2 +- test/test_rake_task_manager.rb | 2 +- test/test_rake_task_manager_argument_resolution.rb | 2 +- test/test_rake_task_with_arguments.rb | 2 +- test/test_rake_test_task.rb | 2 +- test/test_rake_thread_pool.rb | 2 +- test/test_rake_top_level_functions.rb | 2 +- test/test_rake_win32.rb | 2 +- test/test_thread_history_display.rb | 2 +- test/test_trace_output.rb | 2 +- 94 files changed, 94 insertions(+), 94 deletions(-) diff --git a/doc/jamis.rb b/doc/jamis.rb index 6917016e4..531aa7573 100644 --- a/doc/jamis.rb +++ b/doc/jamis.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module RDoc module Page diff --git a/lib/rake.rb b/lib/rake.rb index 68e6badf3..0dfd05315 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true #-- # Copyright 2003-2010 by Jim Weirich (jim.weirich@gmail.com) # diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 576d0f278..ae594e098 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "optparse" require "rake/task_manager" diff --git a/lib/rake/backtrace.rb b/lib/rake/backtrace.rb index b08c3e0c6..31ff05450 100644 --- a/lib/rake/backtrace.rb +++ b/lib/rake/backtrace.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake module Backtrace # :nodoc: all SYS_KEYS = RbConfig::CONFIG.keys.grep(/(?:[a-z]prefix|libdir)\z/) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index 92e2025e7..5af44015e 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # The 'rake/clean' file defines two file lists (CLEAN and CLOBBER) and # two rake tasks (:clean and :clobber). # diff --git a/lib/rake/cloneable.rb b/lib/rake/cloneable.rb index 37dd6d9e2..eddb77e2f 100644 --- a/lib/rake/cloneable.rb +++ b/lib/rake/cloneable.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake ## # Mixin for creating easily cloned objects. diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index 369e1a41f..f3bf6d630 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Based on a script at: diff --git a/lib/rake/default_loader.rb b/lib/rake/default_loader.rb index 2d1115e20..d3b4650d3 100644 --- a/lib/rake/default_loader.rb +++ b/lib/rake/default_loader.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Default Rakefile loader used by +import+. diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index 203dc0b17..3962c1679 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # Rake DSL functions. require "rake/file_utils_ext" diff --git a/lib/rake/early_time.rb b/lib/rake/early_time.rb index 6c6919135..80cc6bfad 100644 --- a/lib/rake/early_time.rb +++ b/lib/rake/early_time.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # EarlyTime is a fake timestamp that occurs _before_ any other time value. diff --git a/lib/rake/ext/core.rb b/lib/rake/ext/core.rb index 82ad823bf..226f2125b 100644 --- a/lib/rake/ext/core.rb +++ b/lib/rake/ext/core.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true class Module # Check for an existing method in the current class before extending. If # the method already exists, then a warning is printed and the extension is diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb index 1020de5f9..7bd5064f9 100644 --- a/lib/rake/ext/string.rb +++ b/lib/rake/ext/string.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/ext/core" class String diff --git a/lib/rake/file_creation_task.rb b/lib/rake/file_creation_task.rb index a3bf78b0e..2eb251bf1 100644 --- a/lib/rake/file_creation_task.rb +++ b/lib/rake/file_creation_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/file_task" require "rake/early_time" diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index 6928333ff..748d668f1 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/cloneable" require "rake/file_utils_ext" require "rake/ext/string" diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index 1f64530ff..474b7bd93 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/task.rb" require "rake/early_time" diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index 764c10d29..3439befab 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rbconfig" require "fileutils" diff --git a/lib/rake/file_utils_ext.rb b/lib/rake/file_utils_ext.rb index b3ea9b9a4..bf558b749 100644 --- a/lib/rake/file_utils_ext.rb +++ b/lib/rake/file_utils_ext.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/file_utils" module Rake diff --git a/lib/rake/invocation_chain.rb b/lib/rake/invocation_chain.rb index 84a19b1f5..44a995496 100644 --- a/lib/rake/invocation_chain.rb +++ b/lib/rake/invocation_chain.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # InvocationChain tracks the chain of task invocations to detect diff --git a/lib/rake/invocation_exception_mixin.rb b/lib/rake/invocation_exception_mixin.rb index c252361b2..b0d307a48 100644 --- a/lib/rake/invocation_exception_mixin.rb +++ b/lib/rake/invocation_exception_mixin.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake module InvocationExceptionMixin # Return the invocation chain (list of Rake tasks) that were in diff --git a/lib/rake/late_time.rb b/lib/rake/late_time.rb index 39d00c10b..8fe024943 100644 --- a/lib/rake/late_time.rb +++ b/lib/rake/late_time.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # LateTime is a fake timestamp that occurs _after_ any other time value. class LateTime diff --git a/lib/rake/linked_list.rb b/lib/rake/linked_list.rb index 32aa79bfd..11fa46f0d 100644 --- a/lib/rake/linked_list.rb +++ b/lib/rake/linked_list.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Polylithic linked list structure used to implement several data diff --git a/lib/rake/loaders/makefile.rb b/lib/rake/loaders/makefile.rb index f1be393d6..46f4beaad 100644 --- a/lib/rake/loaders/makefile.rb +++ b/lib/rake/loaders/makefile.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Makefile loader to be used with the import file loader. Use this to diff --git a/lib/rake/multi_task.rb b/lib/rake/multi_task.rb index 60480b240..04c9f3109 100644 --- a/lib/rake/multi_task.rb +++ b/lib/rake/multi_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Same as a regular task, but the immediate prerequisites are done in diff --git a/lib/rake/name_space.rb b/lib/rake/name_space.rb index 39b376fd6..32f8139fc 100644 --- a/lib/rake/name_space.rb +++ b/lib/rake/name_space.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true ## # The NameSpace class will lookup task names in the scope defined by a # +namespace+ command. diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index b7c96b32b..f65affa6d 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # Define a package task library to aid in the definition of # redistributable package files. diff --git a/lib/rake/phony.rb b/lib/rake/phony.rb index aac793a42..8caa5de17 100644 --- a/lib/rake/phony.rb +++ b/lib/rake/phony.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # Defines a :phony task that you can use as a dependency. This allows # file-based tasks to use non-file-based tasks as prerequisites # without forcing them to rebuild. diff --git a/lib/rake/private_reader.rb b/lib/rake/private_reader.rb index 121b105c1..2815ce643 100644 --- a/lib/rake/private_reader.rb +++ b/lib/rake/private_reader.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Include PrivateReader to use +private_reader+. diff --git a/lib/rake/promise.rb b/lib/rake/promise.rb index c5f2b3f10..ecff4321e 100644 --- a/lib/rake/promise.rb +++ b/lib/rake/promise.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # A Promise object represents a promise to do work (a chore) in the diff --git a/lib/rake/pseudo_status.rb b/lib/rake/pseudo_status.rb index f5f4fe991..8b3c98949 100644 --- a/lib/rake/pseudo_status.rb +++ b/lib/rake/pseudo_status.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake ## diff --git a/lib/rake/rake_module.rb b/lib/rake/rake_module.rb index bb97ec5cd..f5cfde58a 100644 --- a/lib/rake/rake_module.rb +++ b/lib/rake/rake_module.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/application" module Rake diff --git a/lib/rake/rake_test_loader.rb b/lib/rake/rake_test_loader.rb index 88b5cacdc..ce3dd8eb6 100644 --- a/lib/rake/rake_test_loader.rb +++ b/lib/rake/rake_test_loader.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake" # Load the test files from the command line. diff --git a/lib/rake/rule_recursion_overflow_error.rb b/lib/rake/rule_recursion_overflow_error.rb index 7a5eab0ae..a51e77489 100644 --- a/lib/rake/rule_recursion_overflow_error.rb +++ b/lib/rake/rule_recursion_overflow_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Error indicating a recursion overflow error in task selection. diff --git a/lib/rake/scope.rb b/lib/rake/scope.rb index 540219c7a..27c05da89 100644 --- a/lib/rake/scope.rb +++ b/lib/rake/scope.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake class Scope < LinkedList # :nodoc: all diff --git a/lib/rake/task.rb b/lib/rake/task.rb index dc7066466..077f37f4a 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/invocation_exception_mixin" module Rake diff --git a/lib/rake/task_argument_error.rb b/lib/rake/task_argument_error.rb index 277b8b9c7..ef20076c6 100644 --- a/lib/rake/task_argument_error.rb +++ b/lib/rake/task_argument_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Error indicating an ill-formed task declaration. diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index 885d76909..0d3001afd 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake ## diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 4e59b63f0..8bc7d42a4 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # The TaskManager module is a mixin for managing tasks. diff --git a/lib/rake/tasklib.rb b/lib/rake/tasklib.rb index 7a25d0839..5354b4f94 100644 --- a/lib/rake/tasklib.rb +++ b/lib/rake/tasklib.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake" module Rake diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 4986e0c9f..66e114762 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake" require "rake/tasklib" diff --git a/lib/rake/thread_history_display.rb b/lib/rake/thread_history_display.rb index 2d04e4c98..412ea37be 100644 --- a/lib/rake/thread_history_display.rb +++ b/lib/rake/thread_history_display.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/private_reader" module Rake diff --git a/lib/rake/thread_pool.rb b/lib/rake/thread_pool.rb index 43ac9f358..b01a5efe0 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "set" require "rake/promise" diff --git a/lib/rake/trace_output.rb b/lib/rake/trace_output.rb index 319ee4471..d713a0926 100644 --- a/lib/rake/trace_output.rb +++ b/lib/rake/trace_output.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake module TraceOutput # :nodoc: all diff --git a/lib/rake/version.rb b/lib/rake/version.rb index f9a0169df..a240aa5a4 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake VERSION = "12.0.0" diff --git a/lib/rake/win32.rb b/lib/rake/win32.rb index 94f6935d0..6e6203181 100644 --- a/lib/rake/win32.rb +++ b/lib/rake/win32.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rbconfig" module Rake diff --git a/test/helper.rb b/test/helper.rb index 0c3afc92d..a6e38cb18 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true $:.unshift File.expand_path("../../lib", __FILE__) require 'coveralls' diff --git a/test/support/file_creation.rb b/test/support/file_creation.rb index 7631fa663..a1313bc0e 100644 --- a/test/support/file_creation.rb +++ b/test/support/file_creation.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module FileCreation OLDFILE = "old" NEWFILE = "new" diff --git a/test/support/rakefile_definitions.rb b/test/support/rakefile_definitions.rb index 8632b8d7d..5dacd3783 100644 --- a/test/support/rakefile_definitions.rb +++ b/test/support/rakefile_definitions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module RakefileDefinitions include FileUtils diff --git a/test/support/ruby_runner.rb b/test/support/ruby_runner.rb index 60d48abfe..160a57090 100644 --- a/test/support/ruby_runner.rb +++ b/test/support/ruby_runner.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module RubyRunner include FileUtils diff --git a/test/test_private_reader.rb b/test/test_private_reader.rb index 7fdbf17b5..ef08c9d2c 100644 --- a/test/test_private_reader.rb +++ b/test/test_private_reader.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/private_reader" diff --git a/test/test_rake.rb b/test/test_rake.rb index 61fec24f7..2cdab492b 100644 --- a/test/test_rake.rb +++ b/test/test_rake.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRake < Rake::TestCase diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 9dc140c3b..b52c484dc 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeApplication < Rake::TestCase diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index 466bb2beb..b34c2f634 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) TESTING_REQUIRE = [] diff --git a/test/test_rake_backtrace.rb b/test/test_rake_backtrace.rb index 60aed4658..d89817a11 100644 --- a/test/test_rake_backtrace.rb +++ b/test/test_rake_backtrace.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "open3" diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index d4f0dae67..612bd2546 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/clean" diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb index a55b5731d..3c3af15bf 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeCpuCounter < Rake::TestCase diff --git a/test/test_rake_definitions.rb b/test/test_rake_definitions.rb index 86517b1cd..2dee13a34 100644 --- a/test/test_rake_definitions.rb +++ b/test/test_rake_definitions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_directory_task.rb b/test/test_rake_directory_task.rb index 3121f7b6e..d5fd26f27 100644 --- a/test/test_rake_directory_task.rb +++ b/test/test_rake_directory_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" require "pathname" diff --git a/test/test_rake_dsl.rb b/test/test_rake_dsl.rb index d105c4755..162961446 100644 --- a/test/test_rake_dsl.rb +++ b/test/test_rake_dsl.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeDsl < Rake::TestCase diff --git a/test/test_rake_early_time.rb b/test/test_rake_early_time.rb index 39a9eadf3..dc0550b2a 100644 --- a/test/test_rake_early_time.rb +++ b/test/test_rake_early_time.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeEarlyTime < Rake::TestCase diff --git a/test/test_rake_extension.rb b/test/test_rake_extension.rb index dafa291c1..0627ef9b7 100644 --- a/test/test_rake_extension.rb +++ b/test/test_rake_extension.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "stringio" diff --git a/test/test_rake_file_creation_task.rb b/test/test_rake_file_creation_task.rb index e4f1c1253..246f679c7 100644 --- a/test/test_rake_file_creation_task.rb +++ b/test/test_rake_file_creation_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index f220e07f6..7e5d1eed0 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "pathname" diff --git a/test/test_rake_file_list_path_map.rb b/test/test_rake_file_list_path_map.rb index 46f59273e..71402cf36 100644 --- a/test/test_rake_file_list_path_map.rb +++ b/test/test_rake_file_list_path_map.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeFileListPathMap < Rake::TestCase diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index 74840d308..774cbafd4 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" require "pathname" diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 39d4dff61..bfdaf75bd 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" require "stringio" diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index e6e010b5f..daf832254 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" require "open3" diff --git a/test/test_rake_invocation_chain.rb b/test/test_rake_invocation_chain.rb index 61eba3487..338180aaa 100644 --- a/test/test_rake_invocation_chain.rb +++ b/test/test_rake_invocation_chain.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeInvocationChain < Rake::TestCase diff --git a/test/test_rake_late_time.rb b/test/test_rake_late_time.rb index 1641da61d..d07b441a0 100644 --- a/test/test_rake_late_time.rb +++ b/test/test_rake_late_time.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeLateTime < Rake::TestCase diff --git a/test/test_rake_linked_list.rb b/test/test_rake_linked_list.rb index 975befc73..d111575b2 100644 --- a/test/test_rake_linked_list.rb +++ b/test/test_rake_linked_list.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestLinkedList < Rake::TestCase diff --git a/test/test_rake_makefile_loader.rb b/test/test_rake_makefile_loader.rb index 42ce0f604..75713cd2f 100644 --- a/test/test_rake_makefile_loader.rb +++ b/test/test_rake_makefile_loader.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/loaders/makefile" diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index c614e15af..8a50c2980 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "thread" diff --git a/test/test_rake_name_space.rb b/test/test_rake_name_space.rb index 274d71c4c..e8d4d6b20 100644 --- a/test/test_rake_name_space.rb +++ b/test/test_rake_name_space.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeNameSpace < Rake::TestCase diff --git a/test/test_rake_package_task.rb b/test/test_rake_package_task.rb index a3ce632ec..2634267ee 100644 --- a/test/test_rake_package_task.rb +++ b/test/test_rake_package_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/packagetask" diff --git a/test/test_rake_path_map.rb b/test/test_rake_path_map.rb index 1f20ad27b..92cf337cb 100644 --- a/test/test_rake_path_map.rb +++ b/test/test_rake_path_map.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakePathMap < Rake::TestCase diff --git a/test/test_rake_path_map_explode.rb b/test/test_rake_path_map_explode.rb index 18f85a11b..3174d6ccc 100644 --- a/test/test_rake_path_map_explode.rb +++ b/test/test_rake_path_map_explode.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakePathMapExplode < Rake::TestCase diff --git a/test/test_rake_path_map_partial.rb b/test/test_rake_path_map_partial.rb index c62694545..f65428d71 100644 --- a/test/test_rake_path_map_partial.rb +++ b/test/test_rake_path_map_partial.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakePathMapPartial < Rake::TestCase diff --git a/test/test_rake_pseudo_status.rb b/test/test_rake_pseudo_status.rb index 9c8c3bee3..5a54bc200 100644 --- a/test/test_rake_pseudo_status.rb +++ b/test/test_rake_pseudo_status.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakePseudoStatus < Rake::TestCase diff --git a/test/test_rake_rake_test_loader.rb b/test/test_rake_rake_test_loader.rb index 4c84c1bd8..fa35c44aa 100644 --- a/test/test_rake_rake_test_loader.rb +++ b/test/test_rake_rake_test_loader.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeRakeTestLoader < Rake::TestCase diff --git a/test/test_rake_reduce_compat.rb b/test/test_rake_reduce_compat.rb index 71aeabd62..f3db9a79c 100644 --- a/test/test_rake_reduce_compat.rb +++ b/test/test_rake_reduce_compat.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "open3" diff --git a/test/test_rake_require.rb b/test/test_rake_require.rb index 8b8757f64..899aba5ca 100644 --- a/test/test_rake_require.rb +++ b/test/test_rake_require.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeRequire < Rake::TestCase diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index 2e4f341e5..e71af3502 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_scope.rb b/test/test_rake_scope.rb index 54a32e07a..50bb1810b 100644 --- a/test/test_rake_scope.rb +++ b/test/test_rake_scope.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeScope < Rake::TestCase diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index b1952db1f..b2bbb6d95 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_task_argument_parsing.rb b/test/test_rake_task_argument_parsing.rb index 684de7e27..e34126591 100644 --- a/test/test_rake_task_argument_parsing.rb +++ b/test/test_rake_task_argument_parsing.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeTaskArgumentParsing < Rake::TestCase diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 77d5deb05..2ae3652da 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeTaskArguments < Rake::TestCase diff --git a/test/test_rake_task_manager.rb b/test/test_rake_task_manager.rb index d7b3ae669..a9157ed81 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeTaskManager < Rake::TestCase diff --git a/test/test_rake_task_manager_argument_resolution.rb b/test/test_rake_task_manager_argument_resolution.rb index ee0b77f9a..c07be6f5e 100644 --- a/test/test_rake_task_manager_argument_resolution.rb +++ b/test/test_rake_task_manager_argument_resolution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeTaskManagerArgumentResolution < Rake::TestCase diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index cf359daca..b7a9e03e7 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeTaskWithArguments < Rake::TestCase diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 76e69982d..396e05924 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/testtask" diff --git a/test/test_rake_thread_pool.rb b/test/test_rake_thread_pool.rb index 8314ac553..ceb8a5d1b 100644 --- a/test/test_rake_thread_pool.rb +++ b/test/test_rake_thread_pool.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/thread_pool" diff --git a/test/test_rake_top_level_functions.rb b/test/test_rake_top_level_functions.rb index 7082caad7..f3675a096 100644 --- a/test/test_rake_top_level_functions.rb +++ b/test/test_rake_top_level_functions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeTopLevelFunctions < Rake::TestCase diff --git a/test/test_rake_win32.rb b/test/test_rake_win32.rb index 15f6663c9..292af4715 100644 --- a/test/test_rake_win32.rb +++ b/test/test_rake_win32.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeWin32 < Rake::TestCase diff --git a/test/test_thread_history_display.rb b/test/test_thread_history_display.rb index 304471e71..8adb1940a 100644 --- a/test/test_thread_history_display.rb +++ b/test/test_thread_history_display.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/thread_history_display" diff --git a/test/test_trace_output.rb b/test/test_trace_output.rb index a55296f7f..92de3058b 100644 --- a/test/test_trace_output.rb +++ b/test/test_trace_output.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "stringio" From 23f779f73afb4ef9be9f50774bfb6da03f38c0ec Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 20 Jun 2017 10:19:07 +0900 Subject: [PATCH 666/813] Fixed broken test with frozen objects --- lib/rake/ext/string.rb | 2 +- lib/rake/task.rb | 2 +- test/test_rake_application.rb | 2 +- test/test_rake_path_map_partial.rb | 2 +- test/test_trace_output.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb index 7bd5064f9..c70236ae9 100644 --- a/lib/rake/ext/string.rb +++ b/lib/rake/ext/string.rb @@ -137,7 +137,7 @@ def pathmap_replace(patterns, &block) # This String extension comes from Rake def pathmap(spec=nil, &block) return self if spec.nil? - result = "" + result = "".dup spec.scan(/%\{[^}]*\}-?\d*[sdpfnxX%]|%-?\d+d|%.|[^%]+/) do |frag| case frag when "%f" diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 077f37f4a..256571112 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -321,7 +321,7 @@ def set_arg_names(args) # Return a string describing the internal state of a task. Useful for # debugging. def investigation - result = "------------------------------\n" + result = "------------------------------\n".dup result << "Investigating #{name}\n" result << "class: #{self.class}\n" result << "task needed: #{needed?}\n" diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index b52c484dc..141dd576f 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -37,7 +37,7 @@ def test_display_exception_details def test_display_exception_details_bad_encoding begin - raise "El Niño is coming!".force_encoding("US-ASCII") + raise "El Niño is coming!".dup.force_encoding("US-ASCII") rescue => ex end diff --git a/test/test_rake_path_map_partial.rb b/test/test_rake_path_map_partial.rb index f65428d71..9daf44ca5 100644 --- a/test/test_rake_path_map_partial.rb +++ b/test/test_rake_path_map_partial.rb @@ -3,7 +3,7 @@ class TestRakePathMapPartial < Rake::TestCase def test_pathmap_partial - @path = "1/2/file" + @path = "1/2/file".dup def @path.call(n) pathmap_partial(n) end diff --git a/test/test_trace_output.rb b/test/test_trace_output.rb index 92de3058b..34dab6162 100644 --- a/test/test_trace_output.rb +++ b/test/test_trace_output.rb @@ -9,7 +9,7 @@ class PrintSpy attr_reader :result, :calls def initialize - @result = "" + @result = "".dup @calls = 0 end From a0e822b2b1b1c85afd50035d56162028743b8ced Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 28 Jun 2017 17:31:37 -0700 Subject: [PATCH 667/813] Set default rake options explicitly Currently it is impossible to start rake from within a library. By setting the default options explicitly we won't have to call handle_options after replacing ARGV. --- lib/rake/application.rb | 26 ++++++++++++++++++++++++-- test/test_rake_application_options.rb | 26 +++++++++++++------------- 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index ae594e098..4fd59bba0 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -619,8 +619,7 @@ def select_trace_output(options, trace_option, value) # :nodoc: # arguments that we didn't understand, which should (in theory) be just # task names and env vars. def handle_options # :nodoc: - options.rakelib = ["rakelib"] - options.trace_output = $stderr + set_default_options OptionParser.new do |opts| opts.banner = "#{Rake.application.name} [-f rakefile] {options} targets..." @@ -782,5 +781,28 @@ def rakefile_location(backtrace=caller) # :nodoc: backtrace.find { |str| str =~ re } || "" end + def set_default_options + options.always_multitask = false + options.backtrace = false + options.build_all = false + options.dryrun = false + options.ignore_deprecate = false + options.ignore_system = false + options.job_stats = false + options.load_system = false + options.nosearch = false + options.rakelib = %w[rakelib] + options.show_all_tasks = false + options.show_prereqs = false + options.show_task_pattern = nil + options.show_tasks = nil + options.silent = false + options.suppress_backtrace_pattern = nil + options.thread_pool_size = Rake.suggested_thread_count + options.trace = false + options.trace_output = $stderr + options.trace_rules = false + end + end end diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index b34c2f634..eb4060973 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -30,19 +30,19 @@ def clear_argv def test_default_options opts = command_line - assert_nil opts.backtrace - assert_nil opts.dryrun - assert_nil opts.ignore_system - assert_nil opts.load_system - assert_nil opts.always_multitask - assert_nil opts.nosearch + assert_equal false, opts.backtrace + assert_equal false, opts.dryrun + assert_equal false, opts.ignore_system + assert_equal false, opts.load_system + assert_equal false, opts.always_multitask + assert_equal false, opts.nosearch assert_equal ["rakelib"], opts.rakelib - assert_nil opts.show_prereqs + assert_equal false, opts.show_prereqs assert_nil opts.show_task_pattern assert_nil opts.show_tasks - assert_nil opts.silent - assert_nil opts.trace - assert_nil opts.thread_pool_size + assert_equal false, opts.silent + assert_equal false, opts.trace + assert_equal Rake.suggested_thread_count, opts.thread_pool_size assert_equal ["rakelib"], opts.rakelib assert ! Rake::FileUtilsExt.verbose_flag assert ! Rake::FileUtilsExt.nowrite_flag @@ -115,7 +115,7 @@ def test_help def test_jobs flags([]) do |opts| - assert_nil opts.thread_pool_size + assert_equal Rake.suggested_thread_count, opts.thread_pool_size end flags(["--jobs", "0"], ["-j", "0"]) do |opts| assert_equal 0, opts.thread_pool_size @@ -329,12 +329,12 @@ def test_tasks flags("--tasks", "-T") do |opts| assert_equal :tasks, opts.show_tasks assert_equal(//.to_s, opts.show_task_pattern.to_s) - assert_nil opts.show_all_tasks + assert_equal false, opts.show_all_tasks end flags(["--tasks", "xyz"], ["-Txyz"]) do |opts| assert_equal :tasks, opts.show_tasks assert_equal(/xyz/.to_s, opts.show_task_pattern.to_s) - assert_nil opts.show_all_tasks + assert_equal false, opts.show_all_tasks end flags(["--tasks", "xyz", "--comments"]) do |opts| assert_equal :tasks, opts.show_tasks From 84e1fe27d5803a32ada80e84d3fc05509200cc18 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 28 Jun 2017 17:52:24 -0700 Subject: [PATCH 668/813] Allow implicit ARGV for Rake::Application#run This allows users to pass in an explicit ARGV for rake instead of changing their application's ARGV. While the previous commit allows users to create a Rake application explicitly by calling parts of Rake::Application#init directly, some users will not want to dig through the source to set up a Rake application. Swapping ARGV is confusing and error-prone, so this allows them to specify a set of Rake options directly. --- lib/rake/application.rb | 12 ++-- test/test_rake_application.rb | 83 ++++++++------------------- test/test_rake_application_options.rb | 5 +- 3 files changed, 31 insertions(+), 69 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 4fd59bba0..650b6522c 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -74,19 +74,19 @@ def initialize # If you wish to build a custom rake command, you should call # +init+ on your application. Then define any tasks. Finally, # call +top_level+ to run your top level tasks. - def run + def run(argv = ARGV) standard_exception_handling do - init + init 'rake', argv load_rakefile top_level end end # Initialize the command line parameters and app name. - def init(app_name="rake") + def init(app_name="rake", argv = ARGV) standard_exception_handling do @name = app_name - args = handle_options + args = handle_options argv collect_command_line_tasks(args) end end @@ -618,7 +618,7 @@ def select_trace_output(options, trace_option, value) # :nodoc: # Read and handle the command line options. Returns the command line # arguments that we didn't understand, which should (in theory) be just # task names and env vars. - def handle_options # :nodoc: + def handle_options(argv) # :nodoc: set_default_options OptionParser.new do |opts| @@ -633,7 +633,7 @@ def handle_options # :nodoc: standard_rake_options.each { |args| opts.on(*args) } opts.environment("RAKEOPT") - end.parse(ARGV) + end.parse(argv) end # Similar to the regular Ruby +require+ command, but will check diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 141dd576f..0212c9b22 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -10,13 +10,6 @@ def setup @app.options.rakelib = [] end - def setup_command_line(*options) - ARGV.clear - options.each do |option| - ARGV << option - end - end - def test_display_exception_details obj = Object.new obj.instance_eval("def #{__method__}; raise 'test'; end", "ruby") @@ -187,7 +180,7 @@ def test_load_rakefile rakefile_unittest @app.instance_eval do - handle_options + handle_options [] options.silent = true load_rakefile end @@ -215,7 +208,7 @@ def test_load_rakefile_from_subdir Dir.chdir "subdir" @app.instance_eval do - handle_options + handle_options [] options.silent = true load_rakefile end @@ -246,7 +239,7 @@ def test_load_rakefile_doesnt_print_rakefile_directory_from_subdir_if_silent _, err = capture_io do @app.instance_eval do - handle_options + handle_options [] options.silent = true raw_load_rakefile end @@ -258,12 +251,11 @@ def test_load_rakefile_doesnt_print_rakefile_directory_from_subdir_if_silent def test_load_rakefile_not_found skip if jruby9? - ARGV.clear Dir.chdir @tempdir ENV["RAKE_SYSTEM"] = "not_exist" @app.instance_eval do - handle_options + handle_options [] options.silent = true end @@ -280,7 +272,7 @@ def test_load_from_system_rakefile rake_system_dir @app.instance_eval do - handle_options + handle_options [] options.silent = true options.load_system = true options.rakelib = [] @@ -302,7 +294,7 @@ def @app.standard_system_dir ENV["RAKE_SYSTEM"] = nil @app.instance_eval do - handle_options + handle_options [] options.silent = true options.load_system = true options.rakelib = [] @@ -362,28 +354,22 @@ def test_building_imported_files_on_demand def test_handle_options_should_not_strip_options_from_argv assert !@app.options.trace - valid_option = "--trace" - setup_command_line(valid_option) + argv = %w[--trace] + @app.handle_options argv - @app.handle_options - - assert ARGV.include?(valid_option) + assert_includes argv, '--trace' assert @app.options.trace end def test_handle_options_trace_default_is_stderr - setup_command_line("--trace") - - @app.handle_options + @app.handle_options %w[--trace] assert_equal STDERR, @app.options.trace_output assert @app.options.trace end def test_handle_options_trace_overrides_to_stdout - setup_command_line("--trace=stdout") - - @app.handle_options + @app.handle_options %w[--trace=stdout] assert_equal STDOUT, @app.options.trace_output assert @app.options.trace @@ -392,18 +378,16 @@ def test_handle_options_trace_overrides_to_stdout def test_handle_options_trace_does_not_eat_following_task_names assert !@app.options.trace - setup_command_line("--trace", "sometask") + argv = %w[--trace sometask] + @app.handle_options argv - @app.handle_options - assert ARGV.include?("sometask") + assert argv.include?("sometask") assert @app.options.trace end def test_good_run ran = false - ARGV << '--rakelib=""' - @app.options.silent = true @app.instance_eval do @@ -413,7 +397,7 @@ def test_good_run rakefile_default out, err = capture_io do - @app.run + @app.run %w[--rakelib=""] end assert ran @@ -423,10 +407,9 @@ def test_good_run def test_display_task_run ran = false - setup_command_line("-f", "-s", "--tasks", '--rakelib=""') @app.last_description = "COMMENT" @app.define_task(Rake::Task, "default") - out, = capture_io { @app.run } + out, = capture_io { @app.run %w[-f -s --tasks --rakelib=""] } assert @app.options.show_tasks assert ! ran assert_match(/rake default/, out) @@ -435,13 +418,12 @@ def test_display_task_run def test_display_prereqs ran = false - setup_command_line("-f", "-s", "--prereqs", '--rakelib=""') @app.last_description = "COMMENT" t = @app.define_task(Rake::Task, "default") t.enhance([:a, :b]) @app.define_task(Rake::Task, "a") @app.define_task(Rake::Task, "b") - out, = capture_io { @app.run } + out, = capture_io { @app.run %w[-f -s --prereqs --rakelib=""] } assert @app.options.show_prereqs assert ! ran assert_match(/rake a$/, out) @@ -451,37 +433,28 @@ def test_display_prereqs def test_bad_run @app.intern(Rake::Task, "default").enhance { fail } - setup_command_line("-f", "-s", '--rakelib=""') _, err = capture_io { - assert_raises(SystemExit) { @app.run } + assert_raises(SystemExit) { @app.run %w[-f -s --rakelib=""]} } assert_match(/see full trace/i, err) - ensure - ARGV.clear end def test_bad_run_with_trace @app.intern(Rake::Task, "default").enhance { fail } - setup_command_line("-f", "-s", "-t") _, err = capture_io { - assert_raises(SystemExit) { @app.run } + assert_raises(SystemExit) { @app.run %w[-f -s -t] } } refute_match(/see full trace/i, err) - ensure - ARGV.clear end def test_bad_run_with_backtrace @app.intern(Rake::Task, "default").enhance { fail } - setup_command_line("-f", "-s", "--backtrace") _, err = capture_io { assert_raises(SystemExit) { - @app.run + @app.run %w[-f -s --backtrace] } } refute_match(/see full trace/, err) - ensure - ARGV.clear end CustomError = Class.new(RuntimeError) @@ -490,10 +463,9 @@ def test_bad_run_includes_exception_name @app.intern(Rake::Task, "default").enhance { raise CustomError, "intentional" } - setup_command_line("-f", "-s") _, err = capture_io { assert_raises(SystemExit) { - @app.run + @app.run %w[-f -s] } } assert_match(/CustomError: intentional/, err) @@ -503,10 +475,9 @@ def test_rake_error_excludes_exception_name @app.intern(Rake::Task, "default").enhance { fail "intentional" } - setup_command_line("-f", "-s") _, err = capture_io { assert_raises(SystemExit) { - @app.run + @app.run %w[-f -s] } } refute_match(/RuntimeError/, err) @@ -527,28 +498,22 @@ def test_printing_original_exception_cause raise custom_error, "Secondary Error" end } - setup_command_line("-f", "-s") _ ,err = capture_io { assert_raises(SystemExit) { - @app.run + @app.run %w[-f -s] } } if cause_supported? assert_match(/Original Error/, err) end assert_match(/Secondary Error/, err) - ensure - ARGV.clear end def test_run_with_bad_options @app.intern(Rake::Task, "default").enhance { fail } - setup_command_line("-f", "-s", "--xyzzy") assert_raises(SystemExit) { - capture_io { @app.run } + capture_io { @app.run %w[-f -s --xyzzy] } } - ensure - ARGV.clear end def test_standard_exception_handling_invalid_option diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index eb4060973..a8a71a981 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -445,8 +445,6 @@ def test_rake_explicit_task_library def flags(*sets) sets.each do |set| - ARGV.clear - @exit = catch(:system_exit) { command_line(*set) } yield(@app.options) if block_given? @@ -454,13 +452,12 @@ def flags(*sets) end def command_line(*options) - options.each do |opt| ARGV << opt end @app = Rake::Application.new def @app.exit(*args) throw :system_exit, :exit end @app.instance_eval do - args = handle_options + args = handle_options options collect_command_line_tasks(args) end @tasks = @app.top_level_tasks From ee7e30be5abbdd4e0190bcdf06abf6521e72cb91 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 28 Jun 2017 17:58:12 -0700 Subject: [PATCH 669/813] Remove test ARGV manipulation These are no longer necessary --- test/test_rake_application_options.rb | 6 ------ test/test_rake_task_argument_parsing.rb | 6 ++---- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index a8a71a981..d774678b6 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -9,7 +9,6 @@ def setup super @testkey = ENV["TESTKEY"] - clear_argv Rake::FileUtilsExt.verbose_flag = false Rake::FileUtilsExt.nowrite_flag = false TESTING_REQUIRE.clear @@ -17,17 +16,12 @@ def setup def teardown ENV["TESTKEY"] = @testkey - clear_argv Rake::FileUtilsExt.verbose_flag = false Rake::FileUtilsExt.nowrite_flag = false super end - def clear_argv - ARGV.pop until ARGV.empty? - end - def test_default_options opts = command_line assert_equal false, opts.backtrace diff --git a/test/test_rake_task_argument_parsing.rb b/test/test_rake_task_argument_parsing.rb index e34126591..fc494a463 100644 --- a/test/test_rake_task_argument_parsing.rb +++ b/test/test_rake_task_argument_parsing.rb @@ -96,16 +96,14 @@ def @app.unix?() raise end end def test_no_rakeopt - ARGV << "--trace" app = Rake::Application.new - app.init + app.init %w[--trace] assert !app.options.silent end def test_rakeopt_with_blank_options - ARGV << "--trace" app = Rake::Application.new - app.init + app.init %w[--trace] assert !app.options.silent end From ae4f78662accf3145654a005e9f0c0a38b1bd287 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 28 Jun 2017 18:14:48 -0700 Subject: [PATCH 670/813] Add Rake::with_application This allows users to use Rake as a library more easily. This allows loading multiple rakefiles from separate sources into separate Rake applications without task name collisions. --- lib/rake/rake_module.rb | 30 ++++++++++++++++++++++++++++++ test/test_rake_application.rb | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/lib/rake/rake_module.rb b/lib/rake/rake_module.rb index f5cfde58a..1ee9d7d63 100644 --- a/lib/rake/rake_module.rb +++ b/lib/rake/rake_module.rb @@ -34,6 +34,36 @@ def add_rakelib(*files) application.options.rakelib ||= [] application.options.rakelib.concat(files) end + + # Make +block_application+ the default rake application inside a block so + # you can load rakefiles into a different application. + # + # This is useful when you want to run rake tasks inside a library without + # running rake in a sub-shell. + # + # Example: + # + # Dir.chdir 'other/directory' + # + # other_rake = Rake.with_application do |rake| + # rake.set_default_options + # + # rake.load_rakefile + # end + # + # puts other_rake.tasks + + def with_application(block_application = Rake::Application.new) + orig_application = Rake.application + + Rake.application = block_application + + yield block_application + + block_application + ensure + Rake.application = orig_application + end end end diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 0212c9b22..c7d45652c 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -10,6 +10,36 @@ def setup @app.options.rakelib = [] end + def test_class_with_application + orig_app = Rake.application + + return_app = Rake.with_application do |yield_app| + refute_equal orig_app, yield_app, 'new application must be yielded' + + assert_equal yield_app, Rake.application, + 'new application must be default in block' + end + + refute_equal orig_app, return_app, 'new application not returned' + assert_equal orig_app, Rake.application, 'original application not default' + end + + def test_class_with_application_user_defined + orig_app = Rake.application + + user_app = Rake::Application.new + + return_app = Rake.with_application user_app do |yield_app| + assert_equal user_app, yield_app, 'user application must be yielded' + + assert_equal user_app, Rake.application, + 'user application must be default in block' + end + + assert_equal user_app, return_app, 'user application not returned' + assert_equal orig_app, Rake.application, 'original application not default' + end + def test_display_exception_details obj = Object.new obj.instance_eval("def #{__method__}; raise 'test'; end", "ruby") From 4f9c15644910c4c82c318f18753480adf4caa284 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 28 Jun 2017 18:36:29 -0700 Subject: [PATCH 671/813] Always set_default_options This allows Rake.with_application to work without users having to know to set the default options manually. --- lib/rake/application.rb | 2 ++ lib/rake/rake_module.rb | 2 -- test/test_rake_application.rb | 9 +++++++++ test/test_rake_task.rb | 12 +++++++++--- test/test_rake_win32.rb | 6 +++++- 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 650b6522c..8c896888f 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -62,6 +62,8 @@ def initialize add_loader("rake", DefaultLoader.new) @tty_output = STDOUT.tty? @terminal_columns = ENV["RAKE_COLUMNS"].to_i + + set_default_options end # Run the Rake application. The run method performs the following diff --git a/lib/rake/rake_module.rb b/lib/rake/rake_module.rb index 1ee9d7d63..03c295624 100644 --- a/lib/rake/rake_module.rb +++ b/lib/rake/rake_module.rb @@ -46,8 +46,6 @@ def add_rakelib(*files) # Dir.chdir 'other/directory' # # other_rake = Rake.with_application do |rake| - # rake.set_default_options - # # rake.load_rakefile # end # diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index c7d45652c..456f7d878 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -49,6 +49,8 @@ def test_display_exception_details end out, err = capture_io do + @app.set_default_options # reset trace output IO + @app.display_error_message ex end @@ -65,6 +67,8 @@ def test_display_exception_details_bad_encoding end out, err = capture_io do + @app.set_default_options # reset trace output IO + @app.display_error_message ex end @@ -86,6 +90,8 @@ def test_display_exception_details_cause end out, err = capture_io do + @app.set_default_options # reset trace output IO + @app.display_error_message ex end @@ -472,6 +478,7 @@ def test_bad_run def test_bad_run_with_trace @app.intern(Rake::Task, "default").enhance { fail } _, err = capture_io { + @app.set_default_options assert_raises(SystemExit) { @app.run %w[-f -s -t] } } refute_match(/see full trace/i, err) @@ -563,6 +570,8 @@ def test_standard_exception_handling_invalid_option def test_standard_exception_handling_other out, err = capture_io do + @app.set_default_options # reset trace output IO + e = assert_raises SystemExit do @app.standard_exception_handling do raise "blah" diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index b2bbb6d95..8bfdedb4e 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -62,10 +62,14 @@ def test_invoke_with_circular_dependencies end def test_dry_run_prevents_actions - Rake.application.options.dryrun = true runlist = [] t1 = task(:t1) { |t| runlist << t.name; 3321 } - _, err = capture_io { t1.invoke } + _, err = capture_io { + Rake.application.set_default_options # reset trace output IO + Rake.application.options.dryrun = true + + t1.invoke + } assert_match(/execute .*t1/i, err) assert_match(/dry run/i, err) refute_match(/invoke/i, err) @@ -75,9 +79,11 @@ def test_dry_run_prevents_actions end def test_tasks_can_be_traced - Rake.application.options.trace = true t1 = task(:t1) _, err = capture_io { + Rake.application.set_default_options # reset trace output IO + Rake.application.options.trace = true + t1.invoke } assert_match(/invoke t1/i, err) diff --git a/test/test_rake_win32.rb b/test/test_rake_win32.rb index 292af4715..6c341f486 100644 --- a/test/test_rake_win32.rb +++ b/test/test_rake_win32.rb @@ -65,7 +65,11 @@ def test_win32_backtrace_with_different_case rake.options.trace = true rake.instance_variable_set(:@rakefile, "Rakefile") - _, err = capture_io { rake.display_error_message(ex) } + _, err = capture_io { + rake.set_default_options # reset trace output IO + + rake.display_error_message(ex) + } assert_match(/rakefile/, err) end From ab19d387041f0d54aa0269bd8c11f2a605becb9d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 1 Jul 2017 16:45:13 +0900 Subject: [PATCH 672/813] History --- History.rdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/History.rdoc b/History.rdoc index d1bf4b85f..d52c7e2a9 100644 --- a/History.rdoc +++ b/History.rdoc @@ -3,6 +3,7 @@ ==== Enhancements: * Enabled to dependency chained by extensions. Pull request #39 by Petr Skocik. +* Make all of string literals to frozen objects on Ruby 2.4 or later. ==== Bug fixes From 2a5f102e096aacebb0a4d81c697ff934de4a0590 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 1 Jul 2017 16:46:16 +0900 Subject: [PATCH 673/813] Added declaration of frozen string literals --- rake.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/rake.gemspec b/rake.gemspec index 911384c46..4d04b9c3e 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -1,3 +1,4 @@ +# frozen_string_literal: true $LOAD_PATH.unshift File.expand_path('../lib', __FILE__) require 'rake/version' From 537daaca8ac9c4298098c28dc43e4e115f01a42f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 1 Jul 2017 17:30:53 +0900 Subject: [PATCH 674/813] Added broken test for https://github.com/ruby/rake/pull/182 --- test/test_rake_rules.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index e71af3502..739e35470 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -343,6 +343,17 @@ def test_regex_rule_with_args Task[OBJFILE].invoke("arg") end + # for https://github.com/ruby/rake/pull/182 + def test_single_dependent_with_nil_args + create_file(SRCFILE) + rule nil => ".cpp" do |t| p t.name end + rule(/\.o$/ => ".c") do |t| + @runs << t.name + end + Task[OBJFILE].invoke + assert_equal [OBJFILE], @runs + end + def test_string_rule_with_args_and_lambda_prereq delete_file(OBJFILE) create_file(SRCFILE) From 316c76d9737a7dbaa441e34fa193e045622c336e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 1 Jul 2017 17:34:49 +0900 Subject: [PATCH 675/813] Added documentation for warning option --- lib/rake/testtask.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 66e114762..537627567 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -51,6 +51,7 @@ class TestTask < TaskLib # Request that the tests be run with the warning flag set. # E.g. warning=true implies "ruby -w" used to run the tests. + # (default is true) attr_accessor :warning # Glob pattern to match test files. (default is 'test/test*.rb') From 04f5778752bed2f330277aa19985cb589a6425fe Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Thu, 17 Aug 2017 13:18:40 +0200 Subject: [PATCH 676/813] gemspec: Exclude various YAML configuration files --- rake.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index 4d04b9c3e..4d1a223d2 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -24,7 +24,8 @@ Rake has the following features: s.homepage = "https://github.com/ruby/rake".freeze s.licenses = ["MIT".freeze] - s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } - + %w[.rubocop.yml .travis.yml appveyor.yml] s.bindir = "exe" s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) } s.require_paths = ["lib".freeze] From 18704dd6c85064030368dfbc386ffeb01b644729 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Thu, 17 Aug 2017 22:18:31 +0200 Subject: [PATCH 677/813] Travis: jruby-9.1.12.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b64da9a66..c68768e11 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ rvm: - 2.3.4 - 2.4.1 - ruby-head - - jruby-9.1.9.0 + - jruby-9.1.12.0 - jruby-head before_install: - gem install bundler --no-document -v '~> 1.13.3' From aedc33ca9c17297f448a4729c065427a650d487e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 21 Aug 2017 11:42:13 +0900 Subject: [PATCH 678/813] added rubocop to development dependency --- rake.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/rake.gemspec b/rake.gemspec index 4d1a223d2..9f9f356eb 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -39,4 +39,5 @@ Rake has the following features: s.add_development_dependency(%q.freeze) s.add_development_dependency(%q.freeze) s.add_development_dependency(%q.freeze) + s.add_development_dependency(%q.freeze) end From de98d29359a47d8d0e753cc3bbcad67148b0f08a Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 21 Aug 2017 11:42:33 +0900 Subject: [PATCH 679/813] Renamed obsoleted parameter AlignWith to EnforcedStyleAlignWith --- .rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index acdf2e117..19f0bb798 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -54,4 +54,4 @@ Style/BracesAroundHashParameters: Lint/EndAlignment: Enabled: true - AlignWith: variable + EnforcedStyleAlignWith: variable From fb2320156611729467f986f6529b24e0fb692af7 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 21 Aug 2017 11:44:10 +0900 Subject: [PATCH 680/813] Fixed deprecated warnings --- .rubocop.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 19f0bb798..25589b98c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,7 +5,7 @@ AllCops: - doc/**/*.rb - rake.gemspec -Style/LineLength: +Metrics/LineLength: Enabled: true Max: 120 @@ -16,31 +16,31 @@ Style/StringLiterals: Enabled: true EnforcedStyle: double_quotes -Style/IndentationWidth: +Layout/IndentationWidth: Enabled: true -Style/Tab: +Layout/Tab: Enabled: true -Style/EmptyLines: +Layout/EmptyLines: Enabled: true -Style/TrailingBlankLines: +Layout/TrailingBlankLines: Enabled: true -Style/TrailingWhitespace: +Layout/TrailingWhitespace: Enabled: true -Style/SpaceBeforeBlockBraces: +Layout/SpaceBeforeBlockBraces: Enabled: true -Style/SpaceInsideBlockBraces: +Layout/SpaceInsideBlockBraces: Enabled: true -Style/SpaceInsideHashLiteralBraces: +Layout/SpaceInsideHashLiteralBraces: Enabled: true -Style/CaseIndentation: +Layout/CaseIndentation: Enabled: true Style/MultilineIfThen: From d7baa00984168d4b1707573dee643115917f646f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 21 Aug 2017 11:44:23 +0900 Subject: [PATCH 681/813] Ordered --- .rubocop.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 25589b98c..29aa862a5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -16,6 +16,15 @@ Style/StringLiterals: Enabled: true EnforcedStyle: double_quotes +Style/MultilineIfThen: + Enabled: true + +Style/MethodDefParentheses: + Enabled: true + +Style/BracesAroundHashParameters: + Enabled: true + Layout/IndentationWidth: Enabled: true @@ -43,15 +52,6 @@ Layout/SpaceInsideHashLiteralBraces: Layout/CaseIndentation: Enabled: true -Style/MultilineIfThen: - Enabled: true - -Style/MethodDefParentheses: - Enabled: true - -Style/BracesAroundHashParameters: - Enabled: true - Lint/EndAlignment: Enabled: true EnforcedStyleAlignWith: variable From 879e08f34bdbb6f4236f8f2fe1f205b0199601d1 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 21 Aug 2017 11:44:43 +0900 Subject: [PATCH 682/813] rubocop -a --- test/helper.rb | 2 +- test/test_rake_file_utils.rb | 2 +- test/test_rake_rake_test_loader.rb | 4 ++-- test/test_rake_rules.rb | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index a6e38cb18..17447ab2e 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true $:.unshift File.expand_path("../../lib", __FILE__) -require 'coveralls' +require "coveralls" Coveralls.wear! gem "minitest", "~> 5" diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index bfdaf75bd..90526b1d9 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -186,7 +186,7 @@ def test_sh_with_hash_option check_expansion verbose(false) { - sh "#{RUBY} check_expansion.rb", {chdir: "."}, { verbose: false } + sh "#{RUBY} check_expansion.rb", { chdir: "." }, verbose: false } end diff --git a/test/test_rake_rake_test_loader.rb b/test/test_rake_rake_test_loader.rb index fa35c44aa..fabee4721 100644 --- a/test/test_rake_rake_test_loader.rb +++ b/test/test_rake_rake_test_loader.rb @@ -6,7 +6,7 @@ class TestRakeRakeTestLoader < Rake::TestCase def setup super - @loader = File.join @rake_lib, 'rake/rake_test_loader.rb' + @loader = File.join @rake_lib, "rake/rake_test_loader.rb" end def test_pattern @@ -35,7 +35,7 @@ def test_load_error assert_empty out - no_such_path = File.join @tempdir, 'no_such_test_file' + no_such_path = File.join @tempdir, "no_such_test_file" expected = /\A\n diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index 739e35470..52934c258 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -11,7 +11,7 @@ class TestRakeRules < Rake::TestCase OBJFILE = "abc.o" FOOFILE = "foo" DOTFOOFILE = ".foo" - MINFILE = 'abc.min.o' + MINFILE = "abc.min.o" def setup super @@ -400,7 +400,7 @@ def obj.find_prereq(task_name) def test_works_with_chained_extensions_in_rules create_file(OBJFILE) - rule('.min.o' => ['.o']) do |t| + rule(".min.o" => [".o"]) do |t| @runs << t.name assert_equal OBJFILE, t.source assert_equal MINFILE, t.name From 0d007f754116df9cc31ea8129ae980470cb349f2 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Fri, 8 Sep 2017 13:08:40 +0200 Subject: [PATCH 683/813] Travis: jruby-9.1.13.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c68768e11..3a955aa68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ rvm: - 2.3.4 - 2.4.1 - ruby-head - - jruby-9.1.12.0 + - jruby-9.1.13.0 - jruby-head before_install: - gem install bundler --no-document -v '~> 1.13.3' From d54013d4d2e255605867739d4826c44a3eea35a6 Mon Sep 17 00:00:00 2001 From: Christina Thompson Date: Fri, 8 Sep 2017 18:00:12 -0400 Subject: [PATCH 684/813] Added did you mean to rake Signed-off-by: Yuki Nishijima --- lib/rake/task_manager.rb | 16 +++++++++++++++- test/test_rake_task.rb | 13 ++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index f928309ed..e2531c8ef 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -56,7 +56,21 @@ def [](task_name, scopes=nil) self.lookup(task_name, scopes) or enhance_with_matching_rule(task_name) or synthesize_file_task(task_name) or - fail "Don't know how to build task '#{task_name}' (see --tasks)" + fail generate_message_for_undefined_task(task_name) + end + + def generate_message_for_undefined_task(task_name) + message = "Don't know how to build task '#{task_name}' (see --tasks)" + + suggestion_message = \ + if defined?(::DidYouMean::SpellChecker) && defined?(::DidYouMean::Formatter) + suggestions = ::DidYouMean::SpellChecker.new(dictionary: @tasks.keys).correct(task_name.to_s) + ::DidYouMean::Formatter.new(suggestions).to_s + else + "" + end + + message + suggestion_message end def synthesize_file_task(task_name) # :nodoc: diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index b2bbb6d95..bbf3b5444 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -453,4 +453,15 @@ def test_source_is_first_prerequisite t = task t: ["preqA", "preqB"] assert_equal "preqA", t.source end -end + + def test_suggests_valid_rake_task_names + task :test + error = assert_raises(RuntimeError) { Task[:testt] } + + assert_match /Don\'t know how to build task \'testt\'/, error.message + + if defined?(::DidYouMean::SpellChecker) && defined?(::DidYouMean::Formatter) + assert_match /Did you mean\? test/, error.message + end + end +end \ No newline at end of file From 82467f13079329f3c90697441d70037d2a76d168 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 11 Sep 2017 11:09:46 +0900 Subject: [PATCH 685/813] rubocop -a --- test/test_rake_task.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index bbf3b5444..b532d7903 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -464,4 +464,4 @@ def test_suggests_valid_rake_task_names assert_match /Did you mean\? test/, error.message end end -end \ No newline at end of file +end From 972c9ce327bc7546648cb4ac5c1055bbfe401fdb Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 11 Sep 2017 11:11:58 +0900 Subject: [PATCH 686/813] History --- History.rdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.rdoc b/History.rdoc index d52c7e2a9..cab37a378 100644 --- a/History.rdoc +++ b/History.rdoc @@ -2,6 +2,8 @@ ==== Enhancements: +* Added did_you_mean feature for invalid rake task. + Pull request #221 by @xtina-starr * Enabled to dependency chained by extensions. Pull request #39 by Petr Skocik. * Make all of string literals to frozen objects on Ruby 2.4 or later. From f543024ad92d3f5c428a81ba553f3b287b7b80cb Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 11 Sep 2017 11:19:53 +0900 Subject: [PATCH 687/813] bump release version to 12.1.0 --- History.rdoc | 2 +- lib/rake/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index cab37a378..49d3b3a63 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 12.1.0(development) +=== 12.1.0 ==== Enhancements: diff --git a/lib/rake/version.rb b/lib/rake/version.rb index a240aa5a4..7a309b9dc 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Rake - VERSION = "12.0.0" + VERSION = "12.1.0" module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "." From 3d6df97a6fbc44572e08b39e5bc4aed87a3a6278 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 11 Sep 2017 17:15:12 +0900 Subject: [PATCH 688/813] Fixed release date #222. --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index 9f9f356eb..f3e77ca2f 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -5,7 +5,7 @@ require 'rake/version' Gem::Specification.new do |s| s.name = "rake".freeze s.version = Rake::VERSION - s.date = "2016-12-06" + s.date = "2017-09-11" s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] From d183f4d6d124d6f164db3584608692bb7d8845f2 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Mon, 11 Sep 2017 21:48:32 +0900 Subject: [PATCH 689/813] Fix typo --- History.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 49d3b3a63..079e65dcb 100644 --- a/History.rdoc +++ b/History.rdoc @@ -14,7 +14,7 @@ Pull request #183 by @aycabta. * Make LoadError from running tests more obvious. Pull request #195 by Eric Hodel. -* Fix unexpected TypeError with hash stayle option. Pull request #202 +* Fix unexpected TypeError with hash style option. Pull request #202 by Kuniaki IGARASHI. === 12.0.0 From 735609168e29aa3825687bac4fb57fd4599e726e Mon Sep 17 00:00:00 2001 From: Keiji Yoshimi Date: Mon, 25 Sep 2017 22:53:11 +0900 Subject: [PATCH 690/813] fixed warnings ``` test/test_rake_task.rb:467: warning: ambiguous first argument; put parentheses or a space even after `/' operator test/test_rake_task.rb:470: warning: ambiguous first argument; put parentheses or a space even after `/' operator ``` --- test/test_rake_task.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index da1d0d82a..5b9605964 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -464,10 +464,10 @@ def test_suggests_valid_rake_task_names task :test error = assert_raises(RuntimeError) { Task[:testt] } - assert_match /Don\'t know how to build task \'testt\'/, error.message + assert_match(/Don\'t know how to build task \'testt\'/, error.message) if defined?(::DidYouMean::SpellChecker) && defined?(::DidYouMean::Formatter) - assert_match /Did you mean\? test/, error.message + assert_match(/Did you mean\? test/, error.message) end end end From 02fbc5cd93697736be32cdd7c883a4cd83a0357b Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Sep 2017 13:37:32 +0900 Subject: [PATCH 691/813] Removed _JAVA_OPTIONS for JRuby task --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3a955aa68..24aa8aa61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ before_install: - gem install bundler --no-document -v '~> 1.13.3' before_script: - unset JRUBY_OPTS + - unset _JAVA_OPTIONS script: ruby -Ilib exe/rake notifications: email: From 089363455d32153d5f76b57ea060d99e5a19ab68 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Sep 2017 13:37:48 +0900 Subject: [PATCH 692/813] Removed needless bundler installation --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 24aa8aa61..81ab4e34c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,6 @@ rvm: - ruby-head - jruby-9.1.13.0 - jruby-head -before_install: - - gem install bundler --no-document -v '~> 1.13.3' before_script: - unset JRUBY_OPTS - unset _JAVA_OPTIONS From 48c78945778beaa711d23a61f99593d19286d318 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Sep 2017 13:39:10 +0900 Subject: [PATCH 693/813] Removed needless notification --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 81ab4e34c..5ee1b39be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,3 @@ before_script: - unset JRUBY_OPTS - unset _JAVA_OPTIONS script: ruby -Ilib exe/rake -notifications: - email: - - hsbt@ruby-lang.org - - drbrain@segment7.net From 976f97363b6109eb625e3608c6f424f33c9d640a Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Sep 2017 13:39:26 +0900 Subject: [PATCH 694/813] Update latest versions --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5ee1b39be..071c3ef20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,9 @@ sudo: false rvm: - 2.0.0 - 2.1.10 - - 2.2.7 - - 2.3.4 - - 2.4.1 + - 2.2.8 + - 2.3.5 + - 2.4.2 - ruby-head - jruby-9.1.13.0 - jruby-head From 85fa80dc639f68de2b921a605bc4a35a937099b6 Mon Sep 17 00:00:00 2001 From: Sylvain Joyeux Date: Thu, 5 Oct 2017 15:01:43 -0300 Subject: [PATCH 695/813] fix quadratic performance in FileTask#out_of_date? FileTask#out_of_date? has been changed in 462e403a to call #needed? which calls #out_of_date? recursively. In some cases, where the graph of dependencies is fairly dense, this leads to quadratic performance when it was linear before. Use #all_prerequisite_tasks to avoid the problem. This also saves a File.exist? test as #timestamp already takes it into account.fix quadratic performance in FileTask#out_of_date? FileTask#out_of_date? has been changed in 462e403a to call #needed? which calls #out_of_date? recursively. In some cases, where the graph of dependencies is fairly dense, this leads to quadratic performance when it was linear before. Use #all_prerequisite_tasks to avoid the problem. This also saves a File.exist? test as #timestamp already takes it into account. I made a benchmark that measures the difference in duration for out_of_date? on 12.0, 12.1 and 12.1 with this commit applied. The benchmark used to validate the performance creates 5 layers of FileTask, where all tasks of the parent layer are connected to all tasks of the child. A root task is added at the top and #out_of_date? is called on it. The benchmark varies the number of tasks per layer. **12.0** | Tasks per layers | Duration (s) | Standard deviation | |------------------|--------------|--------------------| | 1 | 1.32e-05 | 0.96e-05 | | 2 | 8.69e-05 | 1.11e-06 | | 5 | 1.84e-05 | 2.43e-06 | | 8 | 2.89e-05 | 1.05e-05 | | 10 | 3.35e-05 | 4.12e-06 | | 15 | 4.97e-05 | 6.74e-06 | | 20 | 6.19e-05 | 6.23e-06 | **12.1** | Tasks per layers | Duration (s) | Standard deviation | |------------------|--------------|--------------------| | 1 | 7.00e-05 | 5.62e-05 | | 2 | 3.98e-04 | 7.38e-05 | | 5 | 2.32e-02 | 1.02e-03 | | 8 | 0.22 | 0.006 | | 10 | 0.65 | 0.006 | | 15 | 4.78 | 0.048 | | 20 | 20 | 0.49 | **PR 224** | Tasks per layers | Duration (s) | Standard deviation | |------------------|--------------|--------------------| | 1 | 4.47e-05 | 2.68e-05 | | 2 | 7.56e-05 | 2.92e-05 | | 5 | 2.42e-03 | 4.16e-05 | | 8 | 0.51e-03 | 7.21e-05 | | 10 | 0.77e-03 | 0.13e-03 | | 15 | 14.2e-03 | 0.11e-03 | | 20 | 24.2e-03 | 0.16e-03 | Benchmarking code: ~~~ ruby require 'rake' LAYER_MAX_SIZE = 20 LAYER_COUNT = 5 def measure(size) app = Rake::Application.new layers = (0...LAYER_COUNT).map do |layer_i| (0...size).map do |i| app.define_task(Rake::FileTask, "#{layer_i}_#{i}") end end layers.each_cons(2) do |parent, child| child_names = child.map(&:name) parent.each { |t| t.enhance(child_names) } end root = app.define_task(Rake::FileTask, "root") root.enhance(layers[0].map(&:name)) tic = Time.now root.send(:out_of_date?, tic) Time.now - tic end FileUtils.touch "root" sleep 0.1 LAYER_COUNT.times do |layer_i| LAYER_MAX_SIZE.times do |i| FileUtils.touch "#{LAYER_COUNT - layer_i - 1}_#{i}" end sleep 0.1 end COUNT = 100 [1, 2, 5, 8, 10, 15, 20].each do |size| mean = 0 sum_squared_deviations = 0 COUNT.times do |count| duration = measure(size) old_mean = mean mean = old_mean + (duration - old_mean) / (count + 1) sum_squared_deviations = sum_squared_deviations + (duration - old_mean) * (duration - mean) end puts "#{size} #{mean} #{Math.sqrt(sum_squared_deviations / (COUNT - 1))}" end ~~~ --- lib/rake/file_task.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index 474b7bd93..364d8e395 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -30,10 +30,10 @@ def timestamp # Are there any prerequisites with a later time than the given time stamp? def out_of_date?(stamp) - @prerequisites.any? { |prereq| + all_prerequisite_tasks.any? { |prereq| prereq_task = application[prereq, @scope] if prereq_task.instance_of?(Rake::FileTask) - prereq_task.timestamp > stamp || prereq_task.needed? + prereq_task.timestamp > stamp || @application.options.build_all else prereq_task.timestamp > stamp end From bfab5f8bbeb69d078a71a81ff6ea25919fdaf5fe Mon Sep 17 00:00:00 2001 From: Adrian Setyadi Date: Sun, 15 Oct 2017 07:31:39 +0700 Subject: [PATCH 696/813] Account for a file that match 2 or more patterns. --- lib/rake/file_list.rb | 4 ++-- test/test_rake_file_list.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index 748d668f1..e27de8db5 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -318,14 +318,14 @@ def egrep(pattern, *options) # Return a new file list that only contains file names from the current # file list that exist on the file system. def existing - select { |fn| File.exist?(fn) } + select { |fn| File.exist?(fn) }.uniq end # Modify the current file list so that it contains only file name that # exist on the file system. def existing! resolve - @items = @items.select { |fn| File.exist?(fn) } + @items = @items.select { |fn| File.exist?(fn) }.uniq self end diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 7e5d1eed0..3e2622acd 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -415,13 +415,13 @@ def test_egrep_with_error end def test_existing - fl = FileList["abc.c", "notthere.c"] + fl = FileList["*c.c", "notthere.c", "a*.c"] assert_equal ["abc.c"], fl.existing assert fl.existing.is_a?(FileList) end def test_existing! - fl = FileList["abc.c", "notthere.c"] + fl = FileList["*c.c", "notthere.c", "a*.c"] result = fl.existing! assert_equal ["abc.c"], fl assert_equal fl.object_id, result.object_id From 99f48f23d1ddf913a56844f978b69f9a16e954bd Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 18 Oct 2017 12:35:16 +0900 Subject: [PATCH 697/813] rubocop -a --- lib/rake/application.rb | 2 +- test/test_rake_application.rb | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 8c896888f..89565a670 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -78,7 +78,7 @@ def initialize # call +top_level+ to run your top level tasks. def run(argv = ARGV) standard_exception_handling do - init 'rake', argv + init "rake", argv load_rakefile top_level end diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 456f7d878..cc063c0d2 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -14,14 +14,14 @@ def test_class_with_application orig_app = Rake.application return_app = Rake.with_application do |yield_app| - refute_equal orig_app, yield_app, 'new application must be yielded' + refute_equal orig_app, yield_app, "new application must be yielded" assert_equal yield_app, Rake.application, - 'new application must be default in block' + "new application must be default in block" end - refute_equal orig_app, return_app, 'new application not returned' - assert_equal orig_app, Rake.application, 'original application not default' + refute_equal orig_app, return_app, "new application not returned" + assert_equal orig_app, Rake.application, "original application not default" end def test_class_with_application_user_defined @@ -30,14 +30,14 @@ def test_class_with_application_user_defined user_app = Rake::Application.new return_app = Rake.with_application user_app do |yield_app| - assert_equal user_app, yield_app, 'user application must be yielded' + assert_equal user_app, yield_app, "user application must be yielded" assert_equal user_app, Rake.application, - 'user application must be default in block' + "user application must be default in block" end - assert_equal user_app, return_app, 'user application not returned' - assert_equal orig_app, Rake.application, 'original application not default' + assert_equal user_app, return_app, "user application not returned" + assert_equal orig_app, Rake.application, "original application not default" end def test_display_exception_details @@ -393,7 +393,7 @@ def test_handle_options_should_not_strip_options_from_argv argv = %w[--trace] @app.handle_options argv - assert_includes argv, '--trace' + assert_includes argv, "--trace" assert @app.options.trace end @@ -470,7 +470,7 @@ def test_display_prereqs def test_bad_run @app.intern(Rake::Task, "default").enhance { fail } _, err = capture_io { - assert_raises(SystemExit) { @app.run %w[-f -s --rakelib=""]} + assert_raises(SystemExit) { @app.run %w[-f -s --rakelib=""] } } assert_match(/see full trace/i, err) end From f7774e8209ba8ddec8837814f61dd9244fa52f0e Mon Sep 17 00:00:00 2001 From: Simon Coffey Date: Mon, 16 Oct 2017 16:52:32 +0100 Subject: [PATCH 698/813] Clarify output when printing nested exception traces Since v10.2.0, if an exception has a nested cause exception, the cause is also displayed in the trace output.[1] For heavily-nested exceptions, this output can be quite lengthy - for example, Rails migrations nest DB errors twice over, resulting in an error message and backtrace repeated three times. To break up this output and make it clearer what each individual backtrace relates to, this adds whitespace and a "Caused by:" label to each nested exception being displayed. To prevent "Caused by:" labels occurring on their own, I've moved the exception loop shortcut return into the `#display_cause_details` method. This doesn't alter the behaviour of the shortcut, as only the first exception will be unconditionally printed (which was already the case, as the first exception can't be already seen). [1] https://github.com/ruby/rake/commit/fbb22e7f570fc573ad1bff9d5905df1ab1cbd475 [2] https://github.com/ruby/rake/commit/57c932cea12ef3201fcaeaf80ba6f4f545390269 --- lib/rake/application.rb | 17 +++++++++++++---- test/test_rake_application.rb | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 89565a670..88a38fd8c 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -207,13 +207,22 @@ def display_error_message(ex) # :nodoc: end def display_exception_details(ex) # :nodoc: - seen = Thread.current[:rake_display_exception_details_seen] ||= [] - return if seen.include? ex - seen << ex + display_exception_details_seen << ex display_exception_message_details(ex) display_exception_backtrace(ex) - display_exception_details(ex.cause) if has_cause?(ex) + display_cause_details(ex.cause) if has_cause?(ex) + end + + def display_cause_details(ex) # :nodoc: + return if display_exception_details_seen.include? ex + + trace "\nCaused by:" + display_exception_details(ex) + end + + def display_exception_details_seen # :nodoc: + Thread.current[:rake_display_exception_details_seen] ||= [] end def has_cause?(ex) # :nodoc: diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index cc063c0d2..d17445c7e 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -97,6 +97,7 @@ def test_display_exception_details_cause assert_empty out + assert_match "Caused by:", err assert_match "cause a", err assert_match "cause b", err end From 7eab58e9f6fa4e430e7ed8d3e7d28df4a9db591c Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 25 Oct 2017 09:56:41 +0900 Subject: [PATCH 699/813] Handle LoadError for coveralls. It's optional dependency for testing. --- test/helper.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index 17447ab2e..924f20faf 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,8 +1,12 @@ # frozen_string_literal: true $:.unshift File.expand_path("../../lib", __FILE__) -require "coveralls" -Coveralls.wear! +begin + gem "coveralls" + require "coveralls" + Coveralls.wear! +rescue Gem::LoadError +end gem "minitest", "~> 5" require "minitest/autorun" From 353c893b6346423f214d3e37354be5380892cd08 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 25 Oct 2017 10:04:05 +0900 Subject: [PATCH 700/813] History --- History.rdoc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/History.rdoc b/History.rdoc index 079e65dcb..97cfe750e 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,19 @@ +=== 12.2.0 + +==== Enhancements: + +* Make rake easier to use as a library + Pull request #211 by @drbrain +* Fix quadratic performance in FileTask#out_of_date? + Pull request #224 by @doudou +* Clarify output when printing nested exception traces + Pull request #232 by @urbanautomaton + +==== Bug fixes + +* Account for a file that match 2 or more patterns. + Pull request #231 by @styd + === 12.1.0 ==== Enhancements: From e7ea2d15890c4b204f5fc558f5a7c65384abf586 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 25 Oct 2017 10:05:16 +0900 Subject: [PATCH 701/813] Bump version to rake-12.2.0 --- lib/rake/version.rb | 2 +- rake.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 7a309b9dc..2a29ab173 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Rake - VERSION = "12.1.0" + VERSION = "12.2.0" module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "." diff --git a/rake.gemspec b/rake.gemspec index f3e77ca2f..85a45147e 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -5,7 +5,7 @@ require 'rake/version' Gem::Specification.new do |s| s.name = "rake".freeze s.version = Rake::VERSION - s.date = "2017-09-11" + s.date = "2017-10-25" s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] From 92146b229325a49a497cba6da075dbbeb0b303d1 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 25 Oct 2017 11:02:10 +0900 Subject: [PATCH 702/813] Fixed to break capistrano3. --- lib/rake/application.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 88a38fd8c..8927d951b 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -88,7 +88,12 @@ def run(argv = ARGV) def init(app_name="rake", argv = ARGV) standard_exception_handling do @name = app_name - args = handle_options argv + begin + args = handle_options argv + rescue ArgumentError + # Backword compatibility for capistrano + args = handle_options + end collect_command_line_tasks(args) end end From 1f885501cebad343f820c2a50dc0c0165b68067c Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 25 Oct 2017 11:03:45 +0900 Subject: [PATCH 703/813] Bump version to rake-12.2.1 --- History.rdoc | 6 ++++++ lib/rake/version.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 97cfe750e..d6c3d39e9 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,9 @@ +=== 12.2.1 + +==== Bug fixes + +* Fixed to break Capistrano::Application on capistrano3. + === 12.2.0 ==== Enhancements: diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 2a29ab173..fc36a7663 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Rake - VERSION = "12.2.0" + VERSION = "12.2.1" module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "." From 41359487ab66f18c85998c858b93f5713b5fd07e Mon Sep 17 00:00:00 2001 From: Rick Hull Date: Mon, 6 Nov 2017 20:26:18 +0000 Subject: [PATCH 704/813] update required_ruby_version to 2.0.0 - as suggested by @hsbt in issue #230 on github - problems with 1.9.3 have been reported, which is long EOL'd --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index 85a45147e..fa9a5c635 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -30,7 +30,7 @@ Rake has the following features: s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) } s.require_paths = ["lib".freeze] - s.required_ruby_version = Gem::Requirement.new(">= 1.9.3".freeze) + s.required_ruby_version = Gem::Requirement.new(">= 2.0.0".freeze) s.rubygems_version = "2.6.1".freeze s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] From eb2e34792e2d8fb51cdf0d8daed894572e8edc37 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 15 Nov 2017 10:23:42 -0600 Subject: [PATCH 705/813] Support test-bundled-gems task on ruby core repository --- test/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index 924f20faf..949b63520 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -26,7 +26,7 @@ class TaskManager include Rake::TaskManager end - RUBY = Gem.ruby + RUBY = ENV['BUNDLE_RUBY'] || Gem.ruby def setup ARGV.clear From 6258ad54fcac8916394cc49ee306d1fd7aa05ca8 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 15 Nov 2017 11:03:49 -0600 Subject: [PATCH 706/813] Bump version to rake-12.3.0 --- History.rdoc | 11 +++++++++++ lib/rake/version.rb | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index d6c3d39e9..1c7335b81 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,14 @@ +=== 12.3.0 + +==== Compatibility Changes + +* Bump `required_ruby_verion` to Ruby 2.0.0. Rake was already + removed to support for Ruby 1.9.x. + +=== Enhancements: + +* Support `test-bundled-gems` task on ruby core. + === 12.2.1 ==== Bug fixes diff --git a/lib/rake/version.rb b/lib/rake/version.rb index fc36a7663..873083bb2 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Rake - VERSION = "12.2.1" + VERSION = "12.3.0" module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "." From 0c4aab882547bdd14b3dfde93e0bb02ad26ff088 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Wed, 15 Nov 2017 11:06:01 -0600 Subject: [PATCH 707/813] bump release date --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index fa9a5c635..06777dd68 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -5,7 +5,7 @@ require 'rake/version' Gem::Specification.new do |s| s.name = "rake".freeze s.version = Rake::VERSION - s.date = "2017-10-25" + s.date = "2017-11-15" s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] From b031eff63207a5c5b6d031b052157e4b10a7837a Mon Sep 17 00:00:00 2001 From: Uwe Kubosch Date: Mon, 27 Nov 2017 13:14:17 +0100 Subject: [PATCH 708/813] [skip-ci] Fixed typo --- History.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index 1c7335b81..71838bd67 100644 --- a/History.rdoc +++ b/History.rdoc @@ -2,8 +2,8 @@ ==== Compatibility Changes -* Bump `required_ruby_verion` to Ruby 2.0.0. Rake was already - removed to support for Ruby 1.9.x. +* Bump `required_ruby_version` to Ruby 2.0.0. Rake has already + removed support for Ruby 1.9.x. === Enhancements: From c2f3a1414d069b8d961839f1944bd58fcede2c81 Mon Sep 17 00:00:00 2001 From: aycabta Date: Fri, 8 Dec 2017 12:07:19 +0900 Subject: [PATCH 709/813] Use JRuby 9.1.15.0 on .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 071c3ef20..54051f5bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ rvm: - 2.3.5 - 2.4.2 - ruby-head - - jruby-9.1.13.0 + - jruby-9.1.15.0 - jruby-head before_script: - unset JRUBY_OPTS From be4a70f5e0264e20a21ca41441442f0883933f50 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Fri, 15 Dec 2017 23:55:58 +0100 Subject: [PATCH 710/813] Add missing information on FTP publishing to README --- README.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rdoc b/README.rdoc index 690c11d66..0f108cc67 100644 --- a/README.rdoc +++ b/README.rdoc @@ -25,8 +25,8 @@ Rake has the following features: * A library of prepackaged tasks to make building rakefiles easier. For example, tasks for building tarballs. (Formerly - tasks for building RDoc, Gems and publishing to FTP were included in rake but they're now - available in RDoc, RubyGems and respectively.) + tasks for building RDoc, Gems, and publishing to FTP were included in rake but they're now + available in RDoc, RubyGems, and rake-contrib respectively.) * Supports parallel execution of tasks. From d774bd496f1614ee191f8918e37fa627f8318162 Mon Sep 17 00:00:00 2001 From: aycabta Date: Tue, 26 Dec 2017 18:36:08 +0900 Subject: [PATCH 711/813] Use 2.5.0 and more latest Ruby versions --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 54051f5bb..5c51e7037 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,10 @@ sudo: false rvm: - 2.0.0 - 2.1.10 - - 2.2.8 - - 2.3.5 - - 2.4.2 + - 2.2.9 + - 2.3.6 + - 2.4.3 + - 2.5.0 - ruby-head - jruby-9.1.15.0 - jruby-head From 3804b945bfb45dc7e4ee081617dfc25bffcc56cc Mon Sep 17 00:00:00 2001 From: aycabta Date: Thu, 28 Dec 2017 01:47:06 +0900 Subject: [PATCH 712/813] Force installation Bundler AppVeyor says gem install bundler --no-document bundler's executable "bundle" conflicts with C:/Ruby200/bin/bundle Overwrite the executable? [yN] and it timed out. This commit adds -f option for it. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 456c13d9e..7ef2abe30 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,7 @@ clone_depth: 10 install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - - gem install bundler --no-document + - gem install bundler --no-document -f - bundle install build: off test_script: From 5ac709bc719393b2e786a6a987d9bb742028387f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 7 Jan 2018 11:41:20 +0900 Subject: [PATCH 713/813] Support non-bundler environment --- Rakefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index e0d2ced3d..efb3decc1 100644 --- a/Rakefile +++ b/Rakefile @@ -9,16 +9,19 @@ lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require "bundler/gem_tasks" -require "rake/testtask" -require "rdoc/task" +begin + require "bundler/gem_tasks" +rescue LoadError +end +require "rake/testtask" Rake::TestTask.new(:test) do |t| t.libs << "test" t.verbose = true t.test_files = FileList["test/**/test_*.rb"] end +require "rdoc/task" RDoc::Task.new do |doc| doc.main = "README.rdoc" doc.title = "Rake -- Ruby Make" From 18f8138e97bce9c5633e974d7ce1a7f15d67d5f7 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 7 Jan 2018 11:44:18 +0900 Subject: [PATCH 714/813] prefer to use %x literal instead of back-tick --- Rakefile | 2 +- rake.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index efb3decc1..e03dc6feb 100644 --- a/Rakefile +++ b/Rakefile @@ -30,7 +30,7 @@ RDoc::Task.new do |doc| end task ghpages: :rdoc do - `git checkout gh-pages` + %x[git checkout gh-pages] require "fileutils" FileUtils.rm_rf "/tmp/html" FileUtils.mv "html", "/tmp" diff --git a/rake.gemspec b/rake.gemspec index 06777dd68..62fd76e7d 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -24,7 +24,7 @@ Rake has the following features: s.homepage = "https://github.com/ruby/rake".freeze s.licenses = ["MIT".freeze] - s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } - + s.files = %x[git ls-files -z].split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } - %w[.rubocop.yml .travis.yml appveyor.yml] s.bindir = "exe" s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) } From f35ce833db6976fcad0f9315689098cdb8e6d833 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sun, 7 Jan 2018 11:57:05 +0900 Subject: [PATCH 715/813] rubocop -a --- test/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index 949b63520..29f81c1f6 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -26,7 +26,7 @@ class TaskManager include Rake::TaskManager end - RUBY = ENV['BUNDLE_RUBY'] || Gem.ruby + RUBY = ENV["BUNDLE_RUBY"] || Gem.ruby def setup ARGV.clear From c430a2861c95e8476b3d79f0c957459ef06680bf Mon Sep 17 00:00:00 2001 From: Espartaco Palma Date: Thu, 25 Jan 2018 00:18:39 -0800 Subject: [PATCH 716/813] [skip ci] Fix minimal ruby version on README According to rake.gemspec, rake required at least ruby 2.0.0 --- README.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 0f108cc67..5449303a5 100644 --- a/README.rdoc +++ b/README.rdoc @@ -130,7 +130,7 @@ Rake is available under an MIT-style license. = Other stuff Author:: Jim Weirich -Requires:: Ruby 1.9.3 or later +Requires:: Ruby 2.0.0 or later License:: Copyright Jim Weirich. Released under an MIT-style license. See the MIT-LICENSE file included in the distribution. From da34100b700d508c2184fd943e22140740b3be01 Mon Sep 17 00:00:00 2001 From: Dylan Thacker-Smith Date: Thu, 25 Jan 2018 12:00:23 -0500 Subject: [PATCH 717/813] Re-raise a LoadError that didn't come from require in the test loader --- lib/rake/rake_test_loader.rb | 1 + test/test_rake_rake_test_loader.rb | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/rake/rake_test_loader.rb b/lib/rake/rake_test_loader.rb index ce3dd8eb6..f0f7772ba 100644 --- a/lib/rake/rake_test_loader.rb +++ b/lib/rake/rake_test_loader.rb @@ -19,6 +19,7 @@ false end rescue LoadError => e + raise unless e.path abort "\nFile does not exist: #{e.path}\n\n" end end diff --git a/test/test_rake_rake_test_loader.rb b/test/test_rake_rake_test_loader.rb index fabee4721..bf44235c0 100644 --- a/test/test_rake_rake_test_loader.rb +++ b/test/test_rake_rake_test_loader.rb @@ -24,7 +24,7 @@ def test_pattern $:.replace orig_loaded_features end - def test_load_error + def test_load_error_from_require out, err = capture_io do ARGV.replace %w[no_such_test_file.rb] @@ -44,4 +44,18 @@ def test_load_error assert_match expected, err end + + def test_load_error_raised_explicitly + File.write("error_test.rb", "raise LoadError, 'explicitly raised'") + out, err = capture_io do + ARGV.replace %w[error_test.rb] + + exc = assert_raises(LoadError) do + load @loader + end + assert_equal "explicitly raised", exc.message + end + assert_empty out + assert_empty err + end end From 109dd0ed2b729aba45eebd9eeb41e760557d7510 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 5 Feb 2018 11:50:43 +0900 Subject: [PATCH 718/813] rubocop -a --- test/test_rake_task_with_arguments.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index b7a9e03e7..61cf8e049 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -84,7 +84,7 @@ def test_actions_of_various_arity_are_ok_with_args def test_actions_adore_keywords # A brutish trick to avoid parsing. Remove it once support for 1.9 and 2.0 is dropped # https://ci.appveyor.com/project/ruby/rake/build/1.0.301 - skip 'Keywords aren\'t a feature in this version' if RUBY_VERSION =~ /^1|^2\.0/ + skip "Keywords aren't a feature in this version" if RUBY_VERSION =~ /^1|^2\.0/ # https://github.com/ruby/rake/pull/174#issuecomment-263460761 skip if jruby9? eval <<-RUBY, binding, __FILE__, __LINE__+1 From 7caa6afce8c2159fe24f60a4411fecabda896723 Mon Sep 17 00:00:00 2001 From: Gonzalo Date: Thu, 8 Feb 2018 14:50:16 -0300 Subject: [PATCH 719/813] Don't run tasks if it depends on already invoked but failed task. Fixes #189 --- lib/rake/multi_task.rb | 38 +------------------------------- lib/rake/task.rb | 42 ++++++++++++++++++++++++++---------- test/test_rake_multi_task.rb | 21 ++++++++++++++++++ 3 files changed, 53 insertions(+), 48 deletions(-) diff --git a/lib/rake/multi_task.rb b/lib/rake/multi_task.rb index 04c9f3109..3ae363cbe 100644 --- a/lib/rake/multi_task.rb +++ b/lib/rake/multi_task.rb @@ -5,46 +5,10 @@ module Rake # parallel using Ruby threads. # class MultiTask < Task - - # Same as invoke, but explicitly pass a call chain to detect - # circular dependencies. This is largely copied from Rake::Task - # but has been updated such that if multiple tasks depend on this - # one in parallel, they will all fail if the first execution of - # this task fails. - def invoke_with_call_chain(task_args, invocation_chain) - new_chain = Rake::InvocationChain.append(self, invocation_chain) - @lock.synchronize do - begin - if @already_invoked - if @invocation_exception - if application.options.trace - application.trace "** Previous invocation of #{name} failed #{format_trace_flags}" - end - raise @invocation_exception - else - return - end - end - - if application.options.trace - application.trace "** Invoke #{name} #{format_trace_flags}" - end - @already_invoked = true - - invoke_prerequisites(task_args, new_chain) - execute(task_args) if needed? - rescue Exception => ex - add_chain_to(ex, new_chain) - @invocation_exception = ex - raise - end - end - end - private + def invoke_prerequisites(task_args, invocation_chain) # :nodoc: invoke_prerequisites_concurrently(task_args, invocation_chain) end end - end diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 256571112..c7e0a1d9e 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -103,6 +103,7 @@ def initialize(task_name, app) @scope = app.current_scope @arg_names = nil @locations = [] + @invocation_exception = nil end # Enhance a task with prerequisites or actions. Returns self. @@ -183,20 +184,39 @@ def invoke(*args) # Same as invoke, but explicitly pass a call chain to detect # circular dependencies. - def invoke_with_call_chain(task_args, invocation_chain) # :nodoc: - new_chain = InvocationChain.append(self, invocation_chain) + # + # If multiple tasks depend on this + # one in parallel, they will all fail if the first execution of + # this task fails. + def invoke_with_call_chain(task_args, invocation_chain) + new_chain = Rake::InvocationChain.append(self, invocation_chain) @lock.synchronize do - if application.options.trace - application.trace "** Invoke #{name} #{format_trace_flags}" + begin + if application.options.trace + application.trace "** Invoke #{name} #{format_trace_flags}" + end + + if @already_invoked + if @invocation_exception + if application.options.trace + application.trace "** Previous invocation of #{name} failed #{format_trace_flags}" + end + raise @invocation_exception + else + return + end + end + + @already_invoked = true + + invoke_prerequisites(task_args, new_chain) + execute(task_args) if needed? + rescue Exception => ex + add_chain_to(ex, new_chain) + @invocation_exception = ex + raise ex end - return if @already_invoked - @already_invoked = true - invoke_prerequisites(task_args, new_chain) - execute(task_args) if needed? end - rescue Exception => ex - add_chain_to(ex, new_chain) - raise ex end protected :invoke_with_call_chain diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index 8a50c2980..bd179f22f 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -83,4 +83,25 @@ def test_cross_thread_prerequisite_failures Rake::Task[:b].invoke end end + + def test_task_not_executed_if_dependant_task_failed_concurrently + multitask :default => [:one, :two] + + task :one do + raise + end + + task_two_was_executed = false + task :two => :one do + task_two_was_executed = true + end + + begin + Rake::Task[:default].invoke + rescue RuntimeError + ensure + sleep 0.5 + assert !task_two_was_executed + end + end end From 0c4b0ae2687bd7314dd1743d9771e800a8aac37e Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Wed, 14 Feb 2018 08:42:58 +1100 Subject: [PATCH 720/813] Remove date field from rake.gemspec Hi there :wave: I noticed that in [this commit](https://github.com/ruby/rake/commit/6258ad54fcac8916394cc49ee306d1fd7aa05ca8) you bumped the version but did not change the `date` field in the `rake.gemspec`. This means that on rubygems.org, Rake 12.2.1 and Rake 12.3.0 were seemingly released on the same day, but the commits show a different history. (The last released date was [this commit](https://github.com/ruby/rake/commit/e7ea2d15890c4b204f5fc558f5a7c65384abf586) but it has since been bumped on master with [this commit](https://github.com/ruby/rake/commit/0c4aab882547bdd14b3dfde93e0bb02ad26ff088). May I suggest removing the `date` field from the `gemspec`? This way, RubyGems.org will automatically assign the current date to the package's release _and_ it means that you as a maintainer will have to do one less thing every time you release a new version. We do not have a `date` field in the [`i18n` gem's `gemspec`](https://github.com/svenfuchs/i18n/blob/master/i18n.gemspec) and it works just fine. What do you think? --- rake.gemspec | 1 - 1 file changed, 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index 62fd76e7d..ddc9f2a61 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -5,7 +5,6 @@ require 'rake/version' Gem::Specification.new do |s| s.name = "rake".freeze s.version = Rake::VERSION - s.date = "2017-11-15" s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze] s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze] From 52a48894db8896ef4ba00045211eb56622b6f724 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 22 Feb 2018 15:10:56 +0900 Subject: [PATCH 721/813] To use gem install insteaad of bundle install --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7ef2abe30..4912f88b6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,8 +2,7 @@ clone_depth: 10 install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - - gem install bundler --no-document -f - - bundle install + - gem install minitest build: off test_script: - ruby -Ilib exe/rake From b86a13b9aecf5fb6b6a886df843cf82fcf034022 Mon Sep 17 00:00:00 2001 From: Gonzalo Date: Wed, 21 Feb 2018 13:57:54 -0300 Subject: [PATCH 722/813] Removes duplicated inclusion of Rake::DSL Rake::DSL is already included in Rake::TestCase --- test/test_rake_file_creation_task.rb | 1 - test/test_rake_multi_task.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/test/test_rake_file_creation_task.rb b/test/test_rake_file_creation_task.rb index 246f679c7..e99884a55 100644 --- a/test/test_rake_file_creation_task.rb +++ b/test/test_rake_file_creation_task.rb @@ -4,7 +4,6 @@ class TestRakeFileCreationTask < Rake::TestCase include Rake - include Rake::DSL DUMMY_DIR = "dummy_dir" diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index 8a50c2980..c849b94d1 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -4,7 +4,6 @@ class TestRakeMultiTask < Rake::TestCase include Rake - include Rake::DSL def setup super From c3bd0cde82bd2accd6a9e8be75e2ec0bd09a70c9 Mon Sep 17 00:00:00 2001 From: Gonzalo Date: Thu, 22 Feb 2018 15:17:44 -0300 Subject: [PATCH 723/813] make AppVeyor test with ruby 2.5 also --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 4912f88b6..fa978bb4a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,3 +19,5 @@ environment: - ruby_version: "23-x64" - ruby_version: "24" - ruby_version: "24-x64" + - ruby_version: "25" + - ruby_version: "25-x64" From 15f916938e3b43491647b6e353b7598f768290d2 Mon Sep 17 00:00:00 2001 From: Gonzalo Date: Fri, 23 Feb 2018 15:02:11 -0300 Subject: [PATCH 724/813] Make space trimming consistent for all task arguments. Fixes #260 --- lib/rake/application.rb | 2 +- test/test_rake_task_argument_parsing.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 8927d951b..c86cb1fa2 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -172,7 +172,7 @@ def parse_task_string(string) # :nodoc: args = [] begin - /((?:[^\\,]|\\.)*?)\s*(?:,\s*(.*))?$/ =~ remaining_args + /\s*((?:[^\\,]|\\.)*?)\s*(?:,\s*(.*))?$/ =~ remaining_args remaining_args = $2 args << $1.gsub(/\\(.)/, '\1') diff --git a/test/test_rake_task_argument_parsing.rb b/test/test_rake_task_argument_parsing.rb index fc494a463..fbe0273e7 100644 --- a/test/test_rake_task_argument_parsing.rb +++ b/test/test_rake_task_argument_parsing.rb @@ -32,8 +32,8 @@ def test_two_arguments assert_equal ["one", "two"], args end - def test_can_handle_spaces_between_args - name, args = @app.parse_task_string("name[one, two,\tthree , \tfour]") + def test_can_handle_spaces_between_all_args + name, args = @app.parse_task_string("name[ one , two ,\tthree , \tfour ]") assert_equal "name", name assert_equal ["one", "two", "three", "four"], args end From 31bf731c6606afaec377bb815bcc9e0e0d7d37f1 Mon Sep 17 00:00:00 2001 From: aycabta Date: Thu, 1 Mar 2018 20:19:31 +0900 Subject: [PATCH 725/813] Use JRuby 9.1.16.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5c51e7037..e5dcb34db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ rvm: - 2.4.3 - 2.5.0 - ruby-head - - jruby-9.1.15.0 + - jruby-9.1.16.0 - jruby-head before_script: - unset JRUBY_OPTS From 717591004d86bfb4e7943cdd1143bcc227cdf5f7 Mon Sep 17 00:00:00 2001 From: Gonzalo Date: Wed, 7 Mar 2018 11:39:51 -0300 Subject: [PATCH 726/813] Keep original test case testing spaces in some arguments --- test/test_rake_task_argument_parsing.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_rake_task_argument_parsing.rb b/test/test_rake_task_argument_parsing.rb index fbe0273e7..e65712b37 100644 --- a/test/test_rake_task_argument_parsing.rb +++ b/test/test_rake_task_argument_parsing.rb @@ -32,6 +32,12 @@ def test_two_arguments assert_equal ["one", "two"], args end + def test_can_handle_spaces_between_args + name, args = @app.parse_task_string("name[one, two,\tthree , \tfour]") + assert_equal "name", name + assert_equal ["one", "two", "three", "four"], args + end + def test_can_handle_spaces_between_all_args name, args = @app.parse_task_string("name[ one , two ,\tthree , \tfour ]") assert_equal "name", name From edb7743d6d79549b3dc67aea1575ab6dc5fdb698 Mon Sep 17 00:00:00 2001 From: Gonzalo Date: Thu, 8 Mar 2018 09:48:28 -0300 Subject: [PATCH 727/813] Prefer #refute over negated #assert --- test/test_rake_multi_task.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index bd179f22f..3b767ac0d 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -101,7 +101,7 @@ def test_task_not_executed_if_dependant_task_failed_concurrently rescue RuntimeError ensure sleep 0.5 - assert !task_two_was_executed + refute task_two_was_executed end end end From 9d2c8af56540b5a87360e4261ac32a0d085d9447 Mon Sep 17 00:00:00 2001 From: "FUJI Goro (gfx)" Date: Tue, 20 Mar 2018 16:51:09 +0900 Subject: [PATCH 728/813] support did_you_mean >= v1.2.0 which has a breaking change on formatters --- lib/rake/task_manager.rb | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index e2531c8ef..c1e60b95e 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -61,16 +61,20 @@ def [](task_name, scopes=nil) def generate_message_for_undefined_task(task_name) message = "Don't know how to build task '#{task_name}' (see --tasks)" + message + generate_did_you_mean_suggestions(task_name) + end - suggestion_message = \ - if defined?(::DidYouMean::SpellChecker) && defined?(::DidYouMean::Formatter) - suggestions = ::DidYouMean::SpellChecker.new(dictionary: @tasks.keys).correct(task_name.to_s) - ::DidYouMean::Formatter.new(suggestions).to_s - else - "" - end + def generate_did_you_mean_suggestions(task_name) + return "" unless defined?(::DidYouMean::SpellChecker) - message + suggestion_message + suggestions = ::DidYouMean::SpellChecker.new(dictionary: @tasks.keys).correct(task_name.to_s) + if ::DidYouMean.respond_to?(:formatter)# did_you_mean v1.2.0 or later + ::DidYouMean.formatter.message_for(suggestions) + elsif defined?(::DidYouMean::Formatter) # before did_you_mean v1.2.0 + ::DidYouMean::Formatter.new(suggestions).to_s + else + "" + end end def synthesize_file_task(task_name) # :nodoc: From 9aac0a40408a6fc654e7953189a982ea73128b85 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 20 Mar 2018 17:48:15 +0900 Subject: [PATCH 729/813] rubocop -a --- .rubocop.yml | 2 +- test/test_rake_multi_task.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 29aa862a5..9a14d206e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -52,6 +52,6 @@ Layout/SpaceInsideHashLiteralBraces: Layout/CaseIndentation: Enabled: true -Lint/EndAlignment: +Layout/EndAlignment: Enabled: true EnforcedStyleAlignWith: variable diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index e6aef3110..31d88e5c3 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -84,14 +84,14 @@ def test_cross_thread_prerequisite_failures end def test_task_not_executed_if_dependant_task_failed_concurrently - multitask :default => [:one, :two] + multitask default: [:one, :two] task :one do raise end task_two_was_executed = false - task :two => :one do + task two: :one do task_two_was_executed = true end From 35c18fe5293fe6c64d5bd94361debde45757c24a Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 22 Mar 2018 11:10:29 +0900 Subject: [PATCH 730/813] Fixed rdoc style --- History.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 71838bd67..e803bfaab 100644 --- a/History.rdoc +++ b/History.rdoc @@ -5,7 +5,7 @@ * Bump `required_ruby_version` to Ruby 2.0.0. Rake has already removed support for Ruby 1.9.x. -=== Enhancements: +==== Enhancements: * Support `test-bundled-gems` task on ruby core. From c963dc0e96b4454665fa5be2ead04181426fd220 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 22 Mar 2018 13:44:58 +0900 Subject: [PATCH 731/813] bump version to 12.3.1 --- History.rdoc | 18 ++++++++++++++++++ lib/rake/version.rb | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index e803bfaab..2ae9ba762 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,21 @@ +=== 12.3.1 + +==== Bug fixes + +* Support did_you_mean >= v1.2.0 which has a breaking change on formatters. + Pull request #262 by FUJI Goro. + +==== Enhancements: + +* Don't run task if it depends on already invoked but failed task. + Pull request #252 by Gonzalo Rodriguez. +* Make space trimming consistent for all task arguments. + Pull request #259 by Gonzalo Rodriguez. +* Removes duplicated inclusion of Rake::DSL in tests. + Pull request #254 by Gonzalo Rodriguez. +* Re-raise a LoadError that didn't come from require in the test loader. + Pull request #250 by Dylan Thacker-Smith. + === 12.3.0 ==== Compatibility Changes diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 873083bb2..2d66a8f74 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Rake - VERSION = "12.3.0" + VERSION = "12.3.1" module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "." From acae4a2b696d9410c428da735ae6d3364530fd76 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Thu, 24 May 2018 16:09:38 -0700 Subject: [PATCH 732/813] Fix JRuby detection on JRuby 9.2 in cpu_counter.rb Java::Java is no longer defined by default, it's not defined until it is accessed: $ jruby -e 'p defined?(Java::Java)' nil $ jruby -e 'p Java::Java' Java::Java In earlier JRuby versions, defined?(Java::Java) returned "constant". --- lib/rake/cpu_counter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index f3bf6d630..5f6ba6ba6 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -32,7 +32,7 @@ def count require 'rbconfig' def count - if defined?(Java::Java) + if defined?(JRUBY_VERSION) && (Java::Java rescue nil) count_via_java_runtime else case RbConfig::CONFIG['host_os'] From c376a932f93ac0f2dcac66002df71478a315ba42 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Fri, 25 May 2018 07:52:52 -0700 Subject: [PATCH 733/813] Use simpler RUBY_PLATFORM check for java in cpu_counter.rb --- lib/rake/cpu_counter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index 5f6ba6ba6..564a62859 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -32,7 +32,7 @@ def count require 'rbconfig' def count - if defined?(JRUBY_VERSION) && (Java::Java rescue nil) + if RUBY_PLATFORM == 'java' count_via_java_runtime else case RbConfig::CONFIG['host_os'] From bdc6406a56432a16d65aca9bf6ce82defd9718d2 Mon Sep 17 00:00:00 2001 From: take-cheeze Date: Wed, 20 Jun 2018 20:44:24 +0900 Subject: [PATCH 734/813] Add alias `prereqs`. --- lib/rake/task.rb | 1 + test/test_rake_task.rb | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index c7e0a1d9e..c56118f01 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -15,6 +15,7 @@ module Rake class Task # List of prerequisites for a task. attr_reader :prerequisites + alias prereqs prerequisites # List of actions attached to a task. attr_reader :actions diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 5b9605964..380f59b4f 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -470,4 +470,9 @@ def test_suggests_valid_rake_task_names assert_match(/Did you mean\? test/, error.message) end end + + def test_prereqs + t = task(a: %w[b c d e]) + assert_equal %w[b c d e], t.prereqs + end end From 449766fb9abbfb9d8365ff824952cd1aa9067683 Mon Sep 17 00:00:00 2001 From: take-cheeze Date: Thu, 21 Jun 2018 20:12:09 +0900 Subject: [PATCH 735/813] Add order only dependency. --- lib/rake/task.rb | 18 +++++++++++++- lib/rake/task_manager.rb | 24 +++++++++++-------- ...t_rake_task_manager_argument_resolution.rb | 12 +++++----- test/test_rake_test_task.rb | 18 ++++++++++++++ 4 files changed, 55 insertions(+), 17 deletions(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index c7e0a1d9e..cde41c636 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -16,6 +16,9 @@ class Task # List of prerequisites for a task. attr_reader :prerequisites + # List of order only prerequisites for a task. + attr_reader :order_only_prerequisites + # List of actions attached to a task. attr_reader :actions @@ -55,7 +58,7 @@ def sources # List of prerequisite tasks def prerequisite_tasks - prerequisites.map { |pre| lookup_prerequisite(pre) } + (prerequisites + order_only_prerequisites).map { |pre| lookup_prerequisite(pre) } end def lookup_prerequisite(prerequisite_name) # :nodoc: @@ -104,6 +107,7 @@ def initialize(task_name, app) @arg_names = nil @locations = [] @invocation_exception = nil + @order_only_prerequisites = [] end # Enhance a task with prerequisites or actions. Returns self. @@ -358,6 +362,18 @@ def investigation return result end + # Format dependencies parameter to pass to task. + def self.format_deps(deps) + deps = [deps] unless deps.respond_to?(:to_ary) + deps.map { |d| Rake.from_pathname(d).to_s } + end + + # Add order only dependencies. + def |(deps) + @order_only_prerequisites |= Task.format_deps(deps) - @prerequisites + self + end + # ---------------------------------------------------------------- # Rake Module Methods # diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index c1e60b95e..88a2e6bb3 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -15,13 +15,13 @@ def initialize # :nodoc: end def create_rule(*args, &block) # :nodoc: - pattern, args, deps = resolve_args(args) + pattern, args, deps, order_only = resolve_args(args) pattern = Regexp.new(Regexp.quote(pattern) + "$") if String === pattern - @rules << [pattern, args, deps, block] + @rules << [pattern, args, deps, order_only, block] end def define_task(task_class, *args, &block) # :nodoc: - task_name, arg_names, deps = resolve_args(args) + task_name, arg_names, deps, order_only = resolve_args(args) original_scope = @scope if String === task_name and @@ -31,15 +31,15 @@ def define_task(task_class, *args, &block) # :nodoc: end task_name = task_class.scope_name(@scope, task_name) - deps = [deps] unless deps.respond_to?(:to_ary) - deps = deps.map { |d| Rake.from_pathname(d).to_s } task = intern(task_class, task_name) task.set_arg_names(arg_names) unless arg_names.empty? if Rake::TaskManager.record_task_metadata add_location(task) task.add_description(get_description(task)) end - task.enhance(deps, &block) + task.enhance(Task.format_deps(deps), &block) + task | order_only unless order_only.nil? + task ensure @scope = original_scope end @@ -108,7 +108,7 @@ def resolve_args_without_dependencies(args) else arg_names = args end - [task_name, arg_names, []] + [task_name, arg_names, [], nil] end private :resolve_args_without_dependencies @@ -121,7 +121,10 @@ def resolve_args_without_dependencies(args) # task :t, [a] => [:d] # def resolve_args_with_dependencies(args, hash) # :nodoc: - fail "Task Argument Error" if hash.size != 1 + fail "Task Argument Error" if + hash.size != 1 && + (hash.size != 2 || !hash.key?(:order_only)) + order_only = hash.delete(:order_only) key, value = hash.map { |k, v| [k, v] }.first if args.empty? task_name = key @@ -133,7 +136,7 @@ def resolve_args_with_dependencies(args, hash) # :nodoc: deps = value end deps = [deps] unless deps.respond_to?(:to_ary) - [task_name, arg_names, deps] + [task_name, arg_names, deps, order_only] end private :resolve_args_with_dependencies @@ -144,9 +147,10 @@ def resolve_args_with_dependencies(args, hash) # :nodoc: def enhance_with_matching_rule(task_name, level=0) fail Rake::RuleRecursionOverflowError, "Rule Recursion Too Deep" if level >= 16 - @rules.each do |pattern, args, extensions, block| + @rules.each do |pattern, args, extensions, order_only, block| if pattern && pattern.match(task_name) task = attempt_rule(task_name, pattern, args, extensions, block, level) + task | order_only unless order_only.nil? return task if task end end diff --git a/test/test_rake_task_manager_argument_resolution.rb b/test/test_rake_task_manager_argument_resolution.rb index c07be6f5e..bc4943613 100644 --- a/test/test_rake_task_manager_argument_resolution.rb +++ b/test/test_rake_task_manager_argument_resolution.rb @@ -4,13 +4,13 @@ class TestRakeTaskManagerArgumentResolution < Rake::TestCase def test_good_arg_patterns - assert_equal [:t, [], []], task(:t) - assert_equal [:t, [], [:x]], task(t: :x) - assert_equal [:t, [], [:x, :y]], task(t: [:x, :y]) + assert_equal [:t, [], [], nil], task(:t) + assert_equal [:t, [], [:x], nil], task(t: :x) + assert_equal [:t, [], [:x, :y], nil], task(t: [:x, :y]) - assert_equal [:t, [:a, :b], []], task(:t, [:a, :b]) - assert_equal [:t, [:a, :b], [:x]], task(:t, [:a, :b] => :x) - assert_equal [:t, [:a, :b], [:x, :y]], task(:t, [:a, :b] => [:x, :y]) + assert_equal [:t, [:a, :b], [], nil], task(:t, [:a, :b]) + assert_equal [:t, [:a, :b], [:x], nil], task(:t, [:a, :b] => :x) + assert_equal [:t, [:a, :b], [:x, :y], nil], task(:t, [:a, :b] => [:x, :y]) end def task(*args) diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 396e05924..6a8dd2a4a 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -169,4 +169,22 @@ def test_task_prerequisites_deps task = Rake::Task[:child] assert_includes task.prerequisites, "parent" end + + def test_task_order_only_prerequisites + t = task(a: 'b') { + :aaa + } | 'c' + b, c = task('b'), task('c') + assert_equal ['b'], t.prerequisites + assert_equal ['c'], t.order_only_prerequisites + assert_equal [b, c], t.prerequisite_tasks + end + + def test_task_order_only_prerequisites_key + t = task 'a' => 'b', order_only: ['c'] + b, c = task('b'), task('c') + assert_equal ['b'], t.prerequisites + assert_equal ['c'], t.order_only_prerequisites + assert_equal [b, c], t.prerequisite_tasks + end end From 714a18093b38661508737a6849fc7168f28829a1 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Mon, 20 Aug 2018 14:50:48 +0200 Subject: [PATCH 736/813] Fixed bug: Task raises previous exception on second invokation after beeing reenable-d. --- lib/rake/task.rb | 3 ++- test/test_rake_task.rb | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index c56118f01..5f5254c84 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -141,7 +141,8 @@ def arg_names # Reenable the task, allowing its tasks to be executed if the task # is invoked again. def reenable - @already_invoked = false + @already_invoked = false + @invocation_exception = nil end # Clear the existing prerequisites, actions, comments, and arguments of a rake task. diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 380f59b4f..dca594329 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -117,6 +117,33 @@ def test_can_double_invoke_with_reenable assert_equal ["t1", "t1"], runlist end + def test_can_triple_invoke_after_exception_with_reenable + raise_exception = true + invoked = 0 + + t1 = task(:t1) do |t| + invoked += 1 + next if !raise_exception + + raise_exception = false + raise 'Some error' + end + + assert_raises(RuntimeError) { t1.invoke } + assert_equal 1, invoked + + t1.reenable + + # actually invoke second time + t1.invoke + assert_equal 2, invoked + + # recognize already invoked and + # don't raise pre-reenable exception + t1.invoke + assert_equal 2, invoked + end + def test_clear desc "a task" t = task("t", ["b"] => "a") {} From 282b0d31586c7b723f6ba7d5103f874adec1bdb9 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Wed, 22 Aug 2018 09:04:08 +0200 Subject: [PATCH 737/813] Applied requested changes of @yuki24: Chose clean git blame over nice looking indentaiton. --- lib/rake/task.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 5f5254c84..2255b5c43 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -141,7 +141,7 @@ def arg_names # Reenable the task, allowing its tasks to be executed if the task # is invoked again. def reenable - @already_invoked = false + @already_invoked = false @invocation_exception = nil end From 110cc421bb2b751fb8da24bb050040758bef9db0 Mon Sep 17 00:00:00 2001 From: zhustec Date: Tue, 9 Oct 2018 22:01:38 +0800 Subject: [PATCH 738/813] remove trailing extension name in require * remove trailing extension name * remove space after `!` operator --- lib/rake/file_task.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index 364d8e395..db790e39f 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require "rake/task.rb" +require "rake/task" require "rake/early_time" module Rake @@ -14,7 +14,7 @@ class FileTask < Task # Is this file task needed? Yes if it doesn't exist, or if its time stamp # is out of date. def needed? - ! File.exist?(name) || out_of_date?(timestamp) || @application.options.build_all + !File.exist?(name) || out_of_date?(timestamp) || @application.options.build_all end # Time stamp for file task. From f34e2d57f01938eb1b9334b4a9354eab9e585b35 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Tue, 9 Oct 2018 22:15:39 +0800 Subject: [PATCH 739/813] Fix a typo in lib/rake/application.rb --- lib/rake/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index c86cb1fa2..4cd8420cf 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -91,7 +91,7 @@ def init(app_name="rake", argv = ARGV) begin args = handle_options argv rescue ArgumentError - # Backword compatibility for capistrano + # Backward compatibility for capistrano args = handle_options end collect_command_line_tasks(args) From a54a506b3f82335a258e91708ee66e9c80edc63d Mon Sep 17 00:00:00 2001 From: zhustec Date: Tue, 9 Oct 2018 22:25:56 +0800 Subject: [PATCH 740/813] Remove more space after `!` operator --- lib/rake/application.rb | 2 +- lib/rake/file_creation_task.rb | 2 +- lib/rake/file_list.rb | 2 +- lib/rake/file_utils.rb | 4 ++-- lib/rake/promise.rb | 4 ++-- lib/rake/scope.rb | 2 +- lib/rake/task.rb | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index c86cb1fa2..2cad6122b 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -687,7 +687,7 @@ def print_rakefile_directory(location) # :nodoc: def raw_load_rakefile # :nodoc: rakefile, location = find_rakefile_location - if (! options.ignore_system) && + if (!options.ignore_system) && (options.load_system || rakefile.nil?) && system_dir && File.directory?(system_dir) print_rakefile_directory(location) diff --git a/lib/rake/file_creation_task.rb b/lib/rake/file_creation_task.rb index 2eb251bf1..5a4c68492 100644 --- a/lib/rake/file_creation_task.rb +++ b/lib/rake/file_creation_task.rb @@ -12,7 +12,7 @@ module Rake class FileCreationTask < FileTask # Is this file task needed? Yes if it doesn't exist. def needed? - ! File.exist?(name) + !File.exist?(name) end # Time stamp for file creation task. This time stamp is earlier diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index e27de8db5..15ea4b36d 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -385,7 +385,7 @@ def excluded_from_list?(fn) /~$/ ] DEFAULT_IGNORE_PROCS = [ - proc { |fn| fn =~ /(^|[\/\\])core$/ && ! File.directory?(fn) } + proc { |fn| fn =~ /(^|[\/\\])core$/ && !File.directory?(fn) } ] def import(array) # :nodoc: diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index 3439befab..dc434c8d9 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -35,7 +35,7 @@ module FileUtils # # # check exit status after command runs # sh %{grep pattern file} do |ok, res| - # if ! ok + # if !ok # puts "pattern not found (status = #{res.exitstatus})" # end # end @@ -111,7 +111,7 @@ def ruby(*args, &block) # Attempt to do a normal file link, but fall back to a copy if the link # fails. def safe_ln(*args) - if ! LN_SUPPORTED[0] + if !LN_SUPPORTED[0] cp(*args) else begin diff --git a/lib/rake/promise.rb b/lib/rake/promise.rb index ecff4321e..f45af4f3a 100644 --- a/lib/rake/promise.rb +++ b/lib/rake/promise.rb @@ -71,12 +71,12 @@ def chore # Do we have a result for the promise def result? - ! @result.equal?(NOT_SET) + !@result.equal?(NOT_SET) end # Did the promise throw an error def error? - ! @error.equal?(NOT_SET) + !@error.equal?(NOT_SET) end # Are we done with the promise diff --git a/lib/rake/scope.rb b/lib/rake/scope.rb index 27c05da89..fc1eb6c3a 100644 --- a/lib/rake/scope.rb +++ b/lib/rake/scope.rb @@ -16,7 +16,7 @@ def path_with_task_name(task_name) # this trim beyond the toplevel scope. def trim(n) result = self - while n > 0 && ! result.empty? + while n > 0 && !result.empty? result = result.tail n -= 1 end diff --git a/lib/rake/task.rb b/lib/rake/task.rb index c56118f01..257a7df0c 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -288,7 +288,7 @@ def timestamp def add_description(description) return unless description comment = description.strip - add_comment(comment) if comment && ! comment.empty? + add_comment(comment) if comment && !comment.empty? end def comment=(comment) # :nodoc: From f35c5651542dfd81c7e41e8aaf56feba77fce1a3 Mon Sep 17 00:00:00 2001 From: aycabta Date: Wed, 31 Oct 2018 23:53:13 +0900 Subject: [PATCH 741/813] Use Ruby 2.2.10, 2.3.8, 2.4.5, and 2.5.3 --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e5dcb34db..3662217f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,10 @@ sudo: false rvm: - 2.0.0 - 2.1.10 - - 2.2.9 - - 2.3.6 - - 2.4.3 - - 2.5.0 + - 2.2.10 + - 2.3.8 + - 2.4.5 + - 2.5.3 - ruby-head - jruby-9.1.16.0 - jruby-head From 1c6f3ac3f64caa734a81350a550a98d3c667f237 Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Fri, 2 Nov 2018 10:12:16 +1100 Subject: [PATCH 742/813] add binstubs for bundler, rake, rodc and rubocop --- bin/bundle | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++ bin/rake | 29 +++++++++++++++ bin/rdoc | 29 +++++++++++++++ bin/rubocop | 29 +++++++++++++++ 4 files changed, 192 insertions(+) create mode 100755 bin/bundle create mode 100755 bin/rake create mode 100755 bin/rdoc create mode 100755 bin/rubocop diff --git a/bin/bundle b/bin/bundle new file mode 100755 index 000000000..524dfd3f2 --- /dev/null +++ b/bin/bundle @@ -0,0 +1,105 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'bundle' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "rubygems" + +m = Module.new do + module_function + + def invoked_as_script? + File.expand_path($0) == File.expand_path(__FILE__) + end + + def env_var_version + ENV["BUNDLER_VERSION"] + end + + def cli_arg_version + return unless invoked_as_script? # don't want to hijack other binstubs + return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` + bundler_version = nil + update_index = nil + ARGV.each_with_index do |a, i| + if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN + bundler_version = a + end + next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ + bundler_version = $1 || ">= 0.a" + update_index = i + end + bundler_version + end + + def gemfile + gemfile = ENV["BUNDLE_GEMFILE"] + return gemfile if gemfile && !gemfile.empty? + + File.expand_path("../../Gemfile", __FILE__) + end + + def lockfile + lockfile = + case File.basename(gemfile) + when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) + else "#{gemfile}.lock" + end + File.expand_path(lockfile) + end + + def lockfile_version + return unless File.file?(lockfile) + lockfile_contents = File.read(lockfile) + return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ + Regexp.last_match(1) + end + + def bundler_version + @bundler_version ||= begin + env_var_version || cli_arg_version || + lockfile_version || "#{Gem::Requirement.default}.a" + end + end + + def load_bundler! + ENV["BUNDLE_GEMFILE"] ||= gemfile + + # must dup string for RG < 1.8 compatibility + activate_bundler(bundler_version.dup) + end + + def activate_bundler(bundler_version) + if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0") + bundler_version = "< 2" + end + gem_error = activation_error_handling do + gem "bundler", bundler_version + end + return if gem_error.nil? + require_error = activation_error_handling do + require "bundler/version" + end + return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION)) + 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}'`" + exit 42 + end + + def activation_error_handling + yield + nil + rescue StandardError, LoadError => e + e + end +end + +m.load_bundler! + +if m.invoked_as_script? + load Gem.bin_path("bundler", "bundle") +end diff --git a/bin/rake b/bin/rake new file mode 100755 index 000000000..9275675e8 --- /dev/null +++ b/bin/rake @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'rake' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +bundle_binstub = File.expand_path("../bundle", __FILE__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rake", "rake") diff --git a/bin/rdoc b/bin/rdoc new file mode 100755 index 000000000..a952e7988 --- /dev/null +++ b/bin/rdoc @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'rdoc' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +bundle_binstub = File.expand_path("../bundle", __FILE__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rdoc", "rdoc") diff --git a/bin/rubocop b/bin/rubocop new file mode 100755 index 000000000..d0c488293 --- /dev/null +++ b/bin/rubocop @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'rubocop' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +bundle_binstub = File.expand_path("../bundle", __FILE__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rubocop", "rubocop") From ab2278068a677ba846cbec9ee4bfb5a0a4ecd0f8 Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Fri, 2 Nov 2018 10:42:43 +1100 Subject: [PATCH 743/813] fix errors in rubocop --- lib/rake/packagetask.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index f65affa6d..72fef4d5e 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -132,9 +132,7 @@ def define task package: ["#{package_dir}/#{file}"] file "#{package_dir}/#{file}" => [package_dir_path] + package_files do - chdir(package_dir) do - sh @tar_command, "#{flag}cvf", file, package_name - end + chdir(package_dir) { sh @tar_command, "#{flag}cvf", file, package_name } end end end @@ -143,9 +141,7 @@ def define task package: ["#{package_dir}/#{zip_file}"] file "#{package_dir}/#{zip_file}" => [package_dir_path] + package_files do - chdir(package_dir) do - sh @zip_command, "-r", zip_file, package_name - end + chdir(package_dir) { sh @zip_command, "-r", zip_file, package_name } end end From 7375bf619ae3d4cd813ce8d8ddc33ef68efbf64b Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Fri, 2 Nov 2018 12:04:38 +1100 Subject: [PATCH 744/813] add rubocop section to CONTRIBUTING.rdoc --- CONTRIBUTING.rdoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CONTRIBUTING.rdoc b/CONTRIBUTING.rdoc index d68e8c525..a1a454c9c 100644 --- a/CONTRIBUTING.rdoc +++ b/CONTRIBUTING.rdoc @@ -18,6 +18,13 @@ If you wish to run the unit and functional tests that come with Rake: rake # If you have run rake's tests += Rubocop + +Rake uses Rubocop to enforce a consistent style on new changes being +proposed. You can check your code with Rubocop using: + + ./bin/rubocop + = Issues and Bug Reports Feel free to submit commits or feature requests. If you send a patch, From b6521cf4907af7e9f04013708411ab91d337da87 Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Fri, 2 Nov 2018 15:16:01 +1100 Subject: [PATCH 745/813] Rework the error message that tells to list the tasks with `rake --tasks` --- lib/rake/task_manager.rb | 2 +- test/test_rake_task.rb | 2 +- test/test_rake_task_manager.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index c1e60b95e..d503a3044 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -60,7 +60,7 @@ def [](task_name, scopes=nil) end def generate_message_for_undefined_task(task_name) - message = "Don't know how to build task '#{task_name}' (see --tasks)" + message = "Don't know how to build task '#{task_name}' (See the list of available tasks with `rake --tasks`)" message + generate_did_you_mean_suggestions(task_name) end diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 380f59b4f..ab24cbba5 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -172,7 +172,7 @@ def test_find task :tfind assert_equal "tfind", Task[:tfind].name ex = assert_raises(RuntimeError) { Task[:leaves] } - assert_equal "Don't know how to build task 'leaves' (see --tasks)", ex.message + assert_equal "Don't know how to build task 'leaves' (See the list of available tasks with `rake --tasks`)", ex.message end def test_defined diff --git a/test/test_rake_task_manager.rb b/test/test_rake_task_manager.rb index a9157ed81..94347b6b6 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -25,7 +25,7 @@ def test_index @tm["bad"] end - assert_equal "Don't know how to build task 'bad' (see --tasks)", e.message + assert_equal "Don't know how to build task 'bad' (See the list of available tasks with `rake --tasks`)", e.message end def test_name_lookup From a0afa882eb964c7728f3e4c2aa9b21728137ec43 Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Mon, 5 Nov 2018 20:26:31 +1100 Subject: [PATCH 746/813] fix links to rake resources not showing on Github --- README.rdoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rdoc b/README.rdoc index 5449303a5..ab136b85d 100644 --- a/README.rdoc +++ b/README.rdoc @@ -75,10 +75,10 @@ Type "rake --help" for all available options. === Rake Information -* {Rake command-line}[rdoc-ref:doc/command_line_usage.rdoc] -* {Writing Rakefiles}[rdoc-ref:doc/rakefile.rdoc] -* The original {Rake announcement}[rdoc-ref:doc/rational.rdoc] -* Rake {glossary}[rdoc-ref:doc/glossary.rdoc] +* {Rake command-line}[link:doc/command_line_usage.rdoc] +* {Writing Rakefiles}[link:doc/rakefile.rdoc] +* The original {Rake announcement}[link:doc/rational.rdoc] +* Rake {glossary}[link:doc/glossary.rdoc] === Presentations and Articles about Rake From 44879600d045d03737099e87e3e555a43bba861d Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Mon, 5 Nov 2018 21:14:05 +1100 Subject: [PATCH 747/813] run coveralls only when COVERALLS env var is present This is to prevent multiple travis-ci jobs running coveralls and results in the coveralls posting multiple reports per PR --- .travis.yml | 6 ++++++ test/helper.rb | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3662217f4..9677c0988 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,12 @@ rvm: - ruby-head - jruby-9.1.16.0 - jruby-head + +matrix: + include: + - rvm: 2.5.3 + env: COVERALLS=yes + before_script: - unset JRUBY_OPTS - unset _JAVA_OPTIONS diff --git a/test/helper.rb b/test/helper.rb index 29f81c1f6..7d0989a38 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -2,9 +2,11 @@ $:.unshift File.expand_path("../../lib", __FILE__) begin - gem "coveralls" - require "coveralls" - Coveralls.wear! + if ENV['COVERALLS'] + gem "coveralls" + require "coveralls" + Coveralls.wear! + end rescue Gem::LoadError end From f989fec41766ed37f6d408da8a84f905547f382d Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Mon, 5 Nov 2018 21:19:39 +1100 Subject: [PATCH 748/813] update latest jruby version in travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3662217f4..ad19ac370 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ rvm: - 2.4.5 - 2.5.3 - ruby-head - - jruby-9.1.16.0 + - jruby-9.2.0.0 - jruby-head before_script: - unset JRUBY_OPTS From 137e3f7a43f0429098b8878a00db449fa85fea97 Mon Sep 17 00:00:00 2001 From: Jon San Miguel Date: Thu, 27 Sep 2018 19:15:36 -0700 Subject: [PATCH 749/813] Improve multitask performance --- lib/rake/task.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index c56118f01..7b7057ce5 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -248,7 +248,8 @@ def invoke_prerequisites_concurrently(task_args, invocation_chain)# :nodoc: r.invoke_with_call_chain(prereq_args, invocation_chain) end end - futures.each(&:value) + # Iterate in reverse to improve performance related to thread waiting and switching + futures.reverse_each(&:value) end # Format the trace flags for display. From 5c797778371b978c4202ac9bc72b6f9c393f6fdc Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Sat, 17 Nov 2018 13:22:08 +1100 Subject: [PATCH 750/813] update jruby to the latest version in travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ad19ac370..ea0f0aea1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ rvm: - 2.4.5 - 2.5.3 - ruby-head - - jruby-9.2.0.0 + - jruby-9.2.4.0 - jruby-head before_script: - unset JRUBY_OPTS From e4ebe510406aaad98e433b5b7510fcd7ad41cf72 Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Sun, 25 Nov 2018 00:45:54 +1100 Subject: [PATCH 751/813] set Application#set_default_options to be ignored by rdoc --- lib/rake/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 850b021c8..70efd8e3e 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -797,7 +797,7 @@ def rakefile_location(backtrace=caller) # :nodoc: backtrace.find { |str| str =~ re } || "" end - def set_default_options + def set_default_options # :nodoc: options.always_multitask = false options.backtrace = false options.build_all = false From 760834b3a2dd2c0e1018f2aa595233098a71c126 Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Sun, 25 Nov 2018 00:46:22 +1100 Subject: [PATCH 752/813] add missing params to `task` call-seq examples to match consistency --- lib/rake/dsl_definition.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index 3962c1679..c80464020 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -26,9 +26,9 @@ module DSL private # :call-seq: - # task task_name - # task task_name: dependencies - # task task_name, arguments => dependencies + # task(task_name) + # task(task_name: dependencies) + # task(task_name, arguments => dependencies) # # Declare a basic task. The +task_name+ is always the first argument. If # the task name contains a ":" it is defined in that namespace. From f9d736c4641defcc6340de9ed9ad896f13bb8f18 Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Sun, 25 Nov 2018 00:47:04 +1100 Subject: [PATCH 753/813] ignore all test classes in rdoc --- test/test_private_reader.rb | 4 ++-- test/test_rake.rb | 2 +- test/test_rake_application.rb | 2 +- test/test_rake_application_options.rb | 2 +- test/test_rake_backtrace.rb | 4 ++-- test/test_rake_clean.rb | 2 +- test/test_rake_cpu_counter.rb | 4 ++-- test/test_rake_definitions.rb | 2 +- test/test_rake_directory_task.rb | 2 +- test/test_rake_dsl.rb | 2 +- test/test_rake_early_time.rb | 2 +- test/test_rake_extension.rb | 6 +++--- test/test_rake_file_creation_task.rb | 2 +- test/test_rake_file_list.rb | 4 ++-- test/test_rake_file_list_path_map.rb | 2 +- test/test_rake_file_task.rb | 2 +- test/test_rake_file_utils.rb | 4 ++-- test/test_rake_functional.rb | 2 +- test/test_rake_invocation_chain.rb | 2 +- test/test_rake_late_time.rb | 2 +- test/test_rake_linked_list.rb | 2 +- test/test_rake_makefile_loader.rb | 2 +- test/test_rake_multi_task.rb | 2 +- test/test_rake_name_space.rb | 4 ++-- test/test_rake_package_task.rb | 2 +- test/test_rake_path_map.rb | 2 +- test/test_rake_path_map_explode.rb | 2 +- test/test_rake_path_map_partial.rb | 2 +- test/test_rake_pseudo_status.rb | 2 +- test/test_rake_rake_test_loader.rb | 2 +- test/test_rake_reduce_compat.rb | 2 +- test/test_rake_require.rb | 2 +- test/test_rake_rules.rb | 2 +- test/test_rake_scope.rb | 2 +- test/test_rake_task.rb | 2 +- test/test_rake_task_argument_parsing.rb | 2 +- test/test_rake_task_arguments.rb | 2 +- test/test_rake_task_manager.rb | 2 +- test/test_rake_task_manager_argument_resolution.rb | 2 +- test/test_rake_task_with_arguments.rb | 2 +- test/test_rake_test_task.rb | 2 +- test/test_rake_thread_pool.rb | 2 +- test/test_rake_top_level_functions.rb | 2 +- test/test_rake_win32.rb | 4 ++-- test/test_thread_history_display.rb | 2 +- test/test_trace_output.rb | 4 ++-- 46 files changed, 56 insertions(+), 56 deletions(-) diff --git a/test/test_private_reader.rb b/test/test_private_reader.rb index ef08c9d2c..ee22e1b40 100644 --- a/test/test_private_reader.rb +++ b/test/test_private_reader.rb @@ -2,9 +2,9 @@ require File.expand_path("../helper", __FILE__) require "rake/private_reader" -class TestPrivateAttrs < Rake::TestCase +class TestPrivateAttrs < Rake::TestCase # :nodoc: - class Sample + class Sample # :nodoc: include Rake::PrivateReader private_reader :reader, :a diff --git a/test/test_rake.rb b/test/test_rake.rb index 2cdab492b..a6d08fd35 100644 --- a/test/test_rake.rb +++ b/test/test_rake.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRake < Rake::TestCase +class TestRake < Rake::TestCase # :nodoc: def test_each_dir_parent assert_equal ["a"], alldirs("a") assert_equal ["a/b", "a"], alldirs("a/b") diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index d17445c7e..27645ea12 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeApplication < Rake::TestCase +class TestRakeApplication < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index d774678b6..0ca06e264 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -3,7 +3,7 @@ TESTING_REQUIRE = [] -class TestRakeApplicationOptions < Rake::TestCase +class TestRakeApplicationOptions < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_backtrace.rb b/test/test_rake_backtrace.rb index d89817a11..27e3cecb7 100644 --- a/test/test_rake_backtrace.rb +++ b/test/test_rake_backtrace.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "open3" -class TestBacktraceSuppression < Rake::TestCase +class TestBacktraceSuppression < Rake::TestCase # :nodoc: def test_bin_rake_suppressed paths = ["something/bin/rake:12"] @@ -36,7 +36,7 @@ def test_near_system_dir_isnt_suppressed end end -class TestRakeBacktrace < Rake::TestCase +class TestRakeBacktrace < Rake::TestCase # :nodoc: include RubyRunner def setup diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index 612bd2546..b0b1ad602 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "rake/clean" -class TestRakeClean < Rake::TestCase +class TestRakeClean < Rake::TestCase # :nodoc: def test_clean load "rake/clean.rb", true diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb index 3c3af15bf..5d04e7c97 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeCpuCounter < Rake::TestCase +class TestRakeCpuCounter < Rake::TestCase # :nodoc: def setup super @@ -28,7 +28,7 @@ def @cpu_counter.count; raise; end assert_equal(4, @cpu_counter.count_with_default) end - class TestClassMethod < Rake::TestCase + class TestClassMethod < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_definitions.rb b/test/test_rake_definitions.rb index 2dee13a34..52e468e3b 100644 --- a/test/test_rake_definitions.rb +++ b/test/test_rake_definitions.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "fileutils" -class TestRakeDefinitions < Rake::TestCase +class TestRakeDefinitions < Rake::TestCase # :nodoc: include Rake EXISTINGFILE = "existing" diff --git a/test/test_rake_directory_task.rb b/test/test_rake_directory_task.rb index d5fd26f27..5635afd13 100644 --- a/test/test_rake_directory_task.rb +++ b/test/test_rake_directory_task.rb @@ -3,7 +3,7 @@ require "fileutils" require "pathname" -class TestRakeDirectoryTask < Rake::TestCase +class TestRakeDirectoryTask < Rake::TestCase # :nodoc: include Rake def test_directory diff --git a/test/test_rake_dsl.rb b/test/test_rake_dsl.rb index 162961446..6d0e7344d 100644 --- a/test/test_rake_dsl.rb +++ b/test/test_rake_dsl.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeDsl < Rake::TestCase +class TestRakeDsl < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_early_time.rb b/test/test_rake_early_time.rb index dc0550b2a..95040f67a 100644 --- a/test/test_rake_early_time.rb +++ b/test/test_rake_early_time.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeEarlyTime < Rake::TestCase +class TestRakeEarlyTime < Rake::TestCase # :nodoc: def test_create early = Rake::EarlyTime.instance assert early <= Time.now diff --git a/test/test_rake_extension.rb b/test/test_rake_extension.rb index 0627ef9b7..aeb8ce148 100644 --- a/test/test_rake_extension.rb +++ b/test/test_rake_extension.rb @@ -2,9 +2,9 @@ require File.expand_path("../helper", __FILE__) require "stringio" -class TestRakeExtension < Rake::TestCase +class TestRakeExtension < Rake::TestCase # :nodoc: - module Redirect + module Redirect # :nodoc: def error_redirect old_err = $stderr result = StringIO.new @@ -16,7 +16,7 @@ def error_redirect end end - class Sample + class Sample # :nodoc: extend Redirect def duplicate_method diff --git a/test/test_rake_file_creation_task.rb b/test/test_rake_file_creation_task.rb index e99884a55..05af13bb1 100644 --- a/test/test_rake_file_creation_task.rb +++ b/test/test_rake_file_creation_task.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "fileutils" -class TestRakeFileCreationTask < Rake::TestCase +class TestRakeFileCreationTask < Rake::TestCase # :nodoc: include Rake DUMMY_DIR = "dummy_dir" diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 3e2622acd..97ab99828 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -2,8 +2,8 @@ require File.expand_path("../helper", __FILE__) require "pathname" -class TestRakeFileList < Rake::TestCase - FileList = Rake::FileList +class TestRakeFileList < Rake::TestCase # :nodoc: + FileList = Rake::FileList # :nodoc: def setup super diff --git a/test/test_rake_file_list_path_map.rb b/test/test_rake_file_list_path_map.rb index 71402cf36..2c51a2d72 100644 --- a/test/test_rake_file_list_path_map.rb +++ b/test/test_rake_file_list_path_map.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeFileListPathMap < Rake::TestCase +class TestRakeFileListPathMap < Rake::TestCase # :nodoc: def test_file_list_supports_pathmap assert_equal ["a", "b"], FileList["dir/a.rb", "dir/b.rb"].pathmap("%n") end diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index 774cbafd4..61303d88a 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -3,7 +3,7 @@ require "fileutils" require "pathname" -class TestRakeFileTask < Rake::TestCase +class TestRakeFileTask < Rake::TestCase # :nodoc: include Rake def setup diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 90526b1d9..7e9674fdc 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -3,7 +3,7 @@ require "fileutils" require "stringio" -class TestRakeFileUtils < Rake::TestCase +class TestRakeFileUtils < Rake::TestCase # :nodoc: def setup super @rake_test_sh = ENV["RAKE_TEST_SH"] @@ -47,7 +47,7 @@ def test_ln assert_equal "TEST_LN\n", File.read("b") end - class BadLink + class BadLink # :nodoc: include Rake::FileUtilsExt attr_reader :cp_args diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index daf832254..afc31d28f 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -3,7 +3,7 @@ require "fileutils" require "open3" -class TestRakeFunctional < Rake::TestCase +class TestRakeFunctional < Rake::TestCase # :nodoc: include RubyRunner def setup diff --git a/test/test_rake_invocation_chain.rb b/test/test_rake_invocation_chain.rb index 338180aaa..bf918f758 100644 --- a/test/test_rake_invocation_chain.rb +++ b/test/test_rake_invocation_chain.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeInvocationChain < Rake::TestCase +class TestRakeInvocationChain < Rake::TestCase # :nodoc: include Rake def setup diff --git a/test/test_rake_late_time.rb b/test/test_rake_late_time.rb index d07b441a0..776b02d22 100644 --- a/test/test_rake_late_time.rb +++ b/test/test_rake_late_time.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeLateTime < Rake::TestCase +class TestRakeLateTime < Rake::TestCase # :nodoc: def test_late_time_comparisons late = Rake::LATE assert_equal late, late diff --git a/test/test_rake_linked_list.rb b/test/test_rake_linked_list.rb index d111575b2..656b50ac2 100644 --- a/test/test_rake_linked_list.rb +++ b/test/test_rake_linked_list.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestLinkedList < Rake::TestCase +class TestLinkedList < Rake::TestCase # :nodoc: include Rake def test_empty_list diff --git a/test/test_rake_makefile_loader.rb b/test/test_rake_makefile_loader.rb index 75713cd2f..4f5270e0a 100644 --- a/test/test_rake_makefile_loader.rb +++ b/test/test_rake_makefile_loader.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "rake/loaders/makefile" -class TestRakeMakefileLoader < Rake::TestCase +class TestRakeMakefileLoader < Rake::TestCase # :nodoc: include Rake def test_parse diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index 31d88e5c3..641e65f4b 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "thread" -class TestRakeMultiTask < Rake::TestCase +class TestRakeMultiTask < Rake::TestCase # :nodoc: include Rake def setup diff --git a/test/test_rake_name_space.rb b/test/test_rake_name_space.rb index e8d4d6b20..a1a814cfd 100644 --- a/test/test_rake_name_space.rb +++ b/test/test_rake_name_space.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeNameSpace < Rake::TestCase +class TestRakeNameSpace < Rake::TestCase # :nodoc: - class TM + class TM # :nodoc: include Rake::TaskManager end diff --git a/test/test_rake_package_task.rb b/test/test_rake_package_task.rb index 2634267ee..d3886f8ca 100644 --- a/test/test_rake_package_task.rb +++ b/test/test_rake_package_task.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "rake/packagetask" -class TestRakePackageTask < Rake::TestCase +class TestRakePackageTask < Rake::TestCase # :nodoc: def test_initialize touch "install.rb" diff --git a/test/test_rake_path_map.rb b/test/test_rake_path_map.rb index 92cf337cb..1551247ec 100644 --- a/test/test_rake_path_map.rb +++ b/test/test_rake_path_map.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakePathMap < Rake::TestCase +class TestRakePathMap < Rake::TestCase # :nodoc: def test_returns_self_with_no_args assert_equal "abc.rb", "abc.rb".pathmap diff --git a/test/test_rake_path_map_explode.rb b/test/test_rake_path_map_explode.rb index 3174d6ccc..877a8e0c9 100644 --- a/test/test_rake_path_map_explode.rb +++ b/test/test_rake_path_map_explode.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakePathMapExplode < Rake::TestCase +class TestRakePathMapExplode < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_path_map_partial.rb b/test/test_rake_path_map_partial.rb index 9daf44ca5..e73ec56b6 100644 --- a/test/test_rake_path_map_partial.rb +++ b/test/test_rake_path_map_partial.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakePathMapPartial < Rake::TestCase +class TestRakePathMapPartial < Rake::TestCase # :nodoc: def test_pathmap_partial @path = "1/2/file".dup def @path.call(n) diff --git a/test/test_rake_pseudo_status.rb b/test/test_rake_pseudo_status.rb index 5a54bc200..008621f49 100644 --- a/test/test_rake_pseudo_status.rb +++ b/test/test_rake_pseudo_status.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakePseudoStatus < Rake::TestCase +class TestRakePseudoStatus < Rake::TestCase # :nodoc: def test_with_zero_exit_status s = Rake::PseudoStatus.new assert_equal 0, s.exitstatus diff --git a/test/test_rake_rake_test_loader.rb b/test/test_rake_rake_test_loader.rb index bf44235c0..4423a9b1c 100644 --- a/test/test_rake_rake_test_loader.rb +++ b/test/test_rake_rake_test_loader.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeRakeTestLoader < Rake::TestCase +class TestRakeRakeTestLoader < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_reduce_compat.rb b/test/test_rake_reduce_compat.rb index f3db9a79c..17986dcde 100644 --- a/test/test_rake_reduce_compat.rb +++ b/test/test_rake_reduce_compat.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "open3" -class TestRakeReduceCompat < Rake::TestCase +class TestRakeReduceCompat < Rake::TestCase # :nodoc: include RubyRunner def invoke_normal(task_name) diff --git a/test/test_rake_require.rb b/test/test_rake_require.rb index 899aba5ca..6309277da 100644 --- a/test/test_rake_require.rb +++ b/test/test_rake_require.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeRequire < Rake::TestCase +class TestRakeRequire < Rake::TestCase # :nodoc: def setup super $LOAD_PATH.unshift "." if jruby17? diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index 52934c258..bfb8e775f 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "fileutils" -class TestRakeRules < Rake::TestCase +class TestRakeRules < Rake::TestCase # :nodoc: include Rake SRCFILE = "abc.c" diff --git a/test/test_rake_scope.rb b/test/test_rake_scope.rb index 50bb1810b..24ac03408 100644 --- a/test/test_rake_scope.rb +++ b/test/test_rake_scope.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeScope < Rake::TestCase +class TestRakeScope < Rake::TestCase # :nodoc: include Rake def test_path_against_empty_scope diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index ab24cbba5..ee3e9d35c 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "fileutils" -class TestRakeTask < Rake::TestCase +class TestRakeTask < Rake::TestCase # :nodoc: include Rake def setup diff --git a/test/test_rake_task_argument_parsing.rb b/test/test_rake_task_argument_parsing.rb index e65712b37..ed12ea0b4 100644 --- a/test/test_rake_task_argument_parsing.rb +++ b/test/test_rake_task_argument_parsing.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeTaskArgumentParsing < Rake::TestCase +class TestRakeTaskArgumentParsing < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 2ae3652da..245a71661 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeTaskArguments < Rake::TestCase +class TestRakeTaskArguments < Rake::TestCase # :nodoc: def teardown ENV.delete("rev") ENV.delete("VER") diff --git a/test/test_rake_task_manager.rb b/test/test_rake_task_manager.rb index 94347b6b6..7d8c40902 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeTaskManager < Rake::TestCase +class TestRakeTaskManager < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_task_manager_argument_resolution.rb b/test/test_rake_task_manager_argument_resolution.rb index c07be6f5e..585932c5c 100644 --- a/test/test_rake_task_manager_argument_resolution.rb +++ b/test/test_rake_task_manager_argument_resolution.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeTaskManagerArgumentResolution < Rake::TestCase +class TestRakeTaskManagerArgumentResolution < Rake::TestCase # :nodoc: def test_good_arg_patterns assert_equal [:t, [], []], task(:t) diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index 61cf8e049..46edcd112 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeTaskWithArguments < Rake::TestCase +class TestRakeTaskWithArguments < Rake::TestCase # :nodoc: include Rake def setup diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 396e05924..ed2313b91 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "rake/testtask" -class TestRakeTestTask < Rake::TestCase +class TestRakeTestTask < Rake::TestCase # :nodoc: include Rake def test_initialize diff --git a/test/test_rake_thread_pool.rb b/test/test_rake_thread_pool.rb index ceb8a5d1b..42f648854 100644 --- a/test/test_rake_thread_pool.rb +++ b/test/test_rake_thread_pool.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "rake/thread_pool" -class TestRakeTestThreadPool < Rake::TestCase +class TestRakeTestThreadPool < Rake::TestCase # :nodoc: include Rake def test_pool_executes_in_current_thread_for_zero_threads diff --git a/test/test_rake_top_level_functions.rb b/test/test_rake_top_level_functions.rb index f3675a096..f0dec1b76 100644 --- a/test/test_rake_top_level_functions.rb +++ b/test/test_rake_top_level_functions.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeTopLevelFunctions < Rake::TestCase +class TestRakeTopLevelFunctions < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_win32.rb b/test/test_rake_win32.rb index 6c341f486..ed08ef09e 100644 --- a/test/test_rake_win32.rb +++ b/test/test_rake_win32.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeWin32 < Rake::TestCase +class TestRakeWin32 < Rake::TestCase # :nodoc: - Win32 = Rake::Win32 + Win32 = Rake::Win32 # :nodoc: def test_win32_system_dir_uses_home_if_defined ENV["HOME"] = 'C:\\HP' diff --git a/test/test_thread_history_display.rb b/test/test_thread_history_display.rb index 8adb1940a..026576446 100644 --- a/test/test_thread_history_display.rb +++ b/test/test_thread_history_display.rb @@ -3,7 +3,7 @@ require "rake/thread_history_display" -class TestThreadHistoryDisplay < Rake::TestCase +class TestThreadHistoryDisplay < Rake::TestCase # :nodoc: def setup super @time = 1_000_000 diff --git a/test/test_trace_output.rb b/test/test_trace_output.rb index 34dab6162..46403870f 100644 --- a/test/test_trace_output.rb +++ b/test/test_trace_output.rb @@ -2,10 +2,10 @@ require File.expand_path("../helper", __FILE__) require "stringio" -class TestTraceOutput < Rake::TestCase +class TestTraceOutput < Rake::TestCase # :nodoc: include Rake::TraceOutput - class PrintSpy + class PrintSpy # :nodoc: attr_reader :result, :calls def initialize From b0b450482e101721614f8d875f4bfb775d5c2089 Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Sun, 25 Nov 2018 01:00:24 +1100 Subject: [PATCH 754/813] update public clone URL to use https --- CONTRIBUTING.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rdoc b/CONTRIBUTING.rdoc index a1a454c9c..8eb7b9127 100644 --- a/CONTRIBUTING.rdoc +++ b/CONTRIBUTING.rdoc @@ -3,7 +3,7 @@ Rake is currently hosted at github. The github web page is https://github.com/ruby/rake . The public git clone URL is - git://github.com/ruby/rake.git + https://github.com/ruby/rake.git = Running the Rake Test Suite From c664ddecdb057e2aa1a15e7957b61aab5cb6c886 Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Sun, 25 Nov 2018 01:07:03 +1100 Subject: [PATCH 755/813] improve running test instructions and denote commands with `$` --- CONTRIBUTING.rdoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.rdoc b/CONTRIBUTING.rdoc index a1a454c9c..0eacefd7d 100644 --- a/CONTRIBUTING.rdoc +++ b/CONTRIBUTING.rdoc @@ -12,18 +12,18 @@ If you wish to run the unit and functional tests that come with Rake: * +cd+ into the top project directory of rake. * Install gem dependency using bundler: - bundle install # Install bundler, minitest and rdoc + $ bundle install # Install bundler, minitest and rdoc -* Type one of the following: +* Run the test suite - rake # If you have run rake's tests + $ rake = Rubocop Rake uses Rubocop to enforce a consistent style on new changes being proposed. You can check your code with Rubocop using: - ./bin/rubocop + $ ./bin/rubocop = Issues and Bug Reports From 81763da40dcfc497e25e00a7e957efd84a053923 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 7 Dec 2018 11:06:23 +0900 Subject: [PATCH 756/813] Fixed warnings with https://bugs.ruby-lang.org/issues/15231 --- lib/rake/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 70efd8e3e..9ac9b2130 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -392,7 +392,7 @@ def trace(*strings) # :nodoc: def sort_options(options) # :nodoc: options.sort_by { |opt| - opt.select { |o| o =~ /^-/ }.map(&:downcase).sort.reverse + opt.select { |o| o.is_a?(String) && o =~ /^-/ }.map(&:downcase).sort.reverse } end private :sort_options From ff4bb1e86096444e08b123037bf4907da3d568bf Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 7 Dec 2018 18:45:55 +0900 Subject: [PATCH 757/813] Bump version to v12.3.2 --- History.rdoc | 16 ++++++++++++++++ lib/rake/version.rb | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 2ae9ba762..455b27dd9 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,19 @@ +=== 12.3.2 + +==== Bug fixes + +* Fixed test fails caused by 2.6 warnings. + Pull Request #297 by hsbt + +==== Enhancements: + +* Rdoc improvements. + Pull Request #293 by colby-swandale +* Improve multitask performance. + Pull Request #273 by jsm +* Add alias `prereqs`. + Pull Request #268 by take-cheeze + === 12.3.1 ==== Bug fixes diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 2d66a8f74..53ba15e0e 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Rake - VERSION = "12.3.1" + VERSION = "12.3.2" module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "." From 3d5a5be09038c160fa6ec9c3186a5c8a24d7d8d8 Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Thu, 27 Dec 2018 01:02:23 +1100 Subject: [PATCH 758/813] Add ruby 2.6.0 to .travis.yml We have to manually update RubyGems because Travis forces each ruby version to have an old version of RubyGems --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9e7100420..5ae749249 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ rvm: - 2.3.8 - 2.4.5 - 2.5.3 + - 2.6.0 - ruby-head - jruby-9.2.4.0 - jruby-head @@ -19,4 +20,6 @@ matrix: before_script: - unset JRUBY_OPTS - unset _JAVA_OPTIONS + - if ruby -e "exit RUBY_VERSION >= '2.3.0'"; then gem update --system=3.0.1; else gem update --system=2.7.8; fi + script: ruby -Ilib exe/rake From 799d84787fd4064f005a8383391b8f3a402007fc Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Sun, 30 Dec 2018 12:42:02 +1100 Subject: [PATCH 759/813] fix outstanding rubocop warnings --- .rubocop.yml | 1 + test/helper.rb | 2 +- test/test_rake_task.rb | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 9a14d206e..84d6a7c5b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,6 +4,7 @@ AllCops: Exclude: - doc/**/*.rb - rake.gemspec + - bin/* Metrics/LineLength: Enabled: true diff --git a/test/helper.rb b/test/helper.rb index 7d0989a38..8e061fa45 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -2,7 +2,7 @@ $:.unshift File.expand_path("../../lib", __FILE__) begin - if ENV['COVERALLS'] + if ENV["COVERALLS"] gem "coveralls" require "coveralls" Coveralls.wear! diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index ee3e9d35c..688e0a3e7 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -172,7 +172,8 @@ def test_find task :tfind assert_equal "tfind", Task[:tfind].name ex = assert_raises(RuntimeError) { Task[:leaves] } - assert_equal "Don't know how to build task 'leaves' (See the list of available tasks with `rake --tasks`)", ex.message + assert_equal "Don't know how to build task 'leaves'" \ + " (See the list of available tasks with `rake --tasks`)", ex.message end def test_defined From d28957d64ae88823200049f8ae3667eb631bdfcc Mon Sep 17 00:00:00 2001 From: Teemu Matilainen Date: Mon, 21 Jan 2019 00:40:35 +0200 Subject: [PATCH 760/813] Use the application's name in error message if a task is not found `Rake.application` can be initialized with a custom name, so use that in the error message when a task is not found in the index. The default application name is `rake`. --- lib/rake/task_manager.rb | 3 ++- test/test_rake_task_manager.rb | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index d503a3044..1991088fa 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -60,7 +60,8 @@ def [](task_name, scopes=nil) end def generate_message_for_undefined_task(task_name) - message = "Don't know how to build task '#{task_name}' (See the list of available tasks with `rake --tasks`)" + message = "Don't know how to build task '#{task_name}' "\ + "(See the list of available tasks with `#{Rake.application.name} --tasks`)" message + generate_did_you_mean_suggestions(task_name) end diff --git a/test/test_rake_task_manager.rb b/test/test_rake_task_manager.rb index 7d8c40902..88937c604 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -28,6 +28,16 @@ def test_index assert_equal "Don't know how to build task 'bad' (See the list of available tasks with `rake --tasks`)", e.message end + def test_undefined_task_with_custom_application + Rake.application.init("myrake", nil) + + e = assert_raises RuntimeError do + @tm["bad"] + end + + assert_equal "Don't know how to build task 'bad' (See the list of available tasks with `myrake --tasks`)", e.message + end + def test_name_lookup t = @tm.define_task(Rake::Task, :t) assert_equal t, @tm[:t] From 7b75d7a084c6408759d745db270550b8d14d02cf Mon Sep 17 00:00:00 2001 From: aycabta Date: Tue, 5 Feb 2019 19:19:25 +0900 Subject: [PATCH 761/813] Use Ruby 2.6.1 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5ae749249..eb197f74e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ rvm: - 2.3.8 - 2.4.5 - 2.5.3 - - 2.6.0 + - 2.6.1 - ruby-head - jruby-9.2.4.0 - jruby-head From aec6e976a11728ec2fc78946f308b28d9b2522a3 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 20:02:39 +0900 Subject: [PATCH 762/813] Set up CI with Azure Pipelines --- azure-pipelines.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..6cd30e84d --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,23 @@ +# Ruby +# Package your Ruby project. +# Add steps that install rails, analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/ruby + +trigger: +- master + +pool: + vmImage: 'Ubuntu-16.04' + +steps: +- task: UseRubyVersion@0 + inputs: + versionSpec: '>= 2.5' + +- script: | + gem install bundler + bundle install --retry=3 --jobs=4 + displayName: 'bundle install' + +- script: bundle exec rake + displayName: 'bundle exec rake' From 48a5f2e9b888dd5eb1aa9c7aa624c4191a4c2bae Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 20:12:04 +0900 Subject: [PATCH 763/813] Applied matrix build for the multiple platforms. --- azure-pipelines.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6cd30e84d..d109c2fca 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,21 +3,24 @@ # Add steps that install rails, analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/ruby -trigger: -- master - -pool: - vmImage: 'Ubuntu-16.04' +strategy: + matrix: + linux: + imageName: 'ubuntu-16.04' + mac: + imageName: 'macos-10.13' + windows: + imageName: 'vs2017-win2016' steps: - task: UseRubyVersion@0 inputs: - versionSpec: '>= 2.5' + versionSpec: '>= 2.0' - script: | gem install bundler bundle install --retry=3 --jobs=4 displayName: 'bundle install' -- script: bundle exec rake - displayName: 'bundle exec rake' +- script: ruby -Ilib exe/rake + displayName: 'ruby -Ilib exe/rake' From 4b89261e210a7b12c33c3ef07f54f51e98a2ae70 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 20:24:03 +0900 Subject: [PATCH 764/813] Added missing vmImage --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d109c2fca..4130122d7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,6 +12,9 @@ strategy: windows: imageName: 'vs2017-win2016' +pool: + vmImage: $(imageName) + steps: - task: UseRubyVersion@0 inputs: From c4d03c365b8d9ad3e69cc1c3abcceb8149de7f05 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 20:46:04 +0900 Subject: [PATCH 765/813] Extracted ruby versions for matrix --- azure-pipelines.yml | 91 +++++++++++++++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 27 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4130122d7..2962b9468 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,29 +1,66 @@ -# Ruby -# Package your Ruby project. -# Add steps that install rails, analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/ruby +jobs: +- job: Linux + pool: + vmImage: 'ubuntu-16.04' + strategy: + matrix: + ruby 2.3: + ruby_version: '2.3.7' + ruby 2.4: + ruby_version: '2.4.4' + ruby 2.5: + ruby_version: '2.5.1' + steps: + - task: UseRubyVersion@0 + inputs: + versionSpec: $(ruby_version) + - script: | + gem install bundler + bundle install --retry=3 --jobs=4 + displayName: 'bundle install' + - script: ruby -Ilib exe/rake + displayName: 'ruby -Ilib exe/rake' -strategy: - matrix: - linux: - imageName: 'ubuntu-16.04' - mac: - imageName: 'macos-10.13' - windows: - imageName: 'vs2017-win2016' +- job: macOS + pool: + vmImage: 'macos-10.13' + strategy: + matrix: + ruby 2.3: + ruby_version: '2.3.7' + ruby 2.4: + ruby_version: '2.4.4' + ruby 2.5: + ruby_version: '2.5.1' + steps: + - task: UseRubyVersion@0 + inputs: + versionSpec: $(ruby_version) + - script: | + gem install bundler + bundle install --retry=3 --jobs=4 + displayName: 'bundle install' + - script: ruby -Ilib exe/rake + displayName: 'ruby -Ilib exe/rake' -pool: - vmImage: $(imageName) - -steps: -- task: UseRubyVersion@0 - inputs: - versionSpec: '>= 2.0' - -- script: | - gem install bundler - bundle install --retry=3 --jobs=4 - displayName: 'bundle install' - -- script: ruby -Ilib exe/rake - displayName: 'ruby -Ilib exe/rake' +- job: Windows + pool: + vmImage: 'vs2017-win2016' + strategy: + matrix: + ruby 2.3: + ruby_version: '2.3.7' + ruby 2.4: + ruby_version: '2.4.4' + ruby 2.5: + ruby_version: '2.5.1' + steps: + - task: UseRubyVersion@0 + inputs: + versionSpec: $(ruby_version) + - script: | + gem install bundler + bundle install --retry=3 --jobs=4 + displayName: 'bundle install' + - script: ruby -Ilib exe/rake + displayName: 'ruby -Ilib exe/rake' From b29bae23b67993e41a710ad80f7de643edfed04d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 20:50:38 +0900 Subject: [PATCH 766/813] Removed non supported versions. --- azure-pipelines.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2962b9468..04ab270ee 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,12 +26,8 @@ jobs: vmImage: 'macos-10.13' strategy: matrix: - ruby 2.3: - ruby_version: '2.3.7' - ruby 2.4: - ruby_version: '2.4.4' - ruby 2.5: - ruby_version: '2.5.1' + ruby 2.6: + ruby_version: '2.6.1' steps: - task: UseRubyVersion@0 inputs: @@ -48,12 +44,10 @@ jobs: vmImage: 'vs2017-win2016' strategy: matrix: - ruby 2.3: - ruby_version: '2.3.7' ruby 2.4: - ruby_version: '2.4.4' + ruby_version: '2.4.3' ruby 2.5: - ruby_version: '2.5.1' + ruby_version: '2.5.0' steps: - task: UseRubyVersion@0 inputs: From 54861dc265434cc24ed7baa59c22322613d68a02 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 21:02:09 +0900 Subject: [PATCH 767/813] Rename --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 04ab270ee..98c7b8809 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: ruby 2.6: - ruby_version: '2.6.1' + ruby_version: '2.6.1p33' steps: - task: UseRubyVersion@0 inputs: From a43a3b7871a47b0b5cf96cb5515ed67edae3270b Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 21:06:34 +0900 Subject: [PATCH 768/813] Ignore matrix build for macOS --- azure-pipelines.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 98c7b8809..555079d41 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,14 +24,10 @@ jobs: - job: macOS pool: vmImage: 'macos-10.13' - strategy: - matrix: - ruby 2.6: - ruby_version: '2.6.1p33' steps: - task: UseRubyVersion@0 inputs: - versionSpec: $(ruby_version) + versionSpec: '>= 2.4' - script: | gem install bundler bundle install --retry=3 --jobs=4 From 77448726bb057c8ba90a8d12ab6e20ad60dac976 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 21:09:48 +0900 Subject: [PATCH 769/813] Do not specify ruby version of macOS --- azure-pipelines.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 555079d41..d804993f3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,9 +25,6 @@ jobs: pool: vmImage: 'macos-10.13' steps: - - task: UseRubyVersion@0 - inputs: - versionSpec: '>= 2.4' - script: | gem install bundler bundle install --retry=3 --jobs=4 From 72ffa2ea89f96df2307158fa151825dbb2c28ddf Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 21:19:01 +0900 Subject: [PATCH 770/813] use realpath --- test/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index 8e061fa45..64f7db7e2 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -28,7 +28,7 @@ class TaskManager include Rake::TaskManager end - RUBY = ENV["BUNDLE_RUBY"] || Gem.ruby + RUBY = File.realpath(ENV["BUNDLE_RUBY"] || Gem.ruby) def setup ARGV.clear From 77eb6d87cb69c2cc531f72d4aa1948054e9d077f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 4 Mar 2019 11:52:13 +0900 Subject: [PATCH 771/813] Only enabled macOS environment --- azure-pipelines.yml | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d804993f3..19cce3eeb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,26 +1,4 @@ jobs: -- job: Linux - pool: - vmImage: 'ubuntu-16.04' - strategy: - matrix: - ruby 2.3: - ruby_version: '2.3.7' - ruby 2.4: - ruby_version: '2.4.4' - ruby 2.5: - ruby_version: '2.5.1' - steps: - - task: UseRubyVersion@0 - inputs: - versionSpec: $(ruby_version) - - script: | - gem install bundler - bundle install --retry=3 --jobs=4 - displayName: 'bundle install' - - script: ruby -Ilib exe/rake - displayName: 'ruby -Ilib exe/rake' - - job: macOS pool: vmImage: 'macos-10.13' @@ -31,23 +9,3 @@ jobs: displayName: 'bundle install' - script: ruby -Ilib exe/rake displayName: 'ruby -Ilib exe/rake' - -- job: Windows - pool: - vmImage: 'vs2017-win2016' - strategy: - matrix: - ruby 2.4: - ruby_version: '2.4.3' - ruby 2.5: - ruby_version: '2.5.0' - steps: - - task: UseRubyVersion@0 - inputs: - versionSpec: $(ruby_version) - - script: | - gem install bundler - bundle install --retry=3 --jobs=4 - displayName: 'bundle install' - - script: ruby -Ilib exe/rake - displayName: 'ruby -Ilib exe/rake' From 496944a8febd51e20957e6833c7930286a0e9a25 Mon Sep 17 00:00:00 2001 From: Reece Dunham Date: Sat, 30 Mar 2019 22:15:58 -0400 Subject: [PATCH 772/813] Remove deprecated travis ci option --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index eb197f74e..b0bf3ebe3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,4 @@ language: ruby -sudo: false rvm: - 2.0.0 - 2.1.10 From 382e8047208675c9fb09e2cf9e5c4e4d3fe7ac5f Mon Sep 17 00:00:00 2001 From: Jian Weihang Date: Fri, 10 May 2019 22:22:56 +0800 Subject: [PATCH 773/813] feat: add `without_parent_dir` to `PackageTask` --- lib/rake/packagetask.rb | 19 +++++++++++++++++-- test/test_rake_package_task.rb | 12 ++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index 72fef4d5e..aeff81c29 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -79,6 +79,9 @@ class PackageTask < TaskLib # Zip command for zipped archives. The default is 'zip'. attr_accessor :zip_command + # True if parent directory should be omited (default is false) + attr_accessor :without_parent_dir + # Create a Package Task with the given name and version. Use +:noversion+ # as the version to build a package without a version or to provide a # fully-versioned package name. @@ -102,6 +105,7 @@ def init(name, version) @need_zip = false @tar_command = "tar" @zip_command = "zip" + @without_parent_dir = false end # Create the tasks defined by this task library. @@ -132,7 +136,8 @@ def define task package: ["#{package_dir}/#{file}"] file "#{package_dir}/#{file}" => [package_dir_path] + package_files do - chdir(package_dir) { sh @tar_command, "#{flag}cvf", file, package_name } + chdir(working_dir) { sh @tar_command, "#{flag}cvf", file, target_dir } + mv "#{package_dir_path}/#{target_dir}", package_dir if without_parent_dir end end end @@ -141,7 +146,8 @@ def define task package: ["#{package_dir}/#{zip_file}"] file "#{package_dir}/#{zip_file}" => [package_dir_path] + package_files do - chdir(package_dir) { sh @zip_command, "-r", zip_file, package_name } + chdir(working_dir) { sh @zip_command, "-r", zip_file, target_dir } + mv "#{package_dir_path}/#{zip_file}", package_dir if without_parent_dir end end @@ -202,6 +208,15 @@ def tar_xz_file def zip_file "#{package_name}.zip" end + + def working_dir + without_parent_dir ? package_dir_path : package_dir + end + + # target directory relative to working_dir + def target_dir + without_parent_dir ? "." : package_name + end end end diff --git a/test/test_rake_package_task.rb b/test/test_rake_package_task.rb index d3886f8ca..25a1baa95 100644 --- a/test/test_rake_package_task.rb +++ b/test/test_rake_package_task.rb @@ -78,4 +78,16 @@ def test_package_name_noversion assert_equal "a", pkg.package_name end + def test_without_parent_dir + pkg = Rake::PackageTask.new("foo", :noversion) + + assert_equal "pkg", pkg.working_dir + assert_equal "foo", pkg.target_dir + + pkg.without_parent_dir = true + + assert_equal "pkg/foo", pkg.working_dir + assert_equal ".", pkg.target_dir + end + end From be62efb6cdfc2cc00d660f8fc7d6c1c9de8014e2 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 15 May 2019 09:14:08 +0900 Subject: [PATCH 774/813] Removed gitignore from gemspec files. --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index ddc9f2a61..66c567ca9 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -24,7 +24,7 @@ Rake has the following features: s.licenses = ["MIT".freeze] s.files = %x[git ls-files -z].split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } - - %w[.rubocop.yml .travis.yml appveyor.yml] + %w[.rubocop.yml .gitignore .travis.yml appveyor.yml] s.bindir = "exe" s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) } s.require_paths = ["lib".freeze] From 5b8f8fc41a5d7d7d6a5d767e48464c60884d3aee Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 22 Jul 2019 10:23:43 +0900 Subject: [PATCH 775/813] Use File.open explicitly. --- lib/rake/file_list.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index 15ea4b36d..22c339f24 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -294,7 +294,7 @@ def egrep(pattern, *options) matched = 0 each do |fn| begin - open(fn, "r", *options) do |inf| + File.open(fn, "r", *options) do |inf| count = 0 inf.each do |line| count += 1 From 5c87c462b64aad674ebb92b1f5b0ff2c911406cd Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 22 Jul 2019 10:26:42 +0900 Subject: [PATCH 776/813] Bump version to 12.3.3. --- History.rdoc | 11 +++++++++++ lib/rake/version.rb | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 455b27dd9..16b6331a1 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,14 @@ +=== 12.3.3 + +==== Bug fixes + +* Use the application's name in error message if a task is not found. + Pull Request #303 by tmatilai + +==== Enhancements: + +* Use File.open explicitly. + === 12.3.2 ==== Bug fixes diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 53ba15e0e..6014e9322 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Rake - VERSION = "12.3.2" + VERSION = "12.3.3" module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "." From a232f0204c636dc6b42c7bffef93c1d858635a05 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 9 Aug 2019 23:58:35 +0900 Subject: [PATCH 777/813] Update ruby.yml --- .github/workflows/ruby.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/ruby.yml diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml new file mode 100644 index 000000000..b61895f54 --- /dev/null +++ b/.github/workflows/ruby.yml @@ -0,0 +1,20 @@ +name: Ruby + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: Set up Ruby 2.6 + uses: actions/setup-ruby@v1 + with: + version: 2.6.x + - name: Build and test with Rake + run: | + gem install bundler + bundle install --jobs 4 --retry 3 + bundle exec rake From cfc7e48a0447cec007c9e872035e846d7fd45ff5 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 08:06:48 +0900 Subject: [PATCH 778/813] Enabled build matrix. --- .github/workflows/ruby.yml | 20 -------------------- .github/workflows/ubuntu.yml | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) delete mode 100644 .github/workflows/ruby.yml create mode 100644 .github/workflows/ubuntu.yml diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml deleted file mode 100644 index b61895f54..000000000 --- a/.github/workflows/ruby.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Ruby - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@master - - name: Set up Ruby 2.6 - uses: actions/setup-ruby@v1 - with: - version: 2.6.x - - name: Build and test with Rake - run: | - gem install bundler - bundle install --jobs 4 --retry 3 - bundle exec rake diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml new file mode 100644 index 000000000..f186d5e24 --- /dev/null +++ b/.github/workflows/ubuntu.yml @@ -0,0 +1,20 @@ +name: ubuntu + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ] + steps: + - uses: actions/checkout@master + - name: Set up Ruby + uses: actions/setup-ruby@v1 + with: + version: ${{ matrix.ruby }} + - name: Build and test with Rake + run: | + gem install minitest + ruby -Ilib exe/rake From 8017d98af33f9bd7e626afe79c09eb1c97c8ec22 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 08:09:56 +0900 Subject: [PATCH 779/813] Added Windows and macOS. --- .github/workflows/macos.yml | 20 ++++++++++++++++++++ .github/workflows/windows.yml | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/macos.yml create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..1cb08f474 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,20 @@ +name: ubuntu + +on: [push] + +jobs: + build: + runs-on: macos-latest + strategy: + matrix: + ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ] + steps: + - uses: actions/checkout@master + - name: Set up Ruby + uses: actions/setup-ruby@v1 + with: + version: ${{ matrix.ruby }} + - name: Build and test with Rake + run: | + gem install minitest + ruby -Ilib exe/rake diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 000000000..f3930c50c --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,20 @@ +name: ubuntu + +on: [push] + +jobs: + build: + runs-on: windows-latest + strategy: + matrix: + ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ] + steps: + - uses: actions/checkout@master + - name: Set up Ruby + uses: actions/setup-ruby@v1 + with: + version: ${{ matrix.ruby }} + - name: Build and test with Rake + run: | + gem install minitest + ruby -Ilib exe/rake From 42060431d50fb50c6a2c9dd38fb68c3e5890671c Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 08:10:30 +0900 Subject: [PATCH 780/813] Fixed build names. --- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 1cb08f474..f991a6230 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,4 +1,4 @@ -name: ubuntu +name: macos on: [push] diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f3930c50c..624394de3 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,4 +1,4 @@ -name: ubuntu +name: windows on: [push] From a4dc9e07dc007937137779cf564aae657b4ed025 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 08:12:51 +0900 Subject: [PATCH 781/813] Windows env only provide Ruby 2.4+ --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 624394de3..c0a2c4b39 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -7,7 +7,7 @@ jobs: runs-on: windows-latest strategy: matrix: - ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ] + ruby: [ '2.6.x', '2.5.x', '2.4.x' ] steps: - uses: actions/checkout@master - name: Set up Ruby From 0544f30f32a4029f50c7f2a8233e8ce7b0ff71f8 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 08:14:21 +0900 Subject: [PATCH 782/813] setup-ruby is not support macOS env. --- .github/workflows/macos.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f991a6230..3d7f3d93d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -5,15 +5,8 @@ on: [push] jobs: build: runs-on: macos-latest - strategy: - matrix: - ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ] steps: - uses: actions/checkout@master - - name: Set up Ruby - uses: actions/setup-ruby@v1 - with: - version: ${{ matrix.ruby }} - name: Build and test with Rake run: | gem install minitest From db19b5651b1d184c6ed5dab48baeb449f49c2f9c Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 08:17:30 +0900 Subject: [PATCH 783/813] Split install and test tasks. --- .github/workflows/macos.yml | 8 ++++---- .github/workflows/ubuntu.yml | 8 ++++---- .github/workflows/windows.yml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3d7f3d93d..b1d5cb47c 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -7,7 +7,7 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@master - - name: Build and test with Rake - run: | - gem install minitest - ruby -Ilib exe/rake + - name: Install dependencies + run: gem install minitest + - name: Run test + run: ruby -Ilib exe/rake diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index f186d5e24..e42be3dda 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -14,7 +14,7 @@ jobs: uses: actions/setup-ruby@v1 with: version: ${{ matrix.ruby }} - - name: Build and test with Rake - run: | - gem install minitest - ruby -Ilib exe/rake + - name: Install dependencies + run: gem install minitest + - name: Run test + run: ruby -Ilib exe/rake diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c0a2c4b39..6fea96fb7 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -14,7 +14,7 @@ jobs: uses: actions/setup-ruby@v1 with: version: ${{ matrix.ruby }} - - name: Build and test with Rake - run: | - gem install minitest - ruby -Ilib exe/rake + - name: Install dependencies + run: gem install minitest + - name: Run test + run: ruby -Ilib exe/rake From 116df91231135540719908a4a607fc8fdb9b20e8 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 08:18:48 +0900 Subject: [PATCH 784/813] Removed duplicated tasks with GitHub Actions. --- .travis.yml | 9 +-------- appveyor.yml | 23 ----------------------- azure-pipelines.yml | 11 ----------- 3 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 appveyor.yml delete mode 100644 azure-pipelines.yml diff --git a/.travis.yml b/.travis.yml index b0bf3ebe3..560a3449a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,12 @@ language: ruby rvm: - - 2.0.0 - - 2.1.10 - - 2.2.10 - - 2.3.8 - - 2.4.5 - - 2.5.3 - - 2.6.1 - ruby-head - jruby-9.2.4.0 - jruby-head matrix: include: - - rvm: 2.5.3 + - rvm: ruby-head env: COVERALLS=yes before_script: diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index fa978bb4a..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -clone_depth: 10 -install: - - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - - gem install minitest -build: off -test_script: - - ruby -Ilib exe/rake -deploy: off -environment: - matrix: - - ruby_version: "200" - - ruby_version: "200-x64" - - ruby_version: "21" - - ruby_version: "21-x64" - - ruby_version: "22" - - ruby_version: "22-x64" - - ruby_version: "23" - - ruby_version: "23-x64" - - ruby_version: "24" - - ruby_version: "24-x64" - - ruby_version: "25" - - ruby_version: "25-x64" diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 19cce3eeb..000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,11 +0,0 @@ -jobs: -- job: macOS - pool: - vmImage: 'macos-10.13' - steps: - - script: | - gem install bundler - bundle install --retry=3 --jobs=4 - displayName: 'bundle install' - - script: ruby -Ilib exe/rake - displayName: 'ruby -Ilib exe/rake' From 81c9ca24c9371eb9bdf3ea118a9cdd20cb9ba601 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 09:21:53 +0900 Subject: [PATCH 785/813] Removed the badge of appveyor. --- README.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index ab136b85d..58e504e33 100644 --- a/README.rdoc +++ b/README.rdoc @@ -3,7 +3,7 @@ home :: https://github.com/ruby/rake bugs :: https://github.com/ruby/rake/issues docs :: https://ruby.github.io/rake -build status :: {travis-ci}[https://travis-ci.org/ruby/rake] {appveyor}[https://ci.appveyor.com/project/ruby/rake] +build status :: {travis-ci}[https://travis-ci.org/ruby/rake] == Description From e3c306c4a8d67e381d1abe1ac66b233066798fd0 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 13:59:05 +0900 Subject: [PATCH 786/813] Try to use rvm on GitHub Actions --- .github/workflows/ubuntu-rvm.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/ubuntu-rvm.yml diff --git a/.github/workflows/ubuntu-rvm.yml b/.github/workflows/ubuntu-rvm.yml new file mode 100644 index 000000000..9eb37efc6 --- /dev/null +++ b/.github/workflows/ubuntu-rvm.yml @@ -0,0 +1,28 @@ +name: ubuntu-rvm + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: [ 'jruby-head', 'jruby-9.2.4.0', 'ruby-head' ] + steps: + - uses: actions/checkout@master + - name: Set up RVM + run: | + curl -sSL https://get.rvm.io | bash + - name: Set up Ruby + run: | + source $HOME/.rvm/scripts/rvm + rvm install ${{ matrix.ruby }} --binary + rvm --default use ${{ matrix.ruby }} + - name: Install dependencies + run: | + source $HOME/.rvm/scripts/rvm + gem install minitest + - name: Run test + run: | + source $HOME/.rvm/scripts/rvm + ruby -Ilib exe/rake From c2868b7728e4907d38d2a1b07ba8f7fb5100b80a Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 14:04:52 +0900 Subject: [PATCH 787/813] Enabled coveralls service on macOS env. --- .github/workflows/macos.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index b1d5cb47c..f567d63d2 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -10,4 +10,6 @@ jobs: - name: Install dependencies run: gem install minitest - name: Run test + env: + COVERALLS: "yes" run: ruby -Ilib exe/rake From 516c95e159d9d43f86b5bf72b43d0ccd46b8f398 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 14:08:08 +0900 Subject: [PATCH 788/813] Good bye Travis. Thanks for your contribution. --- .travis.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 560a3449a..000000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: ruby -rvm: - - ruby-head - - jruby-9.2.4.0 - - jruby-head - -matrix: - include: - - rvm: ruby-head - env: COVERALLS=yes - -before_script: - - unset JRUBY_OPTS - - unset _JAVA_OPTIONS - - if ruby -e "exit RUBY_VERSION >= '2.3.0'"; then gem update --system=3.0.1; else gem update --system=2.7.8; fi - -script: ruby -Ilib exe/rake From d06f086872bb6770614f58bae40f3781f76f574b Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 09:24:05 +0900 Subject: [PATCH 789/813] Use Gemfile instead of Gem::Specification#add_development_dependency. --- Gemfile | 8 ++++++++ rake.gemspec | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index b4e2a20bb..f0eb2bc9f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,11 @@ source "https://rubygems.org" gemspec + +group :development do + gem "bundler" + gem "minitest" + gem "rdoc" + gem "coveralls" + gem "rubocop" +end diff --git a/rake.gemspec b/rake.gemspec index 66c567ca9..1fb4515f1 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -33,10 +33,4 @@ Rake has the following features: s.rubygems_version = "2.6.1".freeze s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] - - s.add_development_dependency(%q.freeze) - s.add_development_dependency(%q.freeze) - s.add_development_dependency(%q.freeze) - s.add_development_dependency(%q.freeze) - s.add_development_dependency(%q.freeze) end From 74262fe6f0304aabd9b5fc250acbef0bd2133da7 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 09:24:37 +0900 Subject: [PATCH 790/813] Removed rdoc. --- Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Gemfile b/Gemfile index f0eb2bc9f..8bcbf50a7 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,6 @@ gemspec group :development do gem "bundler" gem "minitest" - gem "rdoc" gem "coveralls" gem "rubocop" end From 3e0c46b01e2b7d7fb6bcd9ee15c3cd291a7e79c8 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 10 Aug 2019 15:21:37 +0900 Subject: [PATCH 791/813] Removed status badge of Travis. --- README.rdoc | 1 - 1 file changed, 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 58e504e33..5f0278d8e 100644 --- a/README.rdoc +++ b/README.rdoc @@ -3,7 +3,6 @@ home :: https://github.com/ruby/rake bugs :: https://github.com/ruby/rake/issues docs :: https://ruby.github.io/rake -build status :: {travis-ci}[https://travis-ci.org/ruby/rake] == Description From b7da5b97cacd700fd7c9538a3127809308c49bb8 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 19 Aug 2019 20:19:51 +0900 Subject: [PATCH 792/813] Use the latest version of JRuby --- .github/workflows/ubuntu-rvm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu-rvm.yml b/.github/workflows/ubuntu-rvm.yml index 9eb37efc6..07138f092 100644 --- a/.github/workflows/ubuntu-rvm.yml +++ b/.github/workflows/ubuntu-rvm.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ 'jruby-head', 'jruby-9.2.4.0', 'ruby-head' ] + ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'ruby-head' ] steps: - uses: actions/checkout@master - name: Set up RVM From 2c1a7ec6666a6e8bf5e329d0a82d278008554a08 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 19 Aug 2019 20:20:31 +0900 Subject: [PATCH 793/813] Added the old versions --- .github/workflows/ubuntu-rvm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu-rvm.yml b/.github/workflows/ubuntu-rvm.yml index 07138f092..09988add6 100644 --- a/.github/workflows/ubuntu-rvm.yml +++ b/.github/workflows/ubuntu-rvm.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'ruby-head' ] + ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'ruby-head', "2.0", "2.1", "2.2", "2.3" ] steps: - uses: actions/checkout@master - name: Set up RVM From 124de86913972c064b628b83be8ffc539e1f01f3 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 19 Aug 2019 20:25:49 +0900 Subject: [PATCH 794/813] Set the explicitly versions. --- .github/workflows/ubuntu-rvm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu-rvm.yml b/.github/workflows/ubuntu-rvm.yml index 09988add6..0b6bbae68 100644 --- a/.github/workflows/ubuntu-rvm.yml +++ b/.github/workflows/ubuntu-rvm.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'ruby-head', "2.0", "2.1", "2.2", "2.3" ] + ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'ruby-head', "2.0.0-p648", "2.1.10", "2.2.10", "2.3.8" ] steps: - uses: actions/checkout@master - name: Set up RVM From 663acd5e5b3af905af4bd018967d7d9663696c41 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 19 Aug 2019 20:33:07 +0900 Subject: [PATCH 795/813] There is no binaries of 2.0 and 2.1 on RVM --- .github/workflows/ubuntu-rvm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu-rvm.yml b/.github/workflows/ubuntu-rvm.yml index 0b6bbae68..b5dce9e0f 100644 --- a/.github/workflows/ubuntu-rvm.yml +++ b/.github/workflows/ubuntu-rvm.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'ruby-head', "2.0.0-p648", "2.1.10", "2.2.10", "2.3.8" ] + ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'ruby-head', 2.2.10", "2.3.8" ] steps: - uses: actions/checkout@master - name: Set up RVM From e7b12dfe554d81dcd906f0a53b3cbd9ddc0c5f38 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 19 Aug 2019 20:34:51 +0900 Subject: [PATCH 796/813] Added truffleruby --- .github/workflows/ubuntu-rvm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu-rvm.yml b/.github/workflows/ubuntu-rvm.yml index b5dce9e0f..1d7aa2a33 100644 --- a/.github/workflows/ubuntu-rvm.yml +++ b/.github/workflows/ubuntu-rvm.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'ruby-head', 2.2.10", "2.3.8" ] + ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'truffleruby', 'ruby-head', 2.2.10", "2.3.8" ] steps: - uses: actions/checkout@master - name: Set up RVM From c728f8f40565618ce0274fcf7a0c1f2838007bbc Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 19 Aug 2019 20:40:33 +0900 Subject: [PATCH 797/813] 2.3 is provided by GitHub Actions, We need to switch 2.1. --- .github/workflows/ubuntu-rvm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu-rvm.yml b/.github/workflows/ubuntu-rvm.yml index 1d7aa2a33..2bebfd10b 100644 --- a/.github/workflows/ubuntu-rvm.yml +++ b/.github/workflows/ubuntu-rvm.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'truffleruby', 'ruby-head', 2.2.10", "2.3.8" ] + ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'truffleruby', 'ruby-head', '2.2.10', '2.1.10' ] steps: - uses: actions/checkout@master - name: Set up RVM From ec19e59ac7fa41feed38a0bc95040666713c580f Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 19 Aug 2019 20:43:23 +0900 Subject: [PATCH 798/813] 2.1 is not provided by binary installation --- .github/workflows/ubuntu-rvm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu-rvm.yml b/.github/workflows/ubuntu-rvm.yml index 2bebfd10b..b807d35d0 100644 --- a/.github/workflows/ubuntu-rvm.yml +++ b/.github/workflows/ubuntu-rvm.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'truffleruby', 'ruby-head', '2.2.10', '2.1.10' ] + ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'truffleruby', 'ruby-head', '2.2.10' ] steps: - uses: actions/checkout@master - name: Set up RVM From f19222ffae9168d4c4d2867f14de06df89febad2 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 20 Aug 2019 09:39:04 +0900 Subject: [PATCH 799/813] Removed truffleruby temporary. https://github.com/oracle/truffleruby/issues/1739#issuecomment-522546333 --- .github/workflows/ubuntu-rvm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu-rvm.yml b/.github/workflows/ubuntu-rvm.yml index b807d35d0..5b5cf8391 100644 --- a/.github/workflows/ubuntu-rvm.yml +++ b/.github/workflows/ubuntu-rvm.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'truffleruby', 'ruby-head', '2.2.10' ] + ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'ruby-head', '2.2.10' ] steps: - uses: actions/checkout@master - name: Set up RVM From f4c27adbaff841c2fd3b7e66e827468f3e38fab5 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 26 Aug 2019 22:05:04 +0900 Subject: [PATCH 800/813] Try to use setup-ruby on macos --- .github/workflows/macos.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f567d63d2..1c52cc0c3 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -5,8 +5,15 @@ on: [push] jobs: build: runs-on: macos-latest + strategy: + matrix: + ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ] steps: - uses: actions/checkout@master + - name: Set up Ruby + uses: actions/setup-ruby@v1 + with: + version: ${{ matrix.ruby }} - name: Install dependencies run: gem install minitest - name: Run test From 4d745f83ad15827e2cb92329356ccc24dcb8bbcd Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 31 Aug 2019 22:00:51 +0900 Subject: [PATCH 801/813] Drop old ruby versions which are no longer tested --- rake.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake.gemspec b/rake.gemspec index 1fb4515f1..20591cb36 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -29,7 +29,7 @@ Rake has the following features: s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) } s.require_paths = ["lib".freeze] - s.required_ruby_version = Gem::Requirement.new(">= 2.0.0".freeze) + s.required_ruby_version = Gem::Requirement.new(">= 2.2".freeze) s.rubygems_version = "2.6.1".freeze s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] From a24f841926b182032fe6bd493c28d2f865cf5e5e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 31 Aug 2019 23:59:57 +0900 Subject: [PATCH 802/813] Removed stale skips --- test/test_rake_application.rb | 3 --- test/test_rake_backtrace.rb | 2 -- test/test_rake_file_list.rb | 1 - test/test_rake_task_with_arguments.rb | 3 --- 4 files changed, 9 deletions(-) diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 27645ea12..8514da354 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -77,9 +77,6 @@ def test_display_exception_details_bad_encoding end def test_display_exception_details_cause - skip "Exception#cause not implemented" unless - Exception.method_defined? :cause - begin raise "cause a" rescue diff --git a/test/test_rake_backtrace.rb b/test/test_rake_backtrace.rb index 27e3cecb7..05a2dfda1 100644 --- a/test/test_rake_backtrace.rb +++ b/test/test_rake_backtrace.rb @@ -13,7 +13,6 @@ def test_bin_rake_suppressed def test_system_dir_suppressed path = RbConfig::CONFIG["rubylibprefix"] - skip if path.nil? path = File.expand_path path paths = [path + ":12"] @@ -25,7 +24,6 @@ def test_system_dir_suppressed def test_near_system_dir_isnt_suppressed path = RbConfig::CONFIG["rubylibprefix"] - skip if path.nil? path = File.expand_path path paths = [" " + path + ":12"] diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 97ab99828..853ebc8d9 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -212,7 +212,6 @@ def test_exclude_with_string_return_on_create end def test_exclude_curly_bracket_pattern - skip "brace pattern matches not supported" unless defined? File::FNM_EXTGLOB fl = FileList["*"].exclude("{abc,xyz}.c") assert_equal %w[abc.h abc.x cfiles existing x.c xyzzy.txt], fl end diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index 46edcd112..36dfa2646 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -82,9 +82,6 @@ def test_actions_of_various_arity_are_ok_with_args end def test_actions_adore_keywords - # A brutish trick to avoid parsing. Remove it once support for 1.9 and 2.0 is dropped - # https://ci.appveyor.com/project/ruby/rake/build/1.0.301 - skip "Keywords aren't a feature in this version" if RUBY_VERSION =~ /^1|^2\.0/ # https://github.com/ruby/rake/pull/174#issuecomment-263460761 skip if jruby9? eval <<-RUBY, binding, __FILE__, __LINE__+1 From 6c0626da3a7af0cba1bdead219e96e5689dc1540 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 31 Aug 2019 23:48:47 +0900 Subject: [PATCH 803/813] Reduce repeated code --- lib/rake/file_utils.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index dc434c8d9..00c9c9dca 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -111,16 +111,14 @@ def ruby(*args, &block) # Attempt to do a normal file link, but fall back to a copy if the link # fails. def safe_ln(*args) - if !LN_SUPPORTED[0] - cp(*args) - else + if LN_SUPPORTED[0] begin - ln(*args) + return ln(*args) rescue StandardError, NotImplementedError LN_SUPPORTED[0] = false - cp(*args) end end + cp(*args) end # Split a file path into individual directory names. From baa23cc8a8cc624bc8f46c8a55d2f0caade568ea Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 31 Aug 2019 22:24:24 +0900 Subject: [PATCH 804/813] Update keyword arguments merger --- lib/rake/clean.rb | 4 ++-- lib/rake/file_utils.rb | 13 ++++++------- lib/rake/file_utils_ext.rb | 23 ++++++----------------- lib/rake/task.rb | 6 +++++- test/test_rake_file_utils.rb | 16 ++++++++++++++++ 5 files changed, 35 insertions(+), 27 deletions(-) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index 5af44015e..b52e832a9 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -28,10 +28,10 @@ def cleanup_files(file_names) end end - def cleanup(file_name, opts={}) + def cleanup(file_name, **opts) begin opts = { verbose: Rake.application.options.trace }.merge(opts) - rm_r file_name, opts + rm_r file_name, **opts rescue StandardError => ex puts "Failed to remove #{file_name}: #{ex}" unless file_already_gone?(file_name) end diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index 00c9c9dca..e979eedb2 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -97,12 +97,11 @@ def set_verbose_option(options) # :nodoc: # Example: # ruby %{-pe '$_.upcase!' 1 - sh(*([RUBY] + args + [options]), &block) + sh(RUBY, *args, **options, &block) else - sh("#{RUBY} #{args.first}", options, &block) + sh("#{RUBY} #{args.first}", **options, &block) end end @@ -110,15 +109,15 @@ def ruby(*args, &block) # Attempt to do a normal file link, but fall back to a copy if the link # fails. - def safe_ln(*args) + def safe_ln(*args, **options) if LN_SUPPORTED[0] begin - return ln(*args) + return options.empty? ? ln(*args) : ln(*args, **options) rescue StandardError, NotImplementedError LN_SUPPORTED[0] = false end end - cp(*args) + options.empty? ? cp(*args) : cp(*args, **options) end # Split a file path into individual directory names. diff --git a/lib/rake/file_utils_ext.rb b/lib/rake/file_utils_ext.rb index bf558b749..e91ad595f 100644 --- a/lib/rake/file_utils_ext.rb +++ b/lib/rake/file_utils_ext.rb @@ -23,19 +23,18 @@ class << self opts = FileUtils.options_of name default_options = [] if opts.include?("verbose") - default_options << ":verbose => FileUtilsExt.verbose_flag" + default_options << "verbose: FileUtilsExt.verbose_flag" end if opts.include?("noop") - default_options << ":noop => FileUtilsExt.nowrite_flag" + default_options << "noop: FileUtilsExt.nowrite_flag" end next if default_options.empty? module_eval(<<-EOS, __FILE__, __LINE__ + 1) - def #{name}( *args, &block ) - super( - *rake_merge_option(args, - #{default_options.join(', ')} - ), &block) + def #{name}(*args, **options, &block) + super(*args, + #{default_options.join(', ')}, + **options, &block) end EOS end @@ -113,16 +112,6 @@ def when_writing(msg=nil) end end - # Merge the given options with the default values. - def rake_merge_option(args, defaults) - if Hash === args.last - defaults.update(args.last) - args.pop - end - args.push defaults - args - end - # Send the message to the default rake output (which is $stderr). def rake_output_message(message) $stderr.puts(message) diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 7629732f6..80824f37b 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -274,7 +274,11 @@ def execute(args=nil) end application.trace "** Execute #{name}" if application.options.trace application.enhance_with_matching_rule(name) if @actions.empty? - @actions.each { |act| act.call(self, args) } + if opts = Hash.try_convert(args) and !opts.empty? + @actions.each { |act| act.call(self, args, **opts)} + else + @actions.each { |act| act.call(self, args)} + end end # Is this task needed? diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 7e9674fdc..ebedd56b2 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -39,6 +39,22 @@ def test_rm_filelist refute File.exist?("b") end + def test_rm_nowrite + create_file("a") + nowrite(true) { + rm_rf "a" + } + assert File.exist?("a") + nowrite(false) { + rm_rf "a", noop: true + } + assert File.exist?("a") + nowrite(true) { + rm_rf "a", noop: false + } + refute File.exist?("a") + end + def test_ln open("a", "w") { |f| f.puts "TEST_LN" } From ab835523b29543092e31a81d7d620b7d90b1678c Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 9 Sep 2019 15:54:11 +0900 Subject: [PATCH 805/813] bump version to 13.0.0.pre.1 --- History.rdoc | 15 +++++++++++++++ lib/rake/version.rb | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 16b6331a1..afdfde5ac 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,18 @@ +=== 13.0.0.pre.1 + +==== Enhancements + +* Follows recent changes on keyword arguments in ruby 2.7. + Pull Request #326 by nobu +* Make `PackageTask` be able to omit parent directory while packing files + Pull Request #310 by tonytonyjan +* Add order only dependency + Pull Request #269 by take-cheeze + +==== Compatibility changes + +* Drop old ruby versions(< 2.2) + === 12.3.3 ==== Bug fixes diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 6014e9322..b0d7dfa64 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Rake - VERSION = "12.3.3" + VERSION = "13.0.0.pre.1" module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "." From c84887d4607c672fda66b62ba4b1c970ac0ce94f Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 10 Sep 2019 19:13:28 +0900 Subject: [PATCH 806/813] Use RUBY insted of BUNDLE_RUBY for test-bundled-gems of ruby/ruby. --- test/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index 64f7db7e2..32456fde4 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -28,7 +28,7 @@ class TaskManager include Rake::TaskManager end - RUBY = File.realpath(ENV["BUNDLE_RUBY"] || Gem.ruby) + RUBY = File.realpath(ENV["RUBY"] || Gem.ruby) def setup ARGV.clear From d8aba43cfe7c42b16856c85dcc6ee3e2b9aff01c Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 24 Sep 2019 21:27:05 +0900 Subject: [PATCH 807/813] Prepare to release rake 13 --- History.rdoc | 2 +- lib/rake/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/History.rdoc b/History.rdoc index afdfde5ac..3d0b53d1d 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,4 +1,4 @@ -=== 13.0.0.pre.1 +=== 13.0.0 ==== Enhancements diff --git a/lib/rake/version.rb b/lib/rake/version.rb index b0d7dfa64..7f47740c1 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Rake - VERSION = "13.0.0.pre.1" + VERSION = "13.0.0" module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "." From 00aacdcf70309a17de2580fb380ed29f2d0fb6f7 Mon Sep 17 00:00:00 2001 From: Matthew Bellantoni Date: Fri, 27 Sep 2019 16:18:12 -0400 Subject: [PATCH 808/813] Fix an incorrectly resolved arg pattern --- lib/rake/task_manager.rb | 4 ++-- test/test_rake_task_manager_argument_resolution.rb | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 1d3cb1cfa..6da31f97f 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -133,8 +133,8 @@ def resolve_args_with_dependencies(args, hash) # :nodoc: deps = value || [] else task_name = args.shift - arg_names = key - deps = value + arg_names = key || args.shift|| [] + deps = value || [] end deps = [deps] unless deps.respond_to?(:to_ary) [task_name, arg_names, deps, order_only] diff --git a/test/test_rake_task_manager_argument_resolution.rb b/test/test_rake_task_manager_argument_resolution.rb index 6539343ac..21e28a951 100644 --- a/test/test_rake_task_manager_argument_resolution.rb +++ b/test/test_rake_task_manager_argument_resolution.rb @@ -8,9 +8,16 @@ def test_good_arg_patterns assert_equal [:t, [], [:x], nil], task(t: :x) assert_equal [:t, [], [:x, :y], nil], task(t: [:x, :y]) + assert_equal [:t, [], [], [:m]], task(:t, order_only: [:m]) + assert_equal [:t, [], [:x, :y], [:m, :n]], task(t: [:x, :y], order_only: [:m, :n]) + assert_equal [:t, [:a, :b], [], nil], task(:t, [:a, :b]) assert_equal [:t, [:a, :b], [:x], nil], task(:t, [:a, :b] => :x) assert_equal [:t, [:a, :b], [:x, :y], nil], task(:t, [:a, :b] => [:x, :y]) + + assert_equal [:t, [:a, :b], [], [:m]], task(:t, [:a, :b], order_only: [:m]) + assert_equal [:t, [:a, :b], [:x], [:m]], task(:t, [:a, :b] => :x, order_only: [:m]) + assert_equal [:t, [:a, :b], [:x, :y], [:m, :n]], task(:t, [:a, :b] => [:x, :y], order_only: [:m, :n]) end def task(*args) From 46a8f7cbd4072431eb16e8e0858d556797ce677e Mon Sep 17 00:00:00 2001 From: Matthew Bellantoni Date: Fri, 27 Sep 2019 16:23:58 -0400 Subject: [PATCH 809/813] Update comments to reflect the current state --- lib/rake/task_manager.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 6da31f97f..97e3b9459 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -83,8 +83,8 @@ def synthesize_file_task(task_name) # :nodoc: define_task(Rake::FileTask, task_name) end - # Resolve the arguments for a task/rule. Returns a triplet of - # [task_name, arg_name_list, prerequisites]. + # Resolve the arguments for a task/rule. Returns a tuple of + # [task_name, arg_name_list, prerequisites, order_only_prerequisites]. def resolve_args(args) if args.last.is_a?(Hash) deps = args.pop @@ -118,8 +118,11 @@ def resolve_args_without_dependencies(args) # # The patterns recognized by this argument resolving function are: # + # task :t, order_only: [:e] # task :t => [:d] + # task :t => [:d], order_only: [:e] # task :t, [a] => [:d] + # task :t, [a] => [:d], order_only: [:e] # def resolve_args_with_dependencies(args, hash) # :nodoc: fail "Task Argument Error" if From c3953d4b2935895e1bb4596c435653d3a865711a Mon Sep 17 00:00:00 2001 From: Orien Madgwick <_@orien.io> Date: Wed, 2 Oct 2019 23:06:46 +1000 Subject: [PATCH 810/813] Add project metadata to the gemspec As per https://guides.rubygems.org/specification-reference/#metadata, add metadata to the gemspec file. This'll allow people to more easily access the source code, raise issues and read the changelog. These `bug_tracker_uri`, `changelog_uri`, `documentation_uri`, and `source_code_uri` links will appear on the rubygems page at https://rubygems.org/gems/rake and be available via the Rubygems API after the next release. --- rake.gemspec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rake.gemspec b/rake.gemspec index 20591cb36..ecdec7299 100644 --- a/rake.gemspec +++ b/rake.gemspec @@ -23,6 +23,13 @@ Rake has the following features: s.homepage = "https://github.com/ruby/rake".freeze s.licenses = ["MIT".freeze] + s.metadata = { + "bug_tracker_uri" => "https://github.com/ruby/rake/issues", + "changelog_uri" => "https://github.com/ruby/rake/blob/v#{s.version}/History.rdoc", + "documentation_uri" => "https://ruby.github.io/rake", + "source_code_uri" => "https://github.com/ruby/rake/tree/v#{s.version}", + } + s.files = %x[git ls-files -z].split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } - %w[.rubocop.yml .gitignore .travis.yml appveyor.yml] s.bindir = "exe" From 4dc6282eb24c0117a012d07744ea1bbcae1b3a79 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Fri, 4 Oct 2019 09:06:44 -0700 Subject: [PATCH 811/813] Skip a taint test on Ruby 2.7 Ruby 2.7 is deprecating taint, and taint will no longer have an effect. See https://bugs.ruby-lang.org/issues/16131. This just skips the test for FileList#clone and #dup copying the taint flag on Ruby 2.7+. --- test/test_rake_file_list.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 853ebc8d9..eda55d29f 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -496,13 +496,15 @@ def test_clone_and_dup assert_equal ["a", "b", "c"], d end - def test_dup_and_clone_replicate_taint - a = FileList["a", "b", "c"] - a.taint - c = a.clone - d = a.dup - assert c.tainted?, "Clone should be tainted" - assert d.tainted?, "Dup should be tainted" + if RUBY_VERSION < '2.7' + def test_dup_and_clone_replicate_taint + a = FileList["a", "b", "c"] + a.taint + c = a.clone + d = a.dup + assert c.tainted?, "Clone should be tainted" + assert d.tainted?, "Dup should be tainted" + end end def test_duped_items_will_thaw From 8edd860cd0fc9035bda472ef45110a40889b9627 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 12 Nov 2019 12:27:50 +0900 Subject: [PATCH 812/813] Fixed build failure of the latest GitHub Actions --- .github/workflows/macos.yml | 4 ++-- .github/workflows/ubuntu-rvm.yml | 2 +- .github/workflows/ubuntu.yml | 4 ++-- .github/workflows/windows.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 1c52cc0c3..2dbc56a36 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -7,13 +7,13 @@ jobs: runs-on: macos-latest strategy: matrix: - ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ] + ruby: [ '2.6.x', '2.5.x', '2.4.x' ] steps: - uses: actions/checkout@master - name: Set up Ruby uses: actions/setup-ruby@v1 with: - version: ${{ matrix.ruby }} + ruby-version: ${{ matrix.ruby }} - name: Install dependencies run: gem install minitest - name: Run test diff --git a/.github/workflows/ubuntu-rvm.yml b/.github/workflows/ubuntu-rvm.yml index 5b5cf8391..cf3d1d05b 100644 --- a/.github/workflows/ubuntu-rvm.yml +++ b/.github/workflows/ubuntu-rvm.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ 'jruby-head', 'jruby-9.2.8.0', 'ruby-head', '2.2.10' ] + ruby: [ 'jruby-head', 'jruby-9.2.9.0', 'ruby-head', '2.3.8', '2.2.10' ] steps: - uses: actions/checkout@master - name: Set up RVM diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index e42be3dda..b67130ad8 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -7,13 +7,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ] + ruby: [ '2.6.x', '2.5.x', '2.4.x' ] steps: - uses: actions/checkout@master - name: Set up Ruby uses: actions/setup-ruby@v1 with: - version: ${{ matrix.ruby }} + ruby-version: ${{ matrix.ruby }} - name: Install dependencies run: gem install minitest - name: Run test diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 6fea96fb7..5ced11c45 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Ruby uses: actions/setup-ruby@v1 with: - version: ${{ matrix.ruby }} + ruby-version: ${{ matrix.ruby }} - name: Install dependencies run: gem install minitest - name: Run test From c8251e2299616d8126e4ac7426e0bb87df7e6922 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 12 Nov 2019 12:28:15 +0900 Subject: [PATCH 813/813] Bump version to 13.0.1 --- History.rdoc | 9 +++++++++ lib/rake/version.rb | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/History.rdoc b/History.rdoc index 3d0b53d1d..119747c66 100644 --- a/History.rdoc +++ b/History.rdoc @@ -1,3 +1,12 @@ +=== 13.0.1 + +==== Bug fixes + +* Fixed bug: Reenabled task raises previous exception on second invokation + Pull Request #271 by thorsteneckel +* Fix an incorrectly resolved arg pattern + Pull Request #327 by mjbellantoni + === 13.0.0 ==== Enhancements diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 7f47740c1..b5486ba79 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Rake - VERSION = "13.0.0" + VERSION = "13.0.1" module Version # :nodoc: all MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "."