Class: Capistrano::CI::Clients::Circle
- Defined in:
- lib/capistrano/ci/clients/circle.rb
Instance Method Summary collapse
-
#initialize(settings = {}) ⇒ Circle
constructor
A new instance of Circle.
- #passed?(branch_name) ⇒ Boolean
- #state(branch_name) ⇒ Object
Constructor Details
#initialize(settings = {}) ⇒ Circle
Returns a new instance of Circle.
7 8 9 10 11 12 |
# File 'lib/capistrano/ci/clients/circle.rb', line 7 def initialize(settings = {}) self.class.default_params "circle-token" => settings[:ci_access_token] self.class.headers 'Accept' => 'application/json' @repository_name = settings[:ci_repository] end |
Instance Method Details
#passed?(branch_name) ⇒ Boolean
14 15 16 |
# File 'lib/capistrano/ci/clients/circle.rb', line 14 def passed?(branch_name) state(branch_name) == "success" end |
#state(branch_name) ⇒ Object
18 19 20 |
# File 'lib/capistrano/ci/clients/circle.rb', line 18 def state(branch_name) branch(branch_name)["status"] end |