Skip to content

Commit

Permalink
Minor engine tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
futhr committed Dec 29, 2014
1 parent 72eddd7 commit 2d9d8d0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion .rbenv-gemsets

This file was deleted.

4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bin/rails
Original file line number Diff line number Diff line change
@@ -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__)
Expand Down
6 changes: 3 additions & 3 deletions lib/spree_static_content/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2d9d8d0

Please sign in to comment.