Class: HiveQueen
- Inherits:
-
Object
- Object
- HiveQueen
- Defined in:
- lib/hivequeen_client/hivequeen.rb
Overview
Special cases:
-
environment not found
-
environment not ready: fail
Class Attribute Summary collapse
-
.endpoint ⇒ Object
Returns the value of attribute endpoint.
-
.logger ⇒ Object
Returns the value of attribute logger.
Class Method Summary collapse
- .environment_names ⇒ Object
- .environments ⇒ Object
- .project_data ⇒ Object
- .repository ⇒ Object
- .roles(env_id) ⇒ Object
Class Attribute Details
.endpoint ⇒ Object
Returns the value of attribute endpoint.
11 12 13 |
# File 'lib/hivequeen_client/hivequeen.rb', line 11 def endpoint @endpoint end |
.logger ⇒ Object
Returns the value of attribute logger.
11 12 13 |
# File 'lib/hivequeen_client/hivequeen.rb', line 11 def logger @logger end |
Class Method Details
.environment_names ⇒ Object
21 22 23 |
# File 'lib/hivequeen_client/hivequeen.rb', line 21 def environment_names environments.map{|e| e['name'].to_sym } end |
.environments ⇒ Object
17 18 19 |
# File 'lib/hivequeen_client/hivequeen.rb', line 17 def environments project_data['environments'] end |
.project_data ⇒ Object
13 14 15 |
# File 'lib/hivequeen_client/hivequeen.rb', line 13 def project_data @project_data ||= fetch('/projects/kickstarter') end |
.repository ⇒ Object
25 26 27 |
# File 'lib/hivequeen_client/hivequeen.rb', line 25 def repository project_data['repo'] end |
.roles(env_id) ⇒ Object
29 30 31 32 33 |
# File 'lib/hivequeen_client/hivequeen.rb', line 29 def roles(env_id) env_id = env_id.to_sym @roles ||= {} @roles[env_id] ||= fetch("/environments/#{env_id}") end |