Class: SOULs::Configuration
- Inherits:
-
Object
- Object
- SOULs::Configuration
- Defined in:
- lib/souls.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#fixed_gems ⇒ Object
Returns the value of attribute fixed_gems.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
-
#region ⇒ Object
Returns the value of attribute region.
-
#strain ⇒ Object
Returns the value of attribute strain.
-
#workers ⇒ Object
Returns the value of attribute workers.
Instance Method Summary collapse
- #gcp_db_host ⇒ Object
- #gcr_region ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #instance_name ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
30 31 32 33 34 35 36 37 38 |
# File 'lib/souls.rb', line 30 def initialize @app = nil @project_id = nil @region = nil @endpoint = nil @strain = nil @fixed_gems = nil @workers = nil end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
28 29 30 |
# File 'lib/souls.rb', line 28 def app @app end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
28 29 30 |
# File 'lib/souls.rb', line 28 def endpoint @endpoint end |
#fixed_gems ⇒ Object
Returns the value of attribute fixed_gems.
28 29 30 |
# File 'lib/souls.rb', line 28 def fixed_gems @fixed_gems end |
#project_id ⇒ Object
Returns the value of attribute project_id.
28 29 30 |
# File 'lib/souls.rb', line 28 def project_id @project_id end |
#region ⇒ Object
Returns the value of attribute region.
28 29 30 |
# File 'lib/souls.rb', line 28 def region @region end |
#strain ⇒ Object
Returns the value of attribute strain.
28 29 30 |
# File 'lib/souls.rb', line 28 def strain @strain end |
#workers ⇒ Object
Returns the value of attribute workers.
28 29 30 |
# File 'lib/souls.rb', line 28 def workers @workers end |
Instance Method Details
#gcp_db_host ⇒ Object
54 55 56 |
# File 'lib/souls.rb', line 54 def gcp_db_host "/cloudsql/#{@project_id}:#{@region}:#{instance_name}" end |
#gcr_region ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'lib/souls.rb', line 44 def gcr_region if @region.include?("asia") "asia.gcr.io" elsif @region.include?("eu") "eu.gcr.io" else "gcr.io" end end |
#instance_name ⇒ Object
40 41 42 |
# File 'lib/souls.rb', line 40 def instance_name "souls-#{@app}-db" end |