exceptiontrap 1.0.11 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +1 -1
- data/Gemfile.lock +19 -0
- data/README.md +4 -4
- data/exceptiontrap.gemspec +3 -1
- data/lib/exceptiontrap.rb +12 -7
- data/lib/exceptiontrap/railtie.rb +4 -4
- data/lib/exceptiontrap/version.rb +2 -2
- metadata +22 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 46f79c8fcfbdce4d8549d9603975e3153c55d92b05a05316203520195cf5c9e5
|
4
|
+
data.tar.gz: b9d046b6d26ba05f2b6320cc0b533f56b2feca0610516677c085e89deb6b159c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0c445fcb4591fa8f03c29adb951bd2f166a525f808ee4b7919d6fdb266bcd6c52bd66cdfc4744cb5af75d5b2fb10064bb0efa6b73c3699f8bde919348670f20
|
7
|
+
data.tar.gz: 695c8bed8a6d220162f901dc888cffdea59c5d584c6da033fde6ab1bb89fd27ada49442a6defa146f433d8bb18ebeb4cbc704fa7630d2c34b772a49bbb7ff9fd
|
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
data/README.md
CHANGED
@@ -5,11 +5,11 @@ This gem is used to catch and report your Ruby on Rails applications errors and
|
|
5
5
|
The gem is compatible with the following Rails versions
|
6
6
|
|
7
7
|
- >= 2.3
|
8
|
-
- 3 and
|
8
|
+
- 3, 4, and 5
|
9
9
|
|
10
10
|
## Setup
|
11
11
|
|
12
|
-
### Rails 3 / 4
|
12
|
+
### Rails 3 / 4 / 5
|
13
13
|
|
14
14
|
#### 1. Install
|
15
15
|
|
@@ -83,7 +83,7 @@ end
|
|
83
83
|
|
84
84
|
### Resque
|
85
85
|
|
86
|
-
automatic integration into [Resque](https://github.com/resque/resque) yet. Meanwhile you can let Exceptiontrap notifiy you about errors using its `notify` method inside
|
86
|
+
automatic integration into [Resque](https://github.com/resque/resque) yet. Meanwhile you can let Exceptiontrap notifiy you about errors using its `notify` method inside Resque's `on_failure` hook.
|
87
87
|
|
88
88
|
You can also create a module with Exceptiontrap enabled and integrate this.
|
89
89
|
|
@@ -107,4 +107,4 @@ end
|
|
107
107
|
Optimize and insert the test suite to the gem.
|
108
108
|
|
109
109
|
|
110
|
-
Copyright (c)
|
110
|
+
Copyright (c) 2018 [Torsten Bühl], released under the MIT license
|
data/exceptiontrap.gemspec
CHANGED
@@ -17,4 +17,6 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.require_paths = ["lib"]
|
20
|
-
|
20
|
+
|
21
|
+
s.add_development_dependency 'rake'
|
22
|
+
end
|
data/lib/exceptiontrap.rb
CHANGED
@@ -7,7 +7,7 @@ require 'exceptiontrap/config'
|
|
7
7
|
require 'exceptiontrap/notifier'
|
8
8
|
require 'exceptiontrap/rack'
|
9
9
|
|
10
|
-
# Use Rack Middleware for Rails 3
|
10
|
+
# Use Rack Middleware for Rails >= 3
|
11
11
|
require 'exceptiontrap/railtie' if defined?(Rails::Railtie)
|
12
12
|
# Background Worker Middleware
|
13
13
|
require "exceptiontrap/sidekiq" if defined?(Sidekiq)
|
@@ -27,22 +27,27 @@ module Exceptiontrap
|
|
27
27
|
Exceptiontrap::Config.load(File.join(Rails.root, '/config/exceptiontrap.yml'))
|
28
28
|
|
29
29
|
if enabled?
|
30
|
+
# Rails 2
|
30
31
|
if defined?(ActionController::Base) && !ActionController::Base.include?(Exceptiontrap::Catcher)
|
31
|
-
ActionController::Base.send(:include, Exceptiontrap::Catcher)
|
32
|
+
ActionController::Base.send(:include, Exceptiontrap::Catcher)
|
32
33
|
end
|
33
34
|
|
34
|
-
|
35
|
+
# Rails >= 2.3
|
36
|
+
Rails.configuration.middleware.use 'Exceptiontrap::Rack'
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
38
40
|
def self.notify(exception, params = {})
|
39
|
-
if
|
40
|
-
|
41
|
-
|
42
|
-
end
|
41
|
+
return if disabled?
|
42
|
+
data = Data.rack_data(exception, params)
|
43
|
+
Notifier.notify(data)
|
43
44
|
end
|
44
45
|
|
45
46
|
def self.enabled?
|
46
47
|
Config.enabled_environments.include?(Data.application_environment)
|
47
48
|
end
|
49
|
+
|
50
|
+
def self.disabled?
|
51
|
+
!enabled?
|
52
|
+
end
|
48
53
|
end
|
@@ -6,9 +6,9 @@ module Exceptiontrap
|
|
6
6
|
class ExceptiontrapRailtie < Rails::Railtie
|
7
7
|
initializer 'exceptiontrap.middleware' do |app|
|
8
8
|
Exceptiontrap::Config.load(File.join(Rails.root, '/config/exceptiontrap.yml'))
|
9
|
-
if Exceptiontrap::
|
10
|
-
|
11
|
-
|
9
|
+
return if Exceptiontrap::disabled?
|
10
|
+
|
11
|
+
app.config.middleware.insert_after ActionDispatch::ShowExceptions, Exceptiontrap::Rack
|
12
12
|
end
|
13
13
|
end
|
14
|
-
end
|
14
|
+
end
|
@@ -1,3 +1,3 @@
|
|
1
1
|
module Exceptiontrap
|
2
|
-
VERSION = '1.0
|
3
|
-
end
|
2
|
+
VERSION = '1.1.0'
|
3
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exceptiontrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tbuehl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
11
|
+
date: 2019-02-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
description: Exception notifier. The Gem catches your applications exceptions and
|
14
28
|
sends those to the exceptiontrap webservice hosted at https://exceptiontrap.com
|
15
29
|
email:
|
@@ -18,8 +32,9 @@ executables: []
|
|
18
32
|
extensions: []
|
19
33
|
extra_rdoc_files: []
|
20
34
|
files:
|
21
|
-
- .gitignore
|
35
|
+
- ".gitignore"
|
22
36
|
- Gemfile
|
37
|
+
- Gemfile.lock
|
23
38
|
- MIT-LICENSE
|
24
39
|
- README.md
|
25
40
|
- Rakefile
|
@@ -54,17 +69,16 @@ require_paths:
|
|
54
69
|
- lib
|
55
70
|
required_ruby_version: !ruby/object:Gem::Requirement
|
56
71
|
requirements:
|
57
|
-
- -
|
72
|
+
- - ">="
|
58
73
|
- !ruby/object:Gem::Version
|
59
74
|
version: '0'
|
60
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
76
|
requirements:
|
62
|
-
- -
|
77
|
+
- - ">="
|
63
78
|
- !ruby/object:Gem::Version
|
64
79
|
version: '0'
|
65
80
|
requirements: []
|
66
|
-
|
67
|
-
rubygems_version: 2.1.11
|
81
|
+
rubygems_version: 3.0.2
|
68
82
|
signing_key:
|
69
83
|
specification_version: 4
|
70
84
|
summary: Exception notifier, used to report your apps exceptions to the exceptiontrap
|
@@ -72,4 +86,3 @@ summary: Exception notifier, used to report your apps exceptions to the exceptio
|
|
72
86
|
test_files:
|
73
87
|
- test/exceptiontrap_test.rb
|
74
88
|
- test/test_helper.rb
|
75
|
-
has_rdoc:
|