mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
did a pass over the AS changelog [ci skip]
This commit is contained in:
parent
99d3ec5b1e
commit
1509844cdd
1 changed files with 61 additions and 55 deletions
|
@ -27,7 +27,7 @@
|
|||
|
||||
* Modify `TimeWithZone#as_json` to include 3 decimal places of sub-second accuracy
|
||||
by default, which is optional as per the ISO8601 spec, but extremely useful. Also
|
||||
the default behaviour of Date#toJSON() in recent versions of Chrome, Safari and
|
||||
the default behaviour of `Date#toJSON()` in recent versions of Chrome, Safari and
|
||||
Firefox.
|
||||
|
||||
*James Harton*
|
||||
|
@ -40,7 +40,7 @@
|
|||
*Andrew White*
|
||||
|
||||
* Extract `ActiveSupport::Testing::Performance` into https://github.com/rails/rails-perftest
|
||||
You can add the gem to your Gemfile to keep using performance tests.
|
||||
You can add the gem to your `Gemfile` to keep using performance tests.
|
||||
|
||||
gem 'rails-perftest'
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
|||
*Kelly Stannard*
|
||||
|
||||
* It's now possible to compare `Date`, `DateTime`, `Time` and `TimeWithZone`
|
||||
with `Infinity`. This allows to create date/time ranges with one infinite bound.
|
||||
with `Float::INFINITY`. This allows to create date/time ranges with one infinite bound.
|
||||
Example:
|
||||
|
||||
range = Range.new(Date.today, Float::INFINITY)
|
||||
|
@ -100,13 +100,13 @@
|
|||
|
||||
* Remove surrogate unicode character encoding from `ActiveSupport::JSON.encode`
|
||||
The encoding scheme was broken for unicode characters outside the basic multilingual plane;
|
||||
since json is assumed to be `UTF-8`, and we already force the encoding to `UTF-8`,
|
||||
since json is assumed to be UTF-8, and we already force the encoding to UTF-8,
|
||||
simply pass through the un-encoded characters.
|
||||
|
||||
*Brett Carter*
|
||||
|
||||
* Deprecate `Time.time_with_date_fallback`, `Time.utc_time` and `Time.local_time`.
|
||||
These methods were added to handle the limited range of Ruby's native Time
|
||||
These methods were added to handle the limited range of Ruby's native `Time`
|
||||
implementation. Those limitations no longer apply so we are deprecating them in 4.0
|
||||
and they will be removed in 4.1.
|
||||
|
||||
|
@ -114,10 +114,10 @@
|
|||
|
||||
* Deprecate `Date#to_time_in_current_zone` and add `Date#in_time_zone`. *Andrew White*
|
||||
|
||||
* Add `String#in_time_zone` method to convert a string to an ActiveSupport::TimeWithZone. *Andrew White*
|
||||
* Add `String#in_time_zone` method to convert a string to an `ActiveSupport::TimeWithZone`. *Andrew White*
|
||||
|
||||
* Deprecate `ActiveSupport::BasicObject` in favor of `ActiveSupport::ProxyObject`.
|
||||
This class is used for proxy classes. It avoids confusion with Ruby's BasicObject
|
||||
This class is used for proxy classes. It avoids confusion with Ruby's `BasicObject`
|
||||
class.
|
||||
|
||||
*Francesco Rodriguez*
|
||||
|
@ -139,9 +139,9 @@
|
|||
|
||||
*Olek Janiszewski*
|
||||
|
||||
* No longer proxy ActiveSupport::Multibyte#class. *Steve Klabnik*
|
||||
* No longer proxy `ActiveSupport::Multibyte#class`. *Steve Klabnik*
|
||||
|
||||
* Deprecate `ActiveSupport::TestCase#pending` method, use `skip` from MiniTest instead. *Carlos Antonio da Silva*
|
||||
* Deprecate `ActiveSupport::TestCase#pending` method, use `skip` from minitest instead. *Carlos Antonio da Silva*
|
||||
|
||||
* `XmlMini.with_backend` now may be safely used with threads:
|
||||
|
||||
|
@ -158,15 +158,15 @@
|
|||
|
||||
* Dependencies no longer trigger `Kernel#autoload` in `remove_constant`. Fixes #8213. *Xavier Noria*
|
||||
|
||||
* Simplify mocha integration and remove monkey-patches, bumping mocha to 0.13.0. *James Mead*
|
||||
* Simplify `mocha` integration and remove monkey-patches, bumping `mocha` to 0.13.0. *James Mead*
|
||||
|
||||
* `#as_json` isolates options when encoding a hash. Fixes #8182.
|
||||
|
||||
*Yves Senn*
|
||||
|
||||
* Deprecate Hash#diff in favor of MiniTest's #diff. *Steve Klabnik*
|
||||
* Deprecate `Hash#diff` in favor of minitest's #diff. *Steve Klabnik*
|
||||
|
||||
* Kernel#capture can catch output from subprocesses *Dmitry Vorotilin*
|
||||
* `Kernel#capture` can catch output from subprocesses. *Dmitry Vorotilin*
|
||||
|
||||
* `to_xml` conversions now use builder's `tag!` method instead of explicit invocation of `method_missing`.
|
||||
|
||||
|
@ -174,27 +174,30 @@
|
|||
|
||||
* Fixed timezone mapping of the Solomon Islands. *Steve Klabnik*
|
||||
|
||||
* Make callstack attribute optional in
|
||||
ActiveSupport::Deprecation::Reporting methods `warn` and `deprecation_warning`
|
||||
* Make callstack attribute optional in `ActiveSupport::Deprecation::Reporting`
|
||||
methods `warn` and `deprecation_warning`.
|
||||
|
||||
*Alexey Gaziev*
|
||||
|
||||
* Implement HashWithIndifferentAccess#replace so key? works correctly. *David Graham*
|
||||
* Implement `HashWithIndifferentAccess#replace` so `key?` works correctly. *David Graham*
|
||||
|
||||
* Handle the possible Permission Denied errors atomic.rb might trigger due to its chown and chmod calls. *Daniele Sluijters*
|
||||
* Handle the possible permission denied errors `atomic.rb` might trigger due to its `chown`
|
||||
and `chmod` calls.
|
||||
|
||||
* Hash#extract! returns only those keys that present in the receiver.
|
||||
*Daniele Sluijters*
|
||||
|
||||
* `Hash#extract!` returns only those keys that present in the receiver.
|
||||
|
||||
{a: 1, b: 2}.extract!(:a, :x) # => {:a => 1}
|
||||
|
||||
*Mikhail Dieterle*
|
||||
|
||||
* Hash#extract! returns the same subclass, that the receiver is. I.e.
|
||||
HashWithIndifferentAccess#extract! returns HashWithIndifferentAccess instance.
|
||||
* `Hash#extract!` returns the same subclass, that the receiver is. I.e.
|
||||
`HashWithIndifferentAccess#extract!` returns a `HashWithIndifferentAccess` instance.
|
||||
|
||||
*Mikhail Dieterle*
|
||||
|
||||
* Optimize ActiveSupport::Cache::Entry to reduce memory and processing overhead. *Brian Durand*
|
||||
* Optimize `ActiveSupport::Cache::Entry` to reduce memory and processing overhead. *Brian Durand*
|
||||
|
||||
* Tests tag the Rails log with the current test class and test case:
|
||||
|
||||
|
@ -203,7 +206,7 @@
|
|||
|
||||
*Jeremy Kemper*
|
||||
|
||||
* Add `logger.push_tags` and `.pop_tags` to complement logger.tagged:
|
||||
* Add `logger.push_tags` and `.pop_tags` to complement `logger.tagged`:
|
||||
|
||||
class Job
|
||||
def before
|
||||
|
@ -239,6 +242,7 @@
|
|||
|
||||
class User
|
||||
include ActiveSupport::Configurable
|
||||
|
||||
config_accessor :hair_colors do
|
||||
[:brown, :black, :blonde, :red]
|
||||
end
|
||||
|
@ -248,7 +252,7 @@
|
|||
|
||||
*Larry Lv*
|
||||
|
||||
* ActiveSupport::Benchmarkable#silence has been deprecated due to its lack of
|
||||
* `ActiveSupport::Benchmarkable#silence` has been deprecated due to its lack of
|
||||
thread safety. It will be removed without replacement in Rails 4.1.
|
||||
|
||||
*Steve Klabnik*
|
||||
|
@ -258,14 +262,14 @@
|
|||
|
||||
*Pranas Kiziela*
|
||||
|
||||
* ActiveSupport::Deprecation is now a class. It is possible to create an instance
|
||||
* `ActiveSupport::Deprecation` is now a class. It is possible to create an instance
|
||||
of deprecator. Backwards compatibility has been preserved.
|
||||
|
||||
You can choose which instance of the deprecator will be used.
|
||||
|
||||
deprecate :method_name, deprecator: deprecator_instance
|
||||
|
||||
You can use ActiveSupport::Deprecation in your gem.
|
||||
You can use `ActiveSupport::Deprecation` in your gem.
|
||||
|
||||
require 'active_support/deprecation'
|
||||
require 'active_support/core_ext/module/deprecation'
|
||||
|
@ -292,7 +296,7 @@
|
|||
* `ERB::Util.html_escape` encodes single quote as `#39`. Decimal form has better support in old browsers. *Kalys Osmonov*
|
||||
|
||||
* `ActiveSupport::Callbacks`: deprecate monkey patch of object callbacks.
|
||||
Using the #filter method like this:
|
||||
Using the `filter` method like this:
|
||||
|
||||
before_filter MyFilter.new
|
||||
|
||||
|
@ -325,7 +329,7 @@
|
|||
|
||||
*Akira Matsuda*
|
||||
|
||||
* Replace deprecated `memcache-client` gem with `dalli` in ActiveSupport::Cache::MemCacheStore
|
||||
* Replace deprecated `memcache-client` gem with `dalli` in `ActiveSupport::Cache::MemCacheStore`.
|
||||
|
||||
*Guillermo Iguaran*
|
||||
|
||||
|
@ -339,14 +343,14 @@
|
|||
|
||||
*Erich Menge*
|
||||
|
||||
* Add String#indent. *fxn & Ace Suares*
|
||||
* Add `String#indent`. *fxn & Ace Suares*
|
||||
|
||||
* Inflections can now be defined per locale. `singularize` and `pluralize`
|
||||
accept locale as an extra argument.
|
||||
|
||||
*David Celis*
|
||||
|
||||
* `Object#try` will now return nil instead of raise a NoMethodError if the
|
||||
* `Object#try` will now return `nil` instead of raise a `NoMethodError` if the
|
||||
receiving object does not implement the method, but you can still get the
|
||||
old behavior by using the new `Object#try!`.
|
||||
|
||||
|
@ -374,63 +378,65 @@
|
|||
|
||||
*Francesco Rodriguez*
|
||||
|
||||
* ActionView::Helpers::NumberHelper methods have been moved to ActiveSupport::NumberHelper and are now available via
|
||||
Numeric#to_s. Numeric#to_s now accepts the formatting options :phone, :currency, :percentage, :delimited,
|
||||
:rounded, :human, and :human_size. *Andrew Mutz*
|
||||
* `ActionView::Helpers::NumberHelper` methods have been moved to `ActiveSupport::NumberHelper` and are now available via
|
||||
`Numeric#to_s`. `Numeric#to_s` now accepts the formatting options `:phone`, `:currency`, `:percentage`, `:delimited`,
|
||||
`:rounded`, `:human`, and `:human_size`.
|
||||
|
||||
*Andrew Mutz*
|
||||
|
||||
* Add `Hash#transform_keys`, `Hash#transform_keys!`, `Hash#deep_transform_keys`, and `Hash#deep_transform_keys!`. *Mark McSpadden*
|
||||
|
||||
* Changed xml type `datetime` to `dateTime` (with upper case letter `T`). *Angelo Capilleri*
|
||||
* Changed XML type `datetime` to `dateTime` (with upper case letter `T`). *Angelo Capilleri*
|
||||
|
||||
* Add `:instance_accessor` option for `class_attribute`. *Alexey Vakhov*
|
||||
|
||||
* `constantize` now looks in the ancestor chain. *Marc-Andre Lafortune & Andrew White*
|
||||
|
||||
* Adds `Hash#deep_stringify_keys` and `Hash#deep_stringify_keys!` to convert all keys from a +Hash+ instance into strings *Lucas Húngaro*
|
||||
* Adds `Hash#deep_stringify_keys` and `Hash#deep_stringify_keys!` to convert all keys from a `Hash` instance into strings. *Lucas Húngaro*
|
||||
|
||||
* Adds `Hash#deep_symbolize_keys` and `Hash#deep_symbolize_keys!` to convert all keys from a +Hash+ instance into symbols *Lucas Húngaro*
|
||||
* Adds `Hash#deep_symbolize_keys` and `Hash#deep_symbolize_keys!` to convert all keys from a `Hash` instance into symbols. *Lucas Húngaro*
|
||||
|
||||
* `Object#try` can't call private methods. *Vasiliy Ermolovich*
|
||||
|
||||
* `AS::Callbacks#run_callbacks` remove `key` argument. *Francesco Rodriguez*
|
||||
|
||||
* `deep_dup` works more expectedly now and duplicates also values in +Hash+ instances and elements in +Array+ instances. *Alexey Gaziev*
|
||||
* `deep_dup` works more expectedly now and duplicates also values in `Hash` instances and elements in `Array` instances. *Alexey Gaziev*
|
||||
|
||||
* Inflector no longer applies ice -> ouse to words like slice, police, ets *Wes Morgan*
|
||||
* Inflector no longer applies ice -> ouse to words like "slice", "police", etc. *Wes Morgan*
|
||||
|
||||
* Add `ActiveSupport::Deprecations.behavior = :silence` to completely ignore Rails runtime deprecations *twinturbo*
|
||||
* Add `ActiveSupport::Deprecations.behavior = :silence` to completely ignore Rails runtime deprecations. *twinturbo*
|
||||
|
||||
* Make Module#delegate stop using `send` - can no longer delegate to private methods. *dasch*
|
||||
* Make `Module#delegate` stop using `send` - can no longer delegate to private methods. *dasch*
|
||||
|
||||
* AS::Callbacks: deprecate `:rescuable` option. *Bogdan Gusiev*
|
||||
* `ActiveSupport::Callbacks`: deprecate `:rescuable` option. *Bogdan Gusiev*
|
||||
|
||||
* Adds Integer#ordinal to get the ordinal suffix string of an integer. *Tim Gildea*
|
||||
* Adds `Integer#ordinal` to get the ordinal suffix string of an integer. *Tim Gildea*
|
||||
|
||||
* AS::Callbacks: `:per_key` option is no longer supported
|
||||
* `ActiveSupport::Callbacks`: `:per_key` option is no longer supported. *Bogdan Gusiev*
|
||||
|
||||
* `AS::Callbacks#define_callbacks`: add `:skip_after_callbacks_if_terminated` option.
|
||||
* `ActiveSupport::Callbacks#define_callbacks`: add `:skip_after_callbacks_if_terminated` option. *Bogdan Gusiev*
|
||||
|
||||
* Add html_escape_once to ERB::Util, and delegate escape_once tag helper to it. *Carlos Antonio da Silva*
|
||||
* Add `html_escape_once` to `ERB::Util`, and delegate the `escape_once` tag helper to it. *Carlos Antonio da Silva*
|
||||
|
||||
* Deprecates the compatibility method Module#local_constant_names,
|
||||
use Module#local_constants instead (which returns symbols). *fxn*
|
||||
* Deprecates the compatibility method `Module#local_constant_names`,
|
||||
use `Module#local_constants` instead (which returns symbols). *Xavier Noria*
|
||||
|
||||
* Deletes the compatibility method Module#method_names,
|
||||
use Module#methods from now on (which returns symbols). *fxn*
|
||||
* Deletes the compatibility method `Module#method_names`,
|
||||
use `Module#methods` from now on (which returns symbols). *Xavier Noria*
|
||||
|
||||
* Deletes the compatibility method Module#instance_method_names,
|
||||
use Module#instance_methods from now on (which returns symbols). *fxn*
|
||||
* Deletes the compatibility method `Module#instance_method_names`,
|
||||
use `Module#instance_methods` from now on (which returns symbols). *Xavier Noria*
|
||||
|
||||
* BufferedLogger is deprecated. Use ActiveSupport::Logger, or the logger
|
||||
from Ruby stdlib.
|
||||
* `BufferedLogger` is deprecated. Use `ActiveSupport::Logger`, or the logger
|
||||
from the Ruby standard library.
|
||||
|
||||
* Unicode database updated to 6.1.0.
|
||||
*Aaron Patterson*
|
||||
|
||||
* Adds `encode_big_decimal_as_string` option to force JSON serialization of BigDecimals as numeric instead
|
||||
* Unicode database updated to 6.1.0. *Norman Clarke*
|
||||
|
||||
* Adds `encode_big_decimal_as_string` option to force JSON serialization of `BigDecimal` as numeric instead
|
||||
of wrapping them in strings for safety.
|
||||
|
||||
* Remove deprecated ActiveSupport::JSON::Variable. *Erich Menge*
|
||||
|
||||
* Optimize log subscribers to check log level before doing any processing. *Brian Durand*
|
||||
|
||||
Please check [3-2-stable](https://github.com/rails/rails/blob/3-2-stable/activesupport/CHANGELOG.md) for previous changes.
|
||||
|
|
Loading…
Reference in a new issue