Sha256: 3049c935c0dc4fc8e6a48fcb302d43d17ecaeb2dc9676c77ae0bd326caed697e

Contents?: true

Size: 899 Bytes

Versions: 4

Compression:

Stored size: 899 Bytes

Contents

module Shoppe
  class Engine < ::Rails::Engine
    isolate_namespace Shoppe
    
    if Shoppe.respond_to?(:root)
      config.autoload_paths << File.join(Shoppe.root, 'lib')
    end
    
    # We don't want any automatic generators in the engine.
    config.generators do |g|
      g.orm             :active_record
      g.test_framework  false
      g.stylesheets     false
      g.javascripts     false
      g.helper          false
    end
    
    initializer 'shoppe.initialize' do |app|
      # Preload the config
      Shoppe.config
      
      # Load our migrations into the application's db/migrate path
      unless app.root.to_s.match root.to_s
        config.paths["db/migrate"].expanded.each do |expanded_path|
          app.config.paths["db/migrate"] << expanded_path
        end
      end
    end
    
    generators do
      require 'shoppe/setup_generator'
    end
    
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shoppe-0.0.8 lib/shoppe/engine.rb
shoppe-0.0.7 lib/shoppe/engine.rb
shoppe-0.0.6 lib/shoppe/engine.rb
shoppe-0.0.5 lib/shoppe/engine.rb