Sha256: 572b97ae6ad6bad38507c5b8f8d6c980a88b79d2ad833e4dbc368136577397bd

Contents?: true

Size: 529 Bytes

Versions: 7

Compression:

Stored size: 529 Bytes

Contents

require 'rails/engine'

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

      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

      def self.root
        @root ||= Pathname.new(File.expand_path('../../../../', __FILE__))
      end

    end
  end
end


Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spree_api-1.1.6 lib/spree/api/engine.rb
spree_api-1.1.5 lib/spree/api/engine.rb
spree_api-1.1.4 lib/spree/api/engine.rb
spree_api-1.2.0 lib/spree/api/engine.rb
spree_api-1.2.0.rc2 lib/spree/api/engine.rb
spree_api-1.2.0.rc1 lib/spree/api/engine.rb
spree_api-1.1.3 lib/spree/api/engine.rb