class Remotenv::Adapters::Http
Public Instance Methods
load()
click to toggle source
# File lib/remotenv/adapters/http.rb, line 9 def load Remotenv.logger.debug("Downloading HTTP File: #{remote_uri}") download_file end
Private Instance Methods
download_file()
click to toggle source
# File lib/remotenv/adapters/http.rb, line 20 def download_file @content = http_get_content Remotenv.logger.error("Error Downloading HTTP File: #{remote_uri}") unless @content end
http_get_content()
click to toggle source
# File lib/remotenv/adapters/http.rb, line 25 def http_get_content response = Net::HTTP.get_response(remote_uri) rescue nil response.body if response.is_a?(Net::HTTPSuccess) end
remote_uri()
click to toggle source
# File lib/remotenv/adapters/http.rb, line 16 def remote_uri @uri end