Compare commits

...

125 Commits

Author SHA1 Message Date
David Heinemeier Hansson
0c516b370b Use real date
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4496 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-27 19:01:06 +00:00
David Heinemeier Hansson
755ff58d56 Made ready for release
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4488 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-24 15:28:56 +00:00
Nicholas Seckar
83af5feefa Add test file that should never be loaded
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4487 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-24 00:56:26 +00:00
Nicholas Seckar
5b8b77e07e ...
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4458 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-18 21:42:56 +00:00
Nicholas Seckar
4e2dcbfb15 Refinement to avoid exceptions in traverse_to_controller
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4457 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-18 05:25:17 +00:00
Nicholas Seckar
a12aabc450 Fix loading of arbitrary files in ruby's load path by traverse_to_controller.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4456 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-18 04:39:42 +00:00
Rick Olson
bf150f0c3a applying to stable: Properly quote index names in migrations (closes #4764) [John Long]
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4240 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-20 02:48:53 +00:00
Rick Olson
a9ad634dbc applying to stable: Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4234 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-19 17:34:49 +00:00
Rick Olson
982d187691 applying to stable: Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-19 17:28:05 +00:00
Rick Olson
8118c486bc Modify ActiveRecord::Base.count so it shares the same signature as #calculate, but maintains backwards compatibility.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-14 14:14:27 +00:00
David Heinemeier Hansson
4363bd0239 Use Aras RubyForge uploader
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-09 22:14:08 +00:00
David Heinemeier Hansson
2ebad525e0 Include the calculations fix for a new release of AR
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4203 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-09 21:27:32 +00:00
David Heinemeier Hansson
b5c3570ff1 Prepare for tiny release of 1.1.2
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4202 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-09 21:09:45 +00:00
David Heinemeier Hansson
8382493551 RAILS_ROOT, please
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-07 18:29:43 +00:00
David Heinemeier Hansson
a60ecc1571 Fixed that boot.rb would set RAILS_GEM_VERSION twice, not respect an uncommented RAILS_GEM_VERSION line, and not use require_gem [DHH] Added rake rails:update:configs to update config/boot.rb from the latest (also included in rake rails:update) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4198 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-07 18:22:16 +00:00
David Heinemeier Hansson
2120651dde Fixed that boot.rb would set RAILS_GEM_VERSION twice, not respect an uncommented RAILS_GEM_VERSION line, and not use require_gem [DHH] Added rake rails:update:configs to update config/boot.rb from the latest (also included in rake rails:update) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4197 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-07 18:21:52 +00:00
David Heinemeier Hansson
e1deb6acca Now where did that stable go
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4195 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-07 16:39:58 +00:00
David Heinemeier Hansson
2f4093690b Tagged and branches 1.1
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4091 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-28 05:22:14 +00:00
Jeremy Kemper
ec20838381 r3847@asus: jeremy | 2006-02-26 15:26:53 -0800
Apply [3674] to stable. Closes #3591.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3676 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 23:26:47 +00:00
Jeremy Kemper
fba571a50a r3846@asus: jeremy | 2006-02-26 15:24:58 -0800
silence test/unit whining DefaultsTest is empty


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3675 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 23:26:42 +00:00
Jeremy Kemper
c049ccd786 r3730@asus: jeremy | 2006-02-09 11:42:57 -0800
Apply [3559] to stable. Closes #3581.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3560 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 19:43:29 +00:00
Jeremy Kemper
f13ddd3eb8 r3724@asus: jeremy | 2006-02-09 10:13:41 -0800
Apply [3554] to stable. PostgreSQL: correctly parse negative integer column defaults. Closes #3776.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3555 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 18:14:22 +00:00
Nicholas Seckar
4ae6f74612 Show a meaningful error when the DB2 adapter cannot be loaded due to missing dependencies.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3461 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-22 06:30:52 +00:00
Marcel Molina
f999ab089d Fix case of VERSION option in migration docs. Closes #3521.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3427 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-18 03:31:14 +00:00
Scott Barron
16a31ccd7d Apply [3359] to stable branch.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-30 18:50:29 +00:00
Florian Weber
cf448036b6 Fixed that saving a model with multiple habtm associations would only save the first one.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3332 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-21 16:56:32 +00:00
Thomas Fuchs
37e0d5de89 Update stable to scriptaculous 1.5 final
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3300 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-13 18:41:10 +00:00
Jeremy Kemper
e8c7d7af48 r3465@asus: jeremy | 2005-12-13 10:15:33 -0800
Apply [3298] to stable.  Don't used defined? on a scoped constant since it results in a const_missing call.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3299 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-13 18:37:32 +00:00
Sam Stephenson
cad37c3eaf Update to Prototype 1.4.0 final
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3297 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-13 17:51:17 +00:00
Jeremy Kemper
da66198fcd r3458@asus: jeremy | 2005-12-13 09:33:50 -0800
Roll back [3245] on stable.  References #3116.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3296 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-13 17:34:09 +00:00
Jeremy Kemper
2670371690 r3457@asus: jeremy | 2005-12-13 08:52:39 -0800
Apply [3293] to stable.  MySQL: allow encoding option for mysql.rb driver.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3295 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-13 17:34:00 +00:00
David Heinemeier Hansson
5da86f8c27 Made ready for 1.0 launch
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3292 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-13 16:41:44 +00:00
Marcel Molina
11598ac77b Apply [3290] to stable. Fix typo in benchmarker usage string.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3291 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-13 02:33:56 +00:00
Marcel Molina
eeb00ea334 Apply [3288] to stable. Fix typo in profiler usage string.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3289 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-13 02:26:15 +00:00
Marcel Molina
d5bfd181d7 Remove duplicate entry from chagnelogs.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3278 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-11 05:09:52 +00:00
Marcel Molina
921c5a7fdc Apply [3276] to stable. Update instructions on how to find and install generators. Closes #3172.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3277 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-11 05:07:39 +00:00
Jeremy Kemper
4ef417cf96 r3435@asus: jeremy | 2005-12-10 13:40:43 -0800
Apply [3274] to stable.  MySQL: fixes for the bundled mysql.rb driver.  Closes #3160.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3275 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-10 21:41:16 +00:00
David Heinemeier Hansson
65e93a523f Close h1 with h1 not h2 #3150
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3273 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-10 19:58:02 +00:00
Jeremy Kemper
2018b2a8d2 r3429@asus: jeremy | 2005-12-09 16:55:16 -0800
Apply [3270] SQLServer rollup to stable.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3271 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-10 01:44:03 +00:00
Jeremy Kemper
596fe49697 r3421@asus: jeremy | 2005-12-09 15:42:40 -0800
Apply [3265] to stable.  Name vendor/generators source differently from lib/generators source.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3268 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-09 23:43:20 +00:00
Jeremy Kemper
4e2e1a1bc6 r3420@asus: jeremy | 2005-12-09 15:38:30 -0800
Apply [3264] to stable.  MySQL: ensure that @config is set.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3267 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-09 23:43:16 +00:00
Jeremy Kemper
36619f2084 r3419@asus: jeremy | 2005-12-09 15:36:50 -0800
Apply [3165] to stable. MySQL, PostgreSQL: reconnect! also reconfigures the connection. Otherwise, the connection 'loses' its settings if it times out and is reconnected. References #2978.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3266 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-09 23:43:09 +00:00
Jeremy Kemper
d2b0cc7bf4 r3416@asus: jeremy | 2005-12-09 15:07:21 -0800
Apply [3262] to stable.  Generator looks in vendor/generators also.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-09 23:07:28 +00:00
Jeremy Kemper
eb79743b13 r3413@asus: jeremy | 2005-12-09 15:03:42 -0800
Apply [3260] to stable.  Fix bundled mysql.rb to correctly check for PROTO_41.  Fixed scramble41 with nil password.  Fixed change_user with PROTO_41.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3261 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-09 23:03:47 +00:00
Jeremy Kemper
256d28d330 r3410@asus: jeremy | 2005-12-09 10:48:32 -0800
Apply [3258] to stable.  Fix shebang handling for empty files.  Closes #2927.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3259 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-09 18:48:38 +00:00
Jeremy Kemper
1b4470c82f r3407@asus: jeremy | 2005-12-09 10:39:00 -0800
Apply [3256] to stable.  Generator copies files in binary mode.  Closes #3156.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3257 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-09 18:39:15 +00:00
Jeremy Kemper
69e4c3c474 r3404@asus: jeremy | 2005-12-08 15:24:44 -0800
Apply [3254] to stable.  Fix some test failures due to MySQL assumptions.  References #3149.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3255 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 23:24:52 +00:00
Jeremy Kemper
94a25200a1 r3401@asus: jeremy | 2005-12-07 23:30:11 -0800
Apply [3252] to stable.  Oracle: active? performs a select instead of a commit.  Closes #3133.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3253 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 07:30:18 +00:00
David Heinemeier Hansson
93bd3b00e1 Prepare versions for release
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3250 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 05:56:23 +00:00
David Heinemeier Hansson
57e992dc0f Remove insignificant classes from docs
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3248 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 05:43:54 +00:00
Jeremy Kemper
a9f4205b21 r3392@asus: jeremy | 2005-12-07 21:10:42 -0800
Apply [3246] to stable.  MySQL: more robust test for nullified result hashes.  Closes #3124.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3247 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 05:11:38 +00:00
Jeremy Kemper
8a19d148b7 r3389@asus: jeremy | 2005-12-07 20:52:39 -0800
Apply [3244] to stable.  SQLite: find database file when RAILS_ROOT is a symlink.  Closes #3116.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3245 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:52:51 +00:00
Jeremy Kemper
bd9b27df8b r3387@asus: jeremy | 2005-12-07 20:48:42 -0800
Apply [3242] to stable.  Reloading an instance refreshes its aggregations as well as its associations.  Closes #3024.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3243 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:48:50 +00:00
David Heinemeier Hansson
c6120acc00 Fixed that using :include together with :conditions array in Base.find would cause NoMethodError #2887 [Paul Hammmond]
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3241 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:46:40 +00:00
Jeremy Kemper
60d68aab53 r3379@asus: jeremy | 2005-12-07 20:42:31 -0800
Don't warn on keep_flash in test.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3239 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:42:54 +00:00
Jeremy Kemper
67cbb0f04c r3378@asus: jeremy | 2005-12-07 20:41:47 -0800
Apply [3237] to stable.  More robust relative url root discovery for SCGI compatibility.  This solves the 'SCGI routes problem' -- you no longer need to prefix all your routes with the name of the SCGI mountpoint.  Closes #3070.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3238 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:42:47 +00:00
Jeremy Kemper
0bb6521649 r3375@asus: jeremy | 2005-12-07 20:36:13 -0800
Apply [3235] to stable.  PostgreSQL: more robust sequence name discovery.  Closes #3087.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3236 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:36:22 +00:00
Jeremy Kemper
966b027c71 r3372@asus: jeremy | 2005-12-07 20:25:20 -0800
Apply [3233] to stable.  Oracle: use syntax compatible with Oracle 8.  Closes #3131.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3234 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:25:36 +00:00
David Heinemeier Hansson
2c5d342809 Warn people not to change boot.rb
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3232 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 03:54:53 +00:00
David Heinemeier Hansson
d45ca84858 Fixed RDoc warnings [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3229 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 03:23:54 +00:00
Jeremy Kemper
142304b79d r3363@asus: jeremy | 2005-12-06 22:26:27 -0800
Apply #428 changesets to stable: r3000, r3001, r3002, r3025, r3045, r3096, r3148, r3152, r3165, r3189, r3195, r3205, r3216, r3219, r3221, r3222.  Closes #428.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-07 06:26:54 +00:00
David Heinemeier Hansson
2deefbade0 Shouldnt overwrite Base documentation
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3225 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-06 02:46:18 +00:00
Sam Stephenson
66cd1330a5 Add builtin/ to the gemspec. Closes #3047.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3224 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-06 00:32:57 +00:00
Marcel Molina
cf656ec1f7 Apply [3207] to stable. Fix docs for text_area_tag. Closes #3083.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3208 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-02 04:41:03 +00:00
Jeremy Kemper
1c86c6f4d9 r3339@asus: jeremy | 2005-12-01 17:03:16 -0800
Apply [3202] to stable.  Firebird: updated for FireRuby 0.4.0.  Closes #3009.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-02 01:04:54 +00:00
Sam Stephenson
14c2334c84 Bring stable lighttpd server script in-line with trunk
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-30 19:26:23 +00:00
Marcel Molina
50c5b2817f Apply [3196] to stable. Make load_fixtures include csv fixtures. Closes #3053.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3197 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-28 23:37:51 +00:00
Nicholas Seckar
786726692f Apply freeze gems fix to stable
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-28 00:56:23 +00:00
Florian Weber
b762e0141c Made test_update_attributes_after_push_without_duplicate_join_table_rows pass with Oracle Adapter.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3187 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 12:54:08 +00:00
Jeremy Kemper
6865b66621 r3315@asus: jeremy | 2005-11-23 23:13:48 -0800
Apply [3184] to stable.  SQLServer: resolve column aliasing/quoting collision when using limit or offset in an eager find.  Closes #2974.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3185 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 07:16:44 +00:00
Jeremy Kemper
1dc4783707 r3313@asus: jeremy | 2005-11-23 23:03:36 -0800
Apply [3182] to stable.  Reloading a model doesn't lose track of its connection.  Closes #2996.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3183 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 07:06:33 +00:00
Jeremy Kemper
98811479f0 r3307@asus: jeremy | 2005-11-23 17:52:14 -0800
Apply [3110] to stable.  PostgreSQL: the purge_test_database Rake task shouldn't explicitly specify the template0 template when creating a fresh test database.  References #2964.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 01:55:39 +00:00
Jeremy Kemper
2b4dd8c6e7 r3306@asus: jeremy | 2005-11-23 17:39:24 -0800
Apply [3100], [3108] to stable.  Makes new ActiveRecordStore sessions work correctly with components.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3179 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 01:55:32 +00:00
Jeremy Kemper
3fcec37473 r3305@asus: jeremy | 2005-11-23 17:33:51 -0800
Apply [3151] to stable.  Don't put flash in session if sessions are disabled.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 01:55:27 +00:00
Jeremy Kemper
15839d56d0 r3303@asus: jeremy | 2005-11-23 17:14:31 -0800
Apply [3051], [3052], [3053], [3059] to stable.  Brings the Firebird adapter to 1.0.  References #1874.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3177 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 01:17:30 +00:00
Jeremy Kemper
9c05146f4b r3296@asus: jeremy | 2005-11-23 13:38:56 -0800
Apply [3170] to stable.  Credit ticket author.  References #2888.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-23 21:41:57 +00:00
Jeremy Kemper
a766ae6d84 r3285@asus: jeremy | 2005-11-22 13:33:04 -0800
Apply [3162] to stable.  Model generator: correct relative path to test_helper in unit test.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3172 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-23 21:41:48 +00:00
Jeremy Kemper
cc4deb1610 r3269@asus: jeremy | 2005-11-21 04:46:40 -0800
Apply [3148] to stable.  Simpler Mysql load test.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3171 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-23 21:41:42 +00:00
Florian Weber
b87294c671 Fixed bug where using update_attribute after pushing a record to a habtm association of the object caused duplicate rows in the join table. #2888
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3168 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-23 21:14:47 +00:00
Thomas Fuchs
7d6e3d0857 Make javascript_include_tag :default behave correctly with application.js, fixes #2986
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3164 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-22 23:18:53 +00:00
Marcel Molina
4906b32450 Apply [3159] to stable. Remove superfluous check for pluralize_table_names (use table_name which does this check when it's set).
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3160 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-22 09:06:04 +00:00
Marcel Molina
541da098f0 Apply [3157] to stable. Make ActionController's render honor the :locals option when rendering a :file. Closes #1665.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3158 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-22 08:41:59 +00:00
Marcel Molina
7bf86f2c57 Revert [3140]. Behavior of introducing Kernel.binding causes breakage.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3143 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 09:38:03 +00:00
Jeremy Kemper
81f3a923d7 r3258@asus: jeremy | 2005-11-21 00:33:59 -0800
Apply [3139] to stable.  Use Kernel.binding rather than binding to allow columns of that name.  Closes #2973.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3140 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 08:36:13 +00:00
Marcel Molina
4a9847f987 Apply [3136] to stable. Make the db_schema_dump task honor the SCHEMA environment variable if present the way db_schema_import does. Closes #2931.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3138 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 08:04:44 +00:00
Sam Stephenson
743fb60a8a Strip out trailing &_= for raw post bodies #2868
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3137 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 08:04:28 +00:00
Marcel Molina
6329724293 Apply [3120] to stable. Make help for the console command more explicit about how to specify the desired environment in which to run the console. Closes #2911.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3121 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 05:35:54 +00:00
Marcel Molina
78e95faec5 Apply #3111 to stable. Correct docs for automatic layout assignment. Closes #2610.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3112 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-20 18:55:26 +00:00
Marcel Molina
371fa97ccc Apply [3105] to stable. Add tasks to create, drop and rebuild the MySQL and PostgreSQL test databases.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3106 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-20 07:51:27 +00:00
Jeremy Kemper
1aac21ca24 r3201@asus: jeremy | 2005-11-19 21:31:47 -0800
Apply [3103] to stable.  Document request.env and request.host.  Strip trailing whitespace.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3104 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-20 05:33:46 +00:00
Jeremy Kemper
54977e0364 r3199@asus: jeremy | 2005-11-19 21:13:22 -0800
Apply [3101] to stable.  Allows generator to specify migrations directory.  Closes #2960.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3102 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-20 05:15:18 +00:00
Jeremy Kemper
3f2541b4ff r3190@asus: jeremy | 2005-11-19 20:20:48 -0800
Apply [3098] to stable.  Introducing the session_migration generator.  Creates an add_session_table migration.  Closes #2958.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3099 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-20 04:26:21 +00:00
Jeremy Kemper
bed4fec60e r3178@asus: jeremy | 2005-11-19 01:59:47 -0800
Apply [3094] to stable.  Use query methods rather than readers in boolean tests for [3092].  References #2949.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3095 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-19 10:01:34 +00:00
Jeremy Kemper
fe09fa278e r3174@asus: jeremy | 2005-11-19 01:53:00 -0800
Apply [3092] to stable.  Correct boolean handling in generated reader methods.  Closes #2945.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-19 09:54:55 +00:00
Sam Stephenson
d4039f5246 Update to Prototype 1.4.0_rc4. Closes #2943 (old Array.prototype.reverse behavior can be obtained by passing false as an argument)
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3091 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-19 06:59:07 +00:00
Jeremy Kemper
b8ea04f8e8 r3167@asus: jeremy | 2005-11-18 22:47:31 -0800
Apply [3089] to stable.  Don't generate read methods for columns whose names are not valid ruby method names.  Closes #2946.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3090 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-19 06:49:18 +00:00
Jeremy Kemper
beddd9680e r3157@asus: jeremy | 2005-11-17 21:27:39 -0800
Apply [3081] to stable.  Eliminate nil from newly generated logfiles.  Closes #2927.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3088 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-18 21:22:09 +00:00
Sam Stephenson
dcaa871695 Update to Prototype 1.4.0_rc3. Closes #1893, #2505, #2550, #2748, #2783.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3079 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-18 00:53:11 +00:00
Jeremy Kemper
9796a587b8 r3149@asus: jeremy | 2005-11-17 12:47:36 -0800
Apply [3075] to stable.  Document :force option to create_table.  Closes #2921.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3077 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-17 20:49:31 +00:00
Jeremy Kemper
de5980289c r3148@asus: jeremy | 2005-11-17 12:45:44 -0800
Apply [3074] to stable.  Don't add the same conditions twice in has_one finder sql.  Closes #2916.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3076 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-17 20:49:24 +00:00
Tobias Lütke
0023cb1b8c stable merge of 3032 -- Updated docs for in_place_editor by Justin Palmer
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3071 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-17 05:04:11 +00:00
Tobias Lütke
37664eb90c stable merge of [3069]
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3070 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-17 04:59:13 +00:00
Marcel Molina
d212f03093 Apply [3067] to stable. Update from LGPL to MIT license as per Minero Aoki's permission.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3068 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-17 00:53:29 +00:00
Marcel Molina
afcd3ebcbb Apply [3065] to stable. Rename Version constant to VERSION. Closes #2802.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3066 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-17 00:38:59 +00:00
Jeremy Kemper
b35d05f594 r3130@asus: jeremy | 2005-11-16 14:37:47 -0800
Apply [3063] to stable.  Remove CHANGELOG from apidoc Rake task since it isn't included with new apps anymore.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3064 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-16 22:39:01 +00:00
Jeremy Kemper
1ec7fb609d r3120@asus: jeremy | 2005-11-16 13:34:45 -0800
Apply [3060] to stable.  Remove the unused, slow response_dump and session_dump variables from error pages.  Closes #1222.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3061 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-16 21:36:12 +00:00
Nicholas Seckar
113c815c6a Change Inflector#constantize to use eval instead of const_get
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3050 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-16 01:17:28 +00:00
Jeremy Kemper
9decb1a46f r3077@asus: jeremy | 2005-11-14 14:28:21 -0800
Apply [3035] to stable.  SQLServer: insert uses given primary key value if not nil rather than SELECT @@IDENTITY.  Closes #2866.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3037 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 22:29:27 +00:00
Thomas Fuchs
49de64e0a4 Update stable to latest script.aculo.us
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3034 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 20:50:49 +00:00
Jeremy Kemper
58c7f2a744 r3073@asus: jeremy | 2005-11-13 23:42:32 -0800
Apply [3021] to stable.  Correct documentation for Base.delete_all.  Closes #1568.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 07:43:03 +00:00
Jeremy Kemper
e24096d616 r3070@asus: jeremy | 2005-11-13 20:54:50 -0800
Apply [3019] to stable.  Oracle: test case for column default parsing.  Closes #2788.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3020 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 04:55:18 +00:00
Jeremy Kemper
902cb21124 r3066@asus: jeremy | 2005-11-13 20:24:18 -0800
Apply [3017] to stable.  Update documentation for Migrations.  Closes #2861.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3018 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 04:24:52 +00:00
Jeremy Kemper
e01febbe68 r3063@asus: jeremy | 2005-11-13 16:13:51 -0800
Apply [3015] to stable.  Update documentation for render :file.  Closes #2858.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3016 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 00:14:37 +00:00
Jeremy Kemper
364f6d645a r3058@asus: jeremy | 2005-11-13 16:09:17 -0800
Apply [3013] to stable.  Note that the ruby-memcache bindings are required to use the memcache store.  Closes #2857.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3014 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 00:09:42 +00:00
Jeremy Kemper
971b40f59f r3055@asus: jeremy | 2005-11-13 14:48:48 -0800
Apply [3009] to stable:  Reapply [2942] which was elided by [2997].  References #2788.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3010 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 22:49:19 +00:00
Jeremy Kemper
af0ad4d50b r3053@asus: jeremy | 2005-11-13 14:37:39 -0800
Only include builtin filters whose filenames match /^[a-z][a-z_]*_helper.rb$/ to avoid including operating system metadata such as ._foo_helper.rb.  Closes #2855.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3008 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 22:38:39 +00:00
Jeremy Kemper
f0b5630dce r3037@asus: jeremy | 2005-11-13 00:11:26 -0800
Apply [2998] to stable.  PostgreSQL: last_insert_id uses select_value rather than using @connection.exec directly.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@2999 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 08:12:22 +00:00
Jeremy Kemper
532d4e8782 r3033@asus: jeremy | 2005-11-12 23:27:13 -0800
Apply [2996] to stable.  Much faster Oracle column reflection.  Closes #2848.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@2997 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 07:29:02 +00:00
Jeremy Kemper
b970d2055a r3027@asus: jeremy | 2005-11-12 22:37:45 -0800
Apply [2994] to stable.  PostgreSQL: correct the sequence discovery fallback query.  References #2594.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@2995 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 06:38:35 +00:00
Jeremy Kemper
9403f471b4 r3022@asus: jeremy | 2005-11-12 18:40:42 -0800
merge to stable
 r3024@asus:  jeremy | 2005-11-12 19:00:49 -0800
 Apply [2992] to stable.  SQLite: the clone_structure_to_test and purge_test_database Rake tasks should always use the test environment.  References #2846.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@2993 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 03:01:19 +00:00
Jeremy Kemper
17836f4819 r3008@asus (orig r2978): david | 2005-11-11 01:50:42 -0800
Make sure that legacy db tasks also reference :database for SQLite (closes #2830) [kazuhiko@fdiary.net]
 r3009@asus (orig r2979):  david | 2005-11-11 02:02:44 -0800
 Changelogging
 r3011@asus (orig r2981):  bitsweat | 2005-11-11 10:49:01 -0800
 Include the Enumerable module in ActiveRecord::Errors.
 r3012@asus (orig r2982):  bitsweat | 2005-11-11 15:45:02 -0800
 SQLServer: don't report limits for unsupported field types.  Closes #2835.
 r3014@asus (orig r2984):  minam | 2005-11-11 21:09:05 -0800
 Make Validations#create! use the current scope
 
 r3015@asus (orig r2985):  bitsweat | 2005-11-12 03:59:54 -0800
  r4325@asus:  jeremy | 2005-11-12 03:57:46 -0800
  PostgreSQL: correctly discover custom primary key sequences.  PostgreSQL: smarter sequence name defaults, stricter last_insert_id, warn on pk without sequence.  Base.reset_sequence_name analogous to reset_table_name (mostly useful for testing).  Base.define_attr_method allows nil values.  References #2594.
 
 r3017@asus (orig r2987):  david | 2005-11-12 08:26:23 -0800
 Pulled auto-starting browser: More pain than gain
 r3019@asus (orig r2989):  bitsweat | 2005-11-12 14:28:38 -0800
 PostgreSQL: min_messages = warning for AR tests.
 r3020@asus (orig r2990):  bitsweat | 2005-11-12 17:12:48 -0800
 SQLite: the clone_structure_to_test Rake task should always use the test environment.  References #2846.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@2991 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 01:16:59 +00:00
Jamis Buck
e823ef8336 merge from trunk (include Enumerable in AR::Errors, make Validations#create! use current scope)
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@2988 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-12 17:41:59 +00:00
David Heinemeier Hansson
ce6545e574 Pulled auto-starting browser: More pain than gain
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@2986 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-12 16:26:12 +00:00
Jeremy Kemper
e8086859c5 Merge [2982] to stable. SQLServer: don't report limits for unsupported field types. References #2835.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@2983 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-12 02:56:11 +00:00
David Heinemeier Hansson
e0ef631055 Added stable branch to prepare for 1.0 release
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@2980 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-11 10:07:24 +00:00
31 changed files with 274 additions and 767 deletions

View File

@@ -1,3 +1,8 @@
*1.2.2* (June 27th, 2006)
* Depend on Action Pack 1.12.2
*1.2.1* (April 6th, 2005)
* Be part of Rails 1.1.1

View File

@@ -54,7 +54,7 @@ spec = Gem::Specification.new do |s|
s.rubyforge_project = "actionmailer"
s.homepage = "http://www.rubyonrails.org"
s.add_dependency('actionpack', '= 1.12.1' + PKG_BUILD)
s.add_dependency('actionpack', '= 1.12.2' + PKG_BUILD)
s.has_rdoc = true
s.requirements << 'none'
@@ -84,116 +84,12 @@ task :pdoc => [:rdoc] do
end
desc "Publish the release files to RubyForge."
task :release => [:package] do
files = ["gem", "tgz", "zip"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
task :release => [ :package ] do
`rubyforge login`
if RUBY_FORGE_PROJECT then
require 'net/http'
require 'open-uri'
project_uri = "http://rubyforge.org/projects/#{RUBY_FORGE_PROJECT}/"
project_data = open(project_uri) { |data| data.read }
group_id = project_data[/[?&]group_id=(\d+)/, 1]
raise "Couldn't get group id" unless group_id
# This echos password to shell which is a bit sucky
if ENV["RUBY_FORGE_PASSWORD"]
password = ENV["RUBY_FORGE_PASSWORD"]
else
print "#{RUBY_FORGE_USER}@rubyforge.org's password: "
password = STDIN.gets.chomp
end
login_response = Net::HTTP.start("rubyforge.org", 80) do |http|
data = [
"login=1",
"form_loginname=#{RUBY_FORGE_USER}",
"form_pw=#{password}"
].join("&")
http.post("/account/login.php", data)
end
cookie = login_response["set-cookie"]
raise "Login failed" unless cookie
headers = { "Cookie" => cookie }
release_uri = "http://rubyforge.org/frs/admin/?group_id=#{group_id}"
release_data = open(release_uri, headers) { |data| data.read }
package_id = release_data[/[?&]package_id=(\d+)/, 1]
raise "Couldn't get package id" unless package_id
first_file = true
release_id = ""
files.each do |filename|
basename = File.basename(filename)
file_ext = File.extname(filename)
file_data = File.open(filename, "rb") { |file| file.read }
puts "Releasing #{basename}..."
release_response = Net::HTTP.start("rubyforge.org", 80) do |http|
release_date = Time.now.strftime("%Y-%m-%d %H:%M")
type_map = {
".zip" => "3000",
".tgz" => "3110",
".gz" => "3110",
".gem" => "1400"
}; type_map.default = "9999"
type = type_map[file_ext]
boundary = "rubyqMY6QN9bp6e4kS21H4y0zxcvoor"
query_hash = if first_file then
{
"group_id" => group_id,
"package_id" => package_id,
"release_name" => RELEASE_NAME,
"release_date" => release_date,
"type_id" => type,
"processor_id" => "8000", # Any
"release_notes" => "",
"release_changes" => "",
"preformatted" => "1",
"submit" => "1"
}
else
{
"group_id" => group_id,
"release_id" => release_id,
"package_id" => package_id,
"step2" => "1",
"type_id" => type,
"processor_id" => "8000", # Any
"submit" => "Add This File"
}
end
query = "?" + query_hash.map do |(name, value)|
[name, URI.encode(value)].join("=")
end.join("&")
data = [
"--" + boundary,
"Content-Disposition: form-data; name=\"userfile\"; filename=\"#{basename}\"",
"Content-Type: application/octet-stream",
"Content-Transfer-Encoding: binary",
"", file_data, ""
].join("\x0D\x0A")
release_headers = headers.merge(
"Content-Type" => "multipart/form-data; boundary=#{boundary}"
)
target = first_file ? "/frs/admin/qrs.php" : "/frs/admin/editrelease.php"
http.post(target + query, data, release_headers)
end
if first_file then
release_id = release_response.body[/release_id=(\d+)/, 1]
raise("Couldn't get release id") unless release_id
end
first_file = false
end
for ext in %w( gem tgz zip )
release_command = "rubyforge add_release #{PKG_NAME} #{PKG_NAME} 'REL #{PKG_VERSION}' pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}"
puts release_command
system(release_command)
end
end
end

View File

@@ -2,7 +2,7 @@ module ActionMailer
module VERSION #:nodoc:
MAJOR = 1
MINOR = 2
TINY = 1
TINY = 2
STRING = [MAJOR, MINOR, TINY].join('.')
end

View File

@@ -1,4 +1,11 @@
*1.12.1* (April 6th, 2005)
*1.12.2* (June 27th, 2006)
* Refinement to avoid exceptions in traverse_to_controller.
* (Hackish) Fix loading of arbitrary files in Ruby's load path by traverse_to_controller. [Nicholas Seckar]
*1.12.1* (April 6th, 2006)
* Fixed that template extensions would be cached development mode #4624 [Stefan Kaes]
@@ -30,7 +37,7 @@
This can be used by deployment managers to set the asset id by application revision
*1.12.0* (March 27th, 2005)
*1.12.0* (March 27th, 2006)
* Add documentation for respond_to. [Jamis Buck]

View File

@@ -136,116 +136,12 @@ task :pdoc => [:rdoc] do
end
desc "Publish the release files to RubyForge."
task :release => [:package] do
files = ["gem", "tgz", "zip"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
task :release => [ :package ] do
`rubyforge login`
if RUBY_FORGE_PROJECT then
require 'net/http'
require 'open-uri'
project_uri = "http://rubyforge.org/projects/#{RUBY_FORGE_PROJECT}/"
project_data = open(project_uri) { |data| data.read }
group_id = project_data[/[?&]group_id=(\d+)/, 1]
raise "Couldn't get group id" unless group_id
# This echos password to shell which is a bit sucky
if ENV["RUBY_FORGE_PASSWORD"]
password = ENV["RUBY_FORGE_PASSWORD"]
else
print "#{RUBY_FORGE_USER}@rubyforge.org's password: "
password = STDIN.gets.chomp
end
login_response = Net::HTTP.start("rubyforge.org", 80) do |http|
data = [
"login=1",
"form_loginname=#{RUBY_FORGE_USER}",
"form_pw=#{password}"
].join("&")
http.post("/account/login.php", data)
end
cookie = login_response["set-cookie"]
raise "Login failed" unless cookie
headers = { "Cookie" => cookie }
release_uri = "http://rubyforge.org/frs/admin/?group_id=#{group_id}"
release_data = open(release_uri, headers) { |data| data.read }
package_id = release_data[/[?&]package_id=(\d+)/, 1]
raise "Couldn't get package id" unless package_id
first_file = true
release_id = ""
files.each do |filename|
basename = File.basename(filename)
file_ext = File.extname(filename)
file_data = File.open(filename, "rb") { |file| file.read }
puts "Releasing #{basename}..."
release_response = Net::HTTP.start("rubyforge.org", 80) do |http|
release_date = Time.now.strftime("%Y-%m-%d %H:%M")
type_map = {
".zip" => "3000",
".tgz" => "3110",
".gz" => "3110",
".gem" => "1400"
}; type_map.default = "9999"
type = type_map[file_ext]
boundary = "rubyqMY6QN9bp6e4kS21H4y0zxcvoor"
query_hash = if first_file then
{
"group_id" => group_id,
"package_id" => package_id,
"release_name" => RELEASE_NAME,
"release_date" => release_date,
"type_id" => type,
"processor_id" => "8000", # Any
"release_notes" => "",
"release_changes" => "",
"preformatted" => "1",
"submit" => "1"
}
else
{
"group_id" => group_id,
"release_id" => release_id,
"package_id" => package_id,
"step2" => "1",
"type_id" => type,
"processor_id" => "8000", # Any
"submit" => "Add This File"
}
end
query = "?" + query_hash.map do |(name, value)|
[name, URI.encode(value)].join("=")
end.join("&")
data = [
"--" + boundary,
"Content-Disposition: form-data; name=\"userfile\"; filename=\"#{basename}\"",
"Content-Type: application/octet-stream",
"Content-Transfer-Encoding: binary",
"", file_data, ""
].join("\x0D\x0A")
release_headers = headers.merge(
"Content-Type" => "multipart/form-data; boundary=#{boundary}"
)
target = first_file ? "/frs/admin/qrs.php" : "/frs/admin/editrelease.php"
http.post(target + query, data, release_headers)
end
if first_file then
release_id = release_response.body[/release_id=(\d+)/, 1]
raise("Couldn't get release id") unless release_id
end
first_file = false
end
for ext in %w( gem tgz zip )
release_command = "rubyforge add_release #{PKG_NAME} #{PKG_NAME} 'REL #{PKG_VERSION}' pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}"
puts release_command
system(release_command)
end
end
end

View File

@@ -226,7 +226,7 @@ module ActionController
mod_name = controller_name = segment = nil
while index < length
return nil unless /^[A-Za-z][A-Za-z\d_]*$/ =~ (segment = segments[index])
return nil unless /\A[A-Za-z][A-Za-z\d_]*\Z/ =~ (segment = segments[index])
index += 1
mod_name = segment.camelize
@@ -245,13 +245,20 @@ module ActionController
raise unless /^uninitialized constant .*#{controller_name}$/ =~ e.message
end
begin
next_mod = eval("mod::#{mod_name}", nil, __FILE__, __LINE__)
# Check that we didn't get a module from a parent namespace
mod = (mod == Object || next_mod.name == "#{mod.name}::#{mod_name}") ? next_mod : nil
rescue NameError => e
raise unless /^uninitialized constant .*#{mod_name}$/ =~ e.message
if mod.const_defined? mod_name
next_mod = mod.send(:const_get, mod_name)
next_mod = nil unless next_mod.is_a?(Module)
else
suffix = File.join(segments[start_at..index])
$:.each do |base|
path = File.join(base, suffix)
next unless File.directory? path
next_mod = Module.new
mod.send(:const_set, mod_name, next_mod)
break
end
end
mod = next_mod
return nil unless mod
end

View File

@@ -2,7 +2,7 @@ module ActionPack #:nodoc:
module VERSION #:nodoc:
MAJOR = 1
MINOR = 12
TINY = 1
TINY = 2
STRING = [MAJOR, MINOR, TINY].join('.')
end

View File

@@ -6,6 +6,7 @@ class NotAController
end
module Admin
class << self; alias_method :const_available?, :const_defined?; end
SomeConstant = 10
class UserController < Class.new(ActionController::Base); end
class NewsFeedController < Class.new(ActionController::Base); end
end

View File

@@ -535,7 +535,6 @@ end
class RouteTests < Test::Unit::TestCase
def route(*args)
@route = ::ActionController::Routing::Route.new(*args) unless args.empty?
return @route
@@ -972,4 +971,21 @@ class RouteSetTests < Test::Unit::TestCase
end
end
class ControllerComponentTest < Test::Unit::TestCase
def test_traverse_to_controller_should_not_load_arbitrary_files
load_path = $:.dup
base = File.dirname(File.dirname(File.expand_path(__FILE__)))
$: << File.join(base, 'fixtures')
assert_equal nil, ActionController::Routing::ControllerComponent.traverse_to_controller(%w(dont_load pretty please))
ensure
$:[0..-1] = load_path
end
def test_traverse_should_not_trip_on_non_module_constants
assert_equal nil, ActionController::Routing::ControllerComponent.traverse_to_controller(%w(admin some_constant a))
end
end
end

3
actionpack/test/fixtures/dont_load.rb vendored Normal file
View File

@@ -0,0 +1,3 @@
# see routing/controller component tests
raise Exception, "I should never be loaded"

View File

@@ -1,3 +1,13 @@
*1.1.3* (June 27th, 2006)
* Rely on Action Pack 1.12.2 and Active Record 1.14.3
*1.1.2* (April 9th, 2005)
* Rely on Active Record 1.14.2
*1.1.1* (April 6th, 2005)
* Do not convert driver options to strings (#4499)

View File

@@ -71,8 +71,8 @@ spec = Gem::Specification.new do |s|
s.rubyforge_project = "aws"
s.homepage = "http://www.rubyonrails.org"
s.add_dependency('actionpack', '= 1.12.1' + PKG_BUILD)
s.add_dependency('activerecord', '= 1.14.1' + PKG_BUILD)
s.add_dependency('actionpack', '= 1.12.2' + PKG_BUILD)
s.add_dependency('activerecord', '= 1.14.3' + PKG_BUILD)
s.has_rdoc = true
s.requirements << 'none'
@@ -160,116 +160,12 @@ task :lines do
end
desc "Publish the release files to RubyForge."
task :release => [:package] do
files = ["gem", "tgz", "zip"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
task :release => [ :package ] do
`rubyforge login`
if RUBY_FORGE_PROJECT then
require 'net/http'
require 'open-uri'
project_uri = "http://rubyforge.org/projects/#{RUBY_FORGE_PROJECT}/"
project_data = open(project_uri) { |data| data.read }
group_id = project_data[/[?&]group_id=(\d+)/, 1]
raise "Couldn't get group id" unless group_id
# This echos password to shell which is a bit sucky
if ENV["RUBY_FORGE_PASSWORD"]
password = ENV["RUBY_FORGE_PASSWORD"]
else
print "#{RUBY_FORGE_USER}@rubyforge.org's password: "
password = STDIN.gets.chomp
end
login_response = Net::HTTP.start("rubyforge.org", 80) do |http|
data = [
"login=1",
"form_loginname=#{RUBY_FORGE_USER}",
"form_pw=#{password}"
].join("&")
http.post("/account/login.php", data)
end
cookie = login_response["set-cookie"]
raise "Login failed" unless cookie
headers = { "Cookie" => cookie }
release_uri = "http://rubyforge.org/frs/admin/?group_id=#{group_id}"
release_data = open(release_uri, headers) { |data| data.read }
package_id = release_data[/[?&]package_id=(\d+)/, 1]
raise "Couldn't get package id" unless package_id
first_file = true
release_id = ""
files.each do |filename|
basename = File.basename(filename)
file_ext = File.extname(filename)
file_data = File.open(filename, "rb") { |file| file.read }
puts "Releasing #{basename}..."
release_response = Net::HTTP.start("rubyforge.org", 80) do |http|
release_date = Time.now.strftime("%Y-%m-%d %H:%M")
type_map = {
".zip" => "3000",
".tgz" => "3110",
".gz" => "3110",
".gem" => "1400"
}; type_map.default = "9999"
type = type_map[file_ext]
boundary = "rubyqMY6QN9bp6e4kS21H4y0zxcvoor"
query_hash = if first_file then
{
"group_id" => group_id,
"package_id" => package_id,
"release_name" => RELEASE_NAME,
"release_date" => release_date,
"type_id" => type,
"processor_id" => "8000", # Any
"release_notes" => "",
"release_changes" => "",
"preformatted" => "1",
"submit" => "1"
}
else
{
"group_id" => group_id,
"release_id" => release_id,
"package_id" => package_id,
"step2" => "1",
"type_id" => type,
"processor_id" => "8000", # Any
"submit" => "Add This File"
}
end
query = "?" + query_hash.map do |(name, value)|
[name, URI.encode(value)].join("=")
end.join("&")
data = [
"--" + boundary,
"Content-Disposition: form-data; name=\"userfile\"; filename=\"#{basename}\"",
"Content-Type: application/octet-stream",
"Content-Transfer-Encoding: binary",
"", file_data, ""
].join("\x0D\x0A")
release_headers = headers.merge(
"Content-Type" => "multipart/form-data; boundary=#{boundary}"
)
target = first_file ? "/frs/admin/qrs.php" : "/frs/admin/editrelease.php"
http.post(target + query, data, release_headers)
end
if first_file then
release_id = release_response.body[/release_id=(\d+)/, 1]
raise("Couldn't get release id") unless release_id
end
first_file = false
end
for ext in %w( gem tgz zip )
release_command = "rubyforge add_release #{PKG_NAME} #{PKG_NAME} 'REL #{PKG_VERSION}' pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}"
puts release_command
system(release_command)
end
end
end

View File

@@ -2,7 +2,7 @@ module ActionWebService
module VERSION #:nodoc:
MAJOR = 1
MINOR = 1
TINY = 1
TINY = 3
STRING = [MAJOR, MINOR, TINY].join('.')
end

View File

@@ -1,4 +1,18 @@
*1.14.1* (April 6th, 2005)
*1.14.3* (June 27th, 2006)
* Properly quote index names in migrations (closes #4764) [John Long]
* Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick]
* Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick]
*1.14.2* (April 9th, 2006)
* Fixed calculations for the Oracle Adapter (closes #4626) [Michael Schoen]
*1.14.1* (April 6th, 2006)
* Fix type_name_with_module to handle type names that begin with '::'. Closes #4614. [Nicholas Seckar]
@@ -53,7 +67,7 @@
* Fixed broken OCIAdapter #4457 [schoenm@earthlink.net]
*1.14.0* (March 27th, 2005)
*1.14.0* (March 27th, 2006)
* Replace 'rescue Object' with a finer grained rescue. Closes #4431. [Nicholas Seckar]
@@ -473,6 +487,7 @@
* Fixed :through relations when using STI inherited classes would use the inherited class's name as foreign key on the join model [Tobias Luetke]
*1.13.2* (December 13th, 2005)
* Become part of Rails 1.0

View File

@@ -170,116 +170,12 @@ task :pdoc => [:rdoc] do
end
desc "Publish the release files to RubyForge."
task :release => [:package] do
files = ["gem", "tgz", "zip"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
task :release => [ :package ] do
`rubyforge login`
if RUBY_FORGE_PROJECT then
require 'net/http'
require 'open-uri'
project_uri = "http://rubyforge.org/projects/#{RUBY_FORGE_PROJECT}/"
project_data = open(project_uri) { |data| data.read }
group_id = project_data[/[?&]group_id=(\d+)/, 1]
raise "Couldn't get group id" unless group_id
# This echos password to shell which is a bit sucky
if ENV["RUBY_FORGE_PASSWORD"]
password = ENV["RUBY_FORGE_PASSWORD"]
else
print "#{RUBY_FORGE_USER}@rubyforge.org's password: "
password = STDIN.gets.chomp
end
login_response = Net::HTTP.start("rubyforge.org", 80) do |http|
data = [
"login=1",
"form_loginname=#{RUBY_FORGE_USER}",
"form_pw=#{password}"
].join("&")
http.post("/account/login.php", data)
end
cookie = login_response["set-cookie"]
raise "Login failed" unless cookie
headers = { "Cookie" => cookie }
release_uri = "http://rubyforge.org/frs/admin/?group_id=#{group_id}"
release_data = open(release_uri, headers) { |data| data.read }
package_id = release_data[/[?&]package_id=(\d+)/, 1]
raise "Couldn't get package id" unless package_id
first_file = true
release_id = ""
files.each do |filename|
basename = File.basename(filename)
file_ext = File.extname(filename)
file_data = File.open(filename, "rb") { |file| file.read }
puts "Releasing #{basename}..."
release_response = Net::HTTP.start("rubyforge.org", 80) do |http|
release_date = Time.now.strftime("%Y-%m-%d %H:%M")
type_map = {
".zip" => "3000",
".tgz" => "3110",
".gz" => "3110",
".gem" => "1400"
}; type_map.default = "9999"
type = type_map[file_ext]
boundary = "rubyqMY6QN9bp6e4kS21H4y0zxcvoor"
query_hash = if first_file then
{
"group_id" => group_id,
"package_id" => package_id,
"release_name" => RELEASE_NAME,
"release_date" => release_date,
"type_id" => type,
"processor_id" => "8000", # Any
"release_notes" => "",
"release_changes" => "",
"preformatted" => "1",
"submit" => "1"
}
else
{
"group_id" => group_id,
"release_id" => release_id,
"package_id" => package_id,
"step2" => "1",
"type_id" => type,
"processor_id" => "8000", # Any
"submit" => "Add This File"
}
end
query = "?" + query_hash.map do |(name, value)|
[name, URI.encode(value)].join("=")
end.join("&")
data = [
"--" + boundary,
"Content-Disposition: form-data; name=\"userfile\"; filename=\"#{basename}\"",
"Content-Type: application/octet-stream",
"Content-Transfer-Encoding: binary",
"", file_data, ""
].join("\x0D\x0A")
release_headers = headers.merge(
"Content-Type" => "multipart/form-data; boundary=#{boundary}"
)
target = first_file ? "/frs/admin/qrs.php" : "/frs/admin/editrelease.php"
http.post(target + query, data, release_headers)
end
if first_file then
release_id = release_response.body[/release_id=(\d+)/, 1]
raise("Couldn't get release id") unless release_id
end
first_file = false
end
for ext in %w( gem tgz zip )
release_command = "rubyforge add_release #{PKG_NAME} #{PKG_NAME} 'REL #{PKG_VERSION}' pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}"
puts release_command
system(release_command)
end
end
end

View File

@@ -1163,18 +1163,19 @@ module ActiveRecord
end
def select_limited_ids_list(options, join_dependency)
connection.select_values(
connection.select_all(
construct_finder_sql_for_association_limiting(options, join_dependency),
"#{name} Load IDs For Limited Eager Loading"
).collect { |id| connection.quote(id) }.join(", ")
).collect { |row| connection.quote(row[primary_key]) }.join(", ")
end
def construct_finder_sql_for_association_limiting(options, join_dependency)
scope = scope(:find)
#sql = "SELECT DISTINCT #{table_name}.#{primary_key} FROM #{table_name} "
sql = "SELECT "
sql << "DISTINCT #{table_name}." if include_eager_conditions?(options) || include_eager_order?(options)
sql << "#{primary_key} FROM #{table_name} "
sql << primary_key
sql << ", #{options[:order].split(',').collect { |s| s.split.first } * ', '}" if options[:order] && (include_eager_conditions?(options) || include_eager_order?(options))
sql << " FROM #{table_name} "
if include_eager_conditions?(options) || include_eager_order?(options)
sql << join_dependency.join_associations.collect{|join| join.association_join }.join
@@ -1186,16 +1187,24 @@ module ActiveRecord
add_limit!(sql, options, scope)
return sanitize_sql(sql)
end
# Checks if the conditions reference a table other than the current model table
def include_eager_conditions?(options)
conditions = scope(:find, :conditions) || options[:conditions]
return false unless conditions
conditions = conditions.first if conditions.is_a?(Array)
conditions.scan(/(\w+)\.\w+/).flatten.any? do |condition_table_name|
# look in both sets of conditions
conditions = [scope(:find, :conditions), options[:conditions]].inject([]) do |all, cond|
case cond
when nil then all
when Array then all << cond.first
else all << cond
end
end
return false unless conditions.any?
conditions.join(' ').scan(/(\w+)\.\w+/).flatten.any? do |condition_table_name|
condition_table_name != table_name
end
end
# Checks if the query order references a table other than the current model's table.
def include_eager_order?(options)
order = options[:order]
return false unless order

View File

@@ -42,26 +42,29 @@ module ActiveRecord
#
# Note: Person.count(:all) will not work because it will use :all as the condition. Use Person.count instead.
def count(*args)
options = {}
#For backwards compatibility, we need to handle both count(conditions=nil, joins=nil) or count(options={}).
if args.size >= 0 and args.size <= 2
options = {}
column_name = :all
# For backwards compatibility, we need to handle both count(conditions=nil, joins=nil) or count(options={}) or count(column_name=:all, options={}).
if args.size >= 0 && args.size <= 2
if args.first.is_a?(Hash)
options = args.first
#should we verify the options hash???
options = args.first
elsif args[1].is_a?(Hash)
options = args[1]
column_name = args.first
options = args[1]
else
# Handle legacy paramter options: def count(conditions=nil, joins=nil)
# Handle legacy paramter options: def count(conditions=nil, joins=nil)
options.merge!(:conditions => args[0]) if args.length > 0
options.merge!(:joins => args[1]) if args.length > 1
options.merge!(:joins => args[1]) if args.length > 1
end
else
raise(ArgumentError, "Unexpected parameters passed to count(*args): expected either count(conditions=nil, joins=nil) or count(options={})")
end
(scope(:find, :include) || options[:include]) ? count_with_associations(options) : calculate(:count, :all, options)
if options[:include] || scope(:find, :include)
count_with_associations(options)
else
calculate(:count, column_name, options)
end
end
# Calculates average value on a given column. The value is returned as a float. See #calculate for examples with options.

View File

@@ -119,7 +119,7 @@ module ActiveRecord
# Adds a new column to the named table.
# See TableDefinition#column for details of the options you can use.
def add_column(table_name, column_name, type, options = {})
add_column_sql = "ALTER TABLE #{table_name} ADD #{column_name} #{type_to_sql(type, options[:limit])}"
add_column_sql = "ALTER TABLE #{table_name} ADD #{quote_column_name(column_name)} #{type_to_sql(type, options[:limit])}"
add_column_options!(add_column_sql, options)
execute(add_column_sql)
end
@@ -128,7 +128,7 @@ module ActiveRecord
# ===== Examples
# remove_column(:suppliers, :qualification)
def remove_column(table_name, column_name)
execute "ALTER TABLE #{table_name} DROP #{column_name}"
execute "ALTER TABLE #{table_name} DROP #{quote_column_name(column_name)}"
end
# Changes the column's definition according to the new options.
@@ -184,7 +184,8 @@ module ActiveRecord
# generates
# CREATE UNIQUE INDEX by_branch_party ON accounts(branch_id, party_id)
def add_index(table_name, column_name, options = {})
index_name = "#{table_name}_#{Array(column_name).first}_index"
column_names = Array(column_name)
index_name = index_name(table_name, :column => column_names.first)
if Hash === options # legacy support, since this param was a string
index_type = options[:unique] ? "UNIQUE" : ""
@@ -192,8 +193,8 @@ module ActiveRecord
else
index_type = options
end
execute "CREATE #{index_type} INDEX #{index_name} ON #{table_name} (#{Array(column_name).join(", ")})"
quoted_column_names = column_names.map { |e| quote_column_name(e) }.join(", ")
execute "CREATE #{index_type} INDEX #{quote_column_name(index_name)} ON #{table_name} (#{quoted_column_names})"
end
# Remove the given index from the table.
@@ -209,7 +210,7 @@ module ActiveRecord
# add_index :accounts, [:username, :password]
# remove_index :accounts, :username
def remove_index(table_name, options = {})
execute "DROP INDEX #{index_name(table_name, options)} ON #{table_name}"
execute "DROP INDEX #{quote_column_name(index_name(table_name, options))} ON #{table_name}"
end
def index_name(table_name, options) #:nodoc:

View File

@@ -18,7 +18,6 @@ module ActiveRecord
end
end
config = config.symbolize_keys
host = config[:host]
port = config[:port]

View File

@@ -337,8 +337,7 @@ module ActiveRecord
def remove_index(table_name, options) #:nodoc:
execute "DROP INDEX #{index_name(table_name, options)}"
end
end
private
BYTEA_COLUMN_TYPE_OID = 17

View File

@@ -213,13 +213,7 @@ module ActiveRecord
end
def remove_index(table_name, options={}) #:nodoc:
if Hash === options
index_name = options[:name]
else
index_name = "#{table_name}_#{options}_index"
end
execute "DROP INDEX #{index_name}"
execute "DROP INDEX #{quote_column_name(index_name(table_name, options))}"
end
def rename_table(name, new_name)

View File

@@ -2,7 +2,7 @@ module ActiveRecord
module VERSION #:nodoc:
MAJOR = 1
MINOR = 14
TINY = 1
TINY = 3
STRING = [MAJOR, MINOR, TINY].join('.')
end

View File

@@ -179,6 +179,42 @@ class EagerAssociationTest < Test::Unit::TestCase
assert_equal count, posts.size
end
def test_eager_with_has_many_and_limit_and_scoped_conditions_on_the_eagers
posts = nil
Post.with_scope(:find => {
:include => :comments,
:conditions => "comments.body like 'Normal%' OR comments.#{QUOTED_TYPE}= 'SpecialComment'"
}) do
posts = authors(:david).posts.find(:all, :limit => 2)
assert_equal 2, posts.size
end
Post.with_scope(:find => {
:include => [ :comments, :author ],
:conditions => "authors.name = 'David' AND (comments.body like 'Normal%' OR comments.#{QUOTED_TYPE}= 'SpecialComment')"
}) do
count = Post.count(:limit => 2)
assert_equal count, posts.size
end
end
def test_eager_with_has_many_and_limit_and_scoped_and_explicit_conditions_on_the_eagers
Post.with_scope(:find => { :conditions => "1=1" }) do
posts = authors(:david).posts.find(:all,
:include => :comments,
:conditions => "comments.body like 'Normal%' OR comments.#{QUOTED_TYPE}= 'SpecialComment'",
:limit => 2
)
assert_equal 2, posts.size
count = Post.count(
:include => [ :comments, :author ],
:conditions => "authors.name = 'David' AND (comments.body like 'Normal%' OR comments.#{QUOTED_TYPE}= 'SpecialComment')",
:limit => 2
)
assert_equal count, posts.size
end
end
def test_eager_association_loading_with_habtm
posts = Post.find(:all, :include => :categories, :order => "posts.id")
assert_equal 2, posts[0].categories.size

View File

@@ -34,6 +34,7 @@ if ActiveRecord::Base.connection.supports_migrations?
Reminder.reset_column_information
Person.connection.remove_column("people", "last_name") rescue nil
Person.connection.remove_column("people", "key") rescue nil
Person.connection.remove_column("people", "bio") rescue nil
Person.connection.remove_column("people", "age") rescue nil
Person.connection.remove_column("people", "height") rescue nil
@@ -47,12 +48,17 @@ if ActiveRecord::Base.connection.supports_migrations?
def test_add_index
Person.connection.add_column "people", "last_name", :string
Person.connection.add_column "people", "administrator", :boolean
Person.connection.add_column "people", "key", :string
assert_nothing_raised { Person.connection.add_index("people", "last_name") }
assert_nothing_raised { Person.connection.remove_index("people", "last_name") }
assert_nothing_raised { Person.connection.add_index("people", ["last_name", "first_name"]) }
assert_nothing_raised { Person.connection.remove_index("people", "last_name") }
# quoting
assert_nothing_raised { Person.connection.add_index("people", ["key"], :name => "key", :unique => true) }
assert_nothing_raised { Person.connection.remove_index("people", :name => "key") }
# Sybase adapter does not support indexes on :boolean columns
unless current_adapter?(:SybaseAdapter)

View File

@@ -71,116 +71,12 @@ task :pdoc => [:rdoc] do
end
desc "Publish the release files to RubyForge."
task :release => [:package] do
files = ["gem", "tgz", "zip"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
task :release => [ :package ] do
`rubyforge login`
if RUBY_FORGE_PROJECT then
require 'net/http'
require 'open-uri'
project_uri = "http://rubyforge.org/projects/#{RUBY_FORGE_PROJECT}/"
project_data = open(project_uri) { |data| data.read }
group_id = project_data[/[?&]group_id=(\d+)/, 1]
raise "Couldn't get group id" unless group_id
# This echos password to shell which is a bit sucky
if ENV["RUBY_FORGE_PASSWORD"]
password = ENV["RUBY_FORGE_PASSWORD"]
else
print "#{RUBY_FORGE_USER}@rubyforge.org's password: "
password = STDIN.gets.chomp
end
login_response = Net::HTTP.start("rubyforge.org", 80) do |http|
data = [
"login=1",
"form_loginname=#{RUBY_FORGE_USER}",
"form_pw=#{password}"
].join("&")
http.post("/account/login.php", data)
end
cookie = login_response["set-cookie"]
raise "Login failed" unless cookie
headers = { "Cookie" => cookie }
release_uri = "http://rubyforge.org/frs/admin/?group_id=#{group_id}"
release_data = open(release_uri, headers) { |data| data.read }
package_id = release_data[/[?&]package_id=(\d+)/, 1]
raise "Couldn't get package id" unless package_id
first_file = true
release_id = ""
files.each do |filename|
basename = File.basename(filename)
file_ext = File.extname(filename)
file_data = File.open(filename, "rb") { |file| file.read }
puts "Releasing #{basename}..."
release_response = Net::HTTP.start("rubyforge.org", 80) do |http|
release_date = Time.now.strftime("%Y-%m-%d %H:%M")
type_map = {
".zip" => "3000",
".tgz" => "3110",
".gz" => "3110",
".gem" => "1400"
}; type_map.default = "9999"
type = type_map[file_ext]
boundary = "rubyqMY6QN9bp6e4kS21H4y0zxcvoor"
query_hash = if first_file then
{
"group_id" => group_id,
"package_id" => package_id,
"release_name" => RELEASE_NAME,
"release_date" => release_date,
"type_id" => type,
"processor_id" => "8000", # Any
"release_notes" => "",
"release_changes" => "",
"preformatted" => "1",
"submit" => "1"
}
else
{
"group_id" => group_id,
"release_id" => release_id,
"package_id" => package_id,
"step2" => "1",
"type_id" => type,
"processor_id" => "8000", # Any
"submit" => "Add This File"
}
end
query = "?" + query_hash.map do |(name, value)|
[name, URI.encode(value)].join("=")
end.join("&")
data = [
"--" + boundary,
"Content-Disposition: form-data; name=\"userfile\"; filename=\"#{basename}\"",
"Content-Type: application/octet-stream",
"Content-Transfer-Encoding: binary",
"", file_data, ""
].join("\x0D\x0A")
release_headers = headers.merge(
"Content-Type" => "multipart/form-data; boundary=#{boundary}"
)
target = first_file ? "/frs/admin/qrs.php" : "/frs/admin/editrelease.php"
http.post(target + query, data, release_headers)
end
if first_file then
release_id = release_response.body[/release_id=(\d+)/, 1]
raise("Couldn't get release id") unless release_id
end
first_file = false
end
for ext in %w( gem tgz zip )
release_command = "rubyforge add_release #{PKG_NAME} #{PKG_NAME} 'REL #{PKG_VERSION}' pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}"
puts release_command
system(release_command)
end
end
end

View File

@@ -1,4 +1,16 @@
*1.1.1* (April 6th, 2005)
*1.1.3* (June 27th, 2006)
* Updated to Active Record 1.14.3, Action Pack 1.12.2, ActionWebService 1.1.3, ActionMailer 1.2.2
*1.1.2* (April 9th, 2006)
* Added rake rails:update:configs to update config/boot.rb from the latest (also included in rake rails:update) [DHH]
* Fixed that boot.rb would set RAILS_GEM_VERSION twice, not respect an uncommented RAILS_GEM_VERSION line, and not use require_gem [DHH]
*1.1.1* (April 6th, 2006)
* Enhances plugin#discover allowing it to discover svn:// like URIs (closes #4565) [ruben.nine@gmail.com]
@@ -37,7 +49,7 @@
* Avoid passing escapeHTML non-string in Rails' info controller [Nicholas Seckar]
*1.1.0* (March 27th, 2005)
*1.1.0* (March 27th, 2006)
* Allow db:fixtures:load to load a subset of the applications fixtures. [Chad Fowler]
@@ -178,6 +190,7 @@
* Honor ActiveRecord::Base.pluralize_table_names when creating and destroying session store table. #3204. [rails@bencurtis.com, Marcel Molina Jr.]
*1.0.0* (December 13th, 2005)
* Update instructions on how to find and install generators. #3172. [Chad Fowler]

View File

@@ -279,10 +279,10 @@ spec = Gem::Specification.new do |s|
s.add_dependency('rake', '>= 0.7.1')
s.add_dependency('activesupport', '= 1.3.1' + PKG_BUILD)
s.add_dependency('activerecord', '= 1.14.1' + PKG_BUILD)
s.add_dependency('actionpack', '= 1.12.1' + PKG_BUILD)
s.add_dependency('actionmailer', '= 1.2.1' + PKG_BUILD)
s.add_dependency('actionwebservice', '= 1.1.1' + PKG_BUILD)
s.add_dependency('activerecord', '= 1.14.3' + PKG_BUILD)
s.add_dependency('actionpack', '= 1.12.2' + PKG_BUILD)
s.add_dependency('actionmailer', '= 1.2.2' + PKG_BUILD)
s.add_dependency('actionwebservice', '= 1.1.3' + PKG_BUILD)
s.rdoc_options << '--exclude' << '.'
s.has_rdoc = false
@@ -312,116 +312,9 @@ task :pgem => [:gem] do
end
desc "Publish the release files to RubyForge."
task :release => [:gem] do
files = ["gem"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
if RUBY_FORGE_PROJECT then
require 'net/http'
require 'open-uri'
project_uri = "http://rubyforge.org/projects/#{RUBY_FORGE_PROJECT}/"
project_data = open(project_uri) { |data| data.read }
group_id = project_data[/[?&]group_id=(\d+)/, 1]
raise "Couldn't get group id" unless group_id
# This echos password to shell which is a bit sucky
if ENV["RUBY_FORGE_PASSWORD"]
password = ENV["RUBY_FORGE_PASSWORD"]
else
print "#{RUBY_FORGE_USER}@rubyforge.org's password: "
password = STDIN.gets.chomp
end
login_response = Net::HTTP.start("rubyforge.org", 80) do |http|
data = [
"login=1",
"form_loginname=#{RUBY_FORGE_USER}",
"form_pw=#{password}"
].join("&")
http.post("/account/login.php", data)
end
cookie = login_response["set-cookie"]
raise "Login failed" unless cookie
headers = { "Cookie" => cookie }
release_uri = "http://rubyforge.org/frs/admin/?group_id=#{group_id}"
release_data = open(release_uri, headers) { |data| data.read }
package_id = release_data[/[?&]package_id=(\d+)/, 1]
raise "Couldn't get package id" unless package_id
first_file = true
release_id = ""
files.each do |filename|
basename = File.basename(filename)
file_ext = File.extname(filename)
file_data = File.open(filename, "rb") { |file| file.read }
puts "Releasing #{basename}..."
release_response = Net::HTTP.start("rubyforge.org", 80) do |http|
release_date = Time.now.strftime("%Y-%m-%d %H:%M")
type_map = {
".zip" => "3000",
".tgz" => "3110",
".gz" => "3110",
".gem" => "1400"
}; type_map.default = "9999"
type = type_map[file_ext]
boundary = "rubyqMY6QN9bp6e4kS21H4y0zxcvoor"
query_hash = if first_file then
{
"group_id" => group_id,
"package_id" => package_id,
"release_name" => RELEASE_NAME,
"release_date" => release_date,
"type_id" => type,
"processor_id" => "8000", # Any
"release_notes" => "",
"release_changes" => "",
"preformatted" => "1",
"submit" => "1"
}
else
{
"group_id" => group_id,
"release_id" => release_id,
"package_id" => package_id,
"step2" => "1",
"type_id" => type,
"processor_id" => "8000", # Any
"submit" => "Add This File"
}
end
query = "?" + query_hash.map do |(name, value)|
[name, URI.encode(value)].join("=")
end.join("&")
data = [
"--" + boundary,
"Content-Disposition: form-data; name=\"userfile\"; filename=\"#{basename}\"",
"Content-Type: application/octet-stream",
"Content-Transfer-Encoding: binary",
"", file_data, ""
].join("\x0D\x0A")
release_headers = headers.merge(
"Content-Type" => "multipart/form-data; boundary=#{boundary}"
)
target = first_file ? "/frs/admin/qrs.php" : "/frs/admin/editrelease.php"
http.post(target + query, data, release_headers)
end
if first_file then
release_id = release_response.body[/release_id=(\d+)/, 1]
raise("Couldn't get release id") unless release_id
end
first_file = false
end
end
end
task :release => [ :gem ] do
`rubyforge login`
release_command = "rubyforge add_release #{PKG_NAME} #{PKG_NAME} 'REL #{PKG_VERSION}' pkg/#{PKG_NAME}-#{PKG_VERSION}.gem"
puts release_command
system(release_command)
end

View File

@@ -2,37 +2,43 @@
unless defined?(RAILS_ROOT)
root_path = File.join(File.dirname(__FILE__), '..')
unless RUBY_PLATFORM =~ /mswin32/
require 'pathname'
root_path = Pathname.new(root_path).cleanpath(true).to_s
end
RAILS_ROOT = root_path
end
if File.directory?("#{RAILS_ROOT}/vendor/rails")
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
else
require 'rubygems'
if !defined?(RAILS_GEM_VERSION) && File.read(File.dirname(__FILE__) + '/environment.rb') =~ /RAILS_GEM_VERSION = '([\d.]+)'/
RAILS_GEM_VERSION = $1
end
if defined?(RAILS_GEM_VERSION)
rails_gem = Gem.cache.search('rails', "=#{RAILS_GEM_VERSION}").first
if rails_gem
require rails_gem.full_gem_path + '/lib/initializer'
else
STDERR.puts %(Cannot find gem for Rails =#{RAILS_GEM_VERSION}:
Install the missing gem with 'gem install -v=#{RAILS_GEM_VERSION} rails', or
change environment.rb to define RAILS_GEM_VERSION with your desired version.
)
exit 1
end
unless defined?(Rails::Initializer)
if File.directory?("#{RAILS_ROOT}/vendor/rails")
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
else
require 'initializer'
end
end
require 'rubygems'
Rails::Initializer.run(:set_load_path)
environment_without_comments = IO.readlines(File.dirname(__FILE__) + '/environment.rb').reject { |l| l =~ /^#/ }.join
environment_without_comments =~ /[^#]RAILS_GEM_VERSION = '([\d.]+)'/
rails_gem_version = $1
if version = defined?(RAILS_GEM_VERSION) ? RAILS_GEM_VERSION : rails_gem_version
rails_gem = Gem.cache.search('rails', "=#{version}").first
if rails_gem
require_gem "rails", "=#{version}"
require rails_gem.full_gem_path + '/lib/initializer'
else
STDERR.puts %(Cannot find gem for Rails =#{version}:
Install the missing gem with 'gem install -v=#{version} rails', or
change environment.rb to define RAILS_GEM_VERSION with your desired version.
)
exit 1
end
else
require_gem "rails"
require 'initializer'
end
end
Rails::Initializer.run(:set_load_path)
end

View File

@@ -2,7 +2,7 @@ module Rails
module VERSION #:nodoc:
MAJOR = 1
MINOR = 1
TINY = 1
TINY = 3
STRING = [MAJOR, MINOR, TINY].join('.')
end

View File

@@ -71,8 +71,8 @@ namespace :rails do
rm_rf "vendor/rails"
end
desc "Update both scripts and public/javascripts from Rails"
task :update => [ "update:scripts", "update:javascripts" ]
desc "Update both configs, scripts and public/javascripts from Rails"
task :update => [ "update:scripts", "update:javascripts", "update:configs" ]
namespace :update do
desc "Add new scripts to the application script/ directory"
@@ -102,5 +102,13 @@ namespace :rails do
scripts.reject!{|s| File.basename(s) == 'application.js'} if File.exists?(project_dir + 'application.js')
FileUtils.cp(scripts, project_dir)
end
desc "Update boot/config.rb from your current rails install"
task :configs do
require 'railties_path'
project_dir = RAILS_ROOT + '/public/javascripts/'
scripts = Dir[RAILTIES_PATH + '/html/javascripts/*.js']
FileUtils.cp(RAILTIES_PATH + '/environments/boot.rb', RAILS_ROOT + '/config/boot.rb')
end
end
end

View File

@@ -1,29 +1,25 @@
#!/usr/local/bin/ruby
VERSION = ARGV.first
PACKAGES = %w( activesupport activerecord actionpack actionmailer actionwebservice )
unless ruby_forge_password = ARGV.first
print "rubyforge.org's password: "
ruby_forge_password = STDIN.gets.chomp
end
# Checkout source
`rm -rf release && svn export http://dev.rubyonrails.org/svn/rails/trunk release`
`rm -rf release && svn export http://dev.rubyonrails.org/svn/rails/branches/stable release`
# Create Rails packages
`cd release/railties && rake template=jamis package`
# Upload documentation
`cd release/rails/doc/api && scp -r * davidhh@wrath.rubyonrails.com:public_html/rails`
PACKAGES.each do |p|
`cd release/#{p} && echo "Publishing documentation for #{p}" && rake template=jamis pdoc`
end
`cd release/rails/doc/api && scp -r * davidhh@wrath.rubyonrails.com:public_html/api`
# Upload packages
(PACKAGES + %w(railties)).each do |p|
`cd release/#{p} && echo "Releasing #{p}" && RUBY_FORGE_PASSWORD=#{ruby_forge_password} rake release`
`cd release/#{p} && echo "Releasing #{p}" && rake release`
end
# Upload rails tgz/zip
`rubyforge add_release rails rails 'REL #{VERSION}' rails-#{VERSION}.tgz`
`rubyforge add_release rails rails 'REL #{VERSION}' rails-#{VERSION}.zip`
# Create SVN tag
puts "Remeber to create SVN tag"