Sha256: fbd78bb5697fb5b9da0ddb37c19483e9961b27406514f535d7889743408750db

Contents?: true

Size: 464 Bytes

Versions: 3

Compression:

Stored size: 464 Bytes

Contents

require "underway/sinatra/app_info"

# Repopen Sinatra to add helpers to the app
module Sinatra
  module Underway
    def debug_route(request)
      log(request.inspect)
    end

    def verbose_logging?
      !!::Underway::Settings.config.verbose_logging
    end

    def log(message)
      if verbose_logging?
        ::Underway::Settings.config.logger.info(message)
      end
    end

    def gh_api(*args)
      ::Underway::Api.invoke(*args)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
underway-1.1.0 lib/underway/sinatra.rb
underway-1.0.1 lib/underway/sinatra.rb
underway-1.0.0 lib/underway/sinatra.rb