module BooticClient

Constants

API_ROOT
AUTH_HOST
InvalidConfigurationError
VERSION
VERY_BASIC_URL_CHECK

Public Class Methods

auth_host() click to toggle source
# File lib/bootic_client.rb, line 25
def auth_host
  @auth_host || AUTH_HOST
end
client(strategy_name, client_opts = {}, &on_new_token) click to toggle source
# File lib/bootic_client.rb, line 14
def client(strategy_name, client_opts = {}, &on_new_token)
  return @stubber if @stubber
  opts = client_opts.dup
  opts[:logging] = configuration.logging
  opts[:logger] = configuration.logger if configuration.logging
  opts[:cache_store] = configuration.cache_store if configuration.cache_store
  opts[:user_agent] = configuration.user_agent if configuration.user_agent
  require "bootic_client/strategies/#{strategy_name}"
  strategies.fetch(strategy_name.to_sym).new configuration, opts, &on_new_token
end
configuration() click to toggle source
# File lib/bootic_client.rb, line 33
def configuration
  @configuration ||= Configuration.new
end
configure() { |configuration| ... } click to toggle source
# File lib/bootic_client.rb, line 29
def configure(&block)
  yield configuration
end
strategies() click to toggle source
# File lib/bootic_client.rb, line 10
def strategies
  @strategies ||= {}
end
stub!() click to toggle source
# File lib/bootic_client.rb, line 37
def stub!
  require "bootic_client/stubbing"
  @stubber = Stubbing::StubRoot.new
end
stub_chain(method_chain, opts = {}) click to toggle source
# File lib/bootic_client.rb, line 42
def stub_chain(method_chain, opts = {})
  @stubber.stub_chain(method_chain, opts)
end
unstub!() click to toggle source
# File lib/bootic_client.rb, line 46
def unstub!
  @stubber = nil
end