hostname.rb revision a446fc1729ca15222cd35f657ebe75152ac5a39c
1516N/A# Compute hostname and port from the hostname in the Settings. 941N/A# If no hostname is specified, read the hostname from the OS. 941N/A Could not automatically determine the hostname: 941N/A #{e.class}: #{e.message} 941N/A Please set the hostname manually in the configuration 941N/A or consult the documentation of `gethostname`: 941N/A * http://ruby-doc.org/stdlib/libdoc/socket/rdoc/Socket.html#method-c-gethostname 941N/A * http://linux.die.net/man/2/gethostname 941N/A Settings.hostname.split(':').last if Settings.hostname 941N/A def self.url_authority(scheme: 'http') 1230N/A port = Ontohub::Application.config.port 941N/A port = ":#{port}" if port 1230N/A "#{scheme}://#{Ontohub::Application.config.fqdn}#{port}/" 941N/AOntohub::Application.config.fqdn = Hostname.fqdn 941N/AOntohub::Application.config.port = Hostname.port