aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | Add docs for CachingKeyGeneratorSantiago Pastorino2012-11-151-0/+6
| |
* | Add nodoc to DummyKeyGenerator since it's a private thingSantiago Pastorino2012-11-151-1/+1
| |
* | Merge pull request #8112 from rails/encrypted_cookiesSantiago Pastorino2012-11-152-2/+53
|\ \ | | | | | | Encrypted cookies
| * | Rename secret_token_key to secret_key_baseSantiago Pastorino2012-11-031-1/+1
| | |
| * | Move ensure_secret_secure to DummyKeyGeneratorSantiago Pastorino2012-11-031-0/+24
| | |
| * | Cache generated keys per KeyGenerator instance using salt + key_sizeSantiago Pastorino2012-11-031-0/+14
| | |
| * | Add cookie.encrypted which returns an EncryptedCookieJarSantiago Pastorino2012-11-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | How to use it? cookies.encrypted[:discount] = 45 => Set-Cookie: discount=ZS9ZZ1R4cG1pcUJ1bm80anhQang3dz09LS1mbDZDSU5scGdOT3ltQ2dTdlhSdWpRPT0%3D--ab54663c9f4e3bc340c790d6d2b71e92f5b60315; path=/ cookies.encrypted[:discount] => 45
| * | Sign cookies using key deriverSantiago Pastorino2012-11-031-0/+10
| |/
* | Merge pull request #8219 from nikitug/threadsafe_xmlmini_with_backendRafael Mendonça França2012-11-151-9/+29
|\ \ | | | | | | | | | | | | | | | | | | Make XmlMini.with_backend usable with threads Conflicts: activesupport/CHANGELOG.md
| * | Make XmlMini.with_backend usable with threadsNikita Afanasenko2012-11-151-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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-10/+22
|/ / | | | | | | | | 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-13/+31
| |
* | backporting Struct#to_h from ruby 2.0Aaron Patterson2012-11-131-0/+6
| |
* | Merge pull request #8180 from freerange/mocha-fixes-supporting-only-0.13-onwardsCarlos Antonio da Silva2012-11-132-25/+5
|\ \ | | | | | | Simplify code by taking advantage of latest mocha (v0.13.0).
| * | Simplify code by taking advantage of latest mocha (v0.13.0).James Mead2012-11-122-25/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only works with mocha v0.13.0 or later. Note that this also fixes a few subtle bugs present in the current implementation :- * Mocha was raising a `MiniTest::Assertion` instead of a `Mocha::ExpectationError` as intended. The latter is not recognized by MiniTest as an assertion failure and so it is recorded as a test *error*, not a test *failure* as it ought to. This leads to potentially confusing output in the test results. * Mocha verification should happen as part of the test. The verification of expectations is equivalent to a set of assertions. These assertions should happen as *part of* the test so that they have a chance to cause the test to fail, and not just as part of the teardown. Also if an assertion fails during the test, then there is no need to verify expectations, because only the first assertion failure is normally reported and all subsequent bets are off. * Expectation verification should be counted as an assertion. Mocha cannot record each expectation verification as an assertion, because we weren't passing in an assertion counter to `#mocha_verify`.
* | | `#as_json` isolates options when encoding a hash. Closes #8182Yves Senn2012-11-121-1/+1
|/ / | | | | | | | | | | 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.
* | Match classes without to_s conversions.Nikita Afanasenko2012-11-111-10/+10
| | | | | | | | There is no need in `value_under_case.class.to_s` conversion since case already matches classes with `Class === value_under_case`.
* | Deprecate Hash#diff.Steve Klabnik2012-11-091-0/+1
| | | | | | | | | | | | 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-11/+26
|\ \ | | | | | | 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-11/+26
| | |
* | | fix warnings in Ruby 2.0Aaron Patterson2012-11-072-0/+4
| | |
* | | mocha_standalone is now deprecated. Switch to mocha/api.Jeremy Kemper2012-11-051-1/+1
| | |
* | | Remove AS::Concern extension from Testing::TaggedLoggingCarlos Antonio da Silva2012-11-051-4/+0
| | |