Sha256: c60b1b3fdc98d14db0a029e0a9ef44da6cf1eb420c810d3b3dc44605e8664f5c

Contents?: true

Size: 609 Bytes

Versions: 5

Compression:

Stored size: 609 Bytes

Contents

require 'rails/engine'

module Spree
  module Api
    class Engine < Rails::Engine
      isolate_namespace Spree
      engine_name 'spree_api'

      initializer "spree.api.environment", before: :load_config_initializers do |_app|
        Spree::Api::Config = Spree::ApiConfiguration.new
      end

      initializer "spree.api.versioncake" do |_app|
        VersionCake.setup do |config|
          config.resources do |r|
            r.resource %r{.*}, [], [], [1]
          end
          config.missing_version = 1
          config.extraction_strategy = :http_header
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solidus_api-2.4.2 lib/spree/api/engine.rb
solidus_api-2.4.1 lib/spree/api/engine.rb
solidus_api-2.4.0 lib/spree/api/engine.rb
solidus_api-2.4.0.rc1 lib/spree/api/engine.rb
solidus_api-2.4.0.beta1 lib/spree/api/engine.rb