exception_notification-bugsnag 0.3.0.preview1 → 0.3.0.preview2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +5 -5
- data/README.md +18 -4
- data/exception_notification-bugsnag.gemspec +1 -1
- data/lib/bugsnag/exception_notification.rb +11 -11
- data/lib/exception_notification/bugsnag/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25a0aef57f93ea4f815028fe7fdcf7f1b5f6472be2c5f0ae2291c7471a21a059
|
4
|
+
data.tar.gz: 43776033f4f0c32bc033d1a96ae90a568f248b09df82683b8c8a08d16338d55a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f9a4b71f0ce2092b002492f9c3481fa7660c89e7507f684e3c4593adf6d67f660f2a77b0b60c1dfcb32b3d708b0969ef65d4f1a5514354e85977bce8326df85
|
7
|
+
data.tar.gz: 86a2501746f78cae18e84162314bef69b065b15df3aad5a8e6ad46f6d5f34ca2cf69998014d147499f17c701236095a06710da74f5ef1b824889f5dc581455f3
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,23 +2,23 @@ Changelog
|
|
2
2
|
====
|
3
3
|
|
4
4
|
|
5
|
-
[unreleased](https://github.com/
|
5
|
+
[unreleased](https://github.com/pocke/exception_notification-bugsnag/compare/v0.2.0...master)
|
6
6
|
----
|
7
7
|
|
8
|
-
[Full Changelog](https://github.com/
|
8
|
+
[Full Changelog](https://github.com/pocke/exception_notification-bugsnag/compare/v0.2.0...master)
|
9
9
|
|
10
10
|
### Enhancements:
|
11
11
|
|
12
12
|
### Fixed Bugs:
|
13
13
|
|
14
14
|
|
15
|
-
[0.2.0](https://github.com/
|
15
|
+
[0.2.0](https://github.com/pocke/exception_notification-bugsnag/compare/v0.1.0...v0.2.0)
|
16
16
|
----
|
17
17
|
|
18
|
-
[Full Changelog](https://github.com/
|
18
|
+
[Full Changelog](https://github.com/pocke/exception_notification-bugsnag/compare/v0.1.0...v0.2.0)
|
19
19
|
|
20
20
|
### Breaking changes:
|
21
21
|
|
22
|
-
- [#1 Use notify instead of auto notify by wata727](https://github.com/
|
22
|
+
- [#1 Use notify instead of auto notify by wata727](https://github.com/pocke/exception_notification-bugsnag/pull/1)
|
23
23
|
|
24
24
|
### Fixed Bugs:
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/exception_notification-bugsnag.svg)](http://badge.fury.io/rb/exception_notification-bugsnag)
|
2
|
-
![Build Status](https://
|
2
|
+
[![Build Status](https://travis-ci.org/pocke/exception_notification-bugsnag.svg?branch=master)](https://travis-ci.org/pocke/exception_notification-bugsnag)
|
3
3
|
|
4
4
|
# ExceptionNotification::Bugsnag
|
5
5
|
|
@@ -23,9 +23,23 @@ Or install it yourself as:
|
|
23
23
|
|
24
24
|
**NOTE: not use exception_notification's middleware.**
|
25
25
|
|
26
|
+
```ruby
|
27
|
+
ExceptionNotifier.add_notifier :bugsnag
|
28
|
+
# or
|
29
|
+
ExceptionNotifier.add_notifier :bugsnag, severity: 'error'
|
26
30
|
```
|
27
|
-
|
28
|
-
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
begin
|
34
|
+
# some code...
|
35
|
+
rescue => err
|
36
|
+
ExceptionNotifier.notify_exception(err)
|
37
|
+
# or
|
38
|
+
ExceptionNotifier.notify_exception(err, severity: 'error')
|
39
|
+
# or
|
40
|
+
ExceptionNotifier.notify_exception(err) do |report|
|
41
|
+
report.severity = 'error'
|
42
|
+
end
|
29
43
|
```
|
30
44
|
|
31
45
|
### NOTE
|
@@ -40,7 +54,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
40
54
|
|
41
55
|
## Contributing
|
42
56
|
|
43
|
-
1. Fork it ( https://github.com/
|
57
|
+
1. Fork it ( https://github.com/pocke/exception_notification-bugsnag/fork )
|
44
58
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
45
59
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
46
60
|
4. Push to the branch (`git push origin my-new-feature`)
|
@@ -3,22 +3,22 @@ require 'exception_notifier'
|
|
3
3
|
|
4
4
|
module ExceptionNotifier
|
5
5
|
class BugsnagNotifier
|
6
|
-
def initialize(options=nil
|
7
|
-
@default_options = options
|
8
|
-
@default_block = default_block
|
6
|
+
def initialize(options=nil)
|
7
|
+
@default_options = options || {}
|
9
8
|
end
|
10
9
|
|
11
10
|
def call(exception, options={}, &block)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
options = @default_options.merge(options)
|
12
|
+
|
13
|
+
wrapped_block = proc do |report|
|
14
|
+
options.each do |key, value|
|
15
|
+
report.public_send("#{key}=", value)
|
16
|
+
end
|
16
17
|
|
17
|
-
|
18
|
-
Bugsnag.notify(exception, @default_options.merge(options), &merged_block)
|
19
|
-
else
|
20
|
-
Bugsnag.notify(exception, &merged_block)
|
18
|
+
block.call(report) if block
|
21
19
|
end
|
20
|
+
|
21
|
+
Bugsnag.notify(exception, &wrapped_block)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
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.3.0.
|
4
|
+
version: 0.3.0.preview2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- koshigoe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '6'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '6'
|
83
83
|
description: Send exception info to Bugsnag.
|
84
84
|
email:
|
85
85
|
- koshigoeb@gmail.com
|