exception-track 0.4.0 → 0.5.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/README.md +1 -1
- data/lib/exception-track/version.rb +1 -1
- data/lib/exception_notifier/exception_track_notifier.rb +10 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f9bbb2c3c1da4471ba2a3a818099d3f501daa49fdf31e3d2da2f3a64e964464
|
4
|
+
data.tar.gz: fe196d3f40496714199ba8a3f4a025689e318328c93dfcda5eeb9bb56747e020
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1961ac2a5ee3f3d7ccb822a65787317f21609fd5a2934992c5dfb16511048ec9a711147af6d4fb51dee863e352789794b0f22d7db97de7199a1295b5c1e5a519
|
7
|
+
data.tar.gz: 512fe5ee9cc021b3579e4fe03a6b0add7610a246d8eeb8e1798297fc730b78dae76b467d922f2d71bf43b2a39f383b7375c3af567eb09d066f29e34e96d3044f
|
data/README.md
CHANGED
@@ -81,7 +81,7 @@ mount ExceptionTrack::Engine => "/exception-track", constraints: AdminConstraint
|
|
81
81
|
**With Devise**
|
82
82
|
|
83
83
|
```rb
|
84
|
-
# config/
|
84
|
+
# config/routes.rb
|
85
85
|
authenticate :user, ->(u) { u.admin? } do
|
86
86
|
mount ExceptionTrack::Engine => "/exception-track"
|
87
87
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# 异常通知
|
4
3
|
module ExceptionNotifier
|
5
4
|
class ExceptionTrackNotifier < ExceptionNotifier::BaseNotifier
|
6
5
|
def initialize(_options); end
|
@@ -23,6 +22,16 @@ module ExceptionNotifier
|
|
23
22
|
end
|
24
23
|
|
25
24
|
ExceptionTrack::Log.create(title: title[0, 200], body: messages.join("\n"))
|
25
|
+
rescue => e
|
26
|
+
errs = []
|
27
|
+
errs << "-- [ExceptionTrack] create error ---------------------------"
|
28
|
+
errs << e.message.indent(2)
|
29
|
+
errs << ""
|
30
|
+
errs << "-- Exception detail ----------------------------------------"
|
31
|
+
errs << title.indent(2)
|
32
|
+
errs << ""
|
33
|
+
errs << messages.join("\n").indent(2)
|
34
|
+
Rails.logger.error errs.join("\n")
|
26
35
|
end
|
27
36
|
|
28
37
|
# Log Request headers from Rack env
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exception-track
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: exception_notification
|