Commit Graph

850 Commits

Author SHA1 Message Date
Joshua Peek
8a87d8a6c2 Improved Memoizable test coverage and added support for multiple arguments 2008-07-22 10:26:44 -05:00
Joshua Peek
da85251f85 Refactor ActiveSupport::Dependencies injector so it would be possible to disable it 2008-07-19 17:32:22 -05:00
Joshua Peek
8c2e839e5a Fix some warnings in i18n lib 2008-07-19 11:04:23 -05:00
Joshua Peek
d84d99a8f7 Undefine old run method 2008-07-19 10:52:30 -05:00
Joshua Peek
c609be4596 Ruby 1.9: Ensure Memoizable#freeze is only overriden once to avoid an endless loop 2008-07-18 23:30:36 -05: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
7430c4168f Decrease default benchmark runs from 10 to 4 2008-07-17 23:18:21 -07:00
Jeremy Kemper
8f9702db5c Merge branch 'master' of git@github.com:rails/rails 2008-07-17 14:43:08 -07:00
Joshua Peek
0eef4e554d Allow ActiveSupport::Cache logger to be silenced 2008-07-17 16:00:59 -05: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
Joshua Peek
7ae2105d57 MemCacheStore#decrement should use data instance variable not local variable [#521 state:resolved] 2008-07-16 18:46:04 -05:00
Pratik Naik
0432d15164 Merge with docrails. 2008-07-16 13:01:23 +01: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
fbe1823117 add i18n lib files 2008-07-16 04:16:08 +02:00
Sven Fuchs
731fca8cf6 remove i18n lib subproject 2008-07-16 04:15:31 +02: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
Joshua Peek
7f0346237e Append a "_" to memoized instance variables 2008-07-14 20:25:09 -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
Jeremy Kemper
269c6c6bcf Cache Module#parent_name 2008-07-14 10:46:16 -07:00
Pratik Naik
9783e66cad Slightly faster DateTime#to_json. [#598 state:resolved] [Alex Zepeda] 2008-07-14 01:02:07 +01:00
Cheah Chu Yeow
ce4a1bb853 Remove some Symbol#to_proc usage in runtime code. [#484 state:resolved] 2008-07-09 10:42:30 -07:00
Sven Fuchs
84816ae981 align with changes in i18n 2008-07-06 21:20:02 +02:00
Michael Koziarski
51e13d51ad Move test related core_ext stuff out of regular core ext to prevent nasty surprises when you require active_support then use Test::Unit directly. 2008-07-04 10:41:39 +03: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
6f1d827096 TimeWithZone#advance: treat :weeks option as variable-length 2008-06-29 15:28:34 -05: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
rick
01db5ded54 Merge branch 'state_machine'
Some big changes:
  * Added some redundant requires so active_support/inflecto can be loaded
    without the rest of ActiveSupport.
  * Disabled callbacks and validations until they are added and tested.
  * Converted specs back to tests, using ActiveSupport::TestCase and the new
    #test helper.
  * As an experiment, I imported Scott Barron's awesome AASM gem into
    ActiveModel.  I added multiple state machine support and vastly improved
    the API (no more aasm_* prefixes).  All the old tests pass.  If this bothers
    people, I have no problems removing this and contributing the changes back to
    AASM.  I just feel like AMo is a better spot for all these 'modelish' features.
2008-06-29 12:13:58 -07: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
rick
aec3c7aa72 add special requires for ActiveSupport::Inflector so you can load it individually 2008-06-27 23:29:25 -07:00
Jeremy Kemper
582bff71c4 Fix typo in apparently-dead will_unload? method. 2008-06-27 17:21:57 -07:00
Jeremy Kemper
24c7f41b4f Freeze ModelName cache_key also 2008-06-25 18:55:55 -07:00
Jeremy Kemper
071fe79279 Include cache key in ModelName 2008-06-24 22:07:09 -07:00
Jeremy Kemper
6874caa407 Performance: minor Array#to_param and #to_query speedups 2008-06-24 21:49:49 -07:00
Jeremy Kemper
d7462ea365 Revert "Check for mocha gem without requiring the lib. [#403 state:resolved]"
This reverts commit 4d5ac3f3d2.
2008-06-23 00:31:49 -07:00
Jeremy Kemper
4d5ac3f3d2 Check for mocha gem without requiring the lib. [#403 state:resolved] 2008-06-22 20:52:29 -07:00
Sven Fuchs
67fce4671e crap, an array never has a request, stupid. 2008-06-22 13:49:08 +02:00