Sha256: f5f5d0979f587f5a46bfe9d6fa8190cbf31d66830b70c1aad5ed0de402befa43

Contents?: true

Size: 885 Bytes

Versions: 1

Compression:

Stored size: 885 Bytes

Contents

# frozen_string_literal: true

require 'spree/core'

module SolidusStripe
  class Engine < Rails::Engine
    include SolidusSupport::EngineExtensions::Decorators

    isolate_namespace Spree

    engine_name 'solidus_stripe'

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

    if SolidusSupport.backend_available?
      paths["app/views"] << "lib/views/backend"
    end

    if SolidusSupport.frontend_available?
      paths["app/views"] << "lib/views/frontend"
      config.assets.precompile += ['spree/stripe-v3-payments.js']
    end

    if SolidusSupport.api_available?
      paths["app/views"] << "lib/views/api"
    end

    initializer "spree.payment_method.add_stripe_credit_card", after: "spree.register.payment_methods" do |app|
      app.config.spree.payment_methods << Spree::PaymentMethod::StripeCreditCard
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_stripe-2.1.0 lib/solidus_stripe/engine.rb