Yehuda Katz
baaaf2acaa
Dead code
2009-12-24 21:50:17 -08:00
David Heinemeier Hansson
0a365d63f6
Translated strings in the view are assumed html_safe ( Closes #3401 )
2009-12-24 20:32:53 -08:00
David Heinemeier Hansson
6ce5982afa
Stray carrier return
2009-12-24 16:13:50 -08:00
David Heinemeier Hansson
b9c0a16655
The new routes shortform now also works for :as
2009-12-24 16:08:03 -08:00
David Heinemeier Hansson
38af368360
Merge
2009-12-24 15:24:57 -08:00
David Heinemeier Hansson
2b7256a42e
Extract Mapping class from monster match method
2009-12-24 15:23:39 -08:00
Jeremy Kemper
46b376962f
Fix new schema test dependency on Hash#to_xml
2009-12-23 23:30:59 -08:00
Sam Ruby
aa3565f3a6
Allow named_routes to be used with root, and with new DSL short-form.
...
The real use case it to make all of the following act the same:
root 'store#index', :as => 'store'
match '/' => 'store#index', :as => 'store'
match '/', :to => 'store#index', :as => 'store'
The test case provided deviates from this in order to demonstrate all three
forms in a single set of test routes.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-23 20:55:21 -08:00
Carlhuda
84f1137ef8
Merge remote branch 'origin/master'
...
Conflicts:
railties/lib/rails/application.rb
2009-12-23 19:18:11 -08:00
Carlhuda
c4d6d50a46
Rackup config.ru from the correct directory
2009-12-23 19:10:44 -08:00
Carlhuda
af5c3c852e
Require active_support/all unless specifically requested to be left out.
2009-12-23 19:00:20 -08:00
Carlhuda
9653599a79
Remove the ActionView::Base autoload because it creates crazy circular autoload insanity
2009-12-23 18:59:49 -08:00
Jeremy Kemper
7a6f73e79b
Fix reference to Application#configuration to use #config
2009-12-23 17:47:38 -08:00
Carlhuda
d926fb62e8
Isolation tests intentionally avoid loading any state (because they're often testing things that have their own load path semantics that should not be polluted), so rack/test is not yet on the load path. Moving require "rack/test" into the setup means and after boot_rails means that it'll be required after the laod path has been altered to add in the Rails vendor/gems
2009-12-23 17:46:38 -08:00
Jeremy Kemper
4d3602a8c4
Routing: fix that route shorthand shouldn't ignore other options. Raise if :as option is given to root method since its name is always 'root'
2009-12-23 17:42:30 -08:00
Carlhuda
d2bd71a145
Finish moving config.frameworks-dependent code to the framework plugin
2009-12-23 17:23:29 -08:00
Jeremy Kemper
1ee50e58f6
Fix Rack::Lock middleware condition: use *unless* we allow concurrency
2009-12-23 17:14:21 -08:00
Jeremy Kemper
94bb331635
Shift more responsibility from application class to its singleton instance. Treat instantiation and boot as separate steps. Use app.config rather than app.configuration.
2009-12-23 17:11:17 -08:00
Carlhuda
61af34b001
Make /rails/info/properties work again. Also, the mocked up tests were passing so we added a test that actually tested this functionality.
2009-12-23 16:26:10 -08:00
Carlhuda
83be262b4b
Isolation tests intentionally avoid loading any state (because they're often testing things that have their own load path semantics that should not be polluted), so rack/test is not yet on the load path. Moving require "rack/test" into the setup means and after boot_rails means that it'll be required after the laod path has been altered to add in the Rails vendor/gems
2009-12-23 16:14:34 -08:00
Carlhuda
38aeb1528c
Moving out some framework specific initializers into the framework libraries.
2009-12-23 16:13:09 -08:00
Carlhuda
fa8dfc7d01
Raise an exception if an initializer is defined without a block
2009-12-23 15:16:38 -08:00
Carlhuda
dc677f7665
tests pass with requiring the frameworks in rails.rb
2009-12-23 15:16:38 -08:00
Jeremy Kemper
24e1b55608
Fix bare string Rack response bodies
2009-12-23 13:06:53 -08:00
Dwayne Litzenberger
808cad2bb4
Fix ActiveSupport::JSON encoding of control characters [\x00-\x1f]
...
According to RFC 4627, only the following Unicode code points are
allowed unescaped in JSON:
unescaped = %x20-21 / %x23-5B / %x5D-10FFFF
However, ActiveSupport::JSON did not escape the range %x00-1f. This caused
parse errors when trying to decode the resulting output.
[#3345 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-23 11:46:06 -08:00
Joshua Peek
74b2e00ce8
Require rack-mount 0.3.3
...
Fixes "Rack-mount boot time is slow as shit" [#3567 state:resolved]
2009-12-22 19:44:38 -06:00
David Heinemeier Hansson
e7ef57dd0d
Merge
2009-12-22 17:31:29 -08:00
David Heinemeier Hansson
ec095456d8
Dont auto require rubygems, move dep on rack-test to Gemfile
2009-12-22 17:29:25 -08:00
David Heinemeier Hansson
fe5f660413
Dont encourage __FILE__ bullshit
2009-12-22 17:25:34 -08:00
Joshua Peek
f737c2d69b
All AMo modules are safe to defer
2009-12-22 17:39:41 -06:00
Joshua Peek
22752ec27c
All ARes modules are safe to defer
2009-12-22 17:36:29 -06:00
Joshua Peek
2e4e8d156c
All AM modules are safe to defer
2009-12-22 17:33:00 -06:00
Joshua Peek
ace20bd25e
Flip deferrable autoload convention
2009-12-22 17:27:37 -06:00
Joshua Peek
b1aee9f4ee
All AD modules are "deferrable"
2009-12-22 17:11:21 -06:00
Joshua Peek
2d0c703c92
Use Rack::Runtime middleware so the reported time includes the entire middleware stack
2009-12-22 16:18:22 -06:00
Joshua Peek
df7faef68e
Referer and user agent are in Rack::Request
2009-12-22 16:09:41 -06:00
Joshua Peek
a1bf2f96ce
AD::StatusCodes support is now part of rack
2009-12-22 16:08:03 -06:00
Joshua Peek
17b6053083
Float on rack/master in preparation for rack 1.1 gem release
2009-12-22 15:46:15 -06:00
José Valim
4964d3b02c
Make ActionMailer::Base inherit from AbstractController::Base
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2009-12-22 11:29:06 -08:00
David Heinemeier Hansson
8e48a5ef0c
Add test for root
2009-12-21 21:49:36 -08:00
Joshua Peek
1de95077dc
Merge branch 'master' of github.com:rails/rails
...
Conflicts:
railties/test/initializer/initialize_i18n_test.rb
railties/test/initializer/path_test.rb
2009-12-21 20:41:25 -06:00
Joshua Peek
426348b484
Update routes.rb template to use App name
2009-12-21 20:15:27 -06:00
Jeremy Kemper
2e571e8f99
Blog -> Blog::Application. Leave the toplevel module up for grabs.
2009-12-21 17:03:21 -08:00
David Heinemeier Hansson
76e732a7be
Fix the documentation for root :to. It should use a fully qualified controller#action syntax ( Closes #3606 )
2009-12-21 16:54:04 -08:00
Carlhuda
be225adafb
Fix ActionMailer. The fact that ActionMailer::Base does not inherit from AbstractController::Base is either a bug or we need to re-evaluate the requirements of the mixins.
2009-12-21 16:49:21 -08:00
David Heinemeier Hansson
a43a9c81cf
Dont need to specify password_confirmation, that happens automatically
2009-12-21 16:41:02 -08:00
Carlhuda
d982fe2b2f
Replace reopening the class with App.configure as an alias to class_eval
2009-12-21 16:35:54 -08:00
Carlhuda
b0b4ae970c
test.rb, dev.rb, and production.rb just reopen the Application class; no more hax required
2009-12-21 16:03:26 -08:00
David Heinemeier Hansson
a110ff0fca
Dont introspect inline templates for the logger and cleanup a few styling issues
2009-12-21 16:03:04 -08:00
David Heinemeier Hansson
36624b2c70
Give the builtin controllers their own routes.rb now that the legacy catch-all is gone
2009-12-21 15:55:59 -08:00