Class: Sleet::Repo
- Inherits:
-
Object
- Object
- Sleet::Repo
- Defined in:
- lib/sleet/repo.rb
Class Method Summary collapse
Instance Method Summary collapse
- #branch ⇒ Object
- #build_for(build_num) ⇒ Object
-
#initialize(circle_ci_token:, username:, project:, branch_name:) ⇒ Repo
constructor
A new instance of Repo.
Constructor Details
#initialize(circle_ci_token:, username:, project:, branch_name:) ⇒ Repo
Returns a new instance of Repo.
16 17 18 19 20 21 |
# 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 |
Class Method Details
.from_config(config) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# 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 |