From 4ca97650880a751901c4370a50c806a84fa529f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 19 Jan 2010 18:43:09 +0100 Subject: Allow railties to specify generators paths. --- railties/lib/rails/application.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'railties/lib/rails/application.rb') diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 4d05f8115c..b92a7ff129 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -8,7 +8,7 @@ module Rails class << self attr_writer :config alias configure class_eval - delegate :initialize!, :load_tasks, :root, :to => :instance + delegate :initialize!, :load_tasks, :load_generators, :root, :to => :instance private :new def instance @@ -82,6 +82,10 @@ module Rails end end + def load_generators + plugins.each { |p| p.load_generators } + end + def initializers initializers = Bootstrap.new(self).initializers plugins.each { |p| initializers += p.initializers } -- cgit v1.2.3 From d1ffc54c06fbacf46783f5ebc84bc125c9188fd1 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sun, 17 Jan 2010 04:21:35 -0200 Subject: fixes the failure of config.plugins without :all option tests [#3718 status:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- railties/lib/rails/application.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'railties/lib/rails/application.rb') diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index b92a7ff129..743681359c 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -93,13 +93,12 @@ module Rails initializers end - # TODO: Fix this method + # TODO: Fix this method. It loads all railties independent if :all is given + # or not, otherwise frameworks are never loaded. def plugins @plugins ||= begin plugin_names = (config.plugins || [:all]).map { |p| p.to_sym } - Railtie.plugins.select { |p| - plugin_names.include?(:all) || plugin_names.include?(p.plugin_name) - }.map { |p| p.new } + Plugin.all(plugin_names, config.paths.vendor.plugins) + Railtie.plugins.map(&:new) + Plugin.all(plugin_names, config.paths.vendor.plugins) end end -- cgit v1.2.3 From fc4f237864541f5012f9b8cc8e0ec81960377e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 21 Jan 2010 16:50:11 +0100 Subject: Make filter parameters based on request, so they can be modified for anything in the middleware stack. --- railties/lib/rails/application.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'railties/lib/rails/application.rb') diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 743681359c..5c9892c630 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -110,6 +110,7 @@ module Rails end def call(env) + env["action_dispatch.parameter_filter"] = config.filter_parameters app.call(env) end -- cgit v1.2.3 From 2db14457f483cf582acf244f89ddff08a16155f3 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 22 Jan 2010 13:40:05 -0600 Subject: Delegate App calls to instance --- railties/lib/rails/application.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'railties/lib/rails/application.rb') diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 5c9892c630..8366127476 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -8,7 +8,13 @@ module Rails class << self attr_writer :config alias configure class_eval - delegate :initialize!, :load_tasks, :load_generators, :root, :to => :instance + delegate :call, + :initialize!, + :load_generators, + :load_tasks, + :middleware, + :root, + :to => :instance private :new def instance -- cgit v1.2.3