Class: Capistrano::CI::Clients::Semaphore
- Defined in:
- lib/capistrano/ci/clients/semaphore.rb
Instance Attribute Summary collapse
-
#repository_name ⇒ Object
readonly
Returns the value of attribute repository_name.
Instance Method Summary collapse
-
#initialize(settings = {}) ⇒ Semaphore
constructor
A new instance of Semaphore.
- #passed?(branch_name) ⇒ Boolean
- #state(branch_name) ⇒ Object
Constructor Details
#initialize(settings = {}) ⇒ Semaphore
Returns a new instance of Semaphore.
9 10 11 12 13 |
# File 'lib/capistrano/ci/clients/semaphore.rb', line 9 def initialize(settings = {}) self.class.default_params "auth_token" => settings[:ci_access_token] @repository_name = settings[:ci_repository] end |
Instance Attribute Details
#repository_name ⇒ Object (readonly)
Returns the value of attribute repository_name.
7 8 9 |
# File 'lib/capistrano/ci/clients/semaphore.rb', line 7 def repository_name @repository_name end |
Instance Method Details
#passed?(branch_name) ⇒ Boolean
15 16 17 |
# File 'lib/capistrano/ci/clients/semaphore.rb', line 15 def passed?(branch_name) state(branch_name) == "passed" end |
#state(branch_name) ⇒ Object
19 20 21 |
# File 'lib/capistrano/ci/clients/semaphore.rb', line 19 def state(branch_name) branch(branch_name)["result"] end |