aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Update CHANGELOG for include_root_in_json.Jeremy Kemper2010-04-261-0/+5
|
* Reuse Active Model serialization in Active Resource. [#2584 state:committed]Santiago Pastorino2010-04-262-69/+25
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Use explicit source encoding rather than forced UTF-8 from US-ASCII.Santiago Pastorino2010-04-264-5/+4
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Use Config::CONFIG['host_os'] instead of RUBY_PLATFORM [#4477 state:resolved]Anil Wadghule2010-04-269-9/+17
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make db console work for all versions of ruby on Windows.unknown2010-04-261-1/+2
| | | | | | [#3999 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* extract ActionController::TestCase::BehaviorDavid Chelimsky2010-04-261-126/+133
| | | | | | | | | | - this makes it possible for other test frameworks to hook into testing facilities provided by Rails without having to subclass AC::TestCase. [#4474 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* No need to require test and rdoc tasks.José Valim2010-04-261-3/+0
|
* Ensure application rake tasks and generators are loaded after the ones ↵José Valim2010-04-264-2/+29
| | | | specified in railties/engines/rails. [#4471 state:resolved]
* Refactor tests by moving all middleware tests to the same place.José Valim2010-04-264-120/+117
|
* Revert "create option to include_root_in_json for ActiveResource [#2584 ↵Jeremy Kemper2010-04-252-32/+6
| | | | | | | | | | state:committed]" This reverts commits 72f89b5d971b48a133c4c0af56fbeda35d738dae, 137d8e0b2fe9fcc4fdac6cbbd44ca010784e5972. Should reuse Active Model. [#2584 state:incomplete]
* Action Pack: fix tests with -K*, work around Ruby 1.9.1 constant lookup.Cezary Baginski2010-04-253-6/+6
| | | | | | [#4473 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Support fixtures for namespaced models [#2965 state:resolved]Andrew White2010-04-259-7/+45
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix validates_numericaly_of only integer error message [#4406 state:resolved]reu2010-04-253-20/+28
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* allow unsubscribe by name or subscription [#4433 state:resolved]David Chelimsky2010-04-243-5/+38
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Missed commit: explicit source encodingJeremy Kemper2010-04-241-1/+1
|
* Explicit source encodingJeremy Kemper2010-04-241-0/+1
|
* Remove quoted_string_prefix entirely since PostgreSQL was the only database ↵Jeremy Kemper2010-04-242-9/+5
| | | | adapter relying on it.
* Add a test for assert_recognizes on ActionDispatch::IntegrationTest [#4390 ↵Santiago Pastorino2010-04-242-1/+13
| | | | | | state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make assert_recognizes work in IntegrationTest [#4390 state:committed]Matthew Rudy Jacobs2010-04-241-1/+3
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* PostgreSQL: always rely on pg driver for escape/unescape and quoting dutiesJeremy Kemper2010-04-241-88/+7
|
* PostgreSQL: use standard-conforming strings if possibleJeremy Kemper2010-04-241-30/+14
|
* Rename fieldWithErrors style to field_with_errors. Remove unused alert style.Jeremy Kemper2010-04-245-12/+10
|
* Use Array.wrap to quiet 1.8.8 deprecationJeremy Kemper2010-04-241-3/+4
|
* Drop support for postgres driver. Use pg >= 0.9.0.Jeremy Kemper2010-04-242-16/+4
|
* Ensure require and load are private - h/t apeirosJeremy Kemper2010-04-241-0/+1
|
* Fix render :xml test (ht Simo Niemelä)José Valim2010-04-241-2/+2
|
* 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-224-7/+8
|
* HWIA symbolize_keys now returns a hash so no need to do this anymoreSantiago Pastorino2010-04-221-1/+1
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make ActionDispatch url_for use HWIA symbolize_keysSantiago Pastorino2010-04-222-4/+8
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* 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>
* Ensure that url_for uses symbolized keys in the controller. [#4391]J Smith2010-04-222-1/+11
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Speed up xml serializer by computing values just once and remove unecessary ↵José Valim2010-04-222-29/+17
| | | | code duplication.
* Always downstream given options in :json, :xml and :js renderers and add ↵José Valim2010-04-223-9/+37
| | | | tests for it.
* Clean up the config object in ActionPack. Create config_accessor which just ↵José Valim2010-04-2218-226/+162
| | | | delegates to the config object, reducing the number of deprecations and add specific tests.
* params already has a setted controller and action hereSantiago Pastorino2010-04-211-1/+0
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* url_for now works with HashWithIndifferentAccess ht jay [#4391 state:committed]Santiago Pastorino2010-04-212-1/+11
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* updates String#to_(date|date_time|time) to return nil for blank stringsDaniel Neighman2010-04-212-3/+9
|
* Squash backtraces from Bundler.setupAndre Arko2010-04-211-2/+6
|
* Some require indifferent_access addedSantiago Pastorino2010-04-216-1/+7
| | | | Signed-off-by: Xavier Noria <fxn@ubuntu.(none)>
* require without .rbSantiago Pastorino2010-04-211-1/+1
| | | | Signed-off-by: Xavier Noria <fxn@ubuntu.(none)>
* It should be possible to render :json with optionswycats2010-04-201-1/+1
|
* TimeZones lazy loadSantiago Pastorino2010-04-201-24/+9
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Build PredicateBuilder object only when neededPratik Naik2010-04-211-3/+1
|
* Remove only formats in shortcuts and do it just once.José Valim2010-04-201-4/+5
|
* Move observers initialization to after_config blocks, they are still being ↵José Valim2010-04-201-13/+9
| | | | initialized to early (before load paths are being set).