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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bdb80b010ab8da05acfddaa542a8b7cbff4be599
4
- data.tar.gz: 7fa7188b650b1ebc07e074f4d6f2f1a365105033
3
+ metadata.gz: 7051f1b045ba90626c2130cda598dcc8db6e93c4
4
+ data.tar.gz: bf4bd085a0f1cf838d26335f6567128768ef1cde
5
5
  SHA512:
6
- metadata.gz: 9f19d8a8b92a80747fb160ca3d55c5b19c35aefe8c9293eff1843668a76e90965b37a643e90ebc912b4e1e621411d0968241e024d01b490b5a1d0484621a2b2f
7
- data.tar.gz: 2b46521a1dbe916993b13f546992533ef2ab0422cf45a27ea6a30c1c13f8ba01c0a42c2e2486ac655eccff531443452a00fe765e51fea039346d205803da9373
6
+ metadata.gz: 146a2cdd6ba41c334948ed643263dab8b4480fec92c430bd4f4025704ce3a7089b0d1a9e0778244d0ec79664670090b132aac6e5f4d7e3ab960218dfc7205c53
7
+ data.tar.gz: 8db4ec587f1c9e0760dc71f569fbb947ee6addf0dc1074b18cc1baddd6d1872fb21a7a314c9194c2a91504a0fcbd5de1ab7da5ca08a9e9c3949aa2de72cafb12
@@ -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.
@@ -48,7 +48,8 @@ If you're a member of the core team, follow these instructions for releasing bug
48
48
  * Commit/push your changes
49
49
 
50
50
  ```
51
- git commit -am v5.X.X
51
+ git add VERSION CHANGELOG.md README.md
52
+ git commit -m "Release v6.x.x"
52
53
  git push origin master
53
54
  ```
54
55
 
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source "https://rubygems.org"
3
3
  group :test, optional: true do
4
4
  gem 'rake', '~> 10.1.1'
5
5
  gem 'rspec'
6
+ gem 'rspec-mocks'
6
7
  gem 'rdoc'
7
8
  gem 'pry'
8
9
  gem 'addressable', '~> 2.3.8'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.0.0
1
+ 6.0.1
@@ -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("Notification to #{url} finished, response was #{response.code}, payload was #{body}")
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
@@ -12,6 +12,7 @@ require 'bugsnag'
12
12
 
13
13
  require 'webmock/rspec'
14
14
  require 'rspec/expectations'
15
+ require 'rspec/mocks'
15
16
 
16
17
  class BugsnagTestException < RuntimeError; end
17
18
 
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.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.6.13
112
+ rubygems_version: 2.4.5
112
113
  signing_key:
113
114
  specification_version: 4
114
115
  summary: Ruby notifier for bugsnag.com