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
Sven Fuchs
d897acfbb1
remove DeprecatedConstantToMethodProxy again
2008-06-22 11:39:10 +02:00
Sven Fuchs
55e2e2e8b4
experimental DeprecatedConstantToMethodProxy
2008-06-21 18:12:59 +02:00
Sven Fuchs
8bfdabbd8b
incorporate #translate usage with several default keys
...
(use first default key that resolves to a translation). this might, depending
on the backend implementation save some expensive lookups (like db lookups)
2008-06-21 17:50:37 +02:00
Jeremy Kemper
9a0e443719
Everything responds to #to_param
2008-06-21 04:19:30 -07:00
Sven Fuchs
428aa24d24
Renamed lang/ to locale/ because that's what we seem to
...
standarize on. Also, in future this place can be used for data/code that's
not literally translations but conceptually belongs to the locale (like
custom pluralization algorithms etc.).
2008-06-21 11:35:02 +02:00
Sven Fuchs
c1e2506494
Changed process of storing translations from the
...
client libraries to the backend: clients now can pass a block to
backend#populate which can contain code to load and register translations.
This makes sense for backends that persist their translations (e.g. to db)
so the repeated loading and passing of translations throughout the server
startup would be wasted resources.
2008-06-21 11:27:19 +02:00
Jeremy Kemper
8d24a029df
Don't assume RubyProf constants are defined
2008-06-20 10:42:36 -07: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
00ba4c0cf3
true#to_param => true, so be sure to #to_s expanded cache keys
2008-06-20 00:46:00 -07:00
Jeremy Kemper
879245de1c
Tired of seeing <foo>/run
2008-06-20 00:36:59 -07:00
Jeremy Kemper
83c3e9903d
Don't profile GC runs/time by default
2008-06-20 00:35:11 -07:00
Jeremy Kemper
f47c81ff37
Fall back to #to_s for cache key expansion
2008-06-20 00:25:41 -07:00
Sven Fuchs
585c8c17c3
rename Backend::Simple#add_translations to set_translations
...
because it overwrites existing translations
2008-06-20 09:13:20 +02:00
Sven Fuchs
fdb5f810dc
I18n has not been released as a gem, yet
2008-06-19 16:55:47 +02:00
Sven Fuchs
4a8486a1b1
add lang file for active_support
2008-06-19 16:43:30 +02:00
Sven Fuchs
45d41f0dad
integrating I18n into Rails
2008-06-19 16:25:27 +02:00
Jeremy Kemper
1e0d2e36cc
Performance: add GC metrics for # of runs and total runtime
2008-06-18 19:19:22 -07:00
Jeremy Kemper
2541f7ac47
Oops, include metric name in csv filename
2008-06-18 18:36:04 -07:00
Jeremy Kemper
616bc42fd7
Performance: tweak unsupported metric error message
2008-06-18 18:34:25 -07:00
Jeremy Kemper
90a9a7013c
Write benchmark output to separate files per test+metric. Support Lloyd Hilaiel's GC.heap_info patch for current heap size.
2008-06-18 16:02:27 -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
Jeremy Kemper
899d63b997
process time for benchmarks (quicker), wall time for profiling (lower overhead)
2008-06-16 03:45:20 -07:00
Jeremy Kemper
e433bb16a6
Merge branch 'master' of git@github.com:rails/rails
2008-06-16 03:05:24 -07:00