Expected app/services/foreman/plugin.rb to define Plugin
Since #3821, the "rake locale:find" command throws an error, identical to the one we saw during the PR with rake test:
rake aborted! Expected /home/dcleal/code/foreman/foreman/app/services/foreman/plugin.rb to define Plugin /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:503:in `load_missing_constant' /home/dcleal/code/foreman/foreman_hooks/lib/foreman_hooks.rb:82:in `load_missing_constant_with_hooks' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:192:in `block in const_missing' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:190:in `each' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:190:in `const_missing' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:514:in `load_missing_constant'
I suspect using autoload_once not on the top level dir (app/services) means it thinks the foreman subdir is just part of the path and not part of the class namespace. Maybe it's only happening with this rake task because it loads so many of the models and classes known in the application, while other simpler rake tasks don't, and rake test isn't affected by the previous commit because it's in the test environment.