Commit d8cf9e3b4e0f7f37b848249d3b693ab1359d007b
1 parent
db1b3a63
Exists in
master
and in
28 other branches
Allow running db:schema:load with plugins enabled
(ActionItem2101)
Showing
2 changed files
with
5 additions
and
2 deletions
Show diff stats
config/environment.rb
@@ -66,7 +66,10 @@ Rails::Initializer.run do |config| | @@ -66,7 +66,10 @@ Rails::Initializer.run do |config| | ||
66 | noosfero:translations:compile | 66 | noosfero:translations:compile |
67 | makemo | 67 | makemo |
68 | ] | 68 | ] |
69 | - unless $PROGRAM_NAME =~ /rake$/ && (ignore_rake_commands.include?(ARGV.first)) | 69 | + if $PROGRAM_NAME =~ /rake$/ && (ignore_rake_commands.include?(ARGV.first)) |
70 | + $NOOSFERO_LOAD_PLUGINS = false | ||
71 | + else | ||
72 | + $NOOSFERO_LOAD_PLUGINS = true | ||
70 | config.active_record.observers = :article_sweeper, :role_assignment_sweeper, :friendship_sweeper, :category_sweeper, :block_sweeper | 73 | config.active_record.observers = :article_sweeper, :role_assignment_sweeper, :friendship_sweeper, :category_sweeper, :block_sweeper |
71 | end | 74 | end |
72 | # Make Active Record use UTC-base instead of local time | 75 | # Make Active Record use UTC-base instead of local time |
config/initializers/plugins.rb
@@ -3,4 +3,4 @@ require 'noosfero/plugin/manager' | @@ -3,4 +3,4 @@ require 'noosfero/plugin/manager' | ||
3 | require 'noosfero/plugin/context' | 3 | require 'noosfero/plugin/context' |
4 | require 'noosfero/plugin/active_record' | 4 | require 'noosfero/plugin/active_record' |
5 | require 'noosfero/plugin/mailer_base' | 5 | require 'noosfero/plugin/mailer_base' |
6 | -Noosfero::Plugin.init_system | 6 | +Noosfero::Plugin.init_system if $NOOSFERO_LOAD_PLUGINS |