aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
Commit message (Collapse)AuthorAgeFilesLines
...
* The rake task :environment now loads config/environment.rb instead of ↵José Valim2010-04-291-5/+7
| | | | initializing the application on its own. This fixes [#4492 state:resolved] and also avoids the application being initialized twice in some rake tasks.
* object_id may be negative, producing an invalid symbol. h/t Markus SchirpJeremy Kemper2010-04-281-1/+1
|
* 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-279-509/+1403
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* use ordinary syntax for options to be well-formed in 1.8Xavier Noria2010-04-271-1/+1
|
* JSON: encode objects that don't have a native JSON representation using ↵Jeremy Kemper2010-04-263-7/+43
| | | | 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-263-3/+4
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Use Config::CONFIG['host_os'] instead of RUBY_PLATFORM [#4477 state:resolved]Anil Wadghule2010-04-262-2/+4
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Action Pack: fix tests with -K*, work around Ruby 1.9.1 constant lookup.Cezary Baginski2010-04-251-2/+2
| | | | | | [#4473 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* allow unsubscribe by name or subscription [#4433 state:resolved]David Chelimsky2010-04-242-5/+37
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* HWIA relies on Hash#symbolize_keys and #stringify_keys extensions.Santiago Pastorino2010-04-221-0/+2
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Change HWIA#stringify_keys to return a HWIA not a HashJeremy Kemper2010-04-222-1/+4
|
* Restore HWIA#stringify_keys! and update changelogJeremy Kemper2010-04-223-5/+7
|
* HWIA delegates to to_hash symbolize_keys and stringify_keys and bang methods ↵Santiago Pastorino2010-04-222-4/+40
| | | | | | 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-222-18/+61
| | | | 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-212-3/+9
|
* TimeZones lazy loadSantiago Pastorino2010-04-201-24/+9
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Switch to TimezoneProxy for later support of deferred TZ loadingJeremy Kemper2010-04-203-9/+10
|
* Missing requires addedSantiago Pastorino2010-04-201-0/+3
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* much complete rdoc for String#ordXavier Noria2010-04-191-3/+19
|
* revises the rdoc of String#ordXavier Noria2010-04-191-1/+5
|
* MemoryStore#read_multi(*keys) for dev-mode compatibility with memcache storeJeremy Kemper2010-04-192-1/+14
|
* remove code for Ruby < 1.8.7Santiago Pastorino2010-04-181-12/+0
|
* removes code written for Ruby < 1.8.7Xavier Noria2010-04-172-19/+0
|
* Make i18n fallbacks configurable and fallback to the default locale by ↵Sven Fuchs2010-04-171-0/+35
| | | | | | | | | | | | | | | | | | | | | default in production [#4428 state:resolved] Allows to configure locale fallbacks through config.i18n.fallbacks. The default setting config.i18n.fallbacks = true in production.rb will make I18n.t lookup fallback to the I18n.default_locale if a translation could not be found for the current or given locale. config.fallbacks = true config.fallbacks.map = { :ca => :es } config.fallbacks.defaults = [:'es-ES', :es] config.fallbacks = [:'es-ES', :es] config.fallbacks = { :ca => :es } config.fallbacks = [:'es-ES', :es, { :ca => :es }] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* avoid warning: ambiguous first argument; put parentheses or even spacesSantiago Pastorino2010-04-161-1/+1
|
* fixing invalid yaml [#4418 state:resolved]Aaron Patterson2010-04-161-1/+4
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* add missing requires to Rescuable and RouteSet [#4415 state:committed]Mislav Marohnić2010-04-161-0/+1
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* utc_offset returns nil for unknown zonesSantiago Pastorino2010-04-142-3/+10
| | | | 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>
* Update changelogs for releaseDavid Heinemeier Hansson2010-04-131-1/+1
|
* Added missing require and delete unused one on proc.rbSantiago Pastorino2010-04-131-1/+1
|
* Improve reliability of Inflector.transliterate. [#4374 state:resolved]Norman Clarke2010-04-124-25/+93
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Avoid unnecessary allocations in Inflector.underscore [#3626 state:resolved]Joe Van Dyk2010-04-121-5/+7
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Not using class_eval wasn't adding clarity herewycats2010-04-101-15/+24
|
* Made arrays of ActiveRecords, and any classes, with namespaces convert to ↵mfoster2010-04-101-1/+1
| | | | | | valid xml. [#3824 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* ActiveSupport::BacktraceCleaner#remove_filters! allows for completely ↵Doug Alcorn2010-04-102-2/+13
| | | | | | untouched backtrace [#4079 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Update versions (otherwise you install a gem from source as beta3 but ↵José Valim2010-04-101-1/+1
| | | | internally it's beta2) and update CHANGELOG.
* Refactor for readabilityJeremy Kemper2010-04-091-30/+24
|
* Fixed method sign errorSantiago Pastorino2010-04-091-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* fix stack trace lines on class_evalSantiago Pastorino2010-04-095-6/+6
| | | | 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-093-44/+119
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* fisting stack trace [#4349 state:resolved]Aaron Patterson2010-04-081-1/+1
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make sure MemCacheStore logger existsJoshua Peek2010-04-071-3/+3
|
* Changed the way inflections for uncountables work for 'funky jeans' [#3576 ↵Rolf Bjaanes2010-04-053-2/+4
| | | | | | 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-0510-14/+20
| | | | 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-042-5/+12
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* delegate unknown timezones to TZInfoSantiago Pastorino2010-04-022-5/+20
|
* utc_offset is no longer required on TimeZone and if it's not supplied we ↵Santiago Pastorino2010-04-021-61/+18
| | | | delegate to TZInfo
* Fix class_attribute so that it works with singleton classes.Carl Lerche2010-04-012-1/+7
|