lib/firetail.rb in firetail-0.0.1.pre.alpha vs lib/firetail.rb in firetail-1.0.1
- old
+ new
@@ -36,11 +36,11 @@
# sets the values for certain necessary configuration
# If it is Rails
if defined?(Rails)
begin
default_location = File.join(Rails.root, "config/firetail.yml")
- config = YAML.load_file(default_location)
+ config = YAML.safe_load(ERB.new(File.read(default_location)).result)
rescue Errno::ENOENT
# error message if firetail is not installed
puts ""
puts "Please run 'rails generate firetail:install' first"
puts ""
@@ -51,11 +51,11 @@
raise Error.new "Please run 'rails generate firetail:install' first" if config.nil?
raise Error.new "API Key is missing from firetail.yml configuration" if config['api_key'].nil?
@api_key = config['api_key']
- @url = config['url'] ? config['url'] : "https://api.logging.eu-west-1.sandbox.firetail.app/logs/bulk" # default goes to dev
+ @url = config['url'] ? config['url'] : "https://api.logging.eu-west-1.prod.firetail.app/logs/bulk" # default goes to europe
@log_drains_timeout = config['log_drains_timeout'] ? config['log_drains_timeout'] : 5
@network_timeout = config['network_timeout'] ? config['network_timeout'] : 10
@number_of_retries = config['number_of_retries'] ? config['number_of_retries'] : 4
@retry_timeout = config['retry_timeout'] ? config['retry_timeout'] : 2
# End of configuration initialization
@@ -169,12 +169,9 @@
},
response: {
statusCode: status,
body: body,
headers: response_headers,
- },
- oauth: {
- subject: subject ? sha1_hash(subject) : nil,
}
})
@request.body.rewind
#Firetail.logger.debug "Request: #{body}"