Sha256: 7fcc0e29f18fc4e63966261c143b0098a73943bca578bf6e80525219da0b378a

Contents?: true

Size: 375 Bytes

Versions: 5

Compression:

Stored size: 375 Bytes

Contents

require 'grape'

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

5 entries across 5 versions & 1 rubygems

Version Path
berkshelf-api-1.1.1 lib/berkshelf/api/endpoint.rb
berkshelf-api-1.1.0 lib/berkshelf/api/endpoint.rb
berkshelf-api-1.0.0 lib/berkshelf/api/endpoint.rb
berkshelf-api-0.2.0 lib/berkshelf/api/endpoint.rb
berkshelf-api-0.1.0 lib/berkshelf/api/endpoint.rb