diff --git a/.rbenv-gemsets b/.rbenv-gemsets deleted file mode 100644 index 17407969..00000000 --- a/.rbenv-gemsets +++ /dev/null @@ -1 +0,0 @@ -spree_static_content diff --git a/Rakefile b/Rakefile index 2f8e9a54..4928a650 100644 --- a/Rakefile +++ b/Rakefile @@ -6,9 +6,9 @@ require 'spree/testing_support/common_rake' RSpec::Core::RakeTask.new -task :default => [:spec] +task default: :spec -desc "Generates a dummy app for testing" +desc 'Generates a dummy app for testing' task :test_app do ENV['LIB_NAME'] = 'spree_static_content' Rake::Task['common:test_app'].invoke diff --git a/bin/rails b/bin/rails index 97ecafb0..7652ac5b 100644 --- a/bin/rails +++ b/bin/rails @@ -1,4 +1,4 @@ -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. +#!/usr/bin/env ruby ENGINE_ROOT = File.expand_path('../..', __FILE__) ENGINE_PATH = File.expand_path('../../lib/spree_static_content/engine', __FILE__) diff --git a/lib/spree_static_content/engine.rb b/lib/spree_static_content/engine.rb index d47504ce..0276445e 100644 --- a/lib/spree_static_content/engine.rb +++ b/lib/spree_static_content/engine.rb @@ -7,11 +7,11 @@ class Engine < Rails::Engine config.autoload_paths += %W(#{config.root}/lib) def self.activate - Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_decorator*.rb")) do |c| - Rails.configuration.cache_classes ? require(c) : load(c) + Dir.glob(%W(#{config.root}/app/overrides/*.rb)) do |klass| + Rails.configuration.cache_classes ? require(klass) : load(klass) end end - config.to_prepare &method(:activate).to_proc + config.to_prepare(&method(:activate).to_proc) end end