Commit Graph

588 Commits

Author SHA1 Message Date
Luca Guidi
ce65a05c5b Fix Ruby's Time marshaling bug in pre-1.9 versions of Ruby: utc instances are now correctly unmarshaled with a utc zone instead of the system local zone [#900 state:resolved] 2008-08-27 08:57:36 -05:00
Hongli Lai (Phusion
b3411ff59e Deprecate Rails::SecretKeyGenerator in favor of ActiveSupport::SecureRandom.
SecureRandom has a few minor security enhancements and can be used as a drop-in replacement

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#913 state:committed]
2008-08-27 15:08:16 +02:00
Jeremy Kemper
5e1ceb153c Work around frozen Date memoization 2008-08-25 17:05:50 -07:00
Peter Wagenet
a652c300ac New inflectors will overwrite defaults [#337 state:resolved]
Signed-off-by: Tarmo Tänav <tarmo@itech.ee>
2008-08-23 20:43:22 +03:00
Amos King
381210daa0 camelize(:lower) should always downcase first character. [#696 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-08-22 13:31:13 +01:00
Frederick Cheung
654c41255d Mark Class as not being duplicable. [#829 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-08-21 18:40:20 +01:00
Joshua Peek
6be8251ec8 Simplified and renamed CallbackChain union method to replace_or_append! 2008-08-21 00:51:06 -05:00
Joshua Peek
f388725bd6 Partial revert of 2681685 premature TypeArray abstraction 2008-08-21 00:28:25 -05:00
Joshua Peek
5de340e79f Ensure objects cached with MemoryStore are immutable 2008-08-19 19:20:10 -05:00
Joshua Peek
96ab01e8f2 Maintain a seperate buffer for each thread 2008-08-18 23:36:13 -05:00
Joshua Peek
a4da8175a2 Replace MemoryStore mutex with a monitor to avoid issues with nested calls 2008-08-18 20:17:08 -05:00
Joshua Peek
8cb14ee120 Ensure results returned by a memoized method are immutable 2008-08-13 21:30:46 -05:00
Joshua Peek
b8b30985d5 Marshal FileStore values 2008-08-13 20:57:26 -05:00
Jeremy Kemper
3fc9a67c04 memoize_ and unmemoize_all 2008-08-13 17:26:27 -07:00
S. Brent Faulkner
3284fbb866 Use current umask when testing the expected file mode [#823 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-08-13 19:19:00 -05:00
Jeremy Kemper
a8057669ff Fixed memoize with punctuation and freezing memoized methods with arguments
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-08-07 14:55:14 -05:00
Joshua Peek
e5b1ab7cc3 MemoryStore is the only "unsafe" store. Make it threadsafe by default. 2008-08-06 14:54:18 -05:00
Joshua Peek
73056500f8 Make File.atomic_write copy the original permissions or use the directories default. 2008-08-06 14:54:18 -05:00
Joshua Peek
3fd9036fc5 Added config.dependency_loading to enable or disable the dependency loader after initialization 2008-07-24 11:58:26 -05:00
Joshua Peek
2681685450 Extract ActiveSupport::TypedArray class to ensure an array is all of the same type [#673 state:resolved] 2008-07-22 11:12:16 -05:00
Joshua Peek
8a87d8a6c2 Improved Memoizable test coverage and added support for multiple arguments 2008-07-22 10:26:44 -05:00
Michael Koziarski
5bec5848b2 If it doesn't overflow, it won't have a .start method. So don't run the second assertion either 2008-07-20 21:25:31 +02:00
Michael Koziarski
006cbb8fde Handle the case where 64bit time_t won't overflow. 2008-07-20 21:23:18 +02:00
Joshua Peek
ef6f6625c9 Changed ActiveSupport::Memoizable API to extend since it mainly adds the memoize class method 2008-07-18 15:32:28 -05:00
Joshua Peek
e1f23da53c Allow memoized methods to be reloaded and allow multiple symbols 2008-07-18 11:19:38 -05:00
Jeremy Kemper
8f9702db5c Merge branch 'master' of git@github.com:rails/rails 2008-07-17 14:43:08 -07:00
Joshua Peek
94cf6675d5 Cleanup ActiveSupport::Cache::ThreadSafety module and add test coverage 2008-07-17 15:29:30 -05:00
Jeremy Kemper
636e6b7138 Merge branch 'master' into i18n-merge
Conflicts:

	actionpack/lib/action_view/helpers/form_options_helper.rb
	activerecord/lib/active_record/validations.rb
2008-07-17 11:52:56 -07:00
MatthewRudy
7e8aee7e6c Add extra tests to ensure Hash#slice works with an array as a key. #613
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-17 15:34:51 +01:00
Pratik Naik
b3a2ee7b87 Revert "Hash#slice supports an array of keys [#613 state:resolved]"
This reverts commit 396f9df891.
2008-07-17 15:28:02 +01:00
Joshua Peek
d8a72b32c5 Revert "Run callbacks from object's metaclass" 2008-07-16 20:23:44 -05:00
Lawrence Pit
40dbebba28 Allow deep merging of hash values for nested with_options. [#490 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-17 01:59:08 +01:00
Josh Owens
396f9df891 Hash#slice supports an array of keys [#613 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-16 19:31:37 -05:00
Sven Fuchs
0ac342fbe5 make i18n date/time tests timezone independent 2008-07-16 10:51:48 -07:00
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
Sven Fuchs
931f366ffc merge forward to current rails/master 2008-07-16 03:41:11 +02: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
Sven Fuchs
84816ae981 align with changes in i18n 2008-07-06 21:20:02 +02:00
Sven Fuchs
8f74ba96c4 remove core extensions in favor of I18n#translate and I18n#localize 2008-07-02 19:21:07 +02:00
Luca Guidi
7403c825a0 Fixed Date and Time localization for ActiveSupport 2008-07-02 17:51:34 +02: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