提交 c8d6dded 编写于 作者: A Aaron Patterson

Merge branch 'master' into testclean

* master:
  activesupport gem dependencies should reflect the versions we actually use
  fix link and add activeresource link in release notes page [ci skip]
  Update 4.0 Release Notes
  Kill not used constant since removal of runner method
...@@ -8,7 +8,6 @@ else ...@@ -8,7 +8,6 @@ else
gem 'arel' gem 'arel'
end end
gem 'minitest', '~> 3.2.0'
gem 'mocha', '>= 0.11.2', :require => false gem 'mocha', '>= 0.11.2', :require => false
gem 'rack-test', github: "brynary/rack-test" gem 'rack-test', github: "brynary/rack-test"
gem 'bcrypt-ruby', '~> 3.0.0' gem 'bcrypt-ruby', '~> 3.0.0'
......
...@@ -22,4 +22,5 @@ ...@@ -22,4 +22,5 @@
s.add_dependency('i18n', '~> 0.6') s.add_dependency('i18n', '~> 0.6')
s.add_dependency('multi_json', '~> 1.3') s.add_dependency('multi_json', '~> 1.3')
s.add_dependency('tzinfo', '~> 0.3.33') s.add_dependency('tzinfo', '~> 0.3.33')
s.add_dependency('minitest', '~> 3.2')
end end
gem 'minitest' # make sure we get the gem, not stdlib
require 'minitest/spec' require 'minitest/spec'
require 'active_support/testing/setup_and_teardown' require 'active_support/testing/setup_and_teardown'
require 'active_support/testing/assertions' require 'active_support/testing/assertions'
......
...@@ -4,20 +4,11 @@ ...@@ -4,20 +4,11 @@
module ActiveSupport module ActiveSupport
module Testing module Testing
module SetupAndTeardown module SetupAndTeardown
PASSTHROUGH_EXCEPTIONS = [
NoMemoryError,
SignalException,
Interrupt,
SystemExit
]
extend ActiveSupport::Concern extend ActiveSupport::Concern
included do included do
include ActiveSupport::Callbacks include ActiveSupport::Callbacks
define_callbacks :setup, :teardown define_callbacks :setup, :teardown
end end
module ClassMethods module ClassMethods
......
...@@ -329,6 +329,20 @@ Moved into a separate gem <tt>sprockets-rails</tt>. ...@@ -329,6 +329,20 @@ Moved into a separate gem <tt>sprockets-rails</tt>.
h3. Active Record h3. Active Record
* Add <tt>add_reference</tt> and <tt>remove_reference</tt> schema statements. Aliases, <tt>add_belongs_to</tt> and <tt>remove_belongs_to</tt> are acceptable. References are reversible.
<ruby>
# 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)
</ruby>
* Add <tt>:default</tt> and <tt>:null</tt> options to <tt>column_exists?</tt>. * Add <tt>:default</tt> and <tt>:null</tt> options to <tt>column_exists?</tt>.
<ruby> <ruby>
...@@ -343,7 +357,7 @@ User.where(:age => 30) # => returns the relation ...@@ -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 User.where(:age => 30).to_a # => executes the query and returns the loaded objects, as before
</ruby> </ruby>
* Add <tt>collation</tt> and <tt>ctype</tt> support to PostgreSQL. These are available for PostgreSQL 8.4 or later. * Add <tt>:collation</tt> and <tt>:ctype</tt> support to PostgreSQL. These are available for PostgreSQL 8.4 or later.
<yaml> <yaml>
development: development:
...@@ -506,7 +520,7 @@ Post.find_by! name: 'Spartacus' ...@@ -506,7 +520,7 @@ Post.find_by! name: 'Spartacus'
* Added <tt>ActiveRecord::Base#slice</tt> to return a hash of the given methods with their names as keys and returned values as values. * Added <tt>ActiveRecord::Base#slice</tt> 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. * Added a feature to dump/load internal state of +SchemaCache+ instance because we want to boot more quickly when we have many models.
...@@ -708,7 +722,7 @@ h4(#activemodel_deprecations). Deprecations ...@@ -708,7 +722,7 @@ h4(#activemodel_deprecations). Deprecations
h3. Active Resource 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 h3. Active Support
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册