class CashServer
Public Class Methods
ip(auth_code, host, environment, subdomain, type, subpath)
click to toggle source
Calls superclass method
Server::ip
# File lib/proboscis_cli.rb, line 33 def self.ip(auth_code, host, environment, subdomain, type, subpath) super if subpath == 'araneae' return @ipAddress end res = HTTParty.get("https://#{subdomain}.delium.io/api/admin/hosts", headers: {'X-Auth-Key': self.param(environment, 'token')}) if res.code != 200 puts "Failed to get subpath details. #{res.code}" exit -1 end subservers = JSON::parse(res.body) @ipAddress = subservers.select {|s| s['name'] == subpath}[0]['host'] @ipAddress end
param(environment, lookup)
click to toggle source
# File lib/proboscis_cli.rb, line 29 def self.param(environment, lookup) ENV["araneae_#{environment}_#{lookup}"] end
port(environment, type, subpath)
click to toggle source
# File lib/proboscis_cli.rb, line 25 def self.port(environment, type, subpath) subpath == 'araneae' ? "1729" : "22" end