aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #10453 from vipulnsward/destructive_sortJeremy Kemper2013-05-051-1/+1
|\ | | | | Speed up Hash#to_param by switching from #sort to #sort!
| * use destructive sort on array in Hash#to_param for performance gains.Vipul A M2013-05-051-1/+1
| | | | | | | | Check https://gist.github.com/vipulnsward/6aad158c06a22f931a71 to see the gains.
* | use nokogirisax as a backendAnton Kalyaev2013-05-051-3/+3
| | | | | | | | | | Most likely someone just forgot to change it during copying and pasting test cases from nokigiri engine test.
* | Fixed bad tests to clean up after themselves.Ryan Davis2013-05-034-6/+27
| |
* | Squashed commit of the following:Aaron Patterson2013-05-0316-172/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 2683de5da85135e8d9fe48593ff6167db9d64b18 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:29:20 2013 -0700 cannot support infinite ranges right now commit cebb6acef2c3957f975f6db4afd849e535126253 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:26:12 2013 -0700 reverting infinity comparison commit 385f7e6b4efd1bf9b89e8d607fcb13e5b03737ea Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:23:28 2013 -0700 Revert "Added ability to compare date/time with infinity" This reverts commit 38f28dca3aa16efd6cc3af6453f2e6b9e9655ec1. Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/core_ext/numeric/infinite_comparable.rb activesupport/test/core_ext/date_ext_test.rb activesupport/test/core_ext/date_time_ext_test.rb activesupport/test/core_ext/numeric_ext_test.rb activesupport/test/core_ext/time_ext_test.rb activesupport/test/core_ext/time_with_zone_test.rb commit 0d799a188dc12b18267fc8421675729917610047 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:18:53 2013 -0700 Revert "Refactor infinite comparable definition a bit" This reverts commit dd3360e05e4909f2f0c74a624cccc2def688f828. commit 42dec90e49745bbfae546f0560b8783f6b48b074 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:18:47 2013 -0700 Revert "Require 'active_support/core_ext/module/aliasing' in the infinite_comparable module" This reverts commit 7003e71c13c53ec3d34250560fbf80b8381df693.
* Merge pull request #10413 from vipulnsward/change_groupingCarlos Antonio da Silva2013-05-031-1/+1
|\ | | | | Use faster Array.new instead of []*padding
| * Use faster Array.new instead of []*paddingVipul A M2013-05-021-1/+1
| |
* | Revert "Merge pull request #10433 from ↵Jon Leighton2013-05-031-33/+11
| | | | | | | | | | | | | | | | | | | | wangjohn/making_callbacks_more_performant" This reverts commit 09751fdc847c25237891a8fcb0c2312e39bbe86d, reversing changes made to 6a5ab08d21c4284a05f5e34484b18a91d4e5c50c. This change caused a failure in actionpack/test/abstract/callbacks_test.rb.
* | Work around change in how MiniTest detects SIGINFOJon Leighton2013-05-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MiniTest 4.7.3 detects the presence of SIGINFO and stores the answer in a constant. It seems that MiniTest 4.7.4 changes this, and instead relies on an info_signal method being implemented on the runner object. In ActiveSupport::Testing::Isolation, we use ProxyTestResult to stand in for the runner object. This object implements `method_missing`, and as such its #info_signal method has a truthy return value. This results in MiniTest trying to install the SIGINFO handler on platforms where SIGINFO does not exists. To fix, I am simply defining an explicit ProxyTestResult#info_signal method.
* | Improving the performance of callbacks by keeping a hash of thewangjohn2013-05-021-11/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | callbacks in the CallbackChain, so you don't have to iterate over all callbacks when checking for duplicates. Benchmark results when the tests in activerecord/test/cases/associations_test.rb were run with and without the change: == On master (when scanning all of the callbacks): --------------------------------------------------------- % cumulative self self total time seconds seconds calls ms/call ms/call name --------------------------------------------------------- 1.85 9.26 0.82 18412 0.04 0.05 ActiveSupport::Callbacks::Callback#matches? 1.22 12.32 0.54 18412 0.03 0.08 ActiveSupport::Callbacks::Callback#duplicates? 0.93 14.61 0.41 19600 0.02 0.21 ActiveSupport::Callbacks::CallbackChain#remove_duplicates Finished tests in 1.217065s, 30.4010 tests/s, 53.4072 assertions/s. --------------------------------------------------------- == On my branch (when using a hash to check callback duplication): --------------------------------------------------------- % cumulative self self total time seconds seconds calls ms/call ms/call name --------------------------------------------------------- 0.15 29.63 0.06 1188 0.05 0.72 ActiveSupport::Callbacks::CallbackChain#handle_duplicates 0.00 40.50 0.00 84 0.00 0.12 ActiveSupport::Callbacks::Callback#matches? 0.00 40.50 0.00 84 0.00 0.12 ActiveSupport::Callbacks::Callback#duplicates? 0.00 40.50 0.00 91 0.00 0.22 ActiveSupport::Callbacks::CallbackChain#scan_and_remove_duplicates Finished tests in 1.117757s, 33.1020 tests/s, 58.1522 assertions/s. ---------------------------------------------------------
* | Merge pull request #10412 from vipulnsward/fix_callback_test_typoCarlos Antonio da Silva2013-05-021-1/+1
|\ \ | | | | | | Fix typo in test
| * | Fix typo in testVipul A M2013-05-021-1/+1
| |/
* | Fixes Dependency bug in Active SupportTomohiko Himura2013-05-023-0/+3
| | | | | | | | DateTime defined in date.rb
* | Fix failures in AS with minitest 4.7.4Carlos Antonio da Silva2013-05-011-0/+3
| |
* | Revert "Object#in? also accepts multiple parameters"Brian Morearty2013-05-012-29/+9
|/ | | | | | | | | | | | | | | | | | This reverts commit ebf69ab1636df74c76332c53bcd3d8494fb91b45. `in?` must not take multiple parameters because its behavior would be ambiguous: # Test if "B" is included in a list of names with `"B".in?(*names)`: names = ["BMorearty"] "B".in?(*names) # => true names = ["BMorearty","rubyduo"] "B".in?(*names) # => false Conflicts: activesupport/lib/active_support/core_ext/object/inclusion.rb activesupport/test/core_ext/object/inclusion_test.rb
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-05-011-6/+6
|\
| * documentation fixes for Array.wrap and AR::Validations::AssociatedValidatorHrvoje Šimić2013-04-171-6/+6
| |
* | Fix typos in deprecation proxy docs [ci skip]Carlos Antonio da Silva2013-04-301-3/+3
| |
* | Merge pull request #10339 from eiel/unused-requireRafael Mendonça França2013-04-301-1/+0
|\ \ | | | | | | remove unused require
| * | remove unused requireTomohiko Himura2013-04-251-1/+0
| | | | | | | | | | | | not used remove_possible_method
* | | rails/master is now 4.1.0.betaRafael Mendonça França2013-04-292-510/+3
| | |
* | | Bump version to rc1David Heinemeier Hansson2013-04-291-1/+1
| | |
* | | Merge pull request #10364 from wangjohn/refactoring_activesupport_cacheJeremy Kemper2013-04-281-10/+23
|\ \ \ | | | | | | | | Making the retrieval of the cache store class a method
| * | | Making the retrieval of the cache store class a method, also wrotewangjohn2013-04-281-10/+23
| | | | | | | | | | | | | | | | comments for the expand_cache_key method.
* | | | Use new hash syntax in module delegation docs [ci skip]Carlos Antonio da Silva2013-04-281-1/+1
|/ / /
* | | Module#delegate checks nilness rather that falsehood if :allow_nil is true, ↵Xavier Noria2013-04-262-30/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and avoids multiple evaluation of the target method Notes: 1) I hope nilness is a word. 2) See rationale for avoiding multiple evaluation in a comment in the patch, credit goes to @jeremy for pointing out this gotcha in the existing implementation. 3) Embeds a little joke dedicated to @pixeltrix (it could be worse! :D). References #10347.
* | | Merge pull request #9980 from stouset/patch-1Andrew White2013-04-261-4/+5
|\ \ \ | | | | | | | | | | | | | | | | Improve poor security recommendation in docs [ci skip]
| * | | Improve poor security recommendation in docsStephen Touset2013-03-281-4/+5
| | | | | | | | | | | | | | | | | | | | As reported in #9960, the current documentation recommends an insecure practice for key generation from a password (a single round of SHA-256). The modified documentation uses ActiveSupport::KeyGenerator to perform proper key stretching.
* | | | Merge pull request #10351 from ↵Xavier Noria2013-04-262-5/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | JonRowe/update_as_date_next_week_to_document_intent Propose better documentation for ActiveSupports `next_week` functionaility
| * | | | formattingJon Rowe2013-04-261-1/+1
| | | | |
| * | | | better document `next_week` functionaility closes #9568Jon Rowe2013-04-262-5/+10
| | |/ / | |/| |
* / | | Delegation method bugLi Ellis Gallardo2013-04-252-0/+19
|/ / / | | | | | | | | | | | | | | | Add documentation and test to delegation method that make sure we're aware that when a delegated object is not nil or false and doesn't respond to the method it will still raise a NoMethodError exception.
* | | refactor number helperVipul A M2013-04-251-2/+3
| | |
* | | Merge pull request #10318 from vipulnsward/refactor_obviousGuillermo Iguaran2013-04-231-4/+1
|\ \ \ | | | | | | | | refactor initialization of array
| * | | refactor initialization of arrayVipul A M2013-04-231-4/+1
| | | |
* | | | Adjust for daylight savings in String#to_timeAndrew White2013-04-232-10/+124
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes in b79adc4323 had a bug where if the time in the String was in standard time but the current time was in daylight savings then the calculated adjustment was off by an hour. This commit fixes this and adds extra tests for the following: * time in string is standard time, current time is standard time * time in string is standard time, current time is daylight savings * time in string is daylight savings, current time is standard time * time in string is daylight savings, current time is daylight savings Fixes #10306.
* | | remove redundant variableVipul A M2013-04-221-2/+0
| | |
* | | Created a registry based on the +PerThreadRegistry+ module forwangjohn2013-04-221-2/+20
| | | | | | | | | | | | subscriber queues. Helps limit the number of thread locals.
* | | Move CHANGELOG entry to topRafael Mendonça França2013-04-221-4/+4
| | | | | | | | | | | | [ci skip]
* | | Merge pull request #10096 from benofsky/fix_skipping_object_callback_filtersRafael Mendonça França2013-04-213-2/+43
|\ \ \ | | | | | | | | Fixes skipping object callback filters
| * | | Fixes skipping object callback filtersBen McRedmond2013-04-043-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows you to skip callbacks that are defined by objects, e.g. for `ActionController`: skip_after_filter MySpecialFilter Previously this didn't work due to a bug in how Rails compared callbacks in `Callback#matches?`. When a callback is compiled, if it's an object filter (i.e. not a method, proc, etc.), `Callback` now defines a method on `@klass` that is derived from the class name rather than `@callback_id`. So, when `skip_callback` tries to find the appropriate callback to remove, `Callback` can regenerate the method name for the filter object and return the correct value for `Callback#matches?`.
* | | | extract array to a constantVipul A M2013-04-221-1/+3
| | | |
* | | | symbolize_keys => symbolize_keys! on new hash;Vipul A M2013-04-191-1/+1
| | | | | | | | | | | | | | | | "There're" => There are for better readability
* | | | Merge pull request #10235 from joergleis/patch-1Michael Koziarski2013-04-181-5/+4
|\ \ \ \ | | | | | | | | | | Reorganize MessageEncryptor
| * | | | Reorganize MessageEncryptorjgls2013-04-191-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) According to OpenSSL's documentation, cipher.random_iv must be called after cipher.encrypt and already sets the generated IV on the cipher. 2) OpenSSL::CipherError was moved to OpenSSL::Cipher::CipherError in Ruby 1.8.7. Since Rails 4 requires at least Ruby 1.9.3, support for the old location can be dropped.
* | | | | The increment and decrement commands in the local cache are exactly thewangjohn2013-04-171-18/+14
| | | | | | | | | | | | | | | | | | | | same, so their logic is being refactored.
* | | | | Refactored the storage of a temporary version of the local cache intowangjohn2013-04-171-8/+6
| | | | | | | | | | | | | | | | | | | | its own method.
* | | | | Add nodoc to LocalCacheRegistryRafael Mendonça França2013-04-171-1/+1
| | | | | | | | | | | | | | | [ci skip]
* | | | | Adding a local thread registry to store local caches.wangjohn2013-04-171-15/+32
| | | | |
* | | | | more descriptive NameError's messages for class attributesHrvoje Šimić2013-04-172-6/+8
| | | | |