aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
Commit message (Collapse)AuthorAgeFilesLines
* Adding TimeWithZone #marshal_dump and #marshal_loadGeoff Buesing2008-03-033-0/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8975 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add OrderedHash#to_hash. Closes #11266 [josh]Michael Koziarski2008-03-033-0/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8974 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Hash#from_xml with Type records. Closes #9242 [Juanjo Bazan, Isaac Feliu]Jeremy Kemper2008-02-271-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changelog attribution for #9312Jeremy Kemper2008-02-271-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding Time#end_of_day, _quarter, _week, and _year. Closes #9312.Jeremy Kemper2008-02-275-0/+99
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add #clear to mem_cache_store, flushes all cachesJeremy Kemper2008-02-211-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8916 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pass array of addressesJeremy Kemper2008-02-171-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8888 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding TimeWithZone#between?Geoff Buesing2008-02-173-1/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8886 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time.=== returns true for TimeWithZone instancesGeoff Buesing2008-02-163-0/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone #+ and #- behave consistently with numeric arguments regardless ↵Geoff Buesing2008-02-163-4/+37
| | | | | | of whether wrapped time is a Time or DateTime; consistenty answers false to #acts_like?(:date) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8884 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add String#squish and String#squish! to remove consecutive chunks of ↵Michael Koziarski2008-02-164-0/+45
| | | | | | whitespace. Closes #11123 [jordi, Henrik N] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8878 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Serialize BigDecimals as Floats when using to_yaml. Closes #8746 ↵Michael Koziarski2008-02-153-0/+34
| | | | | | [ernesto.jimenez] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8877 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding TimeWithZone #to_yaml, #to_datetime, #eql? and method aliases for ↵Geoff Buesing2008-02-103-0/+38
| | | | | | duck-typing compatibility with Time git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8854 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone #in_time_zone returns +self+ if zone argument is the same as ↵Geoff Buesing2008-02-103-0/+7
| | | | | | #time_zone git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8853 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding TimeWithZone #to_a, #to_f, #to_i, #httpdate, #rfc2822Geoff Buesing2008-02-103-1/+48
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8852 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pruning unneeded TimeWithZone#change_time_zone_to_currentGeoff Buesing2008-02-102-5/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8851 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time#zone=, #in_time_zone and #change_time_zone accept a DurationGeoff Buesing2008-02-103-1/+28
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time#in_time_zone handles Time.local instances correctlyGeoff Buesing2008-02-103-4/+21
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pruning unneeded Time#change_time_zone_to_current. Enhanced docs for ↵Geoff Buesing2008-02-103-28/+8
| | | | | | #change_time_zone git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8848 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeZone#new renamed #local, so that new TimeWithZone instances can be ↵Geoff Buesing2008-02-103-5/+7
| | | | | | created via Time.zone.local() git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix that the options hash can be nil when coming from fragmentsDavid Heinemeier Hansson2008-02-071-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8818 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* ActiveSupport::Base64.encode64s since Base64 is deprecatedJeremy Kemper2008-02-075-11/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base64.encode64s to encode values in base64 without the newlines. This ↵David Heinemeier Hansson2008-02-074-0/+31
| | | | | | makes the values immediately usable as URL parameters or memcache keys without further processing [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8816 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove :nodoc: entries around the ActiveSupport test/unit assertions. Closes ↵Rick Olson2008-02-072-3/+7
| | | | | | #10946 [dancroak, jamesh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8810 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Time Zone support to ActiveRecord, and config.time_zone property for ↵Rick Olson2008-02-065-1/+28
| | | | | | specifying a default Time Zone. Closes #10982 [Geoff Buesing, rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8806 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: declare utf-8 file encodingJeremy Kemper2008-02-024-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Slight camelize speedup [Pratik Naik]Jeremy Kemper2008-02-021-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8788 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* 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-012-0/+28
| | | | 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-012-4/+7
| | | | 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-293-2/+13
| | | | | | 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-263-0/+9
| | | | | | correctly git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8732 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* with_timezone test helper renamed with_env_tz, to distinguish between ↵Geoff Buesing2008-01-264-29/+31
| | | | | | setting ENV['TZ'] and setting Time.zone in tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8731 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time#- coerces TimeWithZone argument to a Time instance so that difference ↵Geoff Buesing2008-01-254-0/+27
| | | | | | 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-256-21/+27
| | | | | | 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-252-6/+14
| | | | | | 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-253-31/+53
| | | | | | | | 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-253-2/+4
| | | | | | [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-253-13/+22
| | | | | | 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-237-4/+82
| | | | | | #<=> 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-233-7/+17
| | | | 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-233-6/+8
| | | | | | 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-232-1/+2
| | | | | | 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-232-16/+3
| | | | 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-233-18/+6
| | | | | | 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-236-1/+47
| | | | | | strings with cross-platform consistency git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8698 5ecf4fe2-1ee6-0310-87b1-e25e094e27de