Class: EtdaUtilities::Hosts
- Inherits:
-
Object
- Object
- EtdaUtilities::Hosts
- Defined in:
- lib/etda_utilities/hosts.rb
Class Method Summary collapse
Instance Method Summary collapse
- #explore_host(partner, environment = 'prod') ⇒ Object
- #workflow_submit_host(partner, environment = 'prod') ⇒ Object
Class Method Details
.explore_url(partner = nil, host = nil) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/etda_utilities/hosts.rb', line 16 def explore_url(partner = nil, host = nil) if ENV['EXPLORE_HOST'] "https://#{ENV['EXPLORE_HOST']}" else raise ArgumentError, "_partner and _host are required arguments" if partner.nil? || host.nil? "https://#{new.explore_host(partner, host)}" end end |
.workflow_url(partner = nil, host = nil) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/etda_utilities/hosts.rb', line 6 def workflow_url(partner = nil, host = nil) if ENV['WORKFLOW_HOST'] "https://#{ENV['WORKFLOW_HOST']}" else raise ArgumentError, "_partner and _host are required arguments" if partner.nil? || host.nil? "https://#{new.workflow_submit_host(partner, host)}" end end |
Instance Method Details
#explore_host(partner, environment = 'prod') ⇒ Object
31 32 33 |
# File 'lib/etda_utilities/hosts.rb', line 31 def explore_host(partner, environment = 'prod') host_builder(partner, environment, false) end |
#workflow_submit_host(partner, environment = 'prod') ⇒ Object
27 28 29 |
# File 'lib/etda_utilities/hosts.rb', line 27 def workflow_submit_host(partner, environment = 'prod') host_builder(partner, environment, true) end |