Joshua Peek
612454e00e
Move sprockets initializers back to application
2011-03-29 21:16:44 -05:00
John Firebaugh
435bccda93
Replace AD::Callbacks.to_prepare with AD::Reloader.to_prepare
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-20 12:43:02 +01:00
José Valim
d649bf158b
Provide a cleaner syntax for paths configuration that does not rely on method_missing.
2010-10-06 17:20:15 +02:00
Carl Lerche
117daba18a
Update Rails' built in routes to use RouteSet#append
2010-09-17 12:27:48 -07:00
José Valim
48bf667a8b
Ensure routes are loaded only after the initialization process finishes, ensuring all configuration options were applied.
2010-09-02 12:54:21 +02:00
Xavier Noria
6f83a5036d
renames load_(once_)paths to autoload_(once_)paths in dependencies and config
2010-06-24 00:17:28 +02:00
José Valim
f81666698b
Alias app to build_middleware_stack for clarity.
2010-06-21 01:08:50 +02:00
José Valim
5a0d73f17c
Add lib to load paths when application is inherited to be able to load lib code during configuration.
2010-06-02 00:48:16 +02:00
José Valim
3afdfc35e8
Expose remaining hooks to minimize the need for a Railtie based on feedback from plugin developers.
2010-05-16 00:36:46 +02:00
José Valim
351816fab6
Ensure that eager_load actually takes place just after the middleware stack 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.
2010-05-15 23:49:03 +02:00
wycats
9cfeefb637
Reorganized initializers a bit to enable better hooks for common cases 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.
2010-05-15 06:09:07 -07:00
José Valim
6690d66292
Rename config.cookie_secret to config.secret_token and pass it as configuration in request.env. This is another step forward removing global configuration.
2010-04-05 12:00:24 +02:00
Joshua Peek
f38e89cfba
Move railties/builtin into lib
2010-03-20 12:34:21 -05:00
José Valim
e49f94d71c
Revert behavior from a5684dfa3c
and ensure after_initializer is executed after to_prepare callbacks.
2010-02-19 08:15:49 +01:00
José Valim
a5684dfa3c
Ensure config.after_initializer is executed before building the middleware stack.
2010-02-18 18:56:11 +01:00
José Valim
d3d487479a
Add config.to_prepare back and add tests for it.
...
Signed-off-by: Carl Lerche <carllerche@mac.com>
2010-01-28 10:28:40 -08:00
José Valim
226d8e745a
Refactor MetalLoader and RoutesReloader to rely less on class configuration.
...
Signed-off-by: Carl Lerche <carllerche@mac.com>
2010-01-28 10:28:40 -08:00
José Valim
5d07869245
Ensure all initializers are collections.
2010-01-26 00:08:08 +01:00
José Valim
6e57b88c60
Fix a couple failures on 1.9.1.
2010-01-24 21:21:37 +01:00
José Valim
84ebfa4550
Ensure metals and initializers in plugins are loaded.
2010-01-24 14:48:00 +01:00
José Valim
2fde9d774b
Solve some pendencies.
2010-01-24 09:32:54 +01:00
José Valim
924fa084e8
First steps into making Plugin < Engine.
2010-01-23 17:13:25 +01:00
José Valim
4f03603215
Break application.rb file in smaller chunks.
2010-01-23 16:07:20 +01:00