aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | deprecate `assert_blank` and `assert_present`.Yves Senn2013-01-055-20/+36
| | | | | | | | | | | | | | | | | | | | 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]
* | | | added marshal_load and marshal_dump for ProxyTestResult. Behavior of ↵SHIBATA Hiroshi2013-01-051-2/+10
| | | | | | | | | | | | | | | | method_missing with Marshal.dump and Marshal.load is changing in ruby 2.0.0 later.
* | | | Better error message for String#to_dateKelly Stannard2013-01-043-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Set the default timezone after the initialization since the configurationRafael Mendonça França2013-01-041-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | now lives in the application initializers. Fix #8711
* | | | Refactor infinite comparable definition a bitCarlos Antonio da Silva2013-01-041-15/+19
| | | |
* | | | Remove unnecessary requiresRafael Mendonça França2013-01-031-2/+0
| | | |
* | | | Remove assert_nothing_raisedRafael Mendonça França2013-01-036-67/+49
| | | |
* | | | Added ability to compare date/time with infinitybUg2013-01-0417-7/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #8705 from amparo-luna/change_update_attributes_to_updateGuillermo Iguaran2013-01-031-1/+1
|\ \ \ \ | | | | | | | | | | Rename update_attributes method to update
| * | | | Change docs to use update instead of update_attributesAmparo Luna + Guillermo Iguaran2013-01-031-1/+1
| | | | |
* | | | | Changelog improvements [ci skip]Carlos Antonio da Silva2013-01-021-2/+2
| | | | |
* | | | | missing changelog entry for #8682Akira Matsuda2013-01-021-0/+4
|/ / / /
* | | | 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-312-2/+2
| |
* | Only call MiniTest.autorun if the dependecy is presentRafael Mendonça França2012-12-314-16/+12
| |
* | Alias refute methods to assert_not and perfer assert_not on testsRafael Mendonça França2012-12-313-4/+13
| |
* | Remove unneeded testsRafael Mendonça França2012-12-311-22/+0
| | | | | | | | These tests are needed only if we are using MiniTest::Spec
* | Add active_support/testing/autorunRafael Mendonça França2012-12-313-2/+7
| | | | | | | | | | 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
* | Test that assert_not returns true. Use assert_raises instead of doing ↵Jeremy Kemper2012-12-281-17/+7
|/ | | | begin/rescue/else.
* 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-283-0/+39
|/
* rewrite order dependent test case. #8185Yves Senn2012-12-271-1/+2
| | | | | | As reported (https://github.com/rails/rails/pull/8185#issuecomment-11702226) this test relied on the order a hash was serialized. Comparing the parsed hash makes the test no longer order dependent.
* Make test logs easier to read.Jeremy Kemper2012-12-262-13/+11
| | | | | | 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-252-1/+19
|
* ActiveSupport::BufferedLogger can be subclassedYves Senn2012-12-252-2/+20
|
* Merge pull request #8592 from rafaelfranca/warning_fixGuillermo Iguaran2012-12-241-1/+5
|\ | | | | Remove warning of intance variable not initialized
| * Remove warning of intance variable not initializedRafael Mendonça França2012-12-231-1/+5
| |
* | minor grammar fixZoltan Kiss2012-12-241-1/+1
| |
* | silences "possibly useless use of :: in void context" warningsXavier Noria2012-12-241-7/+3
|/ | | | | | | | | | | | | The AS utility silence_warnings does not really silence this one, because it is issued at parse-time. It seemed to in some places because the constant was the only expression in the block and therefore it was its return value, that could potentially be used by silence_warnings are return value of the yield call. To bypass the warning we assign to a variable. The chosen variable is "_" because it is special-cased in parse.c not to issue an "assigned but unused variable" warning in turn.
* Move background jobs to the 'jobs' branch until fully baked. Not shipping ↵Jeremy Kemper2012-12-214-388/+0
| | | | with Rails 4.0.
* Merge pull request #8471 from kytrinyx/refactor-xml-to-hashSteve Klabnik2012-12-212-51/+101
|\ | | | | WIP Refactor xml conversion to hash
| * Refactor Hash.from_xml.Steve Klabnik + Katrina Owen2012-12-212-51/+101
| | | | | | | | | | | | | | | | | | | | | | | | 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-214-15/+100
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 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-204-15/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-214-21/+30
| | | | | | | | | | | | | | | | | | 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-214-30/+21
| | | | | | | | | | | | core_ext/logger
* | | Add ActiveSupport::Logger#silence that works the same as the old ↵David Heinemeier Hansson2012-12-215-20/+45
| | | | | | | | | | | | 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
| | | |