Class: Capistrano::CI::Clients::Travis
- Defined in:
- lib/capistrano/ci/clients/travis.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#repository_name ⇒ Object
readonly
Returns the value of attribute repository_name.
Instance Method Summary collapse
-
#initialize(settings = {}) ⇒ Travis
constructor
A new instance of Travis.
- #passed?(branch) ⇒ Boolean
- #state(branch) ⇒ Object
Constructor Details
#initialize(settings = {}) ⇒ Travis
Returns a new instance of Travis.
9 10 11 12 13 |
# File 'lib/capistrano/ci/clients/travis.rb', line 9 def initialize(settings = {}) self.class.headers 'Accept' => 'application/json; version=2' @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/travis.rb', line 7 def repository_name @repository_name end |
Instance Method Details
#passed?(branch) ⇒ Boolean
15 16 17 |
# File 'lib/capistrano/ci/clients/travis.rb', line 15 def passed?(branch) state(branch) == "passed" end |
#state(branch) ⇒ Object
19 20 21 |
# File 'lib/capistrano/ci/clients/travis.rb', line 19 def state(branch) branch(branch)["state"] end |