From f3353895a04dfd9a06cf1ca2e7bbfb80a38dbfad Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Tue, 3 Jul 2012 21:02:46 -0300 Subject: [PATCH 1/4] Kill not used constant since removal of runner method Runner method was removed in ada571bfcdbad669ae43a4dd18277ef227680a0b. --- .../lib/active_support/testing/setup_and_teardown.rb | 9 --------- 1 file changed, 9 deletions(-) diff --git a/activesupport/lib/active_support/testing/setup_and_teardown.rb b/activesupport/lib/active_support/testing/setup_and_teardown.rb index ddb7396aa9..a65148cf1f 100644 --- a/activesupport/lib/active_support/testing/setup_and_teardown.rb +++ b/activesupport/lib/active_support/testing/setup_and_teardown.rb @@ -4,20 +4,11 @@ require 'active_support/callbacks' module ActiveSupport module Testing module SetupAndTeardown - - PASSTHROUGH_EXCEPTIONS = [ - NoMemoryError, - SignalException, - Interrupt, - SystemExit - ] - extend ActiveSupport::Concern included do include ActiveSupport::Callbacks define_callbacks :setup, :teardown - end module ClassMethods From b5a2f24b6b2b466a5692f0d46b4a2b8154ee0e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 4 Jul 2012 08:23:51 -0300 Subject: [PATCH 2/4] Update 4.0 Release Notes Related with 17d2115e3df6caf15d554b44e28177069fa3ed5b --- guides/source/4_0_release_notes.textile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/guides/source/4_0_release_notes.textile b/guides/source/4_0_release_notes.textile index e1d6b42e6c..d430dca164 100644 --- a/guides/source/4_0_release_notes.textile +++ b/guides/source/4_0_release_notes.textile @@ -329,6 +329,20 @@ Moved into a separate gem sprockets-rails. h3. Active Record +* Add add_reference and remove_reference schema statements. Aliases, add_belongs_to and remove_belongs_to are acceptable. References are reversible. + + +# Create a user_id column +add_reference(:products, :user) + +# Create a supplier_id, supplier_type columns and appropriate index +add_reference(:products, :supplier, polymorphic: true, index: true) + +# Remove polymorphic reference +remove_reference(:products, :supplier, polymorphic: true) + + + * Add :default and :null options to column_exists?. @@ -343,7 +357,7 @@ User.where(:age => 30) # => returns the relation User.where(:age => 30).to_a # => executes the query and returns the loaded objects, as before -* Add collation and ctype support to PostgreSQL. These are available for PostgreSQL 8.4 or later. +* Add :collation and :ctype support to PostgreSQL. These are available for PostgreSQL 8.4 or later. development: From 4981fa532c32da36171e2c8dd9a073f0dc79df6b Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Wed, 4 Jul 2012 11:06:33 -0500 Subject: [PATCH 3/4] fix link and add activeresource link in release notes page [ci skip] --- guides/source/4_0_release_notes.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/source/4_0_release_notes.textile b/guides/source/4_0_release_notes.textile index d430dca164..270c0e39c5 100644 --- a/guides/source/4_0_release_notes.textile +++ b/guides/source/4_0_release_notes.textile @@ -520,7 +520,7 @@ Post.find_by! name: 'Spartacus' * Added ActiveRecord::Base#slice to return a hash of the given methods with their names as keys and returned values as values. -* Remove IdentityMap - IdentityMap has never graduated to be an "enabled-by-default" feature, due to some inconsistencies with associations, as described in this commit: https://github.com/rails/rails/commit/302c912bf6bcd0fa200d964ec2dc4a44abe328a6. Hence the removal from the codebase, until such issues are fixed. +* Remove IdentityMap - IdentityMap has never graduated to be an "enabled-by-default" feature, due to some inconsistencies with associations, as described in this "commit":https://github.com/rails/rails/commit/302c912bf6bcd0fa200d964ec2dc4a44abe328a6. Hence the removal from the codebase, until such issues are fixed. * Added a feature to dump/load internal state of +SchemaCache+ instance because we want to boot more quickly when we have many models. @@ -722,7 +722,7 @@ h4(#activemodel_deprecations). Deprecations h3. Active Resource -* Active Resource is removed from Rails 4.0 and is now a separate gem. TODO: put a link to the gem here. +* Active Resource is removed from Rails 4.0 and is now a separate "gem":https://github.com/rails/activeresource. h3. Active Support From 6f74d36c4263a6cbbc6dc32a03edeed04faefbd9 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 4 Jul 2012 11:16:21 -0700 Subject: [PATCH 4/4] activesupport gem dependencies should reflect the versions we actually use --- Gemfile | 1 - activesupport/activesupport.gemspec | 1 + activesupport/lib/active_support/test_case.rb | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 6bb6b03671..1c378c7a68 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,6 @@ else gem 'arel' end -gem 'minitest', '~> 3.2.0' gem 'mocha', '>= 0.11.2', :require => false gem 'rack-test', github: "brynary/rack-test" gem 'bcrypt-ruby', '~> 3.0.0' diff --git a/activesupport/activesupport.gemspec b/activesupport/activesupport.gemspec index fa38d5c1e3..836bc2f9cf 100644 --- a/activesupport/activesupport.gemspec +++ b/activesupport/activesupport.gemspec @@ -22,4 +22,5 @@ Gem::Specification.new do |s| s.add_dependency('i18n', '~> 0.6') s.add_dependency('multi_json', '~> 1.3') s.add_dependency('tzinfo', '~> 0.3.33') + s.add_dependency('minitest', '~> 3.2') end diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb index b6abc3b561..a6f3b43792 100644 --- a/activesupport/lib/active_support/test_case.rb +++ b/activesupport/lib/active_support/test_case.rb @@ -1,3 +1,4 @@ +gem 'minitest' # make sure we get the gem, not stdlib require 'minitest/spec' require 'active_support/testing/setup_and_teardown' require 'active_support/testing/assertions'