runtimeerror_notifier 0.0.11 → 0.0.12
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.
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'runtimeerror_notifier/notifier'
|
2
|
+
require 'runtimeerror_notifier/tracker'
|
3
|
+
require 'runtimeerror_notifier/railtie' if defined?(Rails::Railtie)
|
2
4
|
|
3
5
|
module RuntimeerrorNotifier
|
4
6
|
def self.for(*emails)
|
@@ -6,11 +8,13 @@ module RuntimeerrorNotifier
|
|
6
8
|
if defined?(::Rails)
|
7
9
|
::Rails.application.config.middleware.insert 0, RuntimeerrorNotifier::Tracker
|
8
10
|
end
|
11
|
+
|
9
12
|
renderer_class = if defined?(::ActionDispatch::DebugExceptions)
|
10
13
|
::ActionDispatch::DebugExceptions
|
11
14
|
elsif defined?(::ActionDispatch::ShowExceptions)
|
12
15
|
::ActionDispatch::ShowExceptions
|
13
16
|
end
|
17
|
+
|
14
18
|
if renderer_class
|
15
19
|
renderer_class.class_eval do
|
16
20
|
def render_exception_with_runtimeerror_notifier(env, exception)
|
@@ -25,16 +29,4 @@ module RuntimeerrorNotifier
|
|
25
29
|
end
|
26
30
|
end
|
27
31
|
end
|
28
|
-
class Tracker
|
29
|
-
def initialize(app, options={})
|
30
|
-
@app, @options = app, options
|
31
|
-
end
|
32
|
-
|
33
|
-
def call(env)
|
34
|
-
@app.call(env)
|
35
|
-
rescue Exception => ex
|
36
|
-
RuntimeerrorNotifier::Notifier.notification(env, ex, @options)
|
37
|
-
raise ex
|
38
|
-
end
|
39
|
-
end
|
40
32
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'rake'
|
2
|
+
|
3
|
+
module RuntimeerrorNotifier
|
4
|
+
module RakeHandler
|
5
|
+
def self.included(base)
|
6
|
+
base.class_eval do
|
7
|
+
alias_method :display_errors_without_runtimeerror, :display_error_message
|
8
|
+
alias_method :display_error_message, :display_errors_with_runtimeerror
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def display_errors_with_runtimeerror(excp)
|
13
|
+
RuntimeerrorNotifier::Notifier.notification(environment_info, excp)
|
14
|
+
display_errors_without_runtimeerror(excp)
|
15
|
+
end
|
16
|
+
|
17
|
+
def environment_info
|
18
|
+
{ component: 'rake', action: command_line_info, rake_env: ENV}
|
19
|
+
end
|
20
|
+
|
21
|
+
def command_line_info
|
22
|
+
ARGV.join(' ')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# Hook to capture rake errors
|
28
|
+
Rake.application.instance_eval do
|
29
|
+
class << self
|
30
|
+
include RuntimeerrorNotifier::RakeHandler
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module RuntimeerrorNotifier
|
2
|
+
class Tracker
|
3
|
+
def initialize(app, options={})
|
4
|
+
@app, @options = app, options
|
5
|
+
end
|
6
|
+
|
7
|
+
def call(env)
|
8
|
+
@app.call(env)
|
9
|
+
rescue Exception => ex
|
10
|
+
RuntimeerrorNotifier::Notifier.notification(env, ex, @options)
|
11
|
+
raise ex
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runtimeerror_notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ date: 2013-03-23 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
17
|
-
requirement: &
|
17
|
+
requirement: &70178578762780 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,54 @@ dependencies:
|
|
22
22
|
version: 0.10.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70178578762780
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: activesupport
|
28
|
+
requirement: &70178578761400 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *70178578761400
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: actionpack
|
39
|
+
requirement: &70178578760200 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
type: :runtime
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: *70178578760200
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: actionmailer
|
50
|
+
requirement: &70178578758740 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
type: :runtime
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: *70178578758740
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: rake
|
61
|
+
requirement: &70178578757440 !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
type: :runtime
|
68
|
+
prerelease: false
|
69
|
+
version_requirements: *70178578757440
|
26
70
|
- !ruby/object:Gem::Dependency
|
27
71
|
name: rspec
|
28
|
-
requirement: &
|
72
|
+
requirement: &70178578756820 !ruby/object:Gem::Requirement
|
29
73
|
none: false
|
30
74
|
requirements:
|
31
75
|
- - ~>
|
@@ -33,10 +77,10 @@ dependencies:
|
|
33
77
|
version: 2.11.0
|
34
78
|
type: :development
|
35
79
|
prerelease: false
|
36
|
-
version_requirements: *
|
80
|
+
version_requirements: *70178578756820
|
37
81
|
- !ruby/object:Gem::Dependency
|
38
82
|
name: shoulda
|
39
|
-
requirement: &
|
83
|
+
requirement: &70178578756140 !ruby/object:Gem::Requirement
|
40
84
|
none: false
|
41
85
|
requirements:
|
42
86
|
- - ~>
|
@@ -44,7 +88,18 @@ dependencies:
|
|
44
88
|
version: 3.3.2
|
45
89
|
type: :development
|
46
90
|
prerelease: false
|
47
|
-
version_requirements: *
|
91
|
+
version_requirements: *70178578756140
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: faker
|
94
|
+
requirement: &70178578754960 !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
96
|
+
requirements:
|
97
|
+
- - ! '>='
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
type: :development
|
101
|
+
prerelease: false
|
102
|
+
version_requirements: *70178578754960
|
48
103
|
description: This gem installs the agent of RuntimeError.net to your application.
|
49
104
|
It handles uncaught exceptions from your application and tightly integrates exceptions
|
50
105
|
with your project management tool.
|
@@ -59,6 +114,9 @@ files:
|
|
59
114
|
- lib/generators/runtimeerror_notifier/templates/initializer.rb
|
60
115
|
- lib/runtimeerror_notifier/missing_controller.rb
|
61
116
|
- lib/runtimeerror_notifier/notifier.rb
|
117
|
+
- lib/runtimeerror_notifier/railtie.rb
|
118
|
+
- lib/runtimeerror_notifier/rake_handler.rb
|
119
|
+
- lib/runtimeerror_notifier/tracker.rb
|
62
120
|
- lib/runtimeerror_notifier.rb
|
63
121
|
- templates/runtimeerror_notifier/_backtrace.html.erb
|
64
122
|
- templates/runtimeerror_notifier/_environment.html.erb
|