aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
Commit message (Collapse)AuthorAgeFilesLines
* Make notifications go off even when an error is raised, so that we capture ↵Justin George2010-05-021-2/+2
| | | | | | | | | | | | | | the underlying performance data [#4505 state:resolved] This is important when trying to keep track of many layers of interrelated calls i.e.: ActiveRecord::Base.transaction do MyModel.find(1) #ActiveRecord::NotFound end # should capture the full time until the error propagation Signed-off-by: José Valim <jose.valim@gmail.com>
* revises tests for Date.yesterday and Date.tomorrowXavier Noria2010-05-021-3/+3
|
* repair the activesupport message encryptor tests for me, do so in the same ↵Marius Nuennerich2010-05-011-0/+10
| | | | | | | | way as jeremy did with message verifier [#4517 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Delegate Inflector.transliterate to i18n. [#4508 state:resolved]Norman Clarke2010-04-301-33/+18
| | | | | | | Ancillary changes: Moved Chars#normalize into a class method; removed unused UTF_PAT constant. Signed-off-by: José Valim <jose.valim@gmail.com>
* array.to_xml should be able to handle all types of data elements [#4490 ↵Neeraj Singh2010-04-291-5/+5
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix BigDecimal JSON encoding test. [#4495 state:resolved]Cezary Baginski2010-04-281-3/+3
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* ActiveSupport::Cache refactoringBrian Durand2010-04-271-188/+461
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All Caches * Add default options to initializer that will be sent to all read, write, fetch, exist?, increment, and decrement * Add support for the :expires_in option to fetch and write for all caches. Cache entries are stored with the create timestamp and a ttl so that expiration can be handled independently of the implementation. * Add support for a :namespace option. This can be used to set a global prefix for cache entries. * Deprecate expand_cache_key on ActiveSupport::Cache and move it to ActionController::Caching and ActionDispatch::Http::Cache since the logic in the method used some Rails specific environment variables and was only used by ActionPack classes. Not very DRY but there didn't seem to be a good shared spot and ActiveSupport really shouldn't be Rails specific. * Add support for :race_condition_ttl to fetch. This setting can prevent race conditions on fetch calls where several processes try to regenerate a recently expired entry at once. * Add support for :compress option to fetch and write which will compress any data over a configurable threshold. * Nil values can now be stored in the cache and are distinct from cache misses for fetch. * Easier API to create new implementations. Just need to implement the methods read_entry, write_entry, and delete_entry instead of overwriting existing methods. * Since all cache implementations support storing objects, update the docs to state that ActiveCache::Cache::Store implementations should store objects. Keys, however, must be strings since some implementations require that. * Increase test coverage. * Document methods which are provided as convenience but which may not be universally available. MemoryStore * MemoryStore can now safely be used as the cache for single server sites. * Make thread safe so that the default cache implementation used by Rails is thread safe. The overhead is minimal and it is still the fastest store available. * Provide :size initialization option indicating the maximum size of the cache in memory (defaults to 32Mb). * Add prune logic that removes the least recently used cache entries to keep the cache size from exceeding the max. * Deprecated SynchronizedMemoryStore since it isn't needed anymore. FileStore * Escape key values so they will work as file names on all file systems, be consistent, and case sensitive * Use a hash algorithm to segment the cache into sub directories so that a large cache doesn't exceed file system limits. * FileStore can be slow so implement the LocalCache strategy to cache reads for the duration of a request. * Add cleanup method to keep the disk from filling up with expired entries. * Fix increment and decrement to use file system locks so they are consistent between processes. MemCacheStore * Support all keys. Previously keys with spaces in them would fail * Deprecate CompressedMemCacheStore since it isn't needed anymore (use :compress => true) [#4452 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* JSON: encode objects that don't have a native JSON representation using ↵Jeremy Kemper2010-04-261-2/+19
| | | | to_hash, if available, instead of instance_values (the old fallback) or to_s (other encoders' default). Encode BigDecimal and Regexp encode as strings to conform with other encoders. Try to transcode non-UTF-8 strings.
* Use explicit source encoding rather than forced UTF-8 from US-ASCII.Santiago Pastorino2010-04-262-2/+2
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* allow unsubscribe by name or subscription [#4433 state:resolved]David Chelimsky2010-04-241-0/+22
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Change HWIA#stringify_keys to return a HWIA not a HashJeremy Kemper2010-04-221-0/+3
|
* Restore HWIA#stringify_keys! and update changelogJeremy Kemper2010-04-221-3/+3
|
* HWIA delegates to to_hash symbolize_keys and stringify_keys and bang methods ↵Santiago Pastorino2010-04-221-2/+36
| | | | | | are not in the api Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Clean up the config object in ActionPack. Create config_accessor which just ↵José Valim2010-04-221-0/+42
| | | | delegates to the config object, reducing the number of deprecations and add specific tests.
* updates String#to_(date|date_time|time) to return nil for blank stringsDaniel Neighman2010-04-211-3/+6
|
* Switch to TimezoneProxy for later support of deferred TZ loadingJeremy Kemper2010-04-202-6/+9
|
* MemoryStore#read_multi(*keys) for dev-mode compatibility with memcache storeJeremy Kemper2010-04-191-0/+7
|
* removes code written for Ruby < 1.8.7Xavier Noria2010-04-171-12/+0
|
* avoid warning: ambiguous first argument; put parentheses or even spacesSantiago Pastorino2010-04-161-1/+1
|
* utc_offset returns nil for unknown zonesSantiago Pastorino2010-04-141-1/+7
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Test for unknown zone with nil utc_offsetSantiago Pastorino2010-04-141-0/+5
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Improve reliability of Inflector.transliterate. [#4374 state:resolved]Norman Clarke2010-04-122-1/+54
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* ActiveSupport::BacktraceCleaner#remove_filters! allows for completely ↵Doug Alcorn2010-04-101-1/+6
| | | | | | untouched backtrace [#4079 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Make tidy_bytes work on 1.9 and improve its performance. [#4350 state:resolved]Norman Clarke2010-04-091-26/+47
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Changed the way inflections for uncountables work for 'funky jeans' [#3576 ↵Rolf Bjaanes2010-04-051-0/+2
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* moves Object#singleton_class to Kernel#singleton_class to match Ruby also ↵Xavier Noria2010-04-052-5/+11
| | | | there, same for #class_eval to simplify, and adds coverage for class_eval
* Parameterize should accept malformed utf8 characters [#4323 state:resolved]Kristopher Murata2010-04-041-4/+8
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* delegate unknown timezones to TZInfoSantiago Pastorino2010-04-021-0/+8
|
* Fix class_attribute so that it works with singleton classes.Carl Lerche2010-04-011-0/+6
|
* avoid method redefined; discarding old empty? warning [#4302 state:committed]Santiago Pastorino2010-03-304-16/+8
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* New assertion: assert_present [#4299 state:committed]Juanjo Bazan2010-03-301-1/+21
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* new assertion: assert_blankJuanjo Bazan2010-03-301-0/+28
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* Ruby 1.9.2: marshaling round-trips Time#zoneJeremy Kemper2010-03-283-14/+10
|
* Drop expires argument from call to @data in MemCacheStore so it works with ↵Vladimir Andrijevik2010-03-281-0/+6
| | | | | memcache-client and memcached gems, as advertised [#3672 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* Time zone tests were right all along.José Valim2010-03-281-4/+4
|
* Ruby's marshaling of Time instances doesn't respect the zone [#4282 ↵Santiago Pastorino2010-03-271-2/+2
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Limit Array#extract_options! to directl instances of Hash and HWIA. Add ↵wycats2010-03-271-0/+34
| | | | extractable_options? to Hash so that subclasses of Hash can opt-into extractable behavior. This fixes an issue where respond_with wasn't working with subclasses of Hash that were provided by other libraries (such as CouchDB or Mashie) [#4145 state:resolved]
* fixing inconsistency with cattr_reader and matter_reader [#4172 state:resolved]Kabari Hendrick2010-03-272-1/+13
| | | Signed-off-by: wycats <wycats@gmail.com>
* Add support for a type=binary with an optional encoding=base64. If the ↵Josh Franklin2010-03-261-1/+3
| | | | | | encoding attribute is absent, the data is considered unencoded. [#2966 state:resolved]
* Remove test ordering bugEvan Phoenix2010-03-221-8/+14
| | | | | Don't reuse classes with class attributes when testing different use cases of class attributes.
* Singleton classes returns parent's methods with instance_methods(false) and ↵José Valim2010-03-191-0/+14
| | | | this makes remove_method in Module#delegate fail. Add a test case and fix the bug.
* Make dependencies_test pass running standalone [#4215 state:resolved]Santiago Pastorino and Sebastian Martinez2010-03-181-1/+1
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Added missing requires abstract_unit and activesupport to the loadpath of ↵Santiago Pastorino and Sebastian Martinez2010-03-184-2/+6
| | | | | | ts_isolated [#4215 state:committed] Signed-off-by: wycats <wycats@gmail.com>
* Fixed require lineSebastian Martinez2010-03-181-1/+1
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Mark bang instrumentations as something that you shuold not be listening to.José Valim2010-03-171-3/+3
|
* Any reason we can't just use the slow 1.8 path for transliteration in 1.9?wycats2010-03-171-12/+4
|
* Fix some more warnings on 1.9wycats2010-03-172-3/+10
|
* Be sure to pass through args to to_yamlJeremy Kemper2010-03-111-1/+1
|
* OutputBuffer#to_yaml should return string yaml, not some custom class dumpJeremy Kemper2010-03-111-0/+4
|
* class_attribute gets instance methods which delegate to but may override ↵Jeremy Kemper2010-03-081-10/+25
| | | | their class values as you'd expect. Disable instance writer methods with :instance_writer => false.