class CompareLinkerWrapper::Linker

Attributes

git_options[RW]
git_path[RW]

Public Class Methods

new(git_path = '.', git_options = {}) click to toggle source
# File lib/compare_linker_wrapper/linker.rb, line 4
def initialize(git_path = '.', git_options = {})
  @git_path = git_path
  @git_options = git_options
end

Public Instance Methods

access_token() click to toggle source
# File lib/compare_linker_wrapper/linker.rb, line 9
def access_token
  ENV['OCTOKIT_ACCESS_TOKEN'] || ENV['GITHUB_ACCESS_TOKEN']
end
add_formatter(formatter_class) click to toggle source
# File lib/compare_linker_wrapper/linker.rb, line 63
def add_formatter(formatter_class)
  formatter = Formatter.add_formatter(formatter_class) if formatter_class
  fail NoFormatterError unless formatter
  logger.info('use formatter')
  logger.info(formatter)
  formatter
end
client() click to toggle source
# File lib/compare_linker_wrapper/linker.rb, line 13
def client
  @client ||= ::Octokit::Client.new(access_token: access_token)
end
git() click to toggle source
# File lib/compare_linker_wrapper/linker.rb, line 17
def git
  @git ||= Git.open(@git_path, @git_options)
end
logger() click to toggle source
# File lib/compare_linker_wrapper/linker.rb, line 71
def logger
  ::CompareLinkerWrapper.logger
end
parse(lock_file) click to toggle source
# File lib/compare_linker_wrapper/linker.rb, line 75
def parse(lock_file)
  Bundler::LockfileParser.new(lock_file)
end