aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/engine.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Added tests for railtie_name and aliased it in engine as engine_namePiotr Sarnacki2010-09-031-0/+2
|
* Added ability to set asset_path for enginesPiotr Sarnacki2010-09-031-2/+21
|
* Added documentation on endpoint, middeware stack and routes for EnginePiotr Sarnacki2010-09-031-0/+60
|
* Fix url generation for mounted EnginePiotr Sarnacki2010-09-031-7/+2
| | | | | | | | | I added integration tests for generating urls in Engine and application and tweaked Engines to fully cooparate with new router's behavior: * Rails.application now sets ORIGINAL_SCRIPT_NAME * Rails.application also sets its routes as env['action_dispatch.parent_routes'] * Engine implements responds_to? class method to respond to all the instance methods, like #routes
* Pass routes via env['action_dispatch.routes'], it's needed by routes to ↵Piotr Sarnacki2010-09-031-1/+7
| | | | determine if it should generate prefix for mounted apps
* Move singleton pattern to Railtie and remove Engine::Configurable and ↵Piotr Sarnacki2010-09-031-12/+21
| | | | Application::Configurable in favor of unified Railtie::Configurable
* Removed most of deprecated stuff from Application and EnginePiotr Sarnacki2010-09-031-3/+0
|
* Allow Engines loading its own environment file from config/environmentsPiotr Sarnacki2010-09-031-0/+9
|
* Removed ActionDispatch::Static, but left empty MiddlewareStack to unify app ↵Piotr Sarnacki2010-09-031-6/+8
| | | | method between Engine and Application
* Engine can now serve files with ActionDispatch::StaticPiotr Sarnacki2010-09-031-1/+10
|
* Engine sets routes as default rack endpoint if no endpoint was givenPiotr Sarnacki2010-09-031-2/+5
|
* Delegate non existing class methods to instance for EnginePiotr Sarnacki2010-09-031-0/+6
|
* Gather initializers from railties in engines to get rid of additional ↵Piotr Sarnacki2010-09-031-0/+7
| | | | looping through initializers
* Engine can now load its own pluginsPiotr Sarnacki2010-09-031-0/+5
|
* Made Engine valid rack app with its own middleware stackPiotr Sarnacki2010-09-031-0/+13
|
* Config is deprecated on 1.8.8 and 1.9.3 use RbConfigSantiago Pastorino2010-08-231-1/+1
|
* A few changes were done in this commit:José Valim2010-06-281-11/+10
| | | | | | * Added :autoload to engines path API and redefine usage to be in sync with 6f83a5036d8a9c3f8ed7; * Do not autoload code in *lib* for applications (now you need to explicitly require them). This makes an application behave closer to an engine (code in lib is still autoloaded for plugins); * Always autoload code in app/ for engines and plugins. This makes engines behave closer to an application and should allow us to get rid of the unloadable hack required when controllers inside engines inherit from ApplicationController;
* renames load_(once_)paths to autoload_(once_)paths in dependencies and configXavier Noria2010-06-241-8/+8
|
* Removing Metal from Rails 3. wycats2010-05-291-6/+1
| | | | | | | | | | | | | | | | | | | | 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.
* Ensure that eager_load actually takes place just after the middleware stack ↵José Valim2010-05-151-13/+12
| | | | | | is built by using another pattern. Also create a engine_blank_point initializer to ensure any :before or :after hooks defined inside engines won't move the configuration initializers to other places.
* Reorganized initializers a bit to enable better hooks for common cases ↵wycats2010-05-151-5/+10
| | | | | | | | | | | | | | | 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.
* Fix docs typo: app.middlewares -> app.middlewareJeremy Kemper2010-04-291-1/+1
|
* Use Config::CONFIG['host_os'] instead of RUBY_PLATFORM [#4477 state:resolved]Anil Wadghule2010-04-261-1/+2
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Regexp.escape(load_path) in add_routing_namespaces initializer [#4442 ↵Phil Smith2010-04-201-1/+1
| | | | | | state:resolved] Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Use correct RUBY_PLATFORM regex for Windows env [#4385 state:resolved]Anil Wadghule2010-04-131-1/+1
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Update the documentation for Engine and Railtie.José Valim2010-04-051-4/+4
|
* Rename config.cookie_secret to config.secret_token and pass it as ↵José Valim2010-04-051-6/+2
| | | | configuration in request.env. This is another step forward removing global configuration.
* Replace the placeholder base_hook API with on_load. To specify some code thatwycats2010-03-291-2/+7
| | | | | | | | should run during framework load do: ActiveSupport.on_load(:action_controller) do # Code run in the context of AC::Base end
* Merge branch 'master' into docrailswycats2010-03-261-4/+4
|\
| * Move application configuration to the application configuration object, ↵José Valim2010-03-261-3/+3
| | | | | | | | remove railtie_name and engine_name and allow to set the configuration object.
| * Improve heuristic for railties default name, otherwise railties may be named ↵José Valim2010-03-261-1/+1
| | | | | | | | :railtie, :engine and so on.
| * init.rb in plugins is here to staywycats2010-03-231-7/+0
| |
| * Ensure lib/rails/initializers/*.rb also works for gems.José Valim2010-03-231-0/+7
| |
* | Merge remote branch 'mainstream/master'Pratik Naik2010-03-121-10/+13
|\| | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/base.rb railties/lib/rails/configuration.rb railties/lib/rails/log_subscriber.rb
| * Make many parts of Rails lazy. In order to facilitate this,wycats2010-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | add lazy_load_hooks.rb, which allows us to declare code that should be run at some later time. For instance, this allows us to defer requiring ActiveRecord::Base at boot time purely to apply configuration. Instead, we register a hook that should apply configuration once ActiveRecord::Base is loaded. With these changes, brings down total boot time of a new app to 300ms in production and 400ms in dev. TODO: rename base_hook
| * Add mailers to paths in case someone wants to access it directly and ensures ↵José Valim2010-03-061-1/+1
| | | | | | | | deep nesting works in controllers.
| * Don't rely on Rails.application global state in ConfigCarlhuda2010-03-031-1/+1
| |
| * Get the railties tests to pass again.Carlhuda2010-03-021-2/+2
| |
| * Fix unstated usage of PathnameJeremy Kemper2010-03-011-1/+2
| |
| * Remove implicit controller namespacing from new dslJoshua Peek2010-02-281-1/+2
| |
| * Revert "Revert "Application detection should also allow dots in the path.""Jeremy Kemper2010-02-271-1/+1
| | | | | | | | | | | | Works after all. Culprit was 226dfc2. This reverts commit 6189480b1878cdadb092fdfa32ba156a91e6a0e1.
| * Revert "Application detection should also allow dots in the path."Jeremy Kemper2010-02-271-1/+1
| | | | | | | | | | | | Ruby 1.9 regression. This reverts commit 76237f163ff7ad2a64af926030e3449c547cafa2.
| * plugin rails/init.rb deprecation messageJeremy Kemper2010-02-261-3/+3
| |
| * Application detection should also allow dots in the path.José Valim2010-02-261-1/+1
| |
| * Rename engines_load_path to railties_load_path.José Valim2010-02-201-1/+1
| |
| * Ensure config.after_initializer is executed before building the middleware ↵José Valim2010-02-181-0/+1
| | | | | | | | stack.
| * Fix called_from under Windows so engines works properlyAaron2010-02-181-1/+1
| | | | | | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* | Merge remote branch 'mainstream/master'Pratik Naik2010-02-141-1/+5
|\| | | | | | | | | | | | | | | Conflicts: railties/README railties/guides/source/active_support_core_extensions.textile railties/guides/source/getting_started.textile railties/lib/generators/rails/app/templates/README
| * Take into account gem versions (so script/rails server can work outside the ↵José Valim2010-02-081-1/+1
| | | | | | | | application) and use Rails::Application.root instead of ROOT_PATH.
| * Add config.generators.templates to provide alternative paths for template ↵José Valim2010-02-061-0/+4
| | | | | | | | lookup.