Joshua Peek
be078ee162
Run callbacks from object's metaclass [ #575 state:resolved]
2008-07-15 22:01:02 -05:00
Joshua Peek
f4f6e57e8c
Added Object#metaclass
2008-07-15 22:01:02 -05:00
Adrian Mugnolo
fc89a95193
Add in_groups to ActiveSupport::CoreExtensions::Array::Grouping. [ #579 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-15 15:04:26 +01:00
gbuesing
3451045658
Fix TimeWithZone unmarshaling: coerce unmarshaled Time instances to utc, because Ruby's marshaling of Time instances doesn't respect the zone
2008-07-14 23:16:39 -05:00
Tarmo Tänav
911c2c3813
Some performance tweaks to ActiveSupport::Memoizable
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-14 20:23:23 -05:00
Joshua Peek
001c8beb4d
memorize typo
2008-07-14 20:02:59 -05:00
Joshua Peek
8a9934a9d9
Added Memoizable mixin for caching simple lazy loaded attributes
2008-07-14 19:50:32 -05:00
Pratik Naik
4f75840d72
Add Inflection rules for String#humanize. [ #535 state:resolved] [dcmanges]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 13:25:36 +01:00
gbuesing
676d6a6514
TimeWithZone: when crossing DST boundary, treat Durations of days, months or 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.
2008-06-29 15:21:40 -05:00
Ernie Miller
d0092dc44d
Added support for regexp matching of priority zones in time_zone_select [ #195 state:resolved]
2008-06-29 13:37:07 -05:00
David Heinemeier Hansson
161ab28b7c
Added block-handling to Enumerable#many? (Damian Janowski) [ #452 state:resolved]
2008-06-20 11:31:06 -05:00
Jeremy Kemper
f47c81ff37
Fall back to #to_s for cache key expansion
2008-06-20 00:25:41 -07:00
David Heinemeier Hansson
22af62cf48
Added Array#second through Array#tenth as aliases for Array#[1] through Array#[9] [DHH]
2008-06-17 17:37:29 -05:00
David Heinemeier Hansson
ba0f38f89e
Change Enumberal#several? to Enumberal#many?
2008-06-13 17:34:17 -05:00
David Heinemeier Hansson
a3caf28da3
Added Object#present? which is equivalent to !Object#blank? [DHH]
2008-06-12 18:30:56 -05:00
David Heinemeier Hansson
ea3a7e1bb1
Merge branch 'master' of git@github.com:rails/rails
2008-06-12 17:48:30 -05:00
David Heinemeier Hansson
556204abaf
Added Enumberable#several? to encapsulate collection.size > 1 [DHH]
2008-06-12 17:46:15 -05:00
Jeremy Kemper
16a9787bf0
Add empty setup and teardown methods to rule out default setup behavior in base class
2008-06-09 23:04:51 -07:00
Jeremy Kemper
6c970d79a0
Performance: faster Object.subclasses_of
2008-06-08 00:35:36 -07:00
Joshua Peek
ceb5b6dbb1
Wrap date part value method tests inside a uses mocha block.
2008-06-07 23:25:34 -05:00
Jeremy Kemper
566d717d78
Move Class::ModelName to Active Support module core_ext
2008-06-06 03:38:05 -07:00
Joshua Peek
5fe2878973
Renamed StringQuestioneer to StringInquirer.
2008-06-04 15:06:32 -05:00
Joshua Peek
6e85f14817
Namespaced StringQuestioneer under ActiveSupport.
2008-06-04 15:02:51 -05:00
David Heinemeier Hansson
8afa725f4b
Wrapped Rails.env in StringQuestioneer so you can do Rails.env.development? [DHH]
2008-06-03 17:44:56 -05:00
Steve Purcell
7cfa6ec8a3
Add more standard Hash methods to ActiveSupport::OrderedHash [ #314 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-06-03 14:15:33 -05:00
Joshua Peek
a977f3e88e
Fixed ambiguous first argument warning in ArrayExtTest.
2008-06-03 13:35:03 -05:00
Joshua Peek
c08547d226
Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ActiveSupport [ #238 state:resolved]
2008-06-03 13:32:53 -05:00
David Heinemeier Hansson
da91450e68
Added tests [ #279 state:resolved] (Nicholas Schlueter)
2008-06-02 22:05:27 -05:00
David Heinemeier Hansson
64fea9c45c
Fixed Date#end_of_quarter to not blow up on May 31st [ #289 state:resolved] (Danger)
2008-06-02 22:02:43 -05:00
David Heinemeier Hansson
a855ab89b7
Added a test for Gzip
2008-06-02 17:42:10 -05:00
Tom Ward
77e45352e7
Fixed Dependencies so load errors are not masked behind a 'Expected x.rb to define X' message when mechanism is not set to :load [ #87 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-05-31 13:33:38 -07:00
gbuesing
f88267d532
TimeZone#to_s shows offset as GMT instead of UTC, because GMT will be more familiar to end users (see time zone selects used by Windows OS, google.com and yahoo.com.) Reverts [8370]
2008-05-25 11:56:29 -05:00
Tom Ward
ebb642fa3a
Fix Dependencies watch_frames collection. [ #24 state:resolved]
...
Previously, the code collecting watch_frames could fail leaving
watch_frames defined but nil. The cleanup code checks watch_frames
is defined, but not that it holds a value, raising an undefined method
on NilClass error rather than the original cause. This can make
debugging the underlying cause a total pain.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-20 11:44:23 +01:00
gbuesing
cee9297c9b
Hash.from_xml: datetime xml types overflow to Ruby DateTime class when out of range of Time. Adding tests for utc offsets
2008-05-18 11:48:33 -05:00
gbuesing
cde9c09a52
TimeWithZone #+ and #- : ensure overflow to DateTime with Numeric arg
2008-05-18 11:15:29 -05:00
gbuesing
be85868987
Time#to_json: don't convert to utc before encoding. References #175
2008-05-18 10:48:11 -05:00
Joshua Peek
49846f8586
Create a seperate file for ActiveSupport::OrderedHash.
2008-05-14 12:48:37 -05:00
Daniel Morrison
f498f221bd
Include time zone offset in TimeWithZone#to_json
2008-05-13 09:50:45 -07:00
Pratik Naik
2270371f5d
Remove unnecessary DeprecatedInstanceVariable class
2008-05-13 10:39:45 +01:00
gbuesing
66728087d0
Adding Date.current, which returns Time.zone.today if config.time_zone is set; otherwise returns Date.today. ActionView date_helper uses Date.current to determine locale-appropriate default
2008-05-08 22:48:47 -05:00
gbuesing
4f03190f26
TimeWithZone: date part getter methods (#year #mon #day etc) are defined on class; no longer relying on method_missing
2008-05-08 22:07:21 -05:00
gbuesing
06a7c2948a
Time.zone.parse: return nil for strings with no date information
2008-05-08 21:30:17 -05:00
gbuesing
fb9bf16e96
Time.zone.parse: compatibility with far future date with time zone offset in string. Eliminate creation of additional TimeWithZone instance to determine utc offset.
2008-05-08 20:56:38 -05:00
Scott Fleckenstein
eb5b93be74
Fix Time.zone.parse from stripping time zone information and make Time aware attribute methods use Time.zone.parse instead of to_time
2008-05-08 19:25:31 -05:00
Pratik Naik
a53331a161
Add class to deprecate instance variables
...
Add ActiveSupport::Deprecation::DeprecatedInstanceVariable class to
deprecate instance variables of primitive types such as stings.
2008-05-06 11:52:44 +01:00
Sean Ouimet
d75525b045
Added OrderedHash#delete [ #113 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-05-05 10:03:11 -05:00
Jeremy Kemper
c699a4daf1
Ruby 1.9 compat: compatibility wrapper for new Module#const_defined? behavior
2008-05-01 13:34:31 -07:00
gbuesing
32b82e4c6f
Duration #since and #ago with no argument (e.g., 5.days.ago) return 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
2008-04-20 21:57:04 -05:00
Joshua Peek
cf04e62127
Tidy up ActiveSupport::Callbacks::CallbackChain instance API.
2008-04-17 23:30:01 -05:00
jweiss
9e1d506a8c
Support options passed to ActiveSupport::Cache :mem_cache_store [ #14 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-04-17 12:58:31 -05:00