Permalink
Browse files

adjusts lib directory

  • Loading branch information...
1 parent 8f2a7c1 commit 6fca7fc046a819e4dcaf07bfe4a4fb7323b193dd @kennyadsl kennyadsl committed Apr 3, 2012
Showing with 22 additions and 22 deletions.
  1. +2 −2 lib/generators/spree_pages/install/install_generator.rb
  2. +1 −20 lib/spree_pages.rb
  3. +19 −0 lib/spree_pages/engine.rb
@@ -3,13 +3,13 @@ module Generators
class InstallGenerator < Rails::Generators::Base
def add_migrations
- run 'rake railties:install:migrations FROM=spree_pages'
+ run 'bundle exec rake railties:install:migrations FROM=spree_pages'
end
def run_migrations
res = ask "Would you like to run the migrations now? [Y/n]"
if res == "" || res.downcase == "y"
- run 'rake db:migrate'
+ run 'bundle exec rake db:migrate'
else
puts "Skiping rake db:migrate, don't forget to run it!"
end
View
@@ -1,21 +1,2 @@
require 'spree_core'
-
-module SpreePages
- class Engine < Rails::Engine
- engine_name "spree_pages"
-
- config.autoload_paths += %W(#{config.root}/lib)
-
- def self.activate
- Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c|
- Rails.application.config.cache_classes ? require(c) : load(c)
- end
-
- Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/**/*.rb")) do |c|
- Rails.application.config.cache_classes ? require(c) : load(c)
- end
- end
-
- config.to_prepare &method(:activate).to_proc
- end
-end
+require 'spree_pages/engine'
View
@@ -0,0 +1,19 @@
+module SpreePages
+ class Engine < Rails::Engine
+ engine_name "spree_pages"
+
+ config.autoload_paths += %W(#{config.root}/lib)
+
+ def self.activate
+ Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c|
+ Rails.application.config.cache_classes ? require(c) : load(c)
+ end
+
+ Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/**/*.rb")) do |c|
+ Rails.application.config.cache_classes ? require(c) : load(c)
+ end
+ end
+
+ config.to_prepare &method(:activate).to_proc
+ end
+end

0 comments on commit 6fca7fc

Please sign in to comment.