aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
Commit message (Collapse)AuthorAgeFilesLines
* Make File.atomic_write copy the original permissions or use the directories ↵Joshua Peek2008-08-061-6/+44
| | | | default.
* If it doesn't overflow, it won't have a .start method. So don't run the ↵Michael Koziarski2008-07-201-1/+1
| | | | second assertion either
* Handle the case where 64bit time_t won't overflow.Michael Koziarski2008-07-201-1/+6
|
* Add extra tests to ensure Hash#slice works with an array as a key. #613MatthewRudy2008-07-171-0/+21
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Revert "Hash#slice supports an array of keys [#613 state:resolved]"Pratik Naik2008-07-171-35/+21
| | | | This reverts commit 396f9df8916b71f83aad8d56559cf55fc8501679.
* Allow deep merging of hash values for nested with_options. [#490 state:resolved]Lawrence Pit2008-07-171-0/+10
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Hash#slice supports an array of keys [#613 state:resolved]Josh Owens2008-07-161-21/+35
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Added Object#metaclassJoshua Peek2008-07-151-0/+8
|
* Add in_groups to ActiveSupport::CoreExtensions::Array::Grouping. [#579 ↵Adrian Mugnolo2008-07-151-4/+46
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix TimeWithZone unmarshaling: coerce unmarshaled Time instances to utc, ↵gbuesing2008-07-141-0/+6
| | | | because Ruby's marshaling of Time instances doesn't respect the zone
* TimeWithZone: when crossing DST boundary, treat Durations of days, months or ↵gbuesing2008-06-291-0/+168
| | | | years as variable-length, and all other values as absolute length. A time + 24.hours will advance exactly 24 hours, but a time + 1.day will advance 23-25 hours, depending on the day. Ensure consistent behavior across all advancing methods.
* Added block-handling to Enumerable#many? (Damian Janowski) [#452 state:resolved]David Heinemeier Hansson2008-06-201-2/+7
|
* Added Array#second through Array#tenth as aliases for Array#[1] through ↵David Heinemeier Hansson2008-06-171-0/+14
| | | | Array#[9] [DHH]
* Change Enumberal#several? to Enumberal#many?David Heinemeier Hansson2008-06-131-3/+3
|
* Added Object#present? which is equivalent to !Object#blank? [DHH]David Heinemeier Hansson2008-06-121-0/+5
|
* Merge branch 'master' of git@github.com:rails/railsDavid Heinemeier Hansson2008-06-123-17/+38
|\
| * Performance: faster Object.subclasses_ofJeremy Kemper2008-06-081-1/+1
| |
| * Wrap date part value method tests inside a uses mocha block.Joshua Peek2008-06-071-16/+18
| |
| * Move Class::ModelName to Active Support module core_extJeremy Kemper2008-06-061-0/+19
| |
* | Added Enumberable#several? to encapsulate collection.size > 1 [DHH]David Heinemeier Hansson2008-06-121-0/+6
|/
* Fixed ambiguous first argument warning in ArrayExtTest.Joshua Peek2008-06-031-14/+12
|
* Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ↵Joshua Peek2008-06-035-157/+157
| | | | ActiveSupport [#238 state:resolved]
* Added tests [#279 state:resolved] (Nicholas Schlueter)David Heinemeier Hansson2008-06-023-0/+10
|
* Fixed Date#end_of_quarter to not blow up on May 31st [#289 state:resolved] ↵David Heinemeier Hansson2008-06-021-0/+1
| | | | (Danger)
* Hash.from_xml: datetime xml types overflow to Ruby DateTime class when out ↵gbuesing2008-05-181-0/+38
| | | | of range of Time. Adding tests for utc offsets
* TimeWithZone #+ and #- : ensure overflow to DateTime with Numeric arggbuesing2008-05-181-0/+7
|
* Include time zone offset in TimeWithZone#to_jsonDaniel Morrison2008-05-131-1/+1
|
* Adding Date.current, which returns Time.zone.today if config.time_zone is ↵gbuesing2008-05-081-0/+23
| | | | set; otherwise returns Date.today. ActionView date_helper uses Date.current to determine locale-appropriate default
* TimeWithZone: date part getter methods (#year #mon #day etc) are defined on ↵gbuesing2008-05-081-1/+9
| | | | class; no longer relying on method_missing
* Duration #since and #ago with no argument (e.g., 5.days.ago) return ↵gbuesing2008-04-202-0/+66
| | | | TimeWithZone when config.time_zone is set. Introducing Time.current, which returns Time.zone.now if config.time_zone is set, otherwise just returns Time.now
* Time#since behaves correctly when passed a Duration. Closes #11527 [kemiller]gbuesing2008-04-121-2/+53
|
* Add #getutc alias for DateTime#utcgbuesing2008-04-121-0/+1
|
* TimeWithZone respects config.active_support.use_standard_json_time_formatgbuesing2008-04-121-0/+7
|
* Time #yesterday and #tomorrow behave correctly crossing DST boundary. Closes ↵Geoff Buesing2008-04-041-0/+52
| | | | | | #7399 [sblackstone] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9221 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone: Adding tests for dst and leap day edge cases when advancing timeGeoff Buesing2008-04-021-0/+35
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Revert [9209] Use Hash#exceptPratik Naik2008-04-021-32/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9210 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding Hash#without Closes #7369 [eventualbuddha]Pratik Naik2008-04-021-0/+32
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9209 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone#method_missing: send to utc to advance with dst correctness, ↵Geoff Buesing2008-04-021-0/+63
| | | | | | otherwise send to time. Adding tests for time calculations methods git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9208 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add query methods for superclass_delegating_readerJeremy Kemper2008-03-311-4/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removing unnecessary uses_tzinfo helper from tests, given that TZInfo is now ↵Geoff Buesing2008-03-301-456/+453
| | | | | | bundled git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9150 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Play nice with 1.9's DateTime#to_sJeremy Kemper2008-03-291-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9137 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure threads finish running for time zone thread safety test.Josh Peek2008-03-291-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9136 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* config.time_zone and TimeWithZone#marshal_load accept tzinfo/Olson identifiersGeoff Buesing2008-03-281-0/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9108 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time.zone= accepts TZInfo::Timezone instances and Olson identifiers; wraps ↵Geoff Buesing2008-03-281-0/+28
| | | | | | result in TimeZone instance git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9107 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone time conversions don't need to be wrapped in TimeOrDateTime, ↵Geoff Buesing2008-03-281-0/+12
| | | | | | because TZInfo does this internally git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9106 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone#usec returns 0 instead of error when DateTime is wrappedGeoff Buesing2008-03-281-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9105 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that TimeWithZone#to_yaml works when passed a YAML::Emitter. [rick]Rick Olson2008-03-231-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure correct TimeWithZone#to_dateGeoff Buesing2008-03-221-0/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9079 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make TimeWithZone work with tzinfo 0.2.x: use ↵Geoff Buesing2008-03-211-80/+138
| | | | | | TZInfo::Timezone#zone_identifier alias for #abbreviation, silence warnings on tests. Raise LoadError when TZInfo version is < 0.2 by sniffing for TZInfo::TimeOrDateTime constant. Move all tzinfo-dependent TimeZone tests into uses_tzinfo block git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9071 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time, DateTime and TimeWithZone #in_time_zone defaults to Time.zone. ↵Geoff Buesing2008-03-171-25/+25
| | | | | | Removing now unneeded #in_current_time_zone. ActiveRecord time zone aware attributes updated to use #in_time_zone git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de