aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
Commit message (Collapse)AuthorAgeFilesLines
* Add delete to middleware stack proxy.José Valim2010-06-071-0/+6
|
* removes Array#random_element and backports Array#sample from Ruby 1.9, ↵Xavier Noria2010-06-051-2/+2
| | | | thanks to Marc-Andre Lafortune
* Add lib to load paths when application is inherited to be able to load lib ↵José Valim2010-06-021-0/+17
| | | | code during configuration.
* Remove the laziness from the middleware stack.José Valim2010-05-291-1/+1
|
* Removing Metal from Rails 3. wycats2010-05-293-94/+0
| | | | | | | | | | | | | | | | | | | | If you have existing Metals, you have a few options: * if your metal behaves like a middleware, add it to the middleware stack via config.middleware.use. You can use methods on the middleware stack to control exactly where it should go * if it behaves like a Rack endpoint, you can link to it in the router. This will result in more optimal routing time, and allows you to remove code in your endpoint that matches specific URLs in favor of the more powerful handling in the router itself. For the future, you can use ActionController::Metal to get a very fast controller with the ability to opt-in to specific controller features without paying the penalty of the full controller stack. Since Rails 3 is closer to Rack, the Metal abstraction is no longer needed.
* Fix typo on rackup test (ht: pleax)José Valim2010-05-201-1/+1
|
* Final iteration of use better testing methodsNeeraj Singh2010-05-191-2/+2
| | | | | | [#4652 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Simplify cookie_store by simply relying on cookies.signed.José Valim2010-05-182-3/+6
|
* Renames Array#rand -> Array#random_elementRizwan Reza2010-05-171-2/+2
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* Revert "Moved encoding work in progress to a feature branch."wycats2010-05-171-1/+2
| | | | This reverts commit ade756fe42423033bae8e5aea8f58782f7a6c517.
* Moved encoding work in progress to a feature branch.Jeremy Kemper2010-05-161-2/+1
| | | | This reverts commits af0d1a88157942c6e6398dbf73891cff1e152405 and 64d109e3539ad600f58536d3ecabd2f87b67fd1c.
* Significantly improved internal encoding heuristics and support.wycats2010-05-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * Default Encoding.default_internal to UTF-8 * Eliminated the use of file-wide magic comments to coerce code evaluated inside the file * Read templates as BINARY, use default_external or template-wide magic comments inside the Template to set the initial encoding * This means that template handlers in Ruby 1.9 will receive Strings encoded in default_internal (UTF-8 by default) * Create a better Exception for encoding issues, and use it when the template source has bytes that are not compatible with the specified encoding * Allow template handlers to opt-into handling BINARY. If they do so, they need to do some of their own manual encoding work * Added a "Configuration Gotchas" section to the intro Rails Guide instructing users to use UTF-8 for everything * Use config.encoding= in Ruby 1.8, and raise if a value that is an invalid $KCODE value is used Also: * Fixed a few tests that were assert() rather than assert_equal() and were caught by Minitest requiring a String for the message * Fixed a test where an assert_select was misformed, also caught by Minitest being more restrictive * Fixed a test where a Rack response was returning a String rather than an Enumerable
* Fixed two failing tests in railties on 1.9.2-head [#4609 state:commited]rohit2010-05-161-2/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Expose remaining hooks to minimize the need for a Railtie based on feedback ↵José Valim2010-05-161-5/+23
| | | | from plugin developers.
* Reorganized initializers a bit to enable better hooks for common cases ↵wycats2010-05-151-13/+0
| | | | | | | | | | | | | | | without the need for Railtie. Specifically, the following hooks were added: * before_configuration: this hook is run immediately after the Application class comes into existence, but before the user has added any configuration. This is the appropriate place to set configuration for your plugin * before_initialize: This is run after all of the user's configuration has completed, but before any initializers have begun (in other words, it runs right after config/environments/{development,production,test}.rb) * after_initialize: This is run after all of the initializers have run. It is an appropriate place for forking in a preforking setup Each of these hooks may be used via ActiveSupport.on_load(name) { }. In all these cases, the context inside the block will be the Application object. This means that for simple cases, you can use these hooks without needing to create a Railtie.
* Change event namespace ordering to most-significant first [#4504 state:resolved]Justin George2010-05-021-1/+1
| | | | | | | | | More work still needs to be done on some of these names (render_template.action_view and render_template!.action_view particularly) but this allows (for example) /^sql/ to subscribe to all the various ORMs without further modification Signed-off-by: José Valim <jose.valim@gmail.com>
* ActiveRecord middlewares should be inserted before AD::Cascade [#4493 ↵José Valim2010-04-291-3/+3
| | | | state:resolved].
* The rake task :environment now loads config/environment.rb instead of ↵José Valim2010-04-293-2/+18
| | | | initializing the application on its own. This fixes [#4492 state:resolved] and also avoids the application being initialized twice in some rake tasks.
* Fix failing test.José Valim2010-04-281-0/+33
|
* Ensure application rake tasks and generators are loaded after the ones ↵José Valim2010-04-261-0/+23
| | | | specified in railties/engines/rails. [#4471 state:resolved]
* Refactor tests by moving all middleware tests to the same place.José Valim2010-04-263-120/+98
|
* test refactorSantiago Pastorino2010-04-191-2/+8
|
* Added tests for config.action_controller.perform_cachingChetan Sarva2010-04-131-0/+36
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix a bug in ActionDispatch::Static where Rails cannot find assets if ↵José Valim2010-04-081-0/+9
| | | | started in another directory which is not the RAILS_ROOT.
* Alleviate the pain in working with utf8 templates by setting a default encoding.José Valim2010-04-071-0/+12
|
* Remove app/views from the load paths [#4226 state:resolved]José Valim2010-04-051-0/+1
|
* Rename config.cookie_secret to config.secret_token and pass it as ↵José Valim2010-04-053-2/+18
| | | | configuration in request.env. This is another step forward removing global configuration.
* Add a test which ensures action_dispatch.show_exceptions is properly disabled.José Valim2010-04-021-0/+6
|
* Make X-Sendfile default to "" so it works correctly in dev mode.wycats2010-03-261-43/+36
| | | | | Provide a default in production.rb that can be modified, so that people who care about sendfile performance in production mode can get better performance easily.
* Remove invalid builtin tests since we aren't adding that dir to theJoshua Peek2010-03-201-18/+0
| | | | load path anymore
* Fix protect_against_forgeryCarlhuda2010-03-191-0/+27
|
* Add mailers to paths in case someone wants to access it directly and ensures ↵José Valim2010-03-061-3/+4
| | | | deep nesting works in controllers.
* Change generated code to replace faulty commentCarlhuda2010-03-041-1/+1
|
* Deprecated ActionController::Base.session_options= and ↵Carlhuda2010-03-044-6/+10
| | | | ActionController::Base.session_store= in favor of a config.session_store method (which takes params) and a config.cookie_secret variable, which is used in various secret scenarios. The old AC::Base options will continue to work with deprecation warnings.
* Fix Sam Ruby's tests and deprecation warningsCarlhuda2010-03-045-8/+8
|
* Fix all the broken tests due to the AC configuration refactorCarl Lerche2010-03-032-2/+3
|
* Move remote_ip to a middleware:Carlhuda2010-03-031-0/+53
| | | | | * ActionController::Base.ip_spoofing_check deprecated => config.action_dispatch.ip_spoofing_check * ActionController::Base.trusted_proxies deprecated => config.action_dispatch.trusted_proxies
* Fix a test that assumes that defined?(ActiveRecord) == ↵Carlhuda2010-03-021-1/+1
| | | | defined?(ActiveRecord::Base)
* nested controllers need to be explicitly declared with the new mapperJoshua Peek2010-02-281-1/+2
|
* reload! on console now works as expected. [#3822 status:resolved]José Valim2010-02-261-3/+29
|
* Final pass at removing the router from a global constantCarlhuda2010-02-251-0/+42
|
* Woops, forgot to actually add active_support/core_ext/file/path.rbCarlhuda2010-02-231-0/+1
|
* Revert "Fix test load paths for those not using bundler"Carlhuda2010-02-231-1/+1
| | | | | | This reverts commit eec2d301d4ce9df9c71c1a5aa63053eb970b6818. This commit broke tests. You cannot have a file called "bundler" on the load path.
* Makes send_file work again by deferring to Rack::Sendfile. Carlhuda2010-02-231-0/+55
| | | | | | | | | | * Add the Rack::Sendfile middleware * Make the header to use configurable via config.action_dispatch.x_sendfile_header (default to "X-Sendfile"). * Add Railties tests to confirm that these work * Remove the :stream, :buffer_size, and :x_senfile default options to send_file * Change the log subscriber to always say "Sent file" * Add deprecation warnings for options that are now no-ops Note that servers can configure this by setting X-Sendfile-Type. Hosting companies and those creating packages of servers specially designed for Rails applications are encouraged to specify this header so that this can work transparently.
* Add a test for default_url_options in AM.José Valim2010-02-211-0/+11
|
* Revert behavior from a5684dfa3c16472bfa5d5d861ba78cb6dbadcb59 and ensure ↵José Valim2010-02-191-3/+15
| | | | after_initializer is executed after to_prepare callbacks.
* Ensure config.after_initializer is executed before building the middleware ↵José Valim2010-02-181-0/+14
| | | | stack.
* Merge master.José Valim2010-02-171-1/+1
|\
| * Fix test load paths for those not using bundlerJoshua Peek2010-02-151-1/+1
| |
* | Rename Rails::Subscriber to Rails::LogSubscriberPrem Sichanugrist2010-02-161-1/+1
|/