class Sleet::Repo
Attributes
branch_name[R]
circle_ci_token[R]
github_repo[R]
github_user[R]
Public Class Methods
from_config(config)
click to toggle source
# File lib/sleet/repo.rb, line 5 def self.from_config(config) local_repo = Sleet::LocalRepo.new(source_dir: config.source_dir) new( circle_ci_token: config.circle_ci_token, username: config.username || local_repo.username, project: config.project || local_repo.project, branch_name: config.branch || local_repo.branch_name ) end
new(circle_ci_token:, username:, project:, branch_name:)
click to toggle source
# File lib/sleet/repo.rb, line 16 def initialize(circle_ci_token:, username:, project:, branch_name:) @circle_ci_token = circle_ci_token @github_user = username @github_repo = project @branch_name = branch_name end
Public Instance Methods
branch()
click to toggle source
# File lib/sleet/repo.rb, line 32 def branch @branch ||= Sleet::Branch.new( circle_ci_token: circle_ci_token, github_user: github_user, github_repo: github_repo, branch: branch_name ) end
build_for(build_num)
click to toggle source
# File lib/sleet/repo.rb, line 23 def build_for(build_num) Sleet::Build.new( circle_ci_token: circle_ci_token, github_user: github_user, github_repo: github_repo, build_num: build_num ) end