Commit d8cf9e3b4e0f7f37b848249d3b693ab1359d007b

Authored by Antonio Terceiro
1 parent db1b3a63

Allow running db:schema:load with plugins enabled

(ActionItem2101)
config/environment.rb
... ... @@ -66,7 +66,10 @@ Rails::Initializer.run do |config|
66 66 noosfero:translations:compile
67 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 73 config.active_record.observers = :article_sweeper, :role_assignment_sweeper, :friendship_sweeper, :category_sweeper, :block_sweeper
71 74 end
72 75 # Make Active Record use UTC-base instead of local time
... ...
config/initializers/plugins.rb
... ... @@ -3,4 +3,4 @@ require 'noosfero/plugin/manager'
3 3 require 'noosfero/plugin/context'
4 4 require 'noosfero/plugin/active_record'
5 5 require 'noosfero/plugin/mailer_base'
6   -Noosfero::Plugin.init_system
  6 +Noosfero::Plugin.init_system if $NOOSFERO_LOAD_PLUGINS
... ...