Sha256: aa2f1b1a3a8034ebaa9d671fd8de7d36efe6eceea81a30aa74f2773becb6482d

Contents?: true

Size: 999 Bytes

Versions: 18

Compression:

Stored size: 999 Bytes

Contents

module SpreeMollieGateway
  class Engine < ::Rails::Engine
    require 'spree/core'
    require 'mollie-api-ruby'

    isolate_namespace SpreeMollieGateway

    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.configuration.cache_classes ? require(c) : load(c)
      end

      ::Rails.application.config.spree.payment_methods << Spree::Gateway::MollieGateway
      Spree::PermittedAttributes.source_attributes << :payment_method_name
      Spree::PermittedAttributes.source_attributes << :issuer
      Spree::Api::ApiHelpers.payment_source_attributes << :payment_method_name
      Spree::Api::ApiHelpers.payment_source_attributes << :issuer
      Spree::Api::ApiHelpers.payment_source_attributes << :payment_url
    end

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

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
spree_mollie_gateway-2.1.5 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-2.1.4 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-2.1.4.pre.alpha lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-2.1.3 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-2.1.2 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-2.1.1 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-2.1.1.pre.beta lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-2.1.0 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-2.0.0 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-1.0.7 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-1.0.6 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-1.0.5 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-1.0.4 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-1.0.3 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-1.0.2 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-1.0.0 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-1.0.0.pre.beta4 lib/spree_mollie_gateway/engine.rb
spree_mollie_gateway-1.0.0.pre.beta3 lib/spree_mollie_gateway/engine.rb