bugsnag 1.8.6 → 1.8.7

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.
@@ -1,14 +1,14 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Bugsnag::Rack do
4
- it "should call the upstream rack app with the environment" do
4
+ it "calls the upstream rack app with the environment" do
5
5
  rack_env = {"key" => "value"}
6
6
  app = lambda { |env| ['response', {}, env] }
7
7
  rack_stack = Bugsnag::Rack.new(app)
8
8
 
9
9
  response = rack_stack.call(rack_env)
10
10
 
11
- response.should be == ['response', {}, rack_env]
11
+ expect(response).to eq(['response', {}, rack_env])
12
12
  end
13
13
 
14
14
  context "when an exception is raised in rack middleware" do
@@ -18,27 +18,27 @@ describe Bugsnag::Rack do
18
18
  app = lambda { |env| raise exception }
19
19
  rack_stack = Bugsnag::Rack.new(app)
20
20
 
21
- it "should re-raise the exception" do
21
+ it "re-raises the exception" do
22
22
  expect { rack_stack.call(rack_env) }.to raise_error(BugsnagTestException)
23
23
  end
24
24
 
25
- it "should deliver an exception if auto_notify is enabled" do
26
- Bugsnag::Notification.should_receive(:deliver_exception_payload) do |endpoint, payload|
25
+ it "delivers an exception if auto_notify is enabled" do
26
+ expect(Bugsnag::Notification).to receive(:deliver_exception_payload) do |endpoint, payload|
27
27
  exception_class = payload[:events].first[:exceptions].first[:errorClass]
28
- exception_class.should be == exception.class.to_s
28
+ expect(exception_class).to eq(exception.class.to_s)
29
29
  end
30
30
 
31
31
  rack_stack.call(rack_env) rescue nil
32
32
  end
33
33
 
34
- it "should not deliver an exception if auto_notify is disabled" do
34
+ it "does not deliver an exception if auto_notify is disabled" do
35
35
  Bugsnag.configure do |config|
36
36
  config.auto_notify = false
37
37
  end
38
38
 
39
- Bugsnag::Notification.should_not_receive(:deliver_exception_payload)
39
+ expect(Bugsnag::Notification).not_to receive(:deliver_exception_payload)
40
40
 
41
41
  rack_stack.call(rack_env) rescue nil
42
42
  end
43
43
  end
44
- end
44
+ end
@@ -3,13 +3,13 @@ require 'bugsnag'
3
3
  class BugsnagTestException < RuntimeError; end
4
4
 
5
5
  def get_event_from_payload(payload)
6
- payload[:events].should have(1).items
6
+ expect(payload[:events].size).to eq(1)
7
7
  payload[:events].first
8
8
  end
9
9
 
10
10
  def get_exception_from_payload(payload)
11
11
  event = get_event_from_payload(payload)
12
- event[:exceptions].should have(1).items
12
+ expect(event[:exceptions].size).to eq(1)
13
13
  event[:exceptions].last
14
14
  end
15
15
 
@@ -21,6 +21,8 @@ RSpec.configure do |config|
21
21
  Bugsnag.configure do |config|
22
22
  config.api_key = "c9d60ae4c7e70c4b6c4ebd3e8056d2b8"
23
23
  config.release_stage = "production"
24
+ # silence logger in tests
25
+ config.logger = Logger.new(StringIO.new)
24
26
  end
25
27
  end
26
28
 
metadata CHANGED
@@ -1,89 +1,89 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugsnag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.6
4
+ version: 1.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-18 00:00:00.000000000 Z
11
+ date: 2014-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: httparty
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - <
31
+ - - "<"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.0'
34
- - - '>='
34
+ - - ">="
35
35
  - !ruby/object:Gem::Version
36
36
  version: '0.6'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - <
41
+ - - "<"
42
42
  - !ruby/object:Gem::Version
43
43
  version: '1.0'
44
- - - '>='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0.6'
47
47
  - !ruby/object:Gem::Dependency
48
- name: rspec
48
+ name: rake
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - '>='
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - '>='
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  - !ruby/object:Gem::Dependency
62
- name: rdoc
62
+ name: rspec
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - '>='
65
+ - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - '>='
72
+ - - ">="
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  - !ruby/object:Gem::Dependency
76
- name: rake
76
+ name: rdoc
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - '>='
79
+ - - ">="
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - '>='
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  description: Ruby notifier for bugsnag.com
@@ -94,10 +94,10 @@ extra_rdoc_files:
94
94
  - LICENSE.txt
95
95
  - README.md
96
96
  files:
97
- - .document
98
- - .gitignore
99
- - .rspec
100
- - .travis.yml
97
+ - ".document"
98
+ - ".gitignore"
99
+ - ".rspec"
100
+ - ".travis.yml"
101
101
  - CHANGELOG.md
102
102
  - Gemfile
103
103
  - LICENSE.txt
@@ -151,17 +151,17 @@ require_paths:
151
151
  - lib
152
152
  required_ruby_version: !ruby/object:Gem::Requirement
153
153
  requirements:
154
- - - '>='
154
+ - - ">="
155
155
  - !ruby/object:Gem::Version
156
156
  version: '0'
157
157
  required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  requirements:
159
- - - '>='
159
+ - - ">="
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  requirements: []
163
163
  rubyforge_project:
164
- rubygems_version: 2.0.3
164
+ rubygems_version: 2.2.0
165
165
  signing_key:
166
166
  specification_version: 4
167
167
  summary: Ruby notifier for bugsnag.com