class Travis::CLI::ApiCommand

def load_gh

def load_gh
  return if defined? GH
  debug "Loading gh"
  require 'gh'
  gh_config       = session.config['github']
  gh_config     &&= gh_config.inject({}) { |h,(k,v)| h.update(k.to_sym => v) }
  gh_config     ||= {}
  gh_config[:ssl] = Travis::Client::Session::SSL_OPTIONS
  gh_config[:ssl] = { :verify => false } if gh_config[:api_url] and gh_config[:api_url] != "https://api.github.com"
  gh_config[:instrumenter] = proc do |type, payload, &block|
    next block.call unless type == 'http.gh'
    time("GitHub API: #{payload[:verb].to_s.upcase} #{payload[:url]}", block)
  end if debug?
  GH.set(gh_config)
end