exception_notification-bugsnag 0.3.0 → 0.4.0
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 +4 -4
- data/.travis.yml +10 -5
- data/CHANGELOG.md +55 -10
- data/exception_notification-bugsnag.gemspec +4 -2
- data/lib/bugsnag/exception_notification.rb +55 -12
- data/lib/exception_notification/bugsnag/version.rb +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b785df57b8e91049409af97bca90722fbc12626e81d505930874d81a818a865a
|
4
|
+
data.tar.gz: 77461d215cfe228f07ddc9ccb3cad8fe3a4a386cf2e5c761622069d5d276fb51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45f8aa7e0aa0f8b29c6b6ba5a5cb39e4999cd62a1e9f18200ee237ddf31810b296c7d6ceb26f33752e44b345832d2f8abc62747e7749336f988a5f71075dc40d
|
7
|
+
data.tar.gz: db9a851a54cb39cd241de0acc3c8f9a0524e7f2152e2140f4a6d57dab34b890ed155093350e6da6332babbdb60a304801a4e451fd10d4ce5687e2aca41f9c20e
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,24 +1,69 @@
|
|
1
|
-
Changelog
|
2
|
-
====
|
1
|
+
# Changelog
|
3
2
|
|
4
3
|
|
5
|
-
|
6
|
-
----
|
4
|
+
## unreleased
|
7
5
|
|
8
|
-
[Full Changelog](https://github.com/pocke/exception_notification-bugsnag/compare/v0.
|
6
|
+
[Full Changelog](https://github.com/pocke/exception_notification-bugsnag/compare/v0.4.0...master)
|
7
|
+
|
8
|
+
### Breaking Changes:
|
9
9
|
|
10
10
|
### Enhancements:
|
11
11
|
|
12
12
|
### Fixed Bugs:
|
13
13
|
|
14
14
|
|
15
|
-
|
16
|
-
----
|
15
|
+
## 0.4.0
|
17
16
|
|
18
|
-
[Full Changelog](https://github.com/pocke/exception_notification-bugsnag/compare/v0.
|
17
|
+
[Full Changelog](https://github.com/pocke/exception_notification-bugsnag/compare/v0.3.0...v0.4.0)
|
18
|
+
|
19
|
+
### Breaking Changes:
|
20
|
+
|
21
|
+
- [#17](https://github.com/pocke/exception_notification-bugsnag/pull/17) Requires `ruby >= 2.3.0`. ([@ybiquitous](https://github.com/ybiquitous))
|
22
|
+
|
23
|
+
### Fixed Bugs:
|
24
|
+
|
25
|
+
- [#16](https://github.com/pocke/exception_notification-bugsnag/pull/16) Support Sidekiq & Resque. ([@ybiquitous](https://github.com/ybiquitous))
|
26
|
+
|
27
|
+
|
28
|
+
## 0.3.0
|
29
|
+
|
30
|
+
[Full Changelog](https://github.com/pocke/exception_notification-bugsnag/compare/v0.3.0.preview2...v0.3.0)
|
31
|
+
|
32
|
+
### Breaking Changes:
|
33
|
+
|
34
|
+
- Requires `exception_notification >= 4.3.0`.
|
35
|
+
|
36
|
+
### Fixed Bugs:
|
37
|
+
|
38
|
+
- [#11](https://github.com/pocke/exception_notification-bugsnag/pull/11) Handle "Rack Env" object. ([@ybiquitous](https://github.com/ybiquitous))
|
19
39
|
|
20
|
-
### Breaking changes:
|
21
40
|
|
22
|
-
|
41
|
+
## 0.3.0.preview2
|
42
|
+
|
43
|
+
[Full Changelog](https://github.com/pocke/exception_notification-bugsnag/compare/v0.3.0.preview1...v0.3.0.preview2)
|
44
|
+
|
45
|
+
### Breaking Changes:
|
46
|
+
|
47
|
+
- Requires `bugsnag >= 6`.
|
23
48
|
|
24
49
|
### Fixed Bugs:
|
50
|
+
|
51
|
+
- [#8](https://github.com/pocke/exception_notification-bugsnag/pull/8) Support Bugsnag 6 correctly. ([@ybiquitous](https://github.com/ybiquitous))
|
52
|
+
|
53
|
+
|
54
|
+
## 0.3.0.preview1
|
55
|
+
|
56
|
+
[Full Changelog](https://github.com/pocke/exception_notification-bugsnag/compare/v0.2.0...v0.3.0.preview1)
|
57
|
+
|
58
|
+
### Breaking Changes:
|
59
|
+
|
60
|
+
- [#6](https://github.com/pocke/exception_notification-bugsnag/pull/6) Support Bugsnag gem version 6. ([@pocke](https://github.com/pocke))
|
61
|
+
|
62
|
+
|
63
|
+
## 0.2.0
|
64
|
+
|
65
|
+
[Full Changelog](https://github.com/pocke/exception_notification-bugsnag/compare/v0.1.0...v0.2.0)
|
66
|
+
|
67
|
+
### Breaking Changes:
|
68
|
+
|
69
|
+
- [#1](https://github.com/pocke/exception_notification-bugsnag/pull/1) Use notify instead of auto notify. ([@wata727](https://github.com/wata727))
|
@@ -12,14 +12,16 @@ Gem::Specification.new do |spec|
|
|
12
12
|
|
13
13
|
spec.summary = %q{Send exception info to Bugsnag.}
|
14
14
|
spec.description = %q{Send exception info to Bugsnag.}
|
15
|
-
spec.homepage = "https://github.com/
|
15
|
+
spec.homepage = "https://github.com/pocke/exception_notification-bugsnag"
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
18
|
spec.bindir = "exe"
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.
|
22
|
+
spec.required_ruby_version = ">= 2.3.0"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
23
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
24
26
|
spec.add_development_dependency "rspec"
|
25
27
|
|
@@ -12,19 +12,22 @@ module ExceptionNotifier
|
|
12
12
|
|
13
13
|
wrapped_block = proc do |report|
|
14
14
|
options.each do |key, value|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
end
|
26
|
-
else
|
15
|
+
case
|
16
|
+
when support_rack?(key)
|
17
|
+
process_rack(report, value)
|
18
|
+
when support_sidekiq?(key, value)
|
19
|
+
process_sidekiq(report, value)
|
20
|
+
when support_resque?(key, value)
|
21
|
+
process_resque(report, value)
|
22
|
+
|
23
|
+
# Support any attributes.
|
24
|
+
when report.respond_to?("#{key}=")
|
27
25
|
report.public_send("#{key}=", value)
|
26
|
+
|
27
|
+
# Just warn instead of an error because it's tough to support
|
28
|
+
# all data formats which ExceptionNotification may pass.
|
29
|
+
else
|
30
|
+
warn "#{self.class.name} does not know the data: `#{key.inspect}=>#{value.inspect}`"
|
28
31
|
end
|
29
32
|
end
|
30
33
|
|
@@ -33,5 +36,45 @@ module ExceptionNotifier
|
|
33
36
|
|
34
37
|
Bugsnag.notify(exception, &wrapped_block)
|
35
38
|
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
# `:env` option can be passed as a Rack Env object by `ExceptionNotification::Rack`.
|
43
|
+
# Bugsnag provides the way to report the Env object by default.
|
44
|
+
#
|
45
|
+
# @see https://github.com/smartinez87/exception_notification/blob/v4.3.0/lib/exception_notification/rack.rb#L51
|
46
|
+
# @see https://github.com/bugsnag/bugsnag-ruby/blob/v6.0.0/lib/bugsnag/middleware/rack_request.rb#L61-L63
|
47
|
+
# @see https://docs.bugsnag.com/platforms/ruby/rails/configuration-options/#send_environment
|
48
|
+
def support_rack?(key)
|
49
|
+
key == :env
|
50
|
+
end
|
51
|
+
|
52
|
+
def process_rack(report, value)
|
53
|
+
if report.configuration.send_environment
|
54
|
+
report.add_tab(:environment, value)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Support Sidekiq data format.
|
59
|
+
#
|
60
|
+
# @see https://github.com/smartinez87/exception_notification/blob/v4.3.0/lib/exception_notification/sidekiq.rb#L28
|
61
|
+
def support_sidekiq?(key, value)
|
62
|
+
key == :data && value.is_a?(Hash) && value.include?(:sidekiq)
|
63
|
+
end
|
64
|
+
|
65
|
+
def process_sidekiq(report, value)
|
66
|
+
report.add_tab(:sidekiq, value[:sidekiq])
|
67
|
+
end
|
68
|
+
|
69
|
+
# Support Resque data format.
|
70
|
+
#
|
71
|
+
# @see https://github.com/smartinez87/exception_notification/blob/v4.3.0/lib/exception_notification/resque.rb#L20
|
72
|
+
def support_resque?(key, value)
|
73
|
+
key == :data && value.is_a?(Hash) && value.include?(:resque)
|
74
|
+
end
|
75
|
+
|
76
|
+
def process_resque(report, value)
|
77
|
+
report.add_tab(:resque, value[:resque])
|
78
|
+
end
|
36
79
|
end
|
37
80
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exception_notification-bugsnag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- koshigoe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,7 +103,7 @@ files:
|
|
103
103
|
- lib/exception_notification/bugsnag.rb
|
104
104
|
- lib/exception_notification/bugsnag/version.rb
|
105
105
|
- lib/exception_notifier/bugsnag_notifier.rb
|
106
|
-
homepage: https://github.com/
|
106
|
+
homepage: https://github.com/pocke/exception_notification-bugsnag
|
107
107
|
licenses:
|
108
108
|
- MIT
|
109
109
|
metadata: {}
|
@@ -115,15 +115,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
115
|
requirements:
|
116
116
|
- - ">="
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
118
|
+
version: 2.3.0
|
119
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - ">="
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
|
-
|
126
|
-
rubygems_version: 2.7.8
|
125
|
+
rubygems_version: 3.0.2
|
127
126
|
signing_key:
|
128
127
|
specification_version: 4
|
129
128
|
summary: Send exception info to Bugsnag.
|