Commit Graph

993 Commits

Author SHA1 Message Date
Jeremy Kemper
1b94d5dc65 Fix indentation mismatch 2008-09-08 18:10:23 -07:00
Jeremy Kemper
dc0aed1151 Don't shadow arg with block var 2008-09-08 18:08:48 -07:00
Jeremy Kemper
621f48edb2 BigDecimal to_s and yaml housekeeping 2008-09-08 18:06:58 -07:00
Jeremy Kemper
15b1b2b778 Ruby 1.9 compat: use method_defined? instead of instance_methods.include? Don't encourage args abuse by flattening. 2008-09-06 18:45:52 -07:00
David Heinemeier Hansson
de0e7507de Changed all benchmarking reports to be in milliseconds 2008-09-05 14:22:57 +02:00
Jeremy Kemper
17628ecfce Deprecate %d and %s in message interpolation, but only in the bundled i18n lib. 2008-09-04 16:46:12 +02:00
Michael Koziarski
2c62baf4bf Handle the case where there is no ivar set.
This happens on jruby due to a bug, but also on historically marshalled data.
2008-09-04 15:09:30 +02:00
Pratik Naik
6ef35461dc Merge docrails 2008-09-03 17:58:47 +01:00
Adam Keys
10fe6a6d89 Add each_with_object from 1.9 for a more convenient alternative to inject.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#962 state:committed]
2008-09-03 16:21:53 +02:00
Clemens Kofler
d3ccfe414d Whitespace.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:55 +02:00
Jeremy Kemper
6f932b4790 Database connections are now pooled, one pool per #establish_connection call.
Pools start out empty and grow as necessary to a maximum size (default is 5,
configure size with key 'pool' in your database configuration). If no
connections are available, a thread will wait up to a 'wait_timeout' time
(default is 5 seconds).

Connections are verified and reset when checked out from the pool (usually
upon first access to ActiveRecord::Base.connection), and returned back to the
pool after each request.

If you would like to use connection pools outside of ActionPack, there is an
ActiveRecord::Base.connection_pool method that gives you access to the pool,
and you can manually checkout/checkin connections, or supply a block to
ActiveRecord::Base.connection_pool.with_connection which takes care of the
checkout/checkin for you.

[#936 state:resolved]
2008-09-02 18:32:54 +02:00
Michael Koziarski
ebfa43c423 Merge rexml-expansion-fix gem into activesupport.
Addresses the security issue documented at:
* http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/
2008-09-02 16:22:20 +02:00
Jeremy Kemper
a1eb4e11c2 Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>

Conflicts:

	actionpack/test/controller/layout_test.rb
2008-08-31 13:20:15 -07:00
Sven Fuchs
be4ae1f526 I18n: applied Luca Guidi's patch for better #interpolate performance
[#943 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-30 02:02:33 -07:00
Hongli Lai (Phusion)
204a8cce88 Move some core extension methods into a module under the ActiveSupport::CoreExtensions namespace, instead of extending core classes directly. This is more friendly for API reference generators.
[#915 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-29 15:15:40 -07:00
Nick
cab76ce6ac Add synchronization to connection pool also 2008-08-29 14:12:09 -05:00
Nick
b185d157fe Module#synchronize: Add testcase to ensure that singleton methods can be wrapped 2008-08-29 14:12:09 -05:00
Nick
9dc4f66110 Add method punctuation handling to #synchronize 2008-08-29 14:12:09 -05:00
Nick
3eb68248e0 Adds Module#synchronize for easier method-level synchronization. 2008-08-29 14:12:08 -05:00
Pratik Naik
6577942b61 Deprecate render_component.
Please install render_component plugin from http://github.com/rails/render_component/tree/master
if your application uses this functionality.
2008-08-29 13:43:30 +01:00
Jeremy Kemper
85070b5e56 Date#freeze bug doesn't affect Ruby 1.9 2008-08-28 22:36:10 -07:00
Jeremy Kemper
c94f6ea2f3 Date#freeze bug doesn't affect Ruby 1.9 2008-08-28 22:27:55 -07:00
Jeremy Kemper
ce4d13861d Merge branch 'master' of git@github.com:rails/rails 2008-08-28 11:47:06 -07:00
Joshua Peek
acbf2b74aa Deprecated implicit local assignments when rendering partials 2008-08-28 10:37:46 -05:00
Bradford Folkens
293f99700d Reinstate Range#step default argument.
[#595 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-27 23:48:54 -07:00
Jeremy Kemper
657898c821 Merge commit 'sven/i18n'
Conflicts:
	activesupport/lib/active_support.rb
2008-08-27 12:31:07 -07:00
Joshua Peek
87fafe4074 Moved Logger extensions into core_ext 2008-08-27 11:33:18 -05:00
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
Marko Seppae
cba83ede5d I18n: remove #populate from Simple backend as well 2008-08-27 12:00:14 +02:00
Marko Seppae
0fcd5b5466 I18n: removed call to #populate from main library files 2008-08-27 10:36:00 +02:00
Marko Seppae
44de71ba94 I18n: removed #populate and #store_translations from api 2008-08-27 10:16:25 +02:00
Jeremy Kemper
4bcd64c9e9 Ruby 1.9 compat: switch profile_options to superclass_delegating_accessor 2008-08-25 22:01:02 -07:00
Jeremy Kemper
172606e21f Harmonize framework require strategy. Don't add self to load path since Rails initializer and RubyGems handle it. 2008-08-25 21:22:34 -07:00
Jeremy Kemper
5e1ceb153c Work around frozen Date memoization 2008-08-25 17:05:50 -07:00
Sven Fuchs
a61e87aeb9 update i18n gem 2008-08-25 11:20:24 +02:00
Jeremy Kemper
bb3dd6ad2e Ruby 1.9 compat: update bundled i18n lib 2008-08-23 21:51:06 -07:00
Jeremy Kemper
92a7239a3d Ruby 1.9: silence some warnings for block args shadowing local vars 2008-08-23 16:03:00 -07:00
Jeremy Kemper
e7127be365 Ruby 1.9: constantize takes advantage of new inherit arg to const_get and const_defined? 2008-08-23 15:59:59 -07:00
Sven Fuchs
d6989aa0e1 I18n: use :other instead of :many as default key for pluralization to better conform w/ cldr pluralization rules
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-08-23 21:23:00 +02: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
Tarmo Tänav
5232d81281 Pass class through to DeprecatedConstantProxy target
This is needed because include_all_modules_from checks
calls "class" on every constant and sometimes it can
hit deprecated constants which aren't even Modules,
but while checking for it deprecation warnings are shown.
2008-08-23 19:12:14 +03:00
Jeremy Kemper
9dac5547ad Merge branch 'master' into i18n 2008-08-22 13:01:53 -07:00
Jeremy Kemper
a6e05b18d6 Merge commit 'sven/i18n' into i18n 2008-08-22 12:44:14 -07: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
Sven Fuchs
aad429a46e Merge branch 'master' into i18n 2008-08-21 19:04:39 +02: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
Iain Hecker
c1e0d8aa48 Locale file changed to yaml 2008-08-20 18:01:12 +02:00