honeybadger 2.1.0.beta.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/honeybadger/backend/server.rb +16 -1
- data/lib/honeybadger/notice.rb +4 -1
- data/lib/honeybadger/util/http.rb +1 -1
- data/lib/honeybadger/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e792f463bd86a18b5499b2e995407f014db4e82
|
4
|
+
data.tar.gz: 868f7529ee321a42dc00f783ab41cf6182262308
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da5baa248b75404411f27261afa1821d7dd721257498a9a5edf299016bf14e28860aa86897c9f71cb0d8becb2e3e089148bdddcf89a32115c363b3340cfafe46
|
7
|
+
data.tar.gz: 47ca59a742c15f5a69df9604483e2c79fd7f8e5cd219ce72440f800dc28584b1676d301e842b293ac92a052aeb01e0dd552c934dbb08e774e7a888017a1c6add
|
data/CHANGELOG.md
CHANGED
@@ -40,12 +40,27 @@ module Honeybadger
|
|
40
40
|
# Returns Response.
|
41
41
|
def notify(feature, payload)
|
42
42
|
ENDPOINTS[feature] or raise(BackendError, "Unknown feature: #{feature}")
|
43
|
-
Response.new(@http.post(ENDPOINTS[feature], payload))
|
43
|
+
Response.new(@http.post(ENDPOINTS[feature], payload, payload_headers(payload)))
|
44
44
|
rescue *HTTP_ERRORS => e
|
45
45
|
Response.new(:error, nil, "HTTP Error: #{e.class}").tap do |response|
|
46
46
|
error { sprintf('http error class=%s message=%s', e.class, e.message.dump) }
|
47
47
|
end
|
48
48
|
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
# Internal: Construct headers for supported payloads.
|
53
|
+
#
|
54
|
+
# payload - The payload object.
|
55
|
+
#
|
56
|
+
# Returns Hash headers if supported, otherwise nil.
|
57
|
+
def payload_headers(payload)
|
58
|
+
if payload.respond_to?(:api_key) && payload.api_key
|
59
|
+
{
|
60
|
+
'X-API-Key' => payload.api_key
|
61
|
+
}
|
62
|
+
end
|
63
|
+
end
|
49
64
|
end
|
50
65
|
end
|
51
66
|
end
|
data/lib/honeybadger/notice.rb
CHANGED
@@ -91,6 +91,9 @@ module Honeybadger
|
|
91
91
|
# Public: Local variables are extracted from first frame of backtrace.
|
92
92
|
attr_reader :local_variables
|
93
93
|
|
94
|
+
# Public: The API key used to deliver this notice.
|
95
|
+
attr_reader :api_key
|
96
|
+
|
94
97
|
# Internal: Cache project path substitutions for backtrace lines.
|
95
98
|
PROJECT_ROOT_CACHE = {}
|
96
99
|
|
@@ -220,7 +223,7 @@ module Honeybadger
|
|
220
223
|
|
221
224
|
private
|
222
225
|
|
223
|
-
attr_reader :config, :opts, :context, :stats, :
|
226
|
+
attr_reader :config, :opts, :context, :stats, :now, :pid, :causes, :sanitizer
|
224
227
|
|
225
228
|
def ignore_by_origin?
|
226
229
|
opts[:origin] == :rake && !config[:'exceptions.rescue_rake']
|
@@ -25,7 +25,7 @@ module Honeybadger
|
|
25
25
|
@config = config
|
26
26
|
end
|
27
27
|
|
28
|
-
def post(endpoint, payload, headers =
|
28
|
+
def post(endpoint, payload, headers = nil)
|
29
29
|
response = http_connection.post(endpoint, compress(payload.to_json), http_headers(headers))
|
30
30
|
debug { sprintf("http method=POST path=%s code=%d", endpoint.dump, response.code) }
|
31
31
|
response
|
data/lib/honeybadger/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybadger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Honeybadger Industries LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Make managing application errors a more pleasant experience.
|
14
14
|
email:
|
@@ -141,9 +141,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
141
|
version: 1.9.3
|
142
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
|
-
- - "
|
144
|
+
- - ">="
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version:
|
146
|
+
version: '0'
|
147
147
|
requirements: []
|
148
148
|
rubyforge_project:
|
149
149
|
rubygems_version: 2.4.5
|