aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Formatting fix in AS changelog [ci skip]Juanjo Bazán2014-06-161-2/+5
|
* fix error with long keys in ActiveSupport::Cache::FileStoreAdam Panzer2014-06-101-0/+3
|
* Merge pull request #15421 from gchan/time_with_zone_precisionMatthew Draper2014-06-051-0/+20
|\ | | | | | | Fixed `ActiveSupport::TimeWithZone#-` so precision is not unnecessarily lost
| * Fixed `ActiveSupport::TimeWithZone#-` so precision is not unnecessarily lostGordon Chan2014-05-301-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When working with objects with a nanosecond component, the `-` method may unnecessarily cause loss of precision. `ActiveSupport::TimeWithZone#-` should return the same result as if we were using `Time#-`: Time.now.end_of_day - Time.now.beginning_of_day #=> 86399.999999999 Before: Time.zone.now.end_of_day.nsec #=> 999999999 Time.zone.now.end_of_day - Time.zone.now.beginning_of_day #=> 86400.0 After: Time.zone.now.end_of_day - Time.zone.now.beginning_of_day #=> 86399.999999999
* | Fix AS::NumberHelper results with rationalsJuanjo Bazán2014-05-311-0/+13
| | | | | | | | | | | | | | | | | | | | :precision was incorrectly being applied to Rationals before: ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2 => "3.3" after: ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2 => "3.33"
* | Tiny formatting fix in AS change log [ci skip]Robin Dupret2014-05-311-4/+4
| |
* | :scissors: removed deprecated `Numeric#ago` and friendsGodfrey Chan2014-05-301-0/+13
|/ | | | | | | | | | | | | | Replacements: 5.ago => 5.seconds.ago 5.until => 5.seconds.until 5.since => 5.seconds.since 5.from_now => 5.seconds.from_now The removed tests does not affect coverage – we have equivalent test cases in the tests for `AS::Duration`. See #12389 for the history and rationale behind this.
* Merge pull request #12080 from ShayDavidson/fix_datetime_partial_datesMatthew Draper2014-05-281-0/+14
|\ | | | | | | Added partial days support to `DateTime`'s `advance` method.
| * Fixed changelogShay Davidson2013-09-021-4/+12
| |
| * Added partial days support to `DateTime`'s `advance` method.Shay Davidson2013-08-301-0/+4
| | | | | | | | | | You can now add partial days (e.g. 2.5.days) to `DateTime` with the advance method. This was acheived by mimicing the `advance` implementation in `Time`.
* | Merge pull request #10887 from sakuro/deep_transform_keys_in_nested_arraysRafael Mendonça França2014-05-201-0/+7
|\ \ | | | | | | | | | | | | | | | | | | Hash#deep_*_keys(!) recurse into nested arrays. Conflicts: activesupport/CHANGELOG.md
| * | Hash#deep_*_keys(!) recurse into nested arrays.OZAWA Sakuro2013-06-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following methods now recursively transform nested arrays, too. * Hash#deep_transform_keys * Hash#deep_transform_keys! * Hash#deep_stringify_keys * Hash#deep_stringify_keys! * Hash#deep_symbolize_keys * Hash#deep_symbolize_keys!
* | | Fix confusing exception in ActiveSupport delegationVladimir Yarotsky2014-05-201-0/+6
| | |
* | | Merge pull request #15037 from ↵Rafael Mendonça França2014-05-161-0/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | roccoblues/fix_duplicate_activesupport_subscribers Fixed duplicate subscribers in ActiveSupport::Subscriber Conflicts: activesupport/CHANGELOG.md
| * | | Fixed duplicate subscribers in ActiveSupport::SubscriberDennis Schoen2014-05-091-0/+5
| | | | | | | | | | | | | | | | | | | | ActiveSupport::Subscriber no longer creates multiple subscribers when you redefine a method.
* | | | formatting pass through CHANGELOGS. [ci skip]Yves Senn2014-05-161-1/+1
| | | |
* | | | remove deprecation warningeileencodes2014-05-131-0/+4
| | | | | | | | | | | | | | | | | | | | This deprecation was released in 4.1.0 and can be removed for 4.2.0, deprecation message / handling is no longer necessary.
* | | | Use block parameter rather than `$1` during `gsub!` so ↵Mark J. Titorenko2014-05-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | `ActiveSupport::SafeBuffer` values aren't mangled. Fixes #15064
* | | | Make TimeZone#parse behave more like Time#parse.Ulysse Carion2014-05-111-0/+6
|/ / / | | | | | | | | | | | | Namely, if the mday is omitted but any other upper components are, then instead of supplying the mday from the current time, it defaults to 1.
* | | several enhancements to humanize [closes #12288]Xavier Noria2014-05-061-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Strips leading underscores. * Changes some unnecessary gsub!s to sub!s. * Replaces some anchors ^, $ with \A, \z. * Documents that human inflection rules are applied. * Documents that words are downcased except acronyms. * Adds an example with an acronym. * Rewords docs.
* | | Improve CHANGELOG [ci skip]Rafael Mendonça França2014-05-041-2/+2
| | |
* | | [Fixes #14948] Hash#to_query: Changed a way how empty hash and empty array ↵Bogdan Gusiev2014-05-031-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are serialized Empty Hash or Array should not present in serialization result {a: []}.to_query # => "" {a: {}}.to_query # => "" For more info see #14948.
* | | Merge branch 'master' into rm-uuid-fixturesRafael Mendonça França2014-04-101-0/+34
|\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG.md activesupport/CHANGELOG.md
| * | | Fixed problem where `1.day.eql?(1.day)` is falseEmily Dobervich2014-04-081-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes: 1.second.eql?(1.second) #=> false The new `eql?` requires that `other` is an `ActiveSupport::Duration`. This requirement makes `ActiveSupport::Duration`'s behavior consistent with other numeric types in Ruby. 1.eql?(1.0) #=> false 1.0.eql?(1) #=> false 1.second.eql?(1) #=> false (was true) 1.eql?(1.second) #=> false { 1 => "foo", 1.0 => "bar" } #=> { 1 => "foo", 1.0 => "bar" } { 1 => "foo", 1.second => "bar" } # now => { 1 => "foo", 1.second => "bar" } # was => { 1 => "bar" } And though the behavior here hasn't changed, for reference: 1 == 1.0 #=> true 1.0 == 1 #=> true 1 == 1.second #=> true 1.second == 1 #=> true
* | | | Merge pull request #12016 from roderickvd/uuid_fixesRafael Mendonça França2014-04-041-0/+5
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generate stable fixture UUIDs on PostgreSQL Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/fixtures.rb activerecord/test/cases/adapters/postgresql/uuid_test.rb activesupport/CHANGELOG.md
| * | | Auto-generate stable fixture UUIDs on PostgreSQL.Roderick van Domburg2014-01-071-0/+5
| | | | | | | | | | | | | | | | Fixes: #11524
* | | | Make AS::SafeBuffer#prepend act like String#prependPavel Pravosud2014-03-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make `#prepend` method modify instance in-place and return self instead of just returning modified value. That is exactly what `#prepend!` method was doing previously, so it's deprecated from now on.
* | | | HashWithIndifferentAccess better respects #to_hashPeter Jaros2014-03-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | In particular, `.new`, `#update`, `#merge`, `#replace` all accept objects which respond to `#to_hash`, even if those objects are not Hashes directly.
* | | | Deprecate Class#superclass_delegating_accessorAkshay Vishnoi2014-03-201-0/+4
| | | |
* | | | Fix #to_json for BasicObject EnumerablesSammy Larbi2014-03-141-0/+5
| | | |
* | | | Revert "Merge pull request #14269 from arthurnn/expanded_key_array"Godfrey Chan2014-03-041-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 475c96589ca65282e1a61350271c2f83f0d4044f, reversing changes made to 705915ab5cf24430892107764b0050c07e1df583. We decided that this is not worth busting everyone's cache as this seems like a very unlikely problem. The problem only occurs when the user is 1) not using a namespace, or 2) using the same namesapce for different *kinds* of cache items. The recommended "fix" is to put those cache items into their own namspace: id = 1 Rails.cache.fetch(id, namespace: "user"){ User.find(id) } ids = [1] Rails.cache.fetch(ids, namespace: "users"){ User.find(ids) } See the discussion on #14269 for details.
* | | | Cache key should be different when is Array.Arthur Neves2014-03-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `cache.fetch(['foo'])` and `cache.fetch('foo')` should generate different cache keys as they are not equivalents. [related #8615] [related #8614]
* | | | Return a hash rather than array from fetch_multiParker Selbert2014-02-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation of `fetch_multi` returns an array and has no means to easily backtrack which names yielded which results. By changing the return value to a Hash we retain the name information. Hash#values can be used on the response if only the values are needed.
* | | | Point master changelogs to 4-1-stable branchCarlos Antonio da Silva2014-02-251-633/+1
| | | | | | | | | | | | | | | | Remove 4-1 related entries from master [ci skip]
* | | | Go with #presence_in instead of #present_in -- it doesnt sound quite as ↵David Heinemeier Hansson2014-02-241-2/+2
| | | | | | | | | | | | | | | | good, but the closer relationship to #presence over #present is ultimately worth it
* | | | Introduce Concern#class_methods and Kernel#concernJeremy Kemper2014-02-231-0/+28
| | | |
* | | | Move changelog entry to the top, fix examples indent [ci skip]Carlos Antonio da Silva2014-02-181-10/+10
| | | |
* | | | Added Object#present_in to simplify value whitelistingDavid Heinemeier Hansson2014-02-181-0/+12
| | | |
* | | | time helpers honor the application time zone when passed a dateXavier Noria2014-02-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails applications are expected to be always aware of the application time zone. To be consistent with that contract, we have to assume that a bare date passed to time helpers is a date in the application time zone, not in the system time zone. The system time zone is irrelevant, we should totally ignore it. For example, travel_to user.birth_date + 40.years should make that user be 40th years old regardless of the system time zone. Without this patch that may not be true.
* | | | Fix tidy_bytes for JRubyJustin Coyne2014-02-101-0/+7
| | | | | | | | | | | | | | | | | | | | The previous implementation was broken because JRuby (1.7.10) doesn't have a code converter for UTF-8 to UTF8-MAC.
* | | | synchronize 4.1 release notes with CHANGELOGS. [ci skip]Yves Senn2014-02-061-2/+3
| | | | | | | | | | | | | | | | /cc @chancancode
* | | | Add CHANGELOG entryRafael Mendonça França2014-02-051-0/+14
| | | | | | | | | | | | | | | | Closes #13909
* | | | Merge pull request #13911 from davidcelis/remove-bigdecimal-serializationRafael Mendonça França2014-02-011-1/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecate custom BigDecimal serialization Conflicts: activesupport/CHANGELOG.md
| * | | | Don't require BigDecimal serialization extensionDavid Celis2014-02-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails currently provides an extension to BigDecimal that redefines how it is serialized to YAML. However, as noted in #12467, this does not work as expected. When ActiveSupport is required, BigDecimal YAML serialization does not maintain the object type. It instead ends up serializing the number represented by the BigDecimal itself which, when loaded by YAML later, becomes a Float: ```ruby require 'yaml' require 'bigdecimal' yaml = BigDecimal('13.37').to_yaml YAML.load(yaml).class require 'active_support/all' yaml = BigDecimal('13.37').to_yaml YAML.load(yaml).class ``` @tenderlove posits that we should deprecate the custom BigDecimal serialization and let Ruby handle it. For the time being, users who require this serialization for backwards compatibility can manually `require 'active_support/core_ext/big_decimal/yaml_conversions'`. This will close #12467 and deprecate the custom BigDecimal#to_yaml. Signed-off-by: David Celis <me@davidcel.is>
* | | | | Merge pull request #12769 from birkirb/masterRafael Mendonça França2014-02-011-0/+7
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | Boolean parser blows up on a Fixnum. Conflicts: activesupport/CHANGELOG.md
| * | | | Fix breakage in XmlMiniBirkir A. Barkarson2013-12-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Boolean parsing breaks on non strings (i.e. integer 1|0) - Symbol parsing breaks on non strings. - BigDecimal parsing breaks due to missing require. - Update changelog.
* | | | | Maintain the current timezone in wrap_with_time_zoneAndrew White2014-01-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the solution from the fix for #12163 to the general case where `Time` methods are wrapped with a time zone. Fixes #12596.
* | | | | Remove automatic removal of Date/Time stubs after each test caseRafael Mendonça França2014-01-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This behavior is only work out-of-box with minitest and also add a downside to run after each test case, even if we don't used the travel or travel_to methods
* | | | | Add `travel_back` to remove stubs from `travel` and `travel_to`Rafael Mendonça França2014-01-301-0/+4
| | | | |
* | | | | tidy CHANGELOGs [ci skip]Yves Senn2014-01-301-2/+2
| | | | |