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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e4895caa9224c394638111e53c272725b376798
4
- data.tar.gz: a6eed28eb2fae6ab266895c3a7a87bb188ac43a5
3
+ metadata.gz: 717d9f1b2304beb17e79f70136524fe05f02e836
4
+ data.tar.gz: ba4b7b6fe97c78d6ca8f7f627e6c696f34516451
5
5
  SHA512:
6
- metadata.gz: 9d65d2a25cc56852f130ecfea197e3aa1455125d72830d216cb53fcb69e96e72eb0337bf77e41e88ad56c9723fc2942c4582deacc80232a202c02ef942b4f175
7
- data.tar.gz: c976c229171fcc3b784e003b808c23f3ce5a9e8b9220e966c11f8c746448be293506c07d974dce98b364003da080836ad45b4fda8ac28d1de7462022f49bf268
6
+ metadata.gz: 4db0b788c0c54085a2f5d45e221ed4daa33169d1846a75b51319ba416de3eef0e6e6ccbb267ef816077786028f064557204bd7025a53fb1a3dff5ffb41cd50f9
7
+ data.tar.gz: 1c335846a6340ff3f2c9eec2797d4a0288f3b77073221532dd6bcb5ae001af956eac3e4a7d1c511df7f0c3b2e6781e642c7da21d89c8dd129d7c46d928e0a2d3
@@ -1,6 +1,14 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 1.6.5
5
+ -----
6
+ - Send hostname to Bugsnag
7
+
8
+ 1.6.4
9
+ -----
10
+ - Fix load order issue with Resque
11
+
4
12
  1.6.3
5
13
  -----
6
14
  - Deal with SSL properly for deploy notifications on ruby <2.0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.4
1
+ 1.6.5
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bugsnag"
8
- s.version = "1.6.4"
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-11-27"
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
@@ -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
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-27 00:00:00.000000000 Z
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: