10265 Commits

Author SHA1 Message Date
Nick Sieger
1712e37c90 Favor existing connections over new ones if available 2008-08-29 14:12:11 -05:00
Nick Sieger
817a07b451 More doco and class/method renames. Now have a strategy for integration with ActionPack. 2008-08-29 14:12:11 -05:00
Nick Sieger
3ce64d4f16 Fix checkin method, add a couple more tests 2008-08-29 14:12:11 -05:00
Nick Sieger
fe575dd4a9 Nearing the finish line. Initial fixed-size connection pool implemented, more docs 2008-08-29 14:12:11 -05:00
Nick Sieger
82fcd9d85f Clean up the code, get rid of reserve/release, add some more docs 2008-08-29 14:12:10 -05:00
Nick Sieger
029952edf4 Extract a base class for connection pools, start to flesh out reserve/release API 2008-08-29 14:12:10 -05:00
Nick Sieger
51349ec873 Add readme stating intentions of the work 2008-08-29 14:12:10 -05:00
Nick Sieger
72d959d9b5 Split connection handler into single- and multiple-thread versions. 2008-08-29 14:12:10 -05:00
Nick Sieger
ff97e9d029 Connection handling methods extracted out into separate ConnectionHandler class
- delegating methods left behind
2008-08-29 14:12:10 -05:00
Nick Sieger
3151d96663 Revert "Change all databases.rake adapter 'when' statements to use regexes."
This reverts commit 3d2512d38d2e28b3ea669139f7c7b0307522aa72.
2008-08-29 14:12:09 -05:00
Nick
37b0b36918 Fix failure to retain value of allow_concurrency
- Also carry allow_concurrency value through to connection adapter
  (for postgresql)
2008-08-29 14:12:09 -05:00
Nick
cab76ce6ac Add synchronization to connection pool also 2008-08-29 14:12:09 -05:00
Nick
50cd4bdc99 Introduce synchronization around connection pool access
- use new active support Module#synchronize
- allow_concurrency now switches between a null monitor and a
  regular monitor (defaulting to null monitor to avoid overhead)
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
Nick
5879b15f23 Rename defined_connections to connection_pools
- Distinguis meaning of "active_connections" to always mean connections
  associated with the current thread
2008-08-29 14:12:08 -05:00
Nick
6edaa26717 Initial conversion to connection pool
So far so good, tests still run clean. Next steps: synchronize connection pool access
and modification, and change allow_concurrency to simply switch a real lock for a
null lock.
2008-08-29 14:12:08 -05:00
Nick
1a81f156bd Change all databases.rake adapter 'when' statements to use regexes.
This is more friendly to JRuby/JDBC adapters (with names like 'jdbcmysql')
and leaves the door open to alternate implementations of adapters in the
future.
2008-08-29 14:12:08 -05:00
Tom Lea
db26b47b9f Ensure that calling content_tag_for in a helper doesn't cause duplicate output.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#871 state:committed]
2008-08-29 20:52:01 +02:00
Tim Haines
d0b949d873 Improve assert_select_rjs failure messages for show, hide, toggle, and remove
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#931 state:committed]
2008-08-29 20:51:47 +02:00
Joshua Peek
a200c67611 Merge RenderTest and NewRenderTest 2008-08-29 13:26:28 -05:00
Eugene Pimenov
743f0e7114 Make case insensitive validates_uniqueness_of use unicode aware downcase method.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-08-29 20:24:20 +02:00
Nick Sieger
a9086b3daa Make query-cache thread-local
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-08-29 10:21:39 -05:00
Michael Koziarski
6769d824f9 Fix parentheses warnings 2008-08-29 15:27:34 +02:00
Jan De Poorter
db116a2ed6 Fix NamedScope regex so methods containing "an" get delegated to proxy_found. [#901 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-08-29 14:06:37 +01: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
766fb54c8f Fix indentation 2008-08-28 12:35:47 -07:00
Jeremy Kemper
082c377954 Missed changelog update for #501 2008-08-28 12:32:38 -07:00
Brennan Dunn
9cc8c0a0a1 Routes may be restricted to lists of HTTP methods instead of a single method or :any.
[#407 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-28 12:29:49 -07:00
Brennan Dunn
7bdd5b768e Accept an array of method symbols for collection/member actions of resources
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-28 12:23:39 -07:00
Andrew White
db22c89543 Merge scoped :joins together instead of overwriting them. May expose scoping bugs in your code!
[#501 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-28 12:07:15 -07:00
Ernie Miller
44af2efa2c Refactored AssociationCollection#count for uniformity and Ruby 1.8.7 support.
[#831 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-28 11:58:25 -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
Michael Koziarski
8b6870cfae Prevent deprecation warning in the tests 2008-08-28 12:47:18 +02: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
Tarmo Tänav
96c6fe0842 Implement count limit/offset support for has_many associations
[#348 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-27 23:32:21 -07:00
Tarmo Tänav
13671cc565 Alias included associations if needed when doing a count
[#302 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-27 23:29:29 -07:00
Tom Lea
ad562c58ea Dirty: treat two changes resulting in the original value as being unchanged.
[#798 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-27 23:13:41 -07:00
Ken Collins
f277e1d8fd Added TextHelper#current_cycle to return the current cycle for better design options.
[#417 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-27 23:06:20 -07:00
Michael S. Klishin
e42a235dd1 Request#remote_ip handles the uncommon case that REMOTE_ADDR is a comma-separated list.
[#523 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-27 23:03:11 -07:00
Lars Kanis
c2068d14d2 PostgreSQL: fix quote_string for certain old pg drivers. [#94 state:resolved] 2008-08-27 22:51:10 -07:00
Jeremy Kemper
a444c78212 respond_to? passes along splat args to avoid introducing the second arg if it was omitted 2008-08-27 21:32:51 -07:00
Tim Haines
82778351a8 Add TestUploadFile.content_type= to match Request.UploadedFile
[#920 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-27 18:50:29 -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