module Git
Public Class Methods
auth_token()
click to toggle source
# File lib/git/semaphore.rb, line 80 def self.auth_token git_auth_token || global_auth_token || env_auth_token end
env_auth_token()
click to toggle source
# File lib/git/semaphore.rb, line 68 def self.env_auth_token @env_auth_token ||= ENV['SEMAPHORE_AUTH_TOKEN'] end
git_auth_token()
click to toggle source
# File lib/git/semaphore.rb, line 76 def self.git_auth_token git_repo&.config&.get('semaphore.authtoken') end
git_repo()
click to toggle source
# File lib/git/semaphore.rb, line 62 def self.git_repo Rugged::Repository.new(Dir.pwd) rescue Rugged::RepositoryError nil end
global_auth_token()
click to toggle source
# File lib/git/semaphore.rb, line 72 def self.global_auth_token Rugged::Config.global['semaphore.authtoken'] end