aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
Commit message (Collapse)AuthorAgeFilesLines
* Simplified, faster implementation of Benchmark.realtime [Alexander Dymo]Michael Koziarski2008-02-021-0/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8771 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MemCacheStore#write and #delete return a boolean indicating whether the ↵Jeremy Kemper2008-02-011-5/+16
| | | | | | operation succeeded git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8767 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Bundled memcache client consistently returns server responses and checks for ↵Jeremy Kemper2008-02-011-8/+25
| | | | | | errors git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8766 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MemCacheStore#write uses add by default and set if :force => trueJeremy Kemper2008-02-011-2/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8765 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add a handful of cache store testsJeremy Kemper2008-02-011-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8764 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* cache.fetch(key, :force => true) to force a cache missJeremy Kemper2008-02-011-4/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8763 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove unnofficial 'PST' timezoneRick Olson2008-01-291-2/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8747 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Support retrieving TimeZones with a Duration. TimeZone[-28800] == ↵Rick Olson2008-01-291-2/+3
| | | | | | TimeZone[-480.minutes]. [rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone#- added, so that #- can handle a Time or TimeWithZone argument ↵Geoff Buesing2008-01-261-0/+6
| | | | | | correctly git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8732 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time#- coerces TimeWithZone argument to a Time instance so that difference ↵Geoff Buesing2008-01-251-0/+11
| | | | | | in seconds can be calculated. Closes #10914 [Geoff Buesing, yyyc514] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8730 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding UTC zone to TimeZone; TimeWithZone no longer has to fake UTC zone ↵Geoff Buesing2008-01-252-9/+9
| | | | | | with nil git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8720 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time.get_zone refactored to private method, given that the encapsulated ↵Geoff Buesing2008-01-251-6/+12
| | | | | | logic is only useful internally git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time.zone uses thread-local variable for thread safety. Adding ↵Geoff Buesing2008-01-251-7/+13
| | | | | | | | Time.use_zone, for overriding Time.zone locally inside a block. Removing unneeded Time.zone_reset! git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeZone#to_s uses UTC rather than GMT; reapplying change that was undone in ↵Geoff Buesing2008-01-251-1/+1
| | | | | | [8679]. References #1689 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8716 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time.days_in_month defaults to current year if no year is supplied as ↵Geoff Buesing2008-01-251-12/+7
| | | | | | argument, uses Date.gregorian_leap? to determine leap year, and uses constant lookup to determine days in month. Closes #10799 [Radar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8715 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding Time and DateTime #compare_with_coercion, which layers behavior on ↵Geoff Buesing2008-01-233-1/+29
| | | | | | #<=> so that any combination of Time, DateTime and ActiveSupport::TimeWithZone instances can be chronologically compared git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8711 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeZone#now returns an ActiveSupport::TimeWithZoneGeoff Buesing2008-01-231-6/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8710 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time #in_current_time_zone and #change_time_zone_to_current return self when ↵Geoff Buesing2008-01-231-2/+2
| | | | | | Time.zone is nil git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8708 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove unneeded #to_datetime_default_s alias for DateTime#to_s, given that ↵Geoff Buesing2008-01-231-1/+0
| | | | | | we inherit a #to_default_s from Date that does exactly the same thing git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8705 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Enumerable#group_by uses ActiveSupport::OrderedHashJeremy Kemper2008-01-231-15/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8700 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor Time and DateTime #to_formatted_s: use ternary instead of nested ↵Geoff Buesing2008-01-232-18/+4
| | | | | | if/else git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8699 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding Time and DateTime #formatted_offset, for outputting +HH:MM utc offset ↵Geoff Buesing2008-01-233-1/+18
| | | | | | strings with cross-platform consistency git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8698 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding alternate_utc_string option to TimeZone#formatted_offset. Removing ↵Geoff Buesing2008-01-231-10/+2
| | | | | | unneeded TimeZone#offset git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce ActiveSupport::TimeWithZone, for wrapping Time instances with a ↵Geoff Buesing2008-01-235-0/+230
| | | | | | TimeZone. Introduce instance methods to Time for creating TimeWithZone instances, and class methods for managing a global time zone git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8696 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Log an error to the console when the memcache server is raisingDavid Heinemeier Hansson2008-01-221-3/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8687 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace non-dst-aware TimeZone class with dst-aware class from ↵Geoff Buesing2008-01-211-57/+216
| | | | | | tzinfo_timezone plugin. TimeZone#adjust and #unadjust are no longer available; tzinfo gem must now be present in order to perform time zone calculations, via #local_to_utc and #utc_to_local methods. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8679 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Extract ActiveSupport::Callbacks from Active Record, test case setup and ↵Jeremy Kemper2008-01-193-46/+99
| | | | | | teardown, and ActionController::Dispatcher. Closes #10727. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introducing DateTime #utc, #utc? and #utc_offset, for duck-typing ↵Geoff Buesing2008-01-161-0/+20
| | | | | | compatibility with Time. Closes #10002 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8649 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use non-blocking writing if available. Closes #10794 [lifofifo]Michael Koziarski2008-01-131-3/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8638 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time#to_json uses Numeric#to_utc_offset_s to output ↵Geoff Buesing2008-01-121-1/+1
| | | | | | cross-platform-consistent representation without having to convert to DateTime. References #9750 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8636 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor number-to-HH:MM-string conversion logic from ↵Geoff Buesing2008-01-123-5/+23
| | | | | | TimeZone#formatted_offset to reusable Numeric#to_utc_offset_s method git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8635 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Simplify to_formatted_s docs. Closes #10747 [Jeremy Kemper]Jeremy Kemper2008-01-093-74/+38
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8608 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document date and time to_formatted_s. Closes #10747 [leethal]Jeremy Kemper2008-01-093-5/+66
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8606 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix up Enumerable#group_byJeremy Kemper2008-01-091-7/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8604 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve documentation to classify to make it clear that it expects names to ↵Michael Koziarski2008-01-082-4/+10
| | | | | | be plural. Reference #10615 [kris_chambers] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use a decorator module for Files instantiated by Hash.from_xml. Add test ↵Jeremy Kemper2008-01-061-3/+18
| | | | | | coverage. Closes #10726 [Cheah Chu Yeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8579 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Simplify and speedup Hash#stringify_keys! References #10717 [Cheah Chu Yeow]Jeremy Kemper2008-01-061-4/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8576 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* * Continue evolution toward ActiveSupport::TestCase and friends. #10679 ↵Jeremy Kemper2008-01-055-12/+140
| | | | | | | | | [Josh Peek] * TestCase: introduce declared setup and teardown callbacks. Pass a list of methods and an optional block to call before setup or after teardown. Setup callbacks are run in the order declared; teardown callbacks are run in reverse. [Jeremy Kemper] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8570 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9: Module#local_constants can now just use constants(false). Closes ↵Jeremy Kemper2008-01-041-12/+21
| | | | | | #10648 [Xavier Noria] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8555 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Moved the caching stores from ActionController::Caching::Fragments::* to ↵David Heinemeier Hansson2008-01-0313-0/+1163
| | | | | | ActiveSupport::Cache::*. If you're explicitly referring to a store, like ActionController::Caching::Fragments::MemoryStore, you need to update that reference with ActiveSupport::Cache::MemoryStore [DHH] Deprecated ActionController::Base.fragment_cache_store for ActionController::Base.cache_store [DHH] All fragment cache keys are now by default prefixed with the 'views/' namespace [DHH] Added ActiveRecord::Base.cache_key to make it easier to cache Active Records in combination with the new ActiveSupport::Cache::* libraries [DHH] Added ActiveSupport::Gzip.decompress/compress(source) as an easy wrapper for Zlib [Tobias Luetke] Included MemCache-Client to make the improved ActiveSupport::Cache::MemCacheStore work out of the box [Bob Cottrell, Eric Hodel] Added config.cache_store to environment options to control the default cache store (default is FileStore if tmp/cache is present, otherwise MemoryStore is used) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8546 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: special-case String access methods to not depend on #charsJeremy Kemper2008-01-031-48/+72
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8538 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed String#titleize to work for strings with 's too (closes #10571) [trek]David Heinemeier Hansson2008-01-031-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8533 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: add #raise to AS::BasicObject, fixup Duration argument ↵Jeremy Kemper2008-01-022-1/+6
| | | | | | error. Closes #10594. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8523 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct Hash#assert_valid_keys docs. Closes #10621 [Cheah Chu Yeow, blackanger]Jeremy Kemper2008-01-021-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed the implementation of Enumerable#group_by to use a double array ↵David Heinemeier Hansson2007-12-311-2/+7
| | | | | | approach instead of a hash such that the insert order is honored [DHH/Marcel] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8516 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: introduce ActiveSupport::FrozenObjectError normalize ↵Jeremy Kemper2007-12-291-0/+8
| | | | | | TypeError vs RuntimeError handling. Closes #10645 [Frederick Cheung] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8510 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* remove multiple enumerations from ActiveSupport::JSON#convert_json_to_yaml ↵Rick Olson2007-12-281-5/+8
| | | | | | when dealing with date/time values. [rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8505 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce ActiveSupport::BasicObject which bridges Builder::BlankSlate and ↵Jeremy Kemper2007-12-281-4/+13
| | | | | | Ruby 1.9 BasicObject. Closes #10634 [Frederick Cheung] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8500 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: introduce instance_variable_names. Closes #10630 [Frederick ↵Jeremy Kemper2007-12-281-0/+4
| | | | | | Cheung] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8499 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: don't use obsolete ParseDateJeremy Kemper2007-12-271-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8490 5ecf4fe2-1ee6-0310-87b1-e25e094e27de