gelf 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/gelf.gemspec +1 -1
- data/lib/gelf/notifier.rb +2 -3
- data/test/test_notifier.rb +0 -4
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3
|
data/gelf.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{gelf}
|
8
|
-
s.version = "1.1.
|
8
|
+
s.version = "1.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Aleksey Palazhchenko", "Lennart Koopmann"]
|
data/lib/gelf/notifier.rb
CHANGED
@@ -72,7 +72,6 @@ module GELF
|
|
72
72
|
# - string-like object (anything which responds to +to_s+) with optional hash-like object:
|
73
73
|
# notify!('Plain olde text message', :scribe => 'AlekSi')
|
74
74
|
# Resulted fields are merged with +default_options+, the latter will never overwrite the former.
|
75
|
-
# This method will raise +ArgumentError+ if arguments are wrong. Consider using notify instead.
|
76
75
|
def notify!(*args)
|
77
76
|
notify_with_level!(nil, *args)
|
78
77
|
end
|
@@ -144,8 +143,8 @@ module GELF
|
|
144
143
|
frame = stack.shift
|
145
144
|
end while frame.include?(LIB_GELF_PATTERN)
|
146
145
|
match = CALLER_REGEXP.match(frame)
|
147
|
-
@hash['file'] = match[1]
|
148
|
-
@hash['line'] = match[2].to_i
|
146
|
+
@hash['file'] = match[1] if @hash['file'] == nil
|
147
|
+
@hash['line'] = match[2].to_i if @hash['line'] == nil
|
149
148
|
end
|
150
149
|
|
151
150
|
def set_timestamp
|
data/test/test_notifier.rb
CHANGED
@@ -87,10 +87,6 @@ class TestNotifier < Test::Unit::TestCase
|
|
87
87
|
assert !hash.has_key?(:short_message)
|
88
88
|
end
|
89
89
|
|
90
|
-
should "not overwrite keys on convert" do
|
91
|
-
assert_raise(ArgumentError) { @notifier.__send__(:extract_hash, :short_message => :message1, 'short_message' => 'message2') }
|
92
|
-
end
|
93
|
-
|
94
90
|
should "use default_options" do
|
95
91
|
@notifier.default_options = {:foo => 'bar', 'short_message' => 'will be hidden by explicit argument', 'host' => 'some_host'}
|
96
92
|
hash = @notifier.__send__(:extract_hash, { 'version' => '1.0', 'short_message' => 'message' })
|