aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
Commit message (Collapse)AuthorAgeFilesLines
* Make sure that ActiveSupport::Logger includes the Logger extensions from ↵David Heinemeier Hansson2012-12-213-29/+20
| | | | core_ext/logger
* Add ActiveSupport::Logger#silence that works the same as the old ↵David Heinemeier Hansson2012-12-213-20/+31
| | | | Logger#silence extension
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-12-211-2/+1
|\
| * Remove Reference to Ruby 1.8.7John Kelly2012-12-201-2/+1
| |
* | Fix doc pointing to non existent logger class [ci skip]Carlos Antonio da Silva2012-12-211-1/+1
| |
* | Merge pull request #8560 from u16suzu/masterRafael Mendonça França2012-12-201-2/+2
|\ \ | | | | | | | | | | | | | | | | | | Fix document for String#humanize Conflicts: activesupport/lib/active_support/core_ext/string/inflections.rb
| * | Fix: documentation for String#humanizeYuichiro Suzuki2012-12-201-2/+2
| | |
* | | attempt to fix slow runner name methodMax Shytikov2012-12-191-1/+10
| | |
* | | fix AS::BasicObject :nodoc: [ci skip]Francesco Rodriguez2012-12-171-2/+1
| | |
* | | Add missing requires to core_ext/integer/timePablo Torres2012-12-161-0/+3
| | |
* | | AS::BasicObject can be inherited fromPavel Pravosud2012-12-151-2/+7
| |/ |/|
* | Remove unicode character encoding from ActiveSupport::JSON.encodeBrett Carter2012-12-141-7/+1
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #8510 from thedarkone/thread_safety_improvementsAaron Patterson2012-12-144-10/+14
|\ \ | | | | | | Thread safety improvements
| * | Replace some global Hash usages with the new thread safe cache.thedarkone2012-12-144-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of the changes: * Add thread_safe gem. * Use thread safe cache for digestor caching. * Replace manual synchronization with ThreadSafe::Cache in Relation::Delegation. * Replace @attribute_method_matchers_cache Hash with ThreadSafe::Cache. * Use TS::Cache to avoid the synchronisation overhead on listener retrieval. * Replace synchronisation with TS::Cache usage. * Use a preallocated array for performance/memory reasons. * Update the controllers cache to the new AS::Dependencies::ClassCache API. The original @controllers cache no longer makes much sense after @tenderlove's changes in 7b6bfe84f3 and f345e2380c. * Use TS::Cache in the connection pool to avoid locking overhead. * Use TS::Cache in ConnectionHandler.
* | | Backport thread-local variables from Ruby 2.0Rafael Mendonça França2012-12-111-0/+70
| | |
* | | Deprecate obsolete Time to DateTime fallback methodsAndrew White2012-12-115-4/+14
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Clean up 'active_support/time' requiresAndrew White2012-12-111-15/+6
| | | | | | | | | | | | | | | Rely on the hub files for Time, Date and DateTime classes and add the requires for String#to_time and String#in_time_zone.
* | | Deprecate Date#to_time_in_current_zoneAndrew White2012-12-113-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 missing at_end_of_* aliasesAndrew White2012-12-113-0/+5
| | |
* | | Add String#in_time_zone methodAndrew White2012-12-112-0/+14
|/ / | | | | | | | | | | 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.
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-12-081-1/+1
|\ \
| * | Update activesupport/lib/active_support/deprecation/proxy_wrappers.rbClaudio B.2012-12-071-1/+1
| | | | | | | | | Fix a typo in rdoc (*expect* for *except*)
* | | Rename ActiveSupport::BasicObject to ActiveSupport::ProxyObjectFrancesco Rodriguez2012-12-073-13/+20
| | | | | | | | | | | | | | | 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.
* | | Add comment about implementation of class_attributeAndrew White2012-12-061-0/+3
| | | | | | | | | | | | | | | | | | | | | To prevent future pull requests like #8435 add a comment about the implementation of class_attribute using class_eval for performance. [ci skip]
* | | Replace comments' non-breaking spaces with spacesclaudiob2012-12-0417-32/+32
|/ / | | | | | | | | | | | | | | | | | | Sometimes, on Mac OS X, programmers accidentally press Option+Space rather than just Space and don’t see the difference. The problem is that Option+Space writes a non-breaking space (0XA0) rather than a normal space (0x20). This commit removes all the non-breaking spaces inadvertently introduced in the comments of the code.
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-12-043-3/+16
|\ \ | | | | | | | | | | | | Conflicts: guides/source/migrations.md
| * | nodoc AS::Testing::ConstantLookup::ClassMethods [ci skip]Carlos Duclos2012-12-011-1/+1
| | |
| * | Add documentation for Hash.from_xml [ci skip]HPNeo2012-12-011-0/+13
| | |
| * | Revert "Remove trailing whitespaces"Florent Guilleux2012-12-011-1/+1
| | | | | | | | | | | | This reverts commit 90c887fa7d0c454b7533e208daefc342dea4d5f3.
| * | Remove trailing whitespacesFlorent Guilleux2012-12-011-1/+1
| | |
| * | nodoc AS::Testing::Pending because is deprecated [ci skip]Carlos Duclos2012-12-011-2/+2
| | |
* | | Use send in Time marshal extensions since the methods are now privateCarlos Antonio da Silva2012-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | See https://github.com/ruby/ruby/commit/9c1b3161f20162dc1682d758c0e4d2fc3a74745e All Active Support tests pass in 2.0.0preview2 after this change. Closes #8409
* | | Only take the date parts from Time.zone.nowAndrew White2012-12-011-3/+3
|/ / | | | | | | | | | | | | When there are missing components in the Hash returned by Date._parse only the date components should default to the value of Time.zone.now, the time components should all default to zero.
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-12-011-3/+3
|\ \ | | | | | | | | | | | | Conflicts: guides/source/active_record_validations.md
| * | nodoc AS::Deprecation::InstanceDelegator class [ci skip]Francesco Rodriguez2012-11-291-3/+3
| | |
* | | Patched Marshal#load to work with constant autoloading ↵Uriel Katz2012-12-013-0/+23
| | | | | | | | | | | | (active_support/dependecies.rb) (issue #8167)
* | | Make `Time.zone.parse` to work with JavaScript date stringsAndrew White2012-12-011-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-292-0/+18
| | |
* | | Simplify String#mb_chars and stop proxying #classSteve Klabnik2012-11-281-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Fix documentation for String#mb_chars.Steve Klabnik2012-11-281-4/+1
| | | | | | | | | | | | This documentation has been out of date.
* | | prevent Dependencies#remove_const from autoloading parents [fixes #8301]Xavier Noria2012-11-281-32/+44
|/ /
* | Properly deprecate #pending from AS::TestCaseCarlos Antonio da Silva2012-11-181-8/+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-182-0/+22
| | | | | | | | | | | | | | | | | | This reverts commit 1620df78dff527b4fa3f7b204fa05d1b630aae17, reversing changes made to 2d000328dfc0d4b297fb4bdcebc9af6c2fb559dc. Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/test_case.rb
* | Please use assert_equal instead of diff directlyRyan Davis2012-11-171-1/+1
| |
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-11-172-14/+14
|\ \ | | | | | | | | | | | | Conflicts: actionpack/lib/action_dispatch/routing/redirection.rb
| * | Fix another AS::Concern example (class_eval is already called by included)maximerety2012-11-151-4/+2
| | |
| * | Fix AS::Concern example (current example doesn't work)maximerety2012-11-151-1/+3
| | |
| * | 1.9 hash syntax in activesupportAvnerCohen2012-11-101-9/+9
| | |
* | | Simplify (and optimize)Marc-Andre Lafortune2012-11-161-3/+3
| | |
* | | Use Integer#div instead of Integer#/ to avoid side effects from mathnMarc-Andre Lafortune2012-11-161-1/+1
| | |