From a8a92654ba21b22bd3f8d07c3ae25e3604e7942a Mon Sep 17 00:00:00 2001 From: Brendan Deere Date: Wed, 24 Aug 2016 17:00:35 -0700 Subject: init --- lib/solidus_subscriptions/engine.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/solidus_subscriptions/engine.rb (limited to 'lib/solidus_subscriptions/engine.rb') diff --git a/lib/solidus_subscriptions/engine.rb b/lib/solidus_subscriptions/engine.rb new file mode 100644 index 0000000..f9569ab --- /dev/null +++ b/lib/solidus_subscriptions/engine.rb @@ -0,0 +1,20 @@ +module SolidusSubscriptions + class Engine < Rails::Engine + require 'spree/core' + isolate_namespace Spree + engine_name 'solidus_subscriptions' + + # use rspec for tests + config.generators do |g| + g.test_framework :rspec + end + + def self.activate + Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')) do |c| + Rails.configuration.cache_classes ? require(c) : load(c) + end + end + + config.to_prepare(&method(:activate).to_proc) + end +end -- cgit v1.2.3