bugsnag 6.0.0 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/CONTRIBUTING.md +2 -1
- data/Gemfile +1 -0
- data/VERSION +1 -1
- data/lib/bugsnag.rb +4 -1
- data/lib/bugsnag/delivery/synchronous.rb +1 -1
- data/spec/bugsnag_spec.rb +19 -0
- data/spec/spec_helper.rb +1 -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: 7051f1b045ba90626c2130cda598dcc8db6e93c4
|
4
|
+
data.tar.gz: bf4bd085a0f1cf838d26335f6567128768ef1cde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 146a2cdd6ba41c334948ed643263dab8b4480fec92c430bd4f4025704ce3a7089b0d1a9e0778244d0ec79664670090b132aac6e5f4d7e3ab960218dfc7205c53
|
7
|
+
data.tar.gz: 8db4ec587f1c9e0760dc71f569fbb947ee6addf0dc1074b18cc1baddd6d1872fb21a7a314c9194c2a91504a0fcbd5de1ab7da5ca08a9e9c3949aa2de72cafb12
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
## 6.0.1 (09 Nov 2017)
|
5
|
+
|
6
|
+
Adds a warning for the change in usage for the `notify()` method from < 6.0 to
|
7
|
+
ease upgrading.
|
8
|
+
|
4
9
|
## 6.0.0 (09 Nov 2017)
|
5
10
|
|
6
11
|
This notifier has been extensively re-written to make it easier to add new integrations and maintain in the future. This has led to several changes that are not backwards compatible. Please refer to the [upgrading guide](https://github.com/bugsnag/bugsnag-ruby/blob/master/UPGRADING.md) for more information.
|
data/CONTRIBUTING.md
CHANGED
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.0.
|
1
|
+
6.0.1
|
data/lib/bugsnag.rb
CHANGED
@@ -43,6 +43,10 @@ module Bugsnag
|
|
43
43
|
|
44
44
|
# Explicitly notify of an exception
|
45
45
|
def notify(exception, auto_notify=false, &block)
|
46
|
+
unless auto_notify.is_a? TrueClass or auto_notify.is_a? FalseClass
|
47
|
+
configuration.warn("Adding metadata/severity using a hash is no longer supported, please use block syntax instead")
|
48
|
+
auto_notify = false
|
49
|
+
end
|
46
50
|
|
47
51
|
if !configuration.auto_notify && auto_notify
|
48
52
|
configuration.debug("Not notifying because auto_notify is disabled")
|
@@ -106,7 +110,6 @@ module Bugsnag
|
|
106
110
|
# Deliver
|
107
111
|
configuration.info("Notifying #{configuration.endpoint} of #{report.exceptions.last[:errorClass]}")
|
108
112
|
payload_string = ::JSON.dump(Bugsnag::Helpers.trim_if_needed(report.as_json))
|
109
|
-
configuration.debug("Payload: #{payload_string}")
|
110
113
|
Bugsnag::Delivery[configuration.delivery_method].deliver(configuration.endpoint, payload_string, configuration)
|
111
114
|
end
|
112
115
|
end
|
@@ -10,7 +10,7 @@ module Bugsnag
|
|
10
10
|
def deliver(url, body, configuration)
|
11
11
|
begin
|
12
12
|
response = request(url, body, configuration)
|
13
|
-
configuration.debug("
|
13
|
+
configuration.debug("Request to #{url} completed, status: #{response.code}")
|
14
14
|
rescue StandardError => e
|
15
15
|
# KLUDGE: Since we don't re-raise http exceptions, this breaks rspec
|
16
16
|
raise if e.class.to_s == "RSpec::Expectations::ExpectationNotMetError"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Bugsnag do
|
5
|
+
describe 'notify' do
|
6
|
+
before do
|
7
|
+
Bugsnag.configuration.logger = spy('logger')
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'does not log an error when sending valid arguments as auto_notify' do
|
11
|
+
notify_test_exception(true)
|
12
|
+
expect(Bugsnag.configuration.logger).to_not have_received(:warn)
|
13
|
+
end
|
14
|
+
it 'logs an error when sending invalid arguments as auto_notify' do
|
15
|
+
notify_test_exception({severity: 'info'})
|
16
|
+
expect(Bugsnag.configuration.logger).to have_received(:warn)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bugsnag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Smith
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- lib/bugsnag/tasks/bugsnag.rake
|
71
71
|
- lib/bugsnag/version.rb
|
72
72
|
- lib/generators/bugsnag/bugsnag_generator.rb
|
73
|
+
- spec/bugsnag_spec.rb
|
73
74
|
- spec/cleaner_spec.rb
|
74
75
|
- spec/configuration_spec.rb
|
75
76
|
- spec/fixtures/crashes/end_of_file.rb
|
@@ -108,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
109
|
version: '0'
|
109
110
|
requirements: []
|
110
111
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.4.5
|
112
113
|
signing_key:
|
113
114
|
specification_version: 4
|
114
115
|
summary: Ruby notifier for bugsnag.com
|