aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
Commit message (Collapse)AuthorAgeFilesLines
* Change docs to use update instead of update_attributesAmparo Luna + Guillermo Iguaran2013-01-031-1/+1
|
* remove meaningless AS::FrozenObjectErrorAkira Matsuda2013-01-022-4/+0
|
* remove unnecessary always-nil var from #compactGosha Arinich2013-01-011-1/+1
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-01-011-0/+21
|\
| * copy edits [ci skip]Vijay Dev2013-01-011-4/+3
| |
| * Add documentation for TimeWithZone methodsMatthew Stopa2012-12-311-3/+19
| |
| * Add documentation for the TimeWithZone#dst? method.Matthew Stopa2012-12-311-0/+6
| | | | | | | | [ci skip]
* | Updated copyright notices for 2013Andrew Nesbitt2012-12-311-1/+1
| |
* | Alias refute methods to assert_not and perfer assert_not on testsRafael Mendonça França2012-12-311-1/+10
| |
* | Add active_support/testing/autorunRafael Mendonça França2012-12-311-0/+5
| | | | | | | | | | minitest/autorun load minitest/spec polluting the global namespace with the DSL that we don't want on Rails
* | Inherit from MiniTest::Unit::TestCase instead of MiniTest::SpecRafael Mendonça França2012-12-311-8/+2
| |
* | Revert "minitest provides "it" and "describe""Rafael Mendonça França2012-12-312-19/+42
|/ | | | | | | | | | This reverts commit 22bc12ec374b8bdeb3818ca0a3eb787dd3ce39d8. REASON: We will remove the MiniTest::Spec from Rails and we need these methods again Conflicts: activesupport/lib/active_support/test_case.rb
* Merge pull request #8641 from arunagw/warning_removed_unused_varSteve Klabnik2012-12-281-1/+2
|\ | | | | Remove 'assigned but unused variable' warning
| * Remove 'assigned but unused variable' warningArun Agrawal2012-12-281-1/+2
| |
* | Introduce assert_not to replace 'assert !foo'Jeremy Kemper2012-12-281-0/+16
|/
* Make test logs easier to read.Jeremy Kemper2012-12-261-11/+10
| | | | | | Tagging every message in tests makes the logs really wide. It's great for grepping, but annoying to open in an editor or a narrow terminal. Try out a different approach: spit out a heading before each test.
* deprecation warning when BufferedLogger is instantiatedYves Senn2012-12-251-1/+11
|
* ActiveSupport::BufferedLogger can be subclassedYves Senn2012-12-251-2/+6
|
* Remove warning of intance variable not initializedRafael Mendonça França2012-12-231-1/+5
|
* Move background jobs to the 'jobs' branch until fully baked. Not shipping ↵Jeremy Kemper2012-12-211-105/+0
| | | | with Rails 4.0.
* Merge pull request #8471 from kytrinyx/refactor-xml-to-hashSteve Klabnik2012-12-211-50/+100
|\ | | | | WIP Refactor xml conversion to hash
| * Refactor Hash.from_xml.Steve Klabnik + Katrina Owen2012-12-211-50/+100
| | | | | | | | | | | | | | | | | | | | | | | | Three basic refactors in this PR: * We extracted the logic into a method object. We now don't define a tone of extraneous methods on Hash, even if they were private. * Extracted blocks of the case statement into methods that do the work. This makes the logic more clear. * Extracted complicated if clauses into their own query methods. They often have two or three terms, this makes it much easier to see what they _do_. We took care not to refactor too much as to not break anything, and put comments where we suspect tests are missing. We think ActiveSupport::XMLMini might be a good candidate to move to a plugin in the future.
* | Merge pull request #7376 from ↵Rafael Mendonça França2012-12-211-5/+29
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | BufferedLogger is deprecated too.Rafael Mendonça França2012-12-211-1/+1
| | |
* | | Revert "Make sure that ActiveSupport::Logger includes the Logger extensions ↵David Heinemeier Hansson2012-12-213-20/+29
| | | | | | | | | | | | | | | | | | 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-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-074-13/+21
| | | | | | | | | | | | | | | 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]