exception-track 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: 9e58406c8d565977ab639f5b05af8412e18dc49b
4
- data.tar.gz: 9da9833235e61c16222780688792594ebdfe7711
3
+ metadata.gz: dcb5858f2cfdd417d977b925270c8b04a41c4616
4
+ data.tar.gz: 46b9964497879b206a21c5213d7dcd4af7febf0c
5
5
  SHA512:
6
- metadata.gz: b639f4865fbada3a03f4b25770f8665920aa176bc955299917b12841f216f9d60ff9a94456dc19186c24bbd13c8d68b1ea6cd1d8ef45d3c924aa55dfa758773c
7
- data.tar.gz: 55e20cda1a60d5f62e7f4c136ea069a36f1ba01e082be91fe05c94f1cf72b1cf33925281a5ab8ad1d9ec202c253908f875804b4a2dbcfd51cd76372e5f2b355d
6
+ metadata.gz: 37f03fd69a64444b0534e10da3e91a89a46cc53a3ce2ebe3e5ddad8e98d8b1dbd2d1df92dc975c8b72f65273ae4f89d5cddf1de000994ed8ed6174bdc96e1b0d
7
+ data.tar.gz: 4ba8e28108ac18070399365f149811f3198c7892ff2a013786341e312e6399c39ad764b6c01cb1aa5aa539cfa7a074cf9bbf075cc6487754cccdec8d97a638c1
data/README.md CHANGED
@@ -5,6 +5,8 @@ Tracking exceptions for Rails application store them in database.
5
5
 
6
6
  This gem is base on [exception_notification](https://github.com/smartinez87/exception_notification/).
7
7
 
8
+ [中文介绍和使用说明](https://ruby-china.org/topics/32325)
9
+
8
10
  [![Gem Version](https://badge.fury.io/rb/exception-track.svg)](https://badge.fury.io/rb/exception-track) [![Build Status](https://travis-ci.org/rails-engine/exception-track.svg)](https://travis-ci.org/rails-engine/exception-track) [![Code Climate](https://codeclimate.com/github/rails-engine/exception-track/badges/gpa.svg)](https://codeclimate.com/github/rails-engine/exception-track) [![codecov.io](https://codecov.io/github/rails-engine/exception-track/coverage.svg?branch=master)](https://codecov.io/github/rails-engine/exception-track?branch=master) [![](http://inch-ci.org/github/rails-engine/exception-track.svg?branch=master)](http://inch-ci.org/github/rails-engine/exception-track?branch=master)
9
11
 
10
12
  ![2017-02-17 12 35 18](https://cloud.githubusercontent.com/assets/5518/23052599/8e267c02-f50d-11e6-8d6e-cef0cc1991b7.png)
@@ -59,17 +61,33 @@ You can config [exception_notification](https://github.com/smartinez87/exception
59
61
 
60
62
  https://github.com/smartinez87/exception_notification/
61
63
 
62
- ## Router admin authenticate for Devise
64
+ ## Router admin authenticate
63
65
 
64
- config/router.rb
66
+ ```rb
67
+ # lib/admin_constraint.rb
68
+ class AdminConstraint
69
+ def matches?(request)
70
+ return false if !request.session[:user_id]
71
+ user = User.find(request.session[:user_id])
72
+ user && user.admin?
73
+ end
74
+ end
75
+
76
+ # config/router.rb
77
+ require 'admin_constraint'
78
+ mount ExceptionTrack::Engine => "/exception-track", constraints: AdminConstraint.new
79
+ ```
80
+
81
+ **With Devise**
65
82
 
66
83
  ```rb
84
+ # config/router.rb
67
85
  authenticate :user, ->(u) { u.admin? } do
68
86
  mount ExceptionTrack::Engine => "/exception-track"
69
87
  end
70
88
  ```
71
89
 
72
- https://github.com/plataformatec/devise/wiki/How-To:-Define-resource-actions-that-require-authentication-using-routes.rb
90
+ More examples: [Sidekiq Web Document](https://github.com/mperham/sidekiq/wiki/Monitoring#authentication)
73
91
 
74
92
  ## License
75
93
 
@@ -1,3 +1,3 @@
1
1
  module ExceptionTrack
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
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.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-17 00:00:00.000000000 Z
11
+ date: 2017-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,34 +16,34 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.0
19
+ version: '4.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5.1'
22
+ version: '5.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 4.2.0
29
+ version: '4.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5.1'
32
+ version: '5.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: exception_notification
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '4.1'
39
+ version: '4'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '4.1'
46
+ version: '4'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: will_paginate
49
49
  requirement: !ruby/object:Gem::Requirement