aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/CHANGELOG.md2
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb4
-rw-r--r--activesupport/lib/active_support/deprecation/reporting.rb2
-rw-r--r--railties/Rakefile29
4 files changed, 23 insertions, 14 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 3576f5c905..896fec0436 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -227,7 +227,7 @@
*Yves Senn*
-* No longer pass depreacted option `-i` to `pg_dump`.
+* No longer pass deprecated option `-i` to `pg_dump`.
*Paul Sadauskas*
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
index e2ef56798b..abf0124562 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -202,13 +202,9 @@ module ActiveRecord
# end
# end
#
- # The table definitions
- # The Columns are stored as a ColumnDefinition in the #columns attribute.
class TableDefinition
include ColumnMethods
- # An array of ColumnDefinition objects, representing the column changes
- # that have been defined.
attr_accessor :indexes
attr_reader :name, :temporary, :options, :as, :foreign_keys, :native
diff --git a/activesupport/lib/active_support/deprecation/reporting.rb b/activesupport/lib/active_support/deprecation/reporting.rb
index bbe25c9260..f89fc0fe14 100644
--- a/activesupport/lib/active_support/deprecation/reporting.rb
+++ b/activesupport/lib/active_support/deprecation/reporting.rb
@@ -83,7 +83,7 @@ module ActiveSupport
rails_gem_root = File.expand_path("../../../../..", __FILE__) + "/"
offending_line = callstack.find { |frame|
- !frame.absolute_path.start_with?(rails_gem_root)
+ frame.absolute_path && !frame.absolute_path.start_with?(rails_gem_root)
} || callstack.first
[offending_line.path, offending_line.lineno, offending_line.label]
end
diff --git a/railties/Rakefile b/railties/Rakefile
index cf130a5f14..73d881b318 100644
--- a/railties/Rakefile
+++ b/railties/Rakefile
@@ -5,20 +5,33 @@ task :default => :test
desc "Run all unit tests"
task :test => 'test:isolated'
+dash_i = [
+ 'test',
+ 'lib',
+ "#{File.dirname(__FILE__)}/../activesupport/lib",
+ "#{File.dirname(__FILE__)}/../actionpack/lib",
+ "#{File.dirname(__FILE__)}/../activemodel/lib"
+]
+
+dash_i.reverse_each do |x|
+ $:.unshift x unless $:.include? x
+end
+$-w = true
+
+require 'bundler/setup' unless defined?(Bundler)
+require 'active_support'
+
namespace :test do
task :isolated do
dirs = (ENV["TEST_DIR"] || ENV["TEST_DIRS"] || "**").split(",")
test_files = dirs.map { |dir| "test/#{dir}/*_test.rb" }
Dir[*test_files].each do |file|
next true if file.include?("fixtures")
- dash_i = [
- 'test',
- 'lib',
- "#{File.dirname(__FILE__)}/../activesupport/lib",
- "#{File.dirname(__FILE__)}/../actionpack/lib",
- "#{File.dirname(__FILE__)}/../activemodel/lib"
- ]
- ruby "-w", "-I#{dash_i.join ':'}", file
+ puts "#{FileUtils::RUBY} -w -I#{dash_i.join ':'} #{file}"
+
+ # We could run these in parallel, but pretty much all of the
+ # railties tests already run in parallel, so ¯\_(⊙︿⊙)_/¯
+ Process.waitpid fork { ARGV.clear; load file }
end
end
end