Sha256: 768f3ad43850169f685bd6d906fe7c71a52e69c564f35b6d034740e6738234ba

Contents?: true

Size: 534 Bytes

Versions: 4

Compression:

Stored size: 534 Bytes

Contents

require "rack/oauth2"
require "retriable/no_kernel"
require "shutl/network_retry"

require "shutl/auth/version"
require "shutl/auth/access_token_request"
require "shutl/auth/authenticated_request"

require 'logger'

module Shutl
  module Auth
    extend self

    attr_accessor :client_id, :client_secret, :url

    def config
      yield self
    end

    def logger
      return ::Rails.logger if Kernel.const_defined?(:Rails)
      return ::Shutl.logger if Shutl.respond_to? :logger
      Logger.new('/dev/null')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shutl_auth-0.8.5 lib/shutl_auth.rb
shutl_auth-0.8.4 lib/shutl_auth.rb
shutl_auth-0.8.3 lib/shutl_auth.rb
shutl_auth-0.8.2 lib/shutl_auth.rb