Sha256: 478288ba5d607600a7a388ae0f8c19857a39b419c6259e423f3cd6871c0da33d

Contents?: true

Size: 649 Bytes

Versions: 9

Compression:

Stored size: 649 Bytes

Contents

module SpreePurchaseOrder
  class Engine < ::Rails::Engine
    require 'spree/core'
    isolate_namespace Spree
    engine_name 'spree_purchase_order'

    config.autoload_paths << "#{config.root}/lib"

    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
    end

    config.to_prepare &method(:activate).to_proc

    config.after_initialize do |app|
      app.config.spree.payment_methods << Spree::PaymentMethod::PurchaseOrder
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spree_purchase_order-3.2.0.beta lib/spree_purchase_order/engine.rb
spree_purchase_order-3.1.0.beta lib/spree_purchase_order/engine.rb
spree_purchase_order-3.0.0.beta lib/spree_purchase_order/engine.rb
spree_purchase_order-2.4.0.beta lib/spree_purchase_order/engine.rb
spree_purchase_order-2.3.0.beta lib/spree_purchase_order/engine.rb
spree_purchase_order-2.2.0.beta2 lib/spree_purchase_order/engine.rb
spree_purchase_order-2.2.0.beta lib/spree_purchase_order/engine.rb
spree_purchase_order-2.1.0.beta lib/spree_purchase_order/engine.rb
spree_purchase_order-2.0.1 lib/spree_purchase_order/engine.rb