diff options
Diffstat (limited to 'lib/solidus_subscriptions/engine.rb')
-rw-r--r-- | lib/solidus_subscriptions/engine.rb | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/solidus_subscriptions/engine.rb b/lib/solidus_subscriptions/engine.rb index 822f9b2..7b9f336 100644 --- a/lib/solidus_subscriptions/engine.rb +++ b/lib/solidus_subscriptions/engine.rb @@ -1,11 +1,18 @@ +# frozen_string_literal: true + +require 'spree/core' + +require 'solidus_subscriptions' +require 'solidus_subscriptions/permitted_attributes' +require 'solidus_subscriptions/config' +require 'solidus_subscriptions/processor' + module SolidusSubscriptions class Engine < Rails::Engine - require 'spree/core' - require 'solidus_subscriptions/permitted_attributes' - require 'solidus_subscriptions/config' - require 'solidus_subscriptions/processor' + include SolidusSupport::EngineExtensions isolate_namespace SolidusSubscriptions + engine_name 'solidus_subscriptions' # use rspec for tests @@ -13,8 +20,6 @@ module SolidusSubscriptions g.test_framework :rspec end - config.autoload_paths << config.root.join('app', 'jobs') - initializer 'configure spree subcription permitted attributes', after: 'require subscription lib helpers' do PermittedAttributes.update_spree_permiteed_attributes end @@ -40,10 +45,6 @@ module SolidusSubscriptions end def self.activate - Dir.glob(File.join(File.dirname(__FILE__), '../../app/decorators/**/*.rb')) do |c| - Rails.configuration.cache_classes ? require(c) : load(c) - end - Spree::Ability.register_ability(SolidusSubscriptions::Ability) end |