aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
Commit message (Collapse)AuthorAgeFilesLines
* make Hash#extract! more symmetric with Hash#sliceMikhail Dieterle2012-10-081-0/+17
|
* Ruby 2 compat. Hash[] now raises on bad elements rather than ignoring them. ↵Jeremy Kemper2012-10-061-1/+0
| | | | No sense over-testing this MRI-specific behavior. See ruby/ruby@8d6add973ebcb3b4c1efbfaf07786550a3e219af
* Merge pull request #6952 from NZKoz/key_generatorMichael Koziarski2012-10-021-0/+32
|\ | | | | Add ActiveSupport::KeyGenerator as a simple wrapper around PBKDF2
| * Add ActiveSupport::KeyGenerator as a simple wrapper around PBKDF2Michael Koziarski2012-10-011-0/+32
| | | | | | | | | | | | This will be used to derive keys from the secret and a salt, in order to allow us to do things like encrypted cookie stores without using the secret for multiple purposes directly.
* | warning fixed: (...) interpreted as grouped expressionArun Agrawal2012-10-011-1/+1
| |
* | fix broken cache testsBrian Durand2012-09-301-1/+1
|/
* Fix other assertions that were backwards.Steve Klabnik2012-09-301-5/+5
| | | | This time I used ack.
* fix order of assertions.Steve Klabnik2012-09-301-2/+2
|
* Optimize ActiveSupport::Cache::Entry to reduce memory and processing overhead.Brian Durand2012-09-301-38/+53
|
* Changed test names to match proper contextWojciech Wnętrzak2012-09-281-2/+2
|
* ConstantLookup is not needed in every TestCase decendantAndy Lindeman2012-09-261-0/+1
|
* Tests tag the Rails log with the current test class and test caseJeremy Kemper2012-09-261-0/+15
|
* Allow wrapping a logger that hasn't set a formatter. Default to our ↵Jeremy Kemper2012-09-261-0/+8
| | | | SimpleFormatter. Otherwise we try extending nil with the tagging API.
* Add logger.push_tags and .pop_tags to complement logger.taggedJeremy Kemper2012-09-261-0/+17
|
* Add missing inflector dependencyMike Moore2012-09-251-1/+1
|
* Add register_spec_type test coverageMike Moore2012-09-241-0/+23
|
* Create ActiveSupport::Testing::ConstantLookupMike Moore2012-09-241-0/+58
| | | | | AS::TC::ConstantLookup walks the test's name to find the constant it is describing. This additional lookup logic is needed to better support minitest's spec DSL.
* Remove .rb from require sentencesJosé Corcuera Z2012-09-211-1/+1
|
* Merge pull request #7613 from marcandre/delegate_to_classJeremy Kemper2012-09-201-0/+11
|\ | | | | Nice and easy delegation to the class
| * Nice and easy delegation to the classMarc-Andre Lafortune2012-09-111-0/+11
| |
* | Fix #6962. AS::TimeWithZone#strftime responds incorrectly to %:z and %::z ↵kennyj2012-09-201-0/+8
| | | | | | | | format strings.
* | No need to defensively work jobs in another threadJeremy Kemper2012-09-181-1/+1
| |
* | Date.beginning_of_week thread local and beginning_of_week application config ↵gregolsen2012-09-181-0/+50
| | | | | | | | option added (default is Monday)
* | Remove unncessary code.kennyj2012-09-171-1/+0
| |
* | Always run jobs using a consumer, even in synchronous & test queues, to ↵Jeremy Kemper2012-09-163-37/+59
| | | | | | | | ensure shared behavior.
* | set up config_accessor with a default value by blockLarry Lv2012-09-171-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ActiveSupport::Configurable should allow config_accessor to take default value by block, just like cattr_accessor. class User include ActiveSupport::Configurable config_accessor :hair_colors do [:brown, :black, :blonde, :red] end end User.hair_colors # => [:brown, :black, :blonde, :red] * remove trailing whitespaces in configurable.rb and its test file. * Update ActiveSupport CHANGELOG.
* | Move queue classes to ActiveSupportSantiago Pastorino2012-09-143-0/+228
| |
* | Allow passing block to deep_merge and deep_merge!Pranas Kiziela2012-09-131-0/+10
| | | | | | | | | | Hash#merge accepts block that you can use to customize how hash values are merged. This change makes merge and deep_merge compatible.
* | Change ActiveSupport::Deprecation to class.Piotr Niełacny2012-09-131-56/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActiveSupport::Deprecation is now a class rather than a module. You can get instance of ActiveSupport::Deprecation calling #instance method. ActiveSupport::Deprecation.instance But when you need to get new object od ActiveSupport::Deprecation you need to just call #new. @instance = ActiveSupport::Deprecation.new Since you can create a new object, you can change the version and the name of the library where the deprecator concerned. ActiveSupport::Deprecation.new('2.0', 'MyGem') If you need use another deprecator instance you can select it in the options of deprecate method. deprecate :method, :deprecator => deprecator_instance Documentation has been updated.
* | extend ActiveSupport::Deprecation with self, allow other objects to ↵Robert Pankowecki2012-09-131-0/+127
|/ | | | | | | | | | extend/include it also. test local deprecation deprecator object Test ActiveSupport::Deprecation when included
* &#39 dates back to SGML when &#x27 was introduced in HTML 4.0Kalys Osmonov2012-09-091-1/+1
|
* Fix AS tests due to builder change with nil values / empty stringsCarlos Antonio da Silva2012-09-071-2/+2
| | | | | Check 0180e090ab6cbe66f7b521a0c03e278a0463accd for more reasoning about that.
* Extend HashWithIndifferentAccess#update to take an optional blockLeo Cassarani2012-09-051-0/+23
| | | | | | | | | | | | | When a block is passed into the method, it will be invoked for each duplicated key, with the key in question and the two values as arguments. The value for the duplicated key in the receiver will be set to the return value of the block. This behaviour matches Ruby's long-standing implementation of Hash#update and is intended to provide a more consistent interface. HashWithIndifferentAccess#merge is also affected by the change, as it uses #update internally.
* detect circular constant autoloadingXavier Noria2012-08-283-0/+16
| | | | | | | Nowadays circular autoloads do not work, but the user gets a NameError that says some constant is undefined. That's puzzling, because he is normally trying to autoload a constant he knows can be autoloaded. With this check we can give a better error message.
* Merge pull request #7029 from panthomakos/date-and-timeRafael Mendonça França2012-08-254-469/+215
|\ | | | | Refactored common date and time calculations.
| * Refactored common date and time calculations.Pan Thomakos2012-08-044-469/+215
| | | | | | | | | | | | | | | | * Added the `DateAndTime::Calculations` module that is included in Time and Date. It houses common calculations to reduce duplicated code. * Simplified and cleaned-up the calculation code. * Removed duplication in tests by adding a behavior module for shared tests. I also added some missing tests.
* | Fix ActiveSupport tests that depend on run orderFrancesco Rodriguez2012-08-234-14/+23
| |
* | Revert "Use join without default separator"José Valim2012-08-231-0/+5
| | | | | | | | | | | | This reverts commit b0ab8dc0b2b0f580ffe5ac9ff57fd13152e18577 because it was removing the contents of the message when we did not have any tag. A test case is also committed.
* | skip the memcache tests if the memcache server is not upAaron Patterson2012-08-222-48/+50
| |
* | revises a brittle test in Active SupportXavier Noria2012-08-221-1/+1
| | | | | | | | | | | | | | The revised test assumed that the default permissions of a file matched the umask of the process, but in the general case that depends also on the file system. This test was failing in the /vagrant shared folder of Rails development boxes.
* | Make ActiveSupport::Autoload localJosé Valim2012-08-211-11/+1
| | | | | | | | | | | | | | Previously, ActiveSupport::Autoload was global and reserved for usage inside Rails. This pull request makes it local, fixes its test (they were not being run because its file was named wrongly) and make it part of Rails public API.
* | Add test to cover increment/decrement of non-existing key in MemCacheStoreGuillermo Iguaran2012-08-171-0/+2
| |
* | Replace deprecated `memcache-client` gem with `dalli` in ↵Guillermo Iguaran2012-08-172-9/+9
| | | | | | | | | | | | ActiveSupport::Cache::MemCacheStore memcache-client was deprecated in favour of dalli in 2010.
* | Evented notifications take priority over Timed notificationsEric Saxby2012-08-111-0/+20
| | | | | | | | | | | | | | In cases where a notification subscriber includes methods to support both Evented and Timed events, Evented should take priority over Timed. This allows subscribers to be backwards compatible (older Rails only allows Timed events) while defaulting to newer behavior.
* | Ensure I18n format values always have precedence over defaultsCarlos Antonio da Silva2012-08-112-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always merge I18n format values, namespaced or not, over the default ones, to ensure I18n format defaults will have precedence over our namespaced values. Precedence should happen like this: default :format default :namespace :format i18n :format i18n :namespace :format Because we cannot allow our namespaced default to override a I18n :format config - ie precision in I18n :format should always have higher precedence than our default precision for a particular :namespace. Also simplify default format options logic.
* | Fallback to :en locale instead of handling a constant with defaultsCarlos Antonio da Silva2012-08-112-3/+38
| | | | | | | | | | | | | | | | Action Pack already comes with a default locale fine for :en, that is always loaded. We can just fallback to this locale for defaults, if values for the current locale cannot be found. Closes #4420, #2802, #2890.
* | Deprecate ActiveSupport::JSON::VariableErich Menge2012-08-071-0/+7
| | | | | | | | | | | | | | | | | | | | Reason: ActiveSupport::JSON::Variable is not used anymore internally. It was deprecated in 3-2-stable but we reverted all the deprecation for point releases. See #6536 and #6546. Conflicts: activesupport/lib/active_support/json/variable.rb
* | defines String#indent [closes #7263] [Xavier Noria & Ace Suares]Xavier Noria2012-08-071-0/+56
| |
* | Merge pull request #7272 from lexmag/string_inquirerRafael Mendonça França2012-08-061-3/+11
|\ \ | | | | | | Add AS::StringInquirer#respond_to? method
| * | Add AS::StringInquirer#respond_to? methodAleksey Magusev2012-08-061-3/+11
| |/ | | | | | | Consistently with #method_missing