module Fuci::Travis

Constants

DEFAULT_CLIENT
PRO_CLIENT
VERSION

Attributes

access_token[RW]
default_branch[RW]
pro[W]

Public Class Methods

configure() click to toggle source
Calls superclass method
# File lib/fuci/travis.rb, line 48
def self.configure
  super
  set_client
  set_access_token
end
pro() click to toggle source
# File lib/fuci/travis.rb, line 44
def self.pro
  @pro ||= false
end
repo() click to toggle source
# File lib/fuci/travis.rb, line 32
def self.repo
  return @repo if @repo
  puts 'Finding repo...'
  puts remote_repo_name
  @repo = client::Repository.find remote_repo_name
  puts "Using repo: #{remote_repo_name}"
  @repo
rescue
  puts "#{remote_repo_name} repo could not be found on Travis."
  exit
end

Private Class Methods

client() click to toggle source
# File lib/fuci/travis.rb, line 60
def self.client
  @client ||= DEFAULT_CLIENT
end
set_access_token() click to toggle source
# File lib/fuci/travis.rb, line 64
def self.set_access_token
  client.access_token = access_token
end
set_client() click to toggle source
# File lib/fuci/travis.rb, line 56
def self.set_client
  @client = PRO_CLIENT if pro
end