raygun4ruby 1.1.3 → 1.1.4
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.
- checksums.yaml +4 -4
- data/lib/raygun/client.rb +2 -2
- data/lib/raygun/version.rb +1 -1
- data/lib/raygun.rb +1 -1
- data/raygun4ruby.gemspec +1 -1
- data/test/unit/client_test.rb +46 -1
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48b225693ce7d8b12ed42cf62c7ac62772631423
|
4
|
+
data.tar.gz: 6a6d145569e18de22b0f6264ea124d5893a5bb28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57fb50409b4dbcbeead76dc3306b2d5204652b0a3ec274c51ad7c8f2852300456af3b048cc03f3f964c2d9bace03640ad8a957b20f589977f7d4cb69ab7289f3
|
7
|
+
data.tar.gz: f6ba6f88c324f94d72ae15acab093ce33c5a47e8020d97ca7ce67f9a315aa8c6241ce6cadd21b7536ae64e0149a48ce03e4005a1e8537b0855eaeda63f068030
|
data/lib/raygun/client.rb
CHANGED
@@ -49,7 +49,7 @@ module Raygun
|
|
49
49
|
{
|
50
50
|
lineNumber: line_number,
|
51
51
|
fileName: file_name,
|
52
|
-
methodName: method.gsub(/^in `(.*?)'$/, "\\1")
|
52
|
+
methodName: method ? method.gsub(/^in `(.*?)'$/, "\\1") : "(none)"
|
53
53
|
}
|
54
54
|
end
|
55
55
|
|
@@ -76,7 +76,7 @@ module Raygun
|
|
76
76
|
hostName: env["SERVER_NAME"],
|
77
77
|
url: env["PATH_INFO"],
|
78
78
|
httpMethod: env["REQUEST_METHOD"],
|
79
|
-
iPAddress: ip_address_from(env),
|
79
|
+
iPAddress: "#{ip_address_from(env)}",
|
80
80
|
queryString: Rack::Utils.parse_nested_query(env["QUERY_STRING"]),
|
81
81
|
form: form_data(env),
|
82
82
|
headers: headers(env),
|
data/lib/raygun/version.rb
CHANGED
data/lib/raygun.rb
CHANGED
@@ -50,7 +50,7 @@ module Raygun
|
|
50
50
|
end
|
51
51
|
rescue Exception => e
|
52
52
|
if configuration.failsafe_logger
|
53
|
-
failsafe_log("Problem reporting exception to Raygun: #{e.class}: #{e.message}\n\n#{e.
|
53
|
+
failsafe_log("Problem reporting exception to Raygun: #{e.class}: #{e.message}\n\n#{e.backtrace.join("\n")}")
|
54
54
|
else
|
55
55
|
raise e
|
56
56
|
end
|
data/raygun4ruby.gemspec
CHANGED
@@ -30,5 +30,5 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency "minitest", "~> 4.2"
|
31
31
|
spec.add_development_dependency "redis-namespace", ">= 1.3.1"
|
32
32
|
spec.add_development_dependency "resque"
|
33
|
-
spec.add_development_dependency "sidekiq", "
|
33
|
+
spec.add_development_dependency "sidekiq", [">= 3", "< 3.2.2"]
|
34
34
|
end
|
data/test/unit/client_test.rb
CHANGED
@@ -6,6 +6,16 @@ class ClientTest < Raygun::UnitTest
|
|
6
6
|
|
7
7
|
class TestException < StandardError; end
|
8
8
|
|
9
|
+
class FakeActionDispatcherIp
|
10
|
+
attr_reader :ip
|
11
|
+
def initialize remote_ip
|
12
|
+
@ip = remote_ip
|
13
|
+
end
|
14
|
+
def to_s
|
15
|
+
return ip
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
9
19
|
def setup
|
10
20
|
super
|
11
21
|
@client = Raygun::Client.new
|
@@ -90,6 +100,18 @@ class ClientTest < Raygun::UnitTest
|
|
90
100
|
assert_silent { @client.track_exception(bad_exception) }
|
91
101
|
end
|
92
102
|
|
103
|
+
def test_backtrace_without_method_name
|
104
|
+
|
105
|
+
expected = {
|
106
|
+
lineNumber: "123",
|
107
|
+
fileName: "/some/folder/some_file.rb",
|
108
|
+
methodName: "(none)"
|
109
|
+
}
|
110
|
+
|
111
|
+
# note lack of "in method name" in this stack trace line
|
112
|
+
assert_equal expected, @client.send(:stack_trace_for, "/some/folder/some_file.rb:123")
|
113
|
+
end
|
114
|
+
|
93
115
|
def test_full_payload_hash
|
94
116
|
Timecop.freeze do
|
95
117
|
Raygun.configuration.version = 123
|
@@ -242,12 +264,35 @@ class ClientTest < Raygun::UnitTest
|
|
242
264
|
"SERVER_PROTOCOL"=>"HTTP/1.1",
|
243
265
|
"SCRIPT_NAME"=>"",
|
244
266
|
"REMOTE_ADDR"=>"127.0.0.1",
|
245
|
-
"action_dispatch.remote_ip"=>"123.456.789.012"
|
267
|
+
"action_dispatch.remote_ip"=> "123.456.789.012"
|
246
268
|
}
|
247
269
|
|
248
270
|
assert_equal "123.456.789.012", @client.send(:ip_address_from, sample_env_hash)
|
249
271
|
assert_equal "123.456.789.012", @client.send(:request_information, sample_env_hash)[:iPAddress]
|
250
272
|
end
|
273
|
+
def test_ip_address_from_old_action_dispatch
|
274
|
+
old_action_dispatch_ip = FakeActionDispatcherIp.new("123.456.789.012")
|
275
|
+
sample_env_hash = {
|
276
|
+
"HTTP_VERSION"=>"HTTP/1.1",
|
277
|
+
"HTTP_HOST"=>"localhost:3000",
|
278
|
+
"HTTP_CONNECTION"=>"keep-alive",
|
279
|
+
"HTTP_CACHE_CONTROL"=>"max-age=0",
|
280
|
+
"HTTP_ACCEPT"=>"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
281
|
+
"HTTP_USER_AGENT"=>"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.22 Safari/537.36",
|
282
|
+
"HTTP_ACCEPT_ENCODING"=>"gzip,deflate,sdch",
|
283
|
+
"HTTP_ACCEPT_LANGUAGE"=>"en-US,en;q=0.8",
|
284
|
+
"HTTP_COOKIE"=>"cookieval",
|
285
|
+
"GATEWAY_INTERFACE"=>"CGI/1.2",
|
286
|
+
"SERVER_PORT"=>"3000",
|
287
|
+
"SERVER_PROTOCOL"=>"HTTP/1.1",
|
288
|
+
"SCRIPT_NAME"=>"",
|
289
|
+
"REMOTE_ADDR"=>"127.0.0.1",
|
290
|
+
"action_dispatch.remote_ip"=> old_action_dispatch_ip
|
291
|
+
}
|
292
|
+
|
293
|
+
assert_equal old_action_dispatch_ip, @client.send(:ip_address_from, sample_env_hash)
|
294
|
+
assert_equal "123.456.789.012", @client.send(:request_information, sample_env_hash)[:iPAddress]
|
295
|
+
end
|
251
296
|
|
252
297
|
def test_ip_address_from_raygun_specific_key
|
253
298
|
sample_env_hash = {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raygun4ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mindscape
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-08-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -155,16 +155,22 @@ dependencies:
|
|
155
155
|
name: sidekiq
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
|
-
- -
|
158
|
+
- - '>='
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '3'
|
161
|
+
- - <
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: 3.2.2
|
161
164
|
type: :development
|
162
165
|
prerelease: false
|
163
166
|
version_requirements: !ruby/object:Gem::Requirement
|
164
167
|
requirements:
|
165
|
-
- -
|
168
|
+
- - '>='
|
166
169
|
- !ruby/object:Gem::Version
|
167
170
|
version: '3'
|
171
|
+
- - <
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 3.2.2
|
168
174
|
description: Ruby Adapter for Raygun.io
|
169
175
|
email:
|
170
176
|
- hello@raygun.io
|