Sha256: 84024c2e1942307e16ea23250a31608ed8b232d81570cd1496c057b2753124b7

Contents?: true

Size: 942 Bytes

Versions: 1

Compression:

Stored size: 942 Bytes

Contents

module SolidusAuction
  class Engine < Rails::Engine
    require 'spree/core'
    require 'acts_as_votable'
    isolate_namespace Spree
    engine_name 'solidus_auction'
    config.autoload_paths += %W(#{config.root}/lib)

    initializer 'solidus_auction.environment', before: :load_config_initializers do
      Spree::AuctionSettings::Config = SolidusAuction::Configuration.new
    end

    # 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

      Dir.glob(File.join(File.dirname(__FILE__), "../../app/overrides/*.rb")) do |c|
                Rails.configuration.cache_classes ? require(c) : load(c)
      end
    end

    config.to_prepare(&method(:activate).to_proc)
  end
end

module Spree::AuctionSettings
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_auction-0.0.6 lib/solidus_auction/engine.rb