uniq_logger 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/uniq_logger/base.rb +1 -2
- data/lib/uniq_logger/configuration.rb +1 -1
- data/lib/uniq_logger/version.rb +1 -1
- data/lib/uniq_logger.rb +1 -0
- metadata +1 -1
data/lib/uniq_logger/base.rb
CHANGED
@@ -85,12 +85,11 @@ module UniqLogger
|
|
85
85
|
param_data = config["remote"]["url_param_for_data"]
|
86
86
|
|
87
87
|
uri = URI.parse("#{server_name}#{endpoint}?auth_token=#{auth_token}")
|
88
|
-
puts "URI: #{uri.inspect}"
|
89
88
|
|
90
89
|
http = Net::HTTP.new(uri.host, uri.port)
|
91
90
|
request = Net::HTTP::Post.new(uri.request_uri)
|
92
91
|
|
93
|
-
if !config["remote"]["basic_auth"]["username"].nil? && !config["remote"]["basic_auth"]["password"].nil? && !config["remote"]["basic_auth"][
|
92
|
+
if !config["remote"]["basic_auth"]["username"].nil? && !config["remote"]["basic_auth"]["password"].nil? && !config["remote"]["basic_auth"]["username"].empty? && !config["remote"]["basic_auth"]["password"].empty?
|
94
93
|
request.basic_auth(config["remote"]["basic_auth"]["username"], config["remote"]["basic_auth"]["password"])
|
95
94
|
end
|
96
95
|
|
@@ -29,7 +29,7 @@ module UniqLogger
|
|
29
29
|
|
30
30
|
# Configure through hash
|
31
31
|
def self.configure(opts = {})
|
32
|
-
opts.each {|k,v| @config[k.
|
32
|
+
opts.each {|k,v| @config[k.to_s] = v if @valid_config_keys.include? k.to_s}
|
33
33
|
end
|
34
34
|
|
35
35
|
# Configure through yaml file
|
data/lib/uniq_logger/version.rb
CHANGED
data/lib/uniq_logger.rb
CHANGED