airbrake-ruby 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/airbrake-ruby.rb +1 -0
- data/lib/airbrake-ruby/notice.rb +8 -1
- data/lib/airbrake-ruby/version.rb +1 -1
- data/spec/notice_spec.rb +5 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d15481adc9973cf21c5302ab3cd3dbb365d4891
|
4
|
+
data.tar.gz: 94b9535ca5be9f4a28a75a24548516755cf5945e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2426fc74599daab97fe712b40b1f9d8a3a899ef721cd28091e86aa88a91c8bbd16e727452ca70a564f80863b4c32d95cf428f78f4db5fc376fc389bb589fd5dc
|
7
|
+
data.tar.gz: f04c48e0820d3b96c61618c08403845ca4730acc08eb4e68f8668cc52ce6365b28d35d0b4ab5293a22d5290e2863c1d4f100d57bc81fe14162f9c4fce67e9458
|
data/lib/airbrake-ruby.rb
CHANGED
data/lib/airbrake-ruby/notice.rb
CHANGED
@@ -48,6 +48,10 @@ module Airbrake
|
|
48
48
|
:params
|
49
49
|
].freeze
|
50
50
|
|
51
|
+
##
|
52
|
+
# @return [String] the name of the host machine
|
53
|
+
HOSTNAME = Socket.gethostname.freeze
|
54
|
+
|
51
55
|
def initialize(config, exception, params = {})
|
52
56
|
@config = config
|
53
57
|
|
@@ -145,7 +149,10 @@ module Airbrake
|
|
145
149
|
|
146
150
|
# Legacy Airbrake v4 behaviour.
|
147
151
|
component: params.delete(:component),
|
148
|
-
action: params.delete(:action)
|
152
|
+
action: params.delete(:action),
|
153
|
+
|
154
|
+
# Make sure we always send hostname.
|
155
|
+
hostname: HOSTNAME
|
149
156
|
}.merge(CONTEXT).delete_if { |_key, val| val.nil? || val.empty? }
|
150
157
|
end
|
151
158
|
|
data/spec/notice_spec.rb
CHANGED
@@ -105,6 +105,11 @@ RSpec.describe Airbrake::Notice do
|
|
105
105
|
expect(notice.to_json).
|
106
106
|
to match(/"notifier":{"name":"airbrake-ruby","version":".+","url":".+"}/)
|
107
107
|
end
|
108
|
+
|
109
|
+
it "always contains context/hostname" do
|
110
|
+
expect(notice.to_json).
|
111
|
+
to match(/"context":{.*"hostname":".+".*}/)
|
112
|
+
end
|
108
113
|
end
|
109
114
|
|
110
115
|
describe "#[]" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airbrake Technologies, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -158,3 +158,4 @@ test_files:
|
|
158
158
|
- spec/notice_spec.rb
|
159
159
|
- spec/config_spec.rb
|
160
160
|
- spec/filter_chain_spec.rb
|
161
|
+
has_rdoc:
|