aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Make HWIA copy the default proc too.Arthur Neves2014-07-241-0/+4
| | | | [fixes #16279]
* Merge pull request #16190 from oss92/word_truncationMatthew Draper2014-07-171-0/+4
|\ | | | | | | Word truncation
| * Added truncate_words method to activesupport stringsroot2014-07-161-0/+4
|/
* Move uuid_v5 and uuid_v3 to Digest::UUIDRafael Mendonça França2014-07-151-1/+1
| | | | | These methods are not random so they should not belings to SecureRandom module.
* Add CHANGELOG entry for #13392 [ci skip]Rafael Mendonça França2014-07-151-0/+7
|
* `DateTime#to_f` now preserves fractional seconds.John Paul Ashenfelter2014-07-021-0/+7
| | | | | | | Previously this method always returns `.0` in the fractional part. This commit changes it to preserve the fractional seconds instead. Fixes #15994.
* Add `Hash#map_values` to ActiveSupportSean Griffin2014-06-291-0/+5
| | | | | Didn't get a chance to convert existing code, I'll skim through the code base to make use of this later this afternoon.
* Quick pass through Active Support and guides CHANGELOGRobin Dupret2014-06-291-0/+2
| | | | [ci skip]
* Merge pull request #15943 from wagenet/cache-instrumentationRafael Mendonça França2014-06-271-0/+7
|\ | | | | | | Always instrument ActiveSupport::Cache
* | Make the apply_inflections method case-sensitiveRobin Dupret2014-06-261-4/+9
|/ | | | | | | | | | | | | | | | | | | Since d3071db1, the apply_inflections method check if the downcased version of a string is contained inside the "whitelist" of uncountable words. However, if the word is composed of capital letters, it won't be matched in the list while it should. We can't simply revert to the previous behavior as there is a performance concern (benchmarked over /usr/share/dict/words): Before d3071db1 135.610000 0.290000 135.900000 (137.807081) Since d3071db1 22.170000 0.020000 22.190000 ( 22.530005) With the patch 22.060000 0.020000 22.080000 ( 22.125771) Benchmarked with http://git.io/aFnWig This way, the solution is to put the down-case version of words inside the @uncountables array.
* Make dependencies.rb add a name to NameErrorArthur Neves2014-06-201-0/+3
|
* 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.