bugsnag 1.6.4 → 1.6.5
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/CHANGELOG.md +8 -0
- data/VERSION +1 -1
- data/bugsnag.gemspec +2 -2
- data/lib/bugsnag/configuration.rb +11 -1
- data/lib/bugsnag/notification.rb +2 -0
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 717d9f1b2304beb17e79f70136524fe05f02e836
|
4
|
+
data.tar.gz: ba4b7b6fe97c78d6ca8f7f627e6c696f34516451
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4db0b788c0c54085a2f5d45e221ed4daa33169d1846a75b51319ba416de3eef0e6e6ccbb267ef816077786028f064557204bd7025a53fb1a3dff5ffb41cd50f9
|
7
|
+
data.tar.gz: 1c335846a6340ff3f2c9eec2797d4a0288f3b77073221532dd6bcb5ae001af956eac3e4a7d1c511df7f0c3b2e6781e642c7da21d89c8dd129d7c46d928e0a2d3
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.5
|
data/bugsnag.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "bugsnag"
|
8
|
-
s.version = "1.6.
|
8
|
+
s.version = "1.6.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["James Smith"]
|
12
|
-
s.date = "2013-
|
12
|
+
s.date = "2013-12-14"
|
13
13
|
s.description = "Ruby notifier for bugsnag.com"
|
14
14
|
s.email = "james@bugsnag.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require "set"
|
2
|
+
require "socket"
|
2
3
|
require "logger"
|
3
4
|
require "bugsnag/middleware_stack"
|
4
5
|
|
@@ -24,6 +25,7 @@ module Bugsnag
|
|
24
25
|
attr_accessor :proxy_user
|
25
26
|
attr_accessor :proxy_password
|
26
27
|
attr_accessor :timeout
|
28
|
+
attr_accessor :hostname
|
27
29
|
|
28
30
|
THREAD_LOCAL_NAME = "bugsnag_req_data"
|
29
31
|
|
@@ -51,6 +53,7 @@ module Bugsnag
|
|
51
53
|
self.ignore_classes = Set.new(DEFAULT_IGNORE_CLASSES)
|
52
54
|
self.ignore_user_agents = Set.new(DEFAULT_IGNORE_USER_AGENTS)
|
53
55
|
self.endpoint = DEFAULT_ENDPOINT
|
56
|
+
self.hostname = default_hostname
|
54
57
|
|
55
58
|
# Read the API key from the environment
|
56
59
|
self.api_key = ENV["BUGSNAG_API_KEY"]
|
@@ -75,7 +78,7 @@ module Bugsnag
|
|
75
78
|
def set_request_data(key, value)
|
76
79
|
self.request_data[key] = value
|
77
80
|
end
|
78
|
-
|
81
|
+
|
79
82
|
def unset_request_data(key, value)
|
80
83
|
self.request_data.delete(key)
|
81
84
|
end
|
@@ -83,5 +86,12 @@ module Bugsnag
|
|
83
86
|
def clear_request_data
|
84
87
|
Thread.current[THREAD_LOCAL_NAME] = nil
|
85
88
|
end
|
89
|
+
|
90
|
+
private
|
91
|
+
|
92
|
+
def default_hostname
|
93
|
+
# Don't send the hostname on Heroku
|
94
|
+
Socket.gethostname unless ENV["DYNO"]
|
95
|
+
end
|
86
96
|
end
|
87
97
|
end
|
data/lib/bugsnag/notification.rb
CHANGED
@@ -163,6 +163,8 @@ module Bugsnag
|
|
163
163
|
:metaData => Bugsnag::Helpers.cleanup_obj(generate_meta_data(@exceptions, @overrides), @configuration.params_filters)
|
164
164
|
}.reject {|k,v| v.nil? }
|
165
165
|
|
166
|
+
payload_event[:device] = {:hostname => @configuration.hostname} if @configuration.hostname
|
167
|
+
|
166
168
|
# Build the payload hash
|
167
169
|
payload = {
|
168
170
|
:apiKey => @configuration.api_key,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bugsnag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -163,4 +163,3 @@ signing_key:
|
|
163
163
|
specification_version: 4
|
164
164
|
summary: Ruby notifier for bugsnag.com
|
165
165
|
test_files: []
|
166
|
-
has_rdoc:
|