Sha256: 66dfbf141ef0d5c75388c433195d8c5e88142fcb9cdd84bf7f54afcbde6dbcfd

Contents?: true

Size: 1.11 KB

Versions: 20

Compression:

Stored size: 1.11 KB

Contents

# frozen_string_literal: true

require "appsignal"
require "appsignal/rack/grape_middleware"

Appsignal::Utils::StdoutAndLoggerMessage.warning(
  "The 'require \"appsignal/integrations/grape\"' file require integration " \
    "method is deprecated. " \
    "Please follow the Grape setup guide in our docs for the new method: " \
    "https://docs.appsignal.com/ruby/integrations/grape.html"
)

Appsignal.internal_logger.debug("Loading Grape integration")

module Appsignal
  # @api private
  module Grape
    # Alias constants that have moved with a warning message that points to the
    # place to update the reference.
    def self.const_missing(name)
      case name
      when :Middleware
        callers = caller
        Appsignal::Utils::StdoutAndLoggerMessage.warning \
          "The constant Appsignal::Grape::Middleware has been deprecated. " \
            "Please update the constant name to " \
            "Appsignal::Rack::GrapeMiddleware in the following file to " \
            "remove this message.\n#{callers.first}"
        Appsignal::Rack::GrapeMiddleware
      else
        super
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
appsignal-3.13.1-java lib/appsignal/integrations/grape.rb
appsignal-3.13.1 lib/appsignal/integrations/grape.rb
appsignal-3.13.1.alpha.1-java lib/appsignal/integrations/grape.rb
appsignal-3.13.1.alpha.1 lib/appsignal/integrations/grape.rb
appsignal-3.13.0-java lib/appsignal/integrations/grape.rb
appsignal-3.13.0 lib/appsignal/integrations/grape.rb
appsignal-3.12.6-java lib/appsignal/integrations/grape.rb
appsignal-3.12.6 lib/appsignal/integrations/grape.rb
appsignal-3.12.5-java lib/appsignal/integrations/grape.rb
appsignal-3.12.5 lib/appsignal/integrations/grape.rb
appsignal-3.12.4-java lib/appsignal/integrations/grape.rb
appsignal-3.12.4 lib/appsignal/integrations/grape.rb
appsignal-3.12.3-java lib/appsignal/integrations/grape.rb
appsignal-3.12.3 lib/appsignal/integrations/grape.rb
appsignal-3.12.2-java lib/appsignal/integrations/grape.rb
appsignal-3.12.2 lib/appsignal/integrations/grape.rb
appsignal-3.12.1-java lib/appsignal/integrations/grape.rb
appsignal-3.12.1 lib/appsignal/integrations/grape.rb
appsignal-3.12.0-java lib/appsignal/integrations/grape.rb
appsignal-3.12.0 lib/appsignal/integrations/grape.rb