Class: Bard::CLI::CI
- Inherits:
-
Object
- Object
- Bard::CLI::CI
- Extended by:
- Forwardable
- Defined in:
- lib/bard/ci.rb,
lib/bard/ci/local.rb,
lib/bard/ci/jenkins.rb,
lib/bard/ci/github_actions.rb
Defined Under Namespace
Classes: GithubActions, Jenkins, Local
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#project_name ⇒ Object
readonly
Returns the value of attribute project_name.
-
#runner ⇒ Object
readonly
Returns the value of attribute runner.
Instance Method Summary collapse
-
#initialize(project_name, branch, local: false) ⇒ CI
constructor
A new instance of CI.
- #sha ⇒ Object
Constructor Details
#initialize(project_name, branch, local: false) ⇒ CI
Returns a new instance of CI.
5 6 7 8 9 |
# File 'lib/bard/ci.rb', line 5 def initialize project_name, branch, local: false @project_name = project_name @branch = branch @local = !!local end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
11 12 13 |
# File 'lib/bard/ci.rb', line 11 def branch @branch end |
#project_name ⇒ Object (readonly)
Returns the value of attribute project_name.
11 12 13 |
# File 'lib/bard/ci.rb', line 11 def project_name @project_name end |
#runner ⇒ Object (readonly)
Returns the value of attribute runner.
11 12 13 |
# File 'lib/bard/ci.rb', line 11 def runner @runner end |
Instance Method Details
#sha ⇒ Object
13 14 15 |
# File 'lib/bard/ci.rb', line 13 def sha @sha ||= `git rev-parse #{branch}`.chomp end |