summaryrefslogtreecommitdiff
path: root/lib/solidus_subscriptions/engine.rb
diff options
context:
space:
mode:
authorBrendan Deere <brendan.g.deere@gmail.com>2016-08-24 17:00:35 -0700
committerBrendan Deere <brendan.g.deere@gmail.com>2016-08-24 17:00:35 -0700
commita8a92654ba21b22bd3f8d07c3ae25e3604e7942a (patch)
tree2807d38cbf1e54068614aac191eb0b3ea38c09e8 /lib/solidus_subscriptions/engine.rb
init
Diffstat (limited to 'lib/solidus_subscriptions/engine.rb')
-rw-r--r--lib/solidus_subscriptions/engine.rb20
1 files changed, 20 insertions, 0 deletions
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