diff options
author | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-06-13 17:22:13 +0200 |
---|---|---|
committer | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-06-13 17:29:14 +0200 |
commit | 5b1b4c685e6baa5c6fa52ef2da479205f2c6e632 (patch) | |
tree | 863dfc0ba12468d3f9c02a72001d336b51225ee7 /lib/solidus_subscriptions/engine.rb | |
parent | f0e6a42a0229f42b3ad42fbd157c958696388e2e (diff) |
Update to the latest solidus_dev_support
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 |