Sha256: a7179ba9ff988de6b2061764cd07aa677685756a642a74eb785375027873c7ed

Contents?: true

Size: 898 Bytes

Versions: 2

Compression:

Stored size: 898 Bytes

Contents

require "radriar/api/authentication"
require "radriar/api/context"
require "radriar/api/exception_handling"
require "radriar/api/logging"
require "radriar/api/strong_parameters_support"

module Radriar
  module Grape
  end
end

class ::Grape::API
  def self.radriarize(hypermedia: false, representer_namespace: nil, translate_keys: false)
    class_eval do
      format :json
      default_format :json

      helpers Radriar::API::Authentication
      helpers Radriar::API::Logging
      helpers Radriar::API::Context
      helpers Radriar::API::StrongParametersSupport
      helpers Radriar::Roar::Representers
      include Radriar::Roar::KeyTranslation
      include Radriar::Roar::HAL

      Radriar::Representable.representer_namespace = representer_namespace
      Radriar::Representable.hypermedia = hypermedia
      Radriar::Representable.translate_keys = translate_keys
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
radriar-0.1.0.alpha.3 lib/radriar/grape.rb
radriar-0.1.0.alpha.2 lib/radriar/grape.rb