exception-track 0.4.0 → 0.5.0

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
  SHA256:
3
- metadata.gz: 02aea7ddf454611b2daaa86dcebbd8b2350299aec54ebed5527480ac48756b04
4
- data.tar.gz: 517e314cbbd311e37ab70744e3a979bc7b9c89bcf7f4de94be8abd9baedcb1e3
3
+ metadata.gz: 9f9bbb2c3c1da4471ba2a3a818099d3f501daa49fdf31e3d2da2f3a64e964464
4
+ data.tar.gz: fe196d3f40496714199ba8a3f4a025689e318328c93dfcda5eeb9bb56747e020
5
5
  SHA512:
6
- metadata.gz: 6b756a6a7268eee773d7cbf667eb71a3350c21e870be1c4aebe858fcee3aa70e7e8d18b3bd81876b1d46504f8868d083814496987108c7f98a6ace604b26d655
7
- data.tar.gz: 487e5d4dbc297cb1da2e0cbc93ec8cad8aeb6010cd47dcad4463414beedf4b518ec2a03c78459908ef8ed1e41bd315bd478eba56161f616e113529b7e8293c18
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/router.rb
84
+ # config/routes.rb
85
85
  authenticate :user, ->(u) { u.admin? } do
86
86
  mount ExceptionTrack::Engine => "/exception-track"
87
87
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ExceptionTrack
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  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.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-04-24 00:00:00.000000000 Z
11
+ date: 2018-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: exception_notification