Sha256: 44a44a44fa58c62f83921669b8df0e3502d357c8ff256cfdf169ce0fe8d1ad79

Contents?: true

Size: 644 Bytes

Versions: 3

Compression:

Stored size: 644 Bytes

Contents

# frozen_string_literal: true
require "sapience"
require "sapience/extensions/grape/timings"
require "grape"
require "sapience/extensions/grape/middleware/logging"
require "sapience/extensions/grape/notifications"

module Grape
  class API
    extend Sapience::Descendants
  end
end

module Sapience
  class Grape
    UnsupportedVersion = Class.new(Exception)
    if Gem.loaded_specs["grape"].version < Gem::Version.create("0.16.2")
      fail UnsupportedVersion, "Expecting grape version >= 0.16.2"
    end
    Sapience.configure
    ::Grape::API.send(:include, Sapience::Loggable)
    Sapience::Extensions::Grape::Notifications.use
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sapience-2.12 lib/sapience/grape.rb
sapience-2.11 lib/sapience/grape.rb
sapience-2.10 lib/sapience/grape.rb