aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Improve String#squish whitespaces matchingAntoine Lyset2013-01-221-0/+2
|
* Standardise the return value of `to_time`Andrew White2013-01-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | This commit standardises the return value of `to_time` to an instance of `Time` in the local system timezone, matching the Ruby core and standard library behavior. The default form for `String#to_time` has been changed from :utc to :local but research seems to suggest the latter is the more common form. Also fix an edge condition with `String#to_time` where the string has a timezone offset in it and the mode is :local. e.g: # Before: >> "2000-01-01 00:00:00 -0500".to_time(:local) => 2000-01-01 05:00:00 -0500 # After: >> "2000-01-01 00:00:00 -0500".to_time(:local) => 2000-01-01 00:00:00 -0500 Closes #2453
* extract PerformanceTest into rails-performance_tests gemYves Senn2013-01-101-0/+8
|
* CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml.Jeremy Kemper2013-01-081-0/+7
|
* Revert "Merge branch 'master-sec'"Jeremy Kemper2013-01-081-7/+0
| | | | | This reverts commit 88cc1688d0cb828c17706b41a8bd27870f2a2beb, reversing changes made to f049016cd348627bf8db0d72382d7580bf802a79.
* CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml.Jeremy Kemper2013-01-081-0/+7
|
* deprecate `assert_blank` and `assert_present`.Yves Senn2013-01-051-0/+5
| | | | | They don't add any benefits over `assert object.blank?` and `assert object.present?`
* Move changelog entry in railties to the topCarlos Antonio da Silva2013-01-041-3/+3
| | | | Other minor changelog improvements [ci skip]
* Better error message for String#to_dateKelly Stannard2013-01-041-0/+8
| | | | | | | | | | I did this because to_date gives a very unhelpful error message if you do not pass in a correct date. In the process I think this cleans up the code nicely and even better it tends to be slightly faster than the current implementation. Benchmark https://gist.github.com/4440875
* Added ability to compare date/time with infinitybUg2013-01-041-0/+13
| | | | | | | | | | | | | | | | | Date, DateTime, Time and TimeWithZone can now be compared to infinity, so it's now possible to create ranges with one infinite bound and date/time object as another bound. Ex.: @range = Range.new(Date.today, Float::INFINITY) Also it's possible to check inclusion of date/time in range with conversion. Ex.: @range.include?(Time.now + 1.year) # => true @range.include?(DateTime.now + 1.year) # => true Ability to create date/time ranges with infinite bound is required for handling postgresql range types.
* Changelog improvements [ci skip]Carlos Antonio da Silva2013-01-021-2/+2
|
* missing changelog entry for #8682Akira Matsuda2013-01-021-0/+4
|
* Introduce assert_not to replace 'assert !foo'Jeremy Kemper2012-12-281-0/+2
|
* Merge pull request #7376 from ↵Rafael Mendonça França2012-12-211-0/+9
|\ | | | | | | | | | | | | | | | | dmitriy-kiriyenko/fix-double-callback-in-same-statement Prevent callback from being set twice. Conflicts: activesupport/CHANGELOG.md
| * Prevent callback from being set twice.Dmitriy Kiriyenko2012-12-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you add one callack in two separate `set_callback` calls - it is only called once. When you do it in one `set_callback` call - it is called twice. This violates the principle of least astonishment for me. Duplicating callback is usually an error. There is a correct and obvious way to do anything without this "feature". If you want to do before_save :clear_balance, :calculate_tax, :clear_balance or whatever, you should better do before_save :carefully_calculate_tax def carefully_calculate_tax clear_balance calculate_tax clear_balance end And this even opens gates for some advanced refactorings, unlike the first approach. My assumptions are: - Principle of least astonishment is violated, when callbacks are either prevented from duplication, or not. - Duplicating callbacks is usually an error. When it is intentional - it's a smell of a bad design and can be approached without abusing this "feature". My suggestion is: do not allow duplicating callbacks in one callback call, like it is not allowed in separate callbacks call.
* | Revert "Make sure that ActiveSupport::Logger includes the Logger extensions ↵David Heinemeier Hansson2012-12-211-1/+1
| | | | | | | | | | | | from core_ext/logger" (some confusion over deprecation) This reverts commit d00f568a83a5159ed93618b1081bd17858536d1c.
* | Make sure that ActiveSupport::Logger includes the Logger extensions from ↵David Heinemeier Hansson2012-12-211-1/+1
| | | | | | | | core_ext/logger
* | Add ActiveSupport::Logger#silence that works the same as the old ↵David Heinemeier Hansson2012-12-211-0/+4
| | | | | | | | Logger#silence extension
* | Fix Action Mailer changelog indenation to match other changelogsCarlos Antonio da Silva2012-12-191-3/+4
| | | | | | | | Also some minor improvements to other changelogs. [ci skip]
* | Remove unicode character encoding from ActiveSupport::JSON.encodeBrett Carter2012-12-141-0/+6
| | | | | | | | | | | | | | | | | | | | The encoding scheme (e.g. ☠ -> "\u2620") was broken for characters not in the Basic Multilingual Plane. It is possible to escape them for json using the weird encoding scheme of a twelve-character sequence representing the UTF-16 surrogate pair (e.g. '𠜎' -> "\u270e\u263a") but this wasn't properly handled in the escaping code. Since raw UTF-8 is allowed in json, it was decided to simply pass through the raw bytes rather than attempt to escape them.
* | Convert changelogs to 1.9 hash style and fix some formatting [ci skip]Carlos Antonio da Silva2012-12-141-3/+3
|/
* Deprecate obsolete Time to DateTime fallback methodsAndrew White2012-12-111-0/+7
| | | | | | | The Time.time_with_datetime_fallback, Time.utc_time and Time.local_time methods were added to handle the limitations 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.
* Deprecate Date#to_time_in_current_zoneAndrew White2012-12-111-0/+2
| | | | | | | | | | | | | The to_time_in_current_zone method doesn't match the naming of the methods for converting to ActiveSupport::TimeWithZone on Time and DateTime. Since DateTime inherits from Date that has led to confusion with some users using the to_time_in_current_zone method with DateTime instances and having the time part dropped and the UTC offset lost. This commit fixes this by deprecating the old method and adding a new in_time_zone method which matches the naming for DateTime and Time. This should prevent accidently dropping times and UTC offsets when converting DateTime instances to ActiveSupport::TimeWithZone.
* Add String#in_time_zone methodAndrew White2012-12-111-0/+2
| | | | | | This commit adds a convenience method for converting a string to an ActiveSupport::TimeWithZone instance using the configured Time.zone or another passed as an argument.
* Rename ActiveSupport::BasicObject to ActiveSupport::ProxyObjectFrancesco Rodriguez2012-12-071-0/+6
| | | | | AS::BasicObject is used for proxy classes. Let's give it a less concerning name. Also, it avoids the confusion with Ruby's Basic Object.
* Patched Marshal#load to work with constant autoloading ↵Uriel Katz2012-12-011-0/+5
| | | | (active_support/dependecies.rb) (issue #8167)
* Make `Time.zone.parse` to work with JavaScript date stringsAndrew White2012-12-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chrome, Safari and Firefox serialize Date objects to strings such as 'Mon May 28 2012 00:00:00 GMT-0700 (PDT)'. When these strings are parsed the zone is interpreted as 'GMT-0700' which doesn't exist in the TzInfo list of timezones. By taking advantage of the improved date/time handling in 1.9.3 we can use `Date._parse` and the `:offset` value which is parsed correctly. Three tests were amended to make them pass: 1. test_parse_with_old_date This needed changing to a different value because the original value was before EST was adopted so was being changed to a LMT (Local Mean Time) value after the change. It didn't before because `DateTime` just has offsets from UTC not timezones. 2. test_parse_should_not_black_out_system_timezone_dst_jump Changed the implementation of this test as the stubs were dependent on internal implementation details of the test. Confirmed that the modified test still failed when the implementation of `parse` was restored to pre-#5571. 3. test_parse_should_black_out_app_timezone_dst_jump Ditto. Closes #5770.
* Add #seconds_until_end_of_day to DateTime and TimeOlek Janiszewski2012-11-291-1/+10
|
* Simplify String#mb_chars and stop proxying #classSteve Klabnik2012-11-281-0/+2
| | | | | | | | This behavior mattered under Ruby 1.8, but that doesn't matter now that we don't support it. In addition, we don't want to proxy the #class method. A test was added to prevent against regressions.
* Properly deprecate #pending from AS::TestCaseCarlos Antonio da Silva2012-11-181-0/+2
| | | | Check https://github.com/rails/rails/pull/4575#issuecomment-5765575.
* Revert "Merge pull request #4575 from carlosantoniodasilva/remove-test-pending"Carlos Antonio da Silva2012-11-181-2/+0
| | | | | | | | | This reverts commit 1620df78dff527b4fa3f7b204fa05d1b630aae17, reversing changes made to 2d000328dfc0d4b297fb4bdcebc9af6c2fb559dc. Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/test_case.rb
* Merge pull request #8219 from nikitug/threadsafe_xmlmini_with_backendRafael Mendonça França2012-11-151-0/+13
|\ | | | | | | | | | | | | Make XmlMini.with_backend usable with threads Conflicts: activesupport/CHANGELOG.md
| * Make XmlMini.with_backend usable with threadsNikita Afanasenko2012-11-151-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | `XmlMini.with_backend` now may be safely used with threads: Thread.new do XmlMini.with_backend("REXML") { rexml_power } end Thread.new do XmlMini.with_backend("LibXML") { libxml_power } end Each thread will use it's own backend.
* | let remove_constant still delete Kernel#autoload constants [rounds #8213]Xavier Noria2012-11-151-1/+1
|/ | | | | The method #remove_const does not load the file, so we can still remove the constant.
* dependencies no longer trigger Kernel#autoload in remove_const [fixes #8213]Xavier Noria2012-11-151-0/+2
|
* Use new mocha version and add changelog entry for #8180Carlos Antonio da Silva2012-11-131-0/+2
|
* `#as_json` isolates options when encoding a hash. Closes #8182Yves Senn2012-11-121-0/+5
| | | | | | Setting options in a custom `#as_json` method had side effects. Modifications of the `options` hash leaked outside and influenced the conversion of other objects contained in the hash.
* Deprecate Hash#diff.Steve Klabnik2012-11-091-0/+3
| | | | | | It's no longer used in Rails any more. See https://github.com/rails/rails/pull/8142\#issuecomment-10227297 for more
* Merge pull request #7763 from route/full-captureCarlos Antonio da Silva2012-11-081-0/+1
|\ | | | | Kernel#capture replaced by version which can catch output from subprocesses
| * Kernel#capture replaced by version which can catch output from subprocessesDmitry Vorotilin2012-11-011-0/+1
| |
* | Use `tag!` instead of `method_missing` in `to_xml` conversions.Nikita Afanasenko2012-11-041-0/+4
| | | | | | | | Since version `3.0.x` `Builder` caches method passed to `method_missing` each time. This commit replaces `method_missing` call with `tag!` call to prevent method redefinition on each `to_xml` call with the same builder.
* | Fixed timezone mapping of Solomon Islands.Steve Klabnik2012-11-011-0/+2
|/ | | | | | | | Fixes #8095. For reference, here is the discussion about the mapping being incorrect: http://rubyforge.org/pipermail/tzinfo-users/2012-November/000114.html
* Make caller attribute in deprecation methods optionalAlexey Gaziev2012-10-301-0/+5
|
* atomicc.rb: Don't assume we may chown/chmod a file.Daniele Sluijters2012-10-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | Previously this code just assumed it is capable of changing the file ownership, both user and group. This will fail in a lot of scenario's unless: * The process is run as a superuser (root); * The owning user and group are already set to the user and group we're trying to chown to; * The user chown'ing only changes the group to another group it is a member of. If either of those conditions are not met the filesystem will simply deny the operation throwing an error. It is also not always possible to do a chmod, there might be a SELinux policy or another limitation preventing the user to change the file mode. To this end the chmod call has also been added to the rescue block. I've also added a little comment above the chmod command that doing a chmod on a file which has an ACL set will cause the ACL to be recalculated / modified.
* Implement replace method so key? works correctly.David Graham2012-10-261-0/+2
|
* add more testcases and doc about Hash#extract!Mikhail Dieterle2012-10-081-2/+2
|
* make Hash#extract! more symmetric with Hash#sliceMikhail Dieterle2012-10-081-0/+11
|
* Merge pull request #7708 from bdurand/optimize_log_subscribersRafael Mendonça França2012-10-011-0/+2
|\ | | | | Optimize log subscribers to check if the log level is sufficient
| * Optimize log subscribers to check if the log level is sufficient before ↵Brian Durand2012-09-301-0/+2
| | | | | | | | performing an operations.
* | New CHANGELOG entries always in the topRafael Mendonça França2012-10-011-2/+2
| |