Sha256: 93f4bb9fedf346f6f1acaddeedbc1a05b7f7185752b6bda71dae3b4994982125

Contents?: true

Size: 949 Bytes

Versions: 2

Compression:

Stored size: 949 Bytes

Contents

module Spree::ProductZoom; end

module SpreeProductHoverZoom
  class Engine < Rails::Engine
    require 'spree/core'
    isolate_namespace Spree
    engine_name 'spree_product_hover_zoom'

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

    # use rspec for tests
    config.generators do |g|
      g.test_framework :rspec
    end

    initializer :assets do |config|
      Rails.application.config.assets.precompile += %w( store/blank.gif )
    end

    initializer("spree.product_zoom.preferences",
                :after => "spree.environment",
                :before => :load_config_initializers) do |app|
      Spree::ProductZoom::Config = Spree::ProductZoomConfiguration.new
    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
    end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_product_hover_zoom-1.0.3 lib/spree_product_hover_zoom/engine.rb
spree_product_hover_zoom-1.0.2 lib/spree_product_hover_zoom/engine.rb