aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | | 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
| | | |
* | | | Refactor Inflector#ordinal to avoid converting the number twiceCarlos Antonio da Silva2012-11-041-2/+4
| | | |
* | | | Use `tag!` instead of `method_missing` in `to_xml` conversions.Nikita Afanasenko2012-11-042-5/+5
| |/ / |/| | | | | | | | 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.
* | | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-11-034-9/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: actionpack/lib/action_controller/metal/mime_responds.rb activerecord/lib/active_record/attribute_methods.rb guides/source/working_with_javascript_in_rails.md
| * | | Adding a missing parenthesis in the doc of String#parameterize.Geoffrey Roguelon2012-10-241-2/+2
| | | |
| * | | fix output messages - docs [ci skip]Francesco Rodriguez2012-10-224-6/+6
| | | |
| * | | More changes around 1.9 hash syntaxAvnerCohen2012-10-212-4/+4
| | | | | | | | | | | | | | | | Added missing space in previous hash related commit
* | | | Fixed timezone mapping of Solomon Islands.Steve Klabnik2012-11-011-1/+1
| |/ / |/| | | | | | | | | | | | | | | | | | | | 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-3011-14/+17
| | |
* | | Provide a call stack for deprecation warnings where needed.Nikita Afanasenko2012-10-294-6/+12
| | | | | | | | | | | | It's sometimes hard to quickly find where deprecated call was performed, especially in case of migrating between Rails versions. So this is an attempt to improve the call stack part of the warning message by providing caller explicitly.
* | | atomicc.rb: Don't assume we may chown/chmod a file.Daniele Sluijters2012-10-291-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Replace flow-control exception with explicit test.Patrick Mahoney2012-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was noticed while profiling 'assets:precompile' in JRuby that exception creation was consuming a large portion of time, and some of that was due to File.atomic_write. Testing first with File.exists? eliminates the need for an exception which should be a perfomrance improvement on both JRuby and MRI. In this case, the stat() isn't even extra overhead, since it is always called.
* | | Fix queueing tests that should be consuming the queue rather than draining itJeremy Kemper2012-10-261-1/+1
| | |
* | | Job consumer logs to Rails.logger by defaultJeremy Kemper2012-10-261-2/+5
| | |
* | | Job worker thread logs failed jobs tooJeremy Kemper2012-10-261-1/+1
| | |
* | | Job worker thread logs to stderr if no logger is providedJeremy Kemper2012-10-261-2/+1
| | |
* | | Implement replace method so key? works correctly.David Graham2012-10-261-0/+8
| | |
* | | Remove ActiveRecord::Model consant from AS::TestCaseCarlos Antonio da Silva2012-10-261-1/+1
| | | | | | | | | | | | Fixing the build.
* | | pass the key to the block in cache.fetch on missesNoah Hendrix2012-10-231-5/+5
|/ /
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-10-215-8/+8
|\ \ | | | | | | | | | | | | | | | Conflicts: activesupport/lib/active_support/core_ext/hash/slice.rb guides/source/active_support_core_extensions.md
| * | Hash Syntax changes to 1.9 formatAvnerCohen2012-10-205-9/+9
| | |
* | | Make DescendantsTracker thread safe and optimize the #descendants method.thedarkone2012-10-181-19/+34
| | |
* | | some ruby interpreters don't have ruby-prof so just skip the testsAaron Patterson2012-10-181-1/+1
| | | | | | | | | | | | rather than exiting the process.
* | | Revert "remove unnecessary object/conversions file"Xavier Noria2012-10-162-2/+9
| | | | | | | | | | | | | | | | | | | | | This file is used at least by Active Merchant, its existence is maybe not necessary but no big deal either. This reverts commit ae9b3d7cecd77b9ace38671b183e1a360bf632b6.
* | | Backpedal from class-oriented config.queue. Set an actual queue instance.Jeremy Kemper2012-10-121-4/+0
| | |
* | | Remove the queue container. Premature consolidation. Set up and maintain ↵Jeremy Kemper2012-10-121-26/+0
| | | | | | | | | | | | queues in the classes that use them instead.
* | | Merge pull request #7007 from Mik-die/hash_extractRafael Mendonça França2012-10-121-3/+3
|\ \ \ | | | | | | | | make Hash#extract! more symmetric with Hash#slice
| * | | make Hash#extract! more symmetric with Hash#sliceMikhail Dieterle2012-10-081-3/+3
| | | |