module Hoe::Travis

def travis_github_check

def travis_github_check
  user = `git config github.user`.chomp
  abort <<-ABORT unless user
t your github user and token in ~/.gitconfig
e: ri Hoe::Travis and
http://help.github.com/set-your-user-name-email-and-github-token/
  ABORT
  `git config remote.origin.url` =~ /^git@github\.com:(.*).git$/
  repo = $1
  abort <<-ABORT unless repo
able to determine your github repository.
pected \"git@github.com:[repo].git\" as your remote origin
  ABORT
  token = with_config do |config, _|
    config['travis']['token']
  end
  abort 'Please set your travis token via `rake config_hoe` - ' \
        'See: ri Hoe::Travis' if token =~ /FIX/
  return user, repo, token
end