Sha256: 6eb5ea82e1acdbc29cd9b1d6a6ee2d6383208462be34da65adafec8e905eb65d

Contents?: true

Size: 654 Bytes

Versions: 21

Compression:

Stored size: 654 Bytes

Contents

module SpreeBanner
  class Engine < Rails::Engine
    engine_name 'spree_banner'

    config.autoload_paths += %W(#{config.root}/lib)

    # 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.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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
spree_banner-1.3.0 lib/spree_banner/engine.rb
spree_banner-1.1.6 lib/spree_banner/engine.rb
spree_banner-1.1.5 lib/spree_banner/engine.rb
spree_banner-1.1.4 lib/spree_banner/engine.rb
spree_banner-1.1.3 lib/spree_banner/engine.rb
spree_banner-1.1.2 lib/spree_banner/engine.rb
spree_banner-1.0.8 lib/spree_banner/engine.rb
spree_banner-1.1.1 lib/spree_banner/engine.rb
spree_banner-0.70.6 lib/spree_banner/engine.rb
spree_banner-1.0.7 lib/spree_banner/engine.rb
spree_banner-1.1.0 lib/spree_banner/engine.rb
spree_banner-1.0.6 lib/spree_banner/engine.rb
spree_banner-0.70.5 lib/spree_banner/engine.rb
spree_banner-1.0.5 lib/spree_banner/engine.rb
spree_banner-1.0.4 lib/spree_banner/engine.rb
spree_banner-1.0.3 lib/spree_banner/engine.rb
spree_banner-1.0.2 lib/spree_banner/engine.rb
spree_banner-0.70.4 lib/spree_banner/engine.rb
spree_banner-1.0.1 lib/spree_banner/engine.rb
spree_banner-0.70.3 lib/spree_banner/engine.rb