Sha256: 0dc737d3b00e60d26609799fc27fba5c18d735a8c0cfd94bad5b6e89a38f2581

Contents?: true

Size: 399 Bytes

Versions: 7

Compression:

Stored size: 399 Bytes

Contents

require 'grape'
require 'grape-msgpack'

module Berkshelf::API
  module Endpoint
    class Base < Grape::API
      # Force inbound requests to be JSON
      def call(env)
        env['CONTENT_TYPE'] = 'application/json'
        super
      end
    end
  end
end

Dir["#{File.dirname(__FILE__)}/endpoint/*.rb"].sort.each do |path|
  require "berkshelf/api/endpoint/#{File.basename(path, '.rb')}"
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
berkshelf-api-1.3.1 lib/berkshelf/api/endpoint.rb
berkshelf-api-1.3.0 lib/berkshelf/api/endpoint.rb
berkshelf-api-1.2.2 lib/berkshelf/api/endpoint.rb
berkshelf-api-1.2.1 lib/berkshelf/api/endpoint.rb
berkshelf-api-1.2.0 lib/berkshelf/api/endpoint.rb
berkshelf-api-1.2.0.rc2 lib/berkshelf/api/endpoint.rb
berkshelf-api-1.2.0.rc1 lib/berkshelf/api/endpoint.rb