exception_handling 2.17.0.pre.tstarck.1 → 3.0.0.pre.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.tool-versions +1 -1
- data/Appraisals +0 -6
- data/CHANGELOG.md +8 -7
- data/Gemfile +1 -3
- data/Gemfile.lock +47 -125
- data/README.md +2 -39
- data/exception_handling.gemspec +3 -9
- data/gemfiles/rails_5.gemfile +1 -3
- data/gemfiles/rails_6.gemfile +1 -3
- data/gemfiles/rails_7.gemfile +1 -3
- data/lib/exception_handling/logging_methods.rb +1 -7
- data/lib/exception_handling/testing.rb +0 -13
- data/lib/exception_handling/version.rb +1 -1
- data/lib/exception_handling.rb +30 -221
- data/spec/spec_helper.rb +9 -42
- data/spec/unit/exception_handling/escalate_callback_spec.rb +2 -2
- data/spec/unit/exception_handling_spec.rb +28 -430
- metadata +6 -75
- data/lib/exception_handling/mailer.rb +0 -70
- data/lib/exception_handling/methods.rb +0 -54
- data/lib/exception_handling/sensu.rb +0 -28
- data/spec/unit/exception_handling/mailer_spec.rb +0 -97
- data/spec/unit/exception_handling/methods_spec.rb +0 -105
- data/spec/unit/exception_handling/sensu_spec.rb +0 -51
- data/views/exception_handling/mailer/escalate_custom.html.erb +0 -17
- data/views/exception_handling/mailer/escalation_notification.html.erb +0 -17
- data/views/exception_handling/mailer/log_parser_exception_notification.html.erb +0 -82
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac0b3024c051127bd91c798fe917137f450b3db8ebc315434ecfade3b8775279
|
4
|
+
data.tar.gz: 829cd3c05ca289525a789a5b8b93e61a1b996a7a407d91a182f0a126a5a15344
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6ff724591f83d687cd332e35b18a9407a97fd99182e7d255ec34e4a0eaed2dd729446df7c8639734d0338c816c12ed4803adf040a1252a0912e8d0c8035d4b2
|
7
|
+
data.tar.gz: aac19d62e8bd367eed9bb5dd3e80903161af053410f0ab4a5c251f5115e520ebf3d73d3f86e3789968234f2df2ed69b86454483ff029938854805c733246017e
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.2
|
data/.tool-versions
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby
|
1
|
+
ruby 3.1.2
|
data/Appraisals
CHANGED
@@ -1,19 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
appraise "rails-5" do
|
4
|
-
gem 'actionmailer', '~> 5.2'
|
5
|
-
gem 'actionpack', '~> 5.2'
|
6
4
|
gem 'activesupport', '~> 5.2'
|
7
5
|
end
|
8
6
|
|
9
7
|
appraise "rails-6" do
|
10
|
-
gem 'actionmailer', '~> 6.0'
|
11
|
-
gem 'actionpack', '~> 6.0'
|
12
8
|
gem 'activesupport', '~> 6.0'
|
13
9
|
end
|
14
10
|
|
15
11
|
appraise "rails-7" do
|
16
|
-
gem 'actionmailer', '~> 7.0'
|
17
|
-
gem 'actionpack', '~> 7.0'
|
18
12
|
gem 'activesupport', '~> 7.0'
|
19
13
|
end
|
data/CHANGELOG.md
CHANGED
@@ -4,18 +4,19 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
5
5
|
**Note:** this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
-
## [
|
7
|
+
## [3.0.0] - Unreleased
|
8
8
|
### Added
|
9
|
-
-
|
10
|
-
- `ExceptionHandling.add_honeybadger_tag_from_log_context`
|
11
|
-
- Added Ruby 3.2 and 3.3 to the CI test matrix
|
9
|
+
- Added explicit testing and support for Ruby 3.2 and 3.3
|
12
10
|
|
13
11
|
### Changed
|
14
|
-
-
|
12
|
+
- Changed `ExceptionHandling.email_environment` configuration to `ExceptionHandling.environment`
|
15
13
|
|
16
14
|
### Removed
|
17
|
-
- Removed
|
18
|
-
|
15
|
+
- Removed explicit testing of Rails 5
|
16
|
+
- Removed all emailing logic from the gem
|
17
|
+
- Removed all sensu alerting logic from the gem
|
18
|
+
- Removed `Methods` module
|
19
|
+
- Removed functionality from `ExceptionHandling.logger=` will implicitly extend the logger with `ContextualLogger::LoggerMixin`
|
19
20
|
|
20
21
|
## [2.16.0] - 2023-05-01
|
21
22
|
### Added
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,172 +1,94 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
exception_handling (
|
5
|
-
actionmailer (>= 5.2)
|
6
|
-
actionpack (>= 5.2)
|
4
|
+
exception_handling (3.0.0.pre.2)
|
7
5
|
activesupport (>= 5.2)
|
8
6
|
contextual_logger (~> 1.0)
|
9
7
|
escalate (~> 0.3)
|
10
|
-
eventmachine (~> 1.0)
|
11
8
|
invoca-utils (~> 0.3)
|
12
|
-
net-smtp
|
13
9
|
psych (~> 3.0)
|
14
10
|
|
15
11
|
GEM
|
16
12
|
remote: https://rubygems.org/
|
17
13
|
specs:
|
18
|
-
|
19
|
-
actionpack (= 6.1.7.6)
|
20
|
-
actionview (= 6.1.7.6)
|
21
|
-
activejob (= 6.1.7.6)
|
22
|
-
activesupport (= 6.1.7.6)
|
23
|
-
mail (~> 2.5, >= 2.5.4)
|
24
|
-
rails-dom-testing (~> 2.0)
|
25
|
-
actionpack (6.1.7.6)
|
26
|
-
actionview (= 6.1.7.6)
|
27
|
-
activesupport (= 6.1.7.6)
|
28
|
-
rack (~> 2.0, >= 2.0.9)
|
29
|
-
rack-test (>= 0.6.3)
|
30
|
-
rails-dom-testing (~> 2.0)
|
31
|
-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
32
|
-
actionview (6.1.7.6)
|
33
|
-
activesupport (= 6.1.7.6)
|
34
|
-
builder (~> 3.1)
|
35
|
-
erubi (~> 1.4)
|
36
|
-
rails-dom-testing (~> 2.0)
|
37
|
-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
38
|
-
activejob (6.1.7.6)
|
39
|
-
activesupport (= 6.1.7.6)
|
40
|
-
globalid (>= 0.3.6)
|
41
|
-
activesupport (6.1.7.6)
|
14
|
+
activesupport (6.0.4.7)
|
42
15
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
43
|
-
i18n (>=
|
44
|
-
minitest (
|
45
|
-
tzinfo (~>
|
46
|
-
zeitwerk (~> 2.
|
47
|
-
appraisal (2.
|
16
|
+
i18n (>= 0.7, < 2)
|
17
|
+
minitest (~> 5.1)
|
18
|
+
tzinfo (~> 1.1)
|
19
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
20
|
+
appraisal (2.2.0)
|
48
21
|
bundler
|
49
22
|
rake
|
50
23
|
thor (>= 0.14.0)
|
51
|
-
ast (2.4.
|
52
|
-
builder (3.2.4)
|
24
|
+
ast (2.4.0)
|
53
25
|
byebug (11.1.3)
|
54
26
|
coderay (1.1.3)
|
55
|
-
concurrent-ruby (1.
|
27
|
+
concurrent-ruby (1.1.10)
|
56
28
|
contextual_logger (1.3.0)
|
57
29
|
activesupport (< 7.1)
|
58
30
|
json
|
59
|
-
|
60
|
-
date (3.3.4)
|
61
|
-
diff-lcs (1.5.1)
|
62
|
-
erubi (1.12.0)
|
31
|
+
diff-lcs (1.5.0)
|
63
32
|
escalate (0.3.0)
|
64
|
-
|
65
|
-
|
66
|
-
activesupport (>= 6.1)
|
67
|
-
honeybadger (4.12.2)
|
68
|
-
i18n (1.14.1)
|
33
|
+
honeybadger (4.11.0)
|
34
|
+
i18n (1.10.0)
|
69
35
|
concurrent-ruby (~> 1.0)
|
70
36
|
invoca-utils (0.5.1)
|
71
37
|
activesupport (>= 5.0)
|
38
|
+
jaro_winkler (1.5.3)
|
72
39
|
json (2.7.1)
|
73
|
-
language_server-protocol (3.17.0.3)
|
74
|
-
loofah (2.22.0)
|
75
|
-
crass (~> 1.0.2)
|
76
|
-
nokogiri (>= 1.12.0)
|
77
|
-
mail (2.8.1)
|
78
|
-
mini_mime (>= 0.1.1)
|
79
|
-
net-imap
|
80
|
-
net-pop
|
81
|
-
net-smtp
|
82
40
|
method_source (1.0.0)
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
net-protocol
|
89
|
-
net-pop (0.1.2)
|
90
|
-
net-protocol
|
91
|
-
net-protocol (0.2.2)
|
92
|
-
timeout
|
93
|
-
net-smtp (0.4.0.1)
|
94
|
-
net-protocol
|
95
|
-
nokogiri (1.15.5)
|
96
|
-
mini_portile2 (~> 2.8.2)
|
97
|
-
racc (~> 1.4)
|
98
|
-
parallel (1.24.0)
|
99
|
-
parser (3.3.0.5)
|
100
|
-
ast (~> 2.4.1)
|
101
|
-
racc
|
102
|
-
power_assert (2.0.3)
|
41
|
+
minitest (5.15.0)
|
42
|
+
parallel (1.17.0)
|
43
|
+
parser (2.6.3.0)
|
44
|
+
ast (~> 2.4.0)
|
45
|
+
power_assert (1.2.0)
|
103
46
|
pry (0.14.2)
|
104
47
|
coderay (~> 1.1)
|
105
48
|
method_source (~> 1.0)
|
106
|
-
pry-byebug (3.
|
49
|
+
pry-byebug (3.8.0)
|
107
50
|
byebug (~> 11.0)
|
108
|
-
pry (
|
51
|
+
pry (~> 0.10)
|
109
52
|
psych (3.3.4)
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
loofah (~> 2.21)
|
120
|
-
nokogiri (~> 1.14)
|
121
|
-
rainbow (3.1.1)
|
122
|
-
rake (13.1.0)
|
123
|
-
regexp_parser (2.9.0)
|
124
|
-
rexml (3.2.6)
|
125
|
-
rspec (3.13.0)
|
126
|
-
rspec-core (~> 3.13.0)
|
127
|
-
rspec-expectations (~> 3.13.0)
|
128
|
-
rspec-mocks (~> 3.13.0)
|
129
|
-
rspec-core (3.13.0)
|
130
|
-
rspec-support (~> 3.13.0)
|
131
|
-
rspec-expectations (3.13.0)
|
53
|
+
rainbow (3.0.0)
|
54
|
+
rake (13.0.1)
|
55
|
+
rspec (3.9.0)
|
56
|
+
rspec-core (~> 3.9.0)
|
57
|
+
rspec-expectations (~> 3.9.0)
|
58
|
+
rspec-mocks (~> 3.9.0)
|
59
|
+
rspec-core (3.9.2)
|
60
|
+
rspec-support (~> 3.9.3)
|
61
|
+
rspec-expectations (3.9.2)
|
132
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
133
|
-
rspec-support (~> 3.
|
134
|
-
rspec-mocks (3.
|
63
|
+
rspec-support (~> 3.9.0)
|
64
|
+
rspec-mocks (3.9.1)
|
135
65
|
diff-lcs (>= 1.2.0, < 2.0)
|
136
|
-
rspec-support (~> 3.
|
137
|
-
rspec-support (3.
|
138
|
-
rspec_junit_formatter (0.
|
66
|
+
rspec-support (~> 3.9.0)
|
67
|
+
rspec-support (3.9.4)
|
68
|
+
rspec_junit_formatter (0.4.1)
|
139
69
|
rspec-core (>= 2, < 4, != 2.12.0)
|
140
|
-
rubocop (
|
141
|
-
|
142
|
-
language_server-protocol (>= 3.17.0)
|
70
|
+
rubocop (0.74.0)
|
71
|
+
jaro_winkler (~> 1.5.1)
|
143
72
|
parallel (~> 1.10)
|
144
|
-
parser (>=
|
73
|
+
parser (>= 2.6)
|
145
74
|
rainbow (>= 2.2.2, < 4.0)
|
146
|
-
regexp_parser (>= 1.8, < 3.0)
|
147
|
-
rexml (>= 3.2.5, < 4.0)
|
148
|
-
rubocop-ast (>= 1.30.0, < 2.0)
|
149
75
|
ruby-progressbar (~> 1.7)
|
150
|
-
unicode-display_width (>=
|
151
|
-
|
152
|
-
|
153
|
-
ruby-progressbar (1.13.0)
|
154
|
-
test-unit (3.6.1)
|
76
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
77
|
+
ruby-progressbar (1.10.1)
|
78
|
+
test-unit (3.3.6)
|
155
79
|
power_assert
|
156
|
-
thor (1.
|
157
|
-
|
158
|
-
tzinfo (2.
|
159
|
-
|
160
|
-
unicode-display_width (
|
161
|
-
zeitwerk (2.
|
80
|
+
thor (1.0.1)
|
81
|
+
thread_safe (0.3.6)
|
82
|
+
tzinfo (1.2.9)
|
83
|
+
thread_safe (~> 0.1)
|
84
|
+
unicode-display_width (1.6.0)
|
85
|
+
zeitwerk (2.5.4)
|
162
86
|
|
163
87
|
PLATFORMS
|
164
88
|
ruby
|
165
89
|
|
166
90
|
DEPENDENCIES
|
167
|
-
|
168
|
-
actionpack (~> 6.0)
|
169
|
-
activesupport (~> 6.0)
|
91
|
+
activesupport
|
170
92
|
appraisal (~> 2.2)
|
171
93
|
exception_handling!
|
172
94
|
honeybadger (~> 4.11)
|
data/README.md
CHANGED
@@ -30,21 +30,12 @@ require "exception_handling"
|
|
30
30
|
|
31
31
|
# required
|
32
32
|
ExceptionHandling.server_name = Cluster['server_name']
|
33
|
-
ExceptionHandling.sender_address = %("Exceptions" <exceptions@example.com>)
|
34
|
-
ExceptionHandling.exception_recipients = ['exceptions@example.com']
|
35
33
|
ExceptionHandling.logger = Rails.logger
|
36
34
|
|
37
35
|
# optional
|
38
|
-
ExceptionHandling.escalation_recipients = ['escalation@example.com']
|
39
36
|
ExceptionHandling.filter_list_filename = "#{Rails.root}/config/exception_filters.yml"
|
40
|
-
ExceptionHandling.
|
41
|
-
ExceptionHandling.eventmachine_safe = false
|
42
|
-
ExceptionHandling.eventmachine_synchrony = false
|
43
|
-
ExceptionHandling.sensu_host = "127.0.0.1"
|
44
|
-
ExceptionHandling.sensu_port = 3030
|
45
|
-
ExceptionHandling.sensu_prefix = ""
|
37
|
+
ExceptionHandling.environment = Rails.env
|
46
38
|
ExceptionHandling.honeybadger_auto_tagger = ->(exception) { [] } # See "Automatically Tagging Exceptions" section below for examples
|
47
|
-
ExceptionHandling.add_honeybadger_tag_from_log_context("tag-name", path: ["path", "in", "log", "context"])
|
48
39
|
```
|
49
40
|
|
50
41
|
## Usage
|
@@ -81,7 +72,7 @@ log_error(ex, "A specific error occurred.", honeybadger_tags: ["critical", "sequ
|
|
81
72
|
|
82
73
|
**Note**: Manual tags will be merged with any automatic tags.
|
83
74
|
|
84
|
-
#### Automatically Tagging Exceptions
|
75
|
+
#### Automatically Tagging Exceptions (`honeybadger_auto_tagger=`)
|
85
76
|
|
86
77
|
Configure exception handling so that you can automatically apply multiple tags to exceptions sent to honeybadger.
|
87
78
|
|
@@ -99,34 +90,6 @@ Example to disable auto-tagging:
|
|
99
90
|
ExceptionHandling.honeybadger_auto_tagger = nil
|
100
91
|
```
|
101
92
|
|
102
|
-
#### Automatically Tagging Exceptions from Log Context (`add_honeybadger_tag_from_log_context`)
|
103
|
-
|
104
|
-
Add a tag to exceptions sent to honeybadger based on a value in the log context.
|
105
|
-
|
106
|
-
To configure this, use the `add_honeybadger_tag_from_log_context` method.
|
107
|
-
```ruby
|
108
|
-
ExceptionHandling.add_honeybadger_tag_from_log_context("kubernetes_context", path: ["kubernetes", "context"])
|
109
|
-
```
|
110
|
-
|
111
|
-
This will add a tag to the exception if the log context contains a value at the specified path: "kubernetes" => { "context" => "value" }.
|
112
|
-
|
113
|
-
For example:
|
114
|
-
```ruby
|
115
|
-
ExceptionHandling.logger.with_context("kubernetes" => { "context" => "local" }) do
|
116
|
-
log_error(ex, "A specific error occurred.")
|
117
|
-
end
|
118
|
-
```
|
119
|
-
|
120
|
-
This will add the following tag to the exception sent to honeybadger:
|
121
|
-
```
|
122
|
-
kubernetes_context:local
|
123
|
-
```
|
124
|
-
|
125
|
-
To clear all automated tagging from the log context, use the `clear_honeybadger_tags_from_log_context` method.
|
126
|
-
```ruby
|
127
|
-
ExceptionHandling.clear_honeybadger_tags_from_log_context
|
128
|
-
```
|
129
|
-
|
130
93
|
## Custom Hooks
|
131
94
|
|
132
95
|
### custom_data_hook
|
data/exception_handling.gemspec
CHANGED
@@ -5,8 +5,8 @@ require File.expand_path('lib/exception_handling/version', __dir__)
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.authors = ["Invoca"]
|
7
7
|
spec.email = ["development@invoca.com"]
|
8
|
-
spec.description = 'Exception handling logger
|
9
|
-
spec.summary = "Invoca's exception handling logger
|
8
|
+
spec.description = 'Exception handling logger'
|
9
|
+
spec.summary = "Invoca's exception handling logger layer, based on exception_notifier."
|
10
10
|
spec.homepage = "https://github.com/Invoca/exception_handling"
|
11
11
|
|
12
12
|
spec.files = `git ls-files`.split("\n")
|
@@ -15,20 +15,14 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.name = "exception_handling"
|
16
16
|
spec.require_paths = ["lib"]
|
17
17
|
spec.version = ExceptionHandling::VERSION
|
18
|
-
spec.metadata
|
18
|
+
spec.metadata = {
|
19
19
|
"source_code_uri" => "https://github.com/Invoca/exception_handling",
|
20
20
|
"allowed_push_host" => "https://rubygems.org"
|
21
21
|
}
|
22
22
|
|
23
|
-
spec.required_ruby_version = '>= 2.7.0'
|
24
|
-
|
25
|
-
spec.add_dependency 'actionmailer', '>= 5.2'
|
26
|
-
spec.add_dependency 'actionpack', '>= 5.2'
|
27
23
|
spec.add_dependency 'activesupport', '>= 5.2'
|
28
24
|
spec.add_dependency 'contextual_logger', '~> 1.0'
|
29
25
|
spec.add_dependency 'escalate', '~> 0.3'
|
30
|
-
spec.add_dependency 'eventmachine', '~> 1.0'
|
31
26
|
spec.add_dependency 'invoca-utils', '~> 0.3'
|
32
27
|
spec.add_dependency 'psych', '~> 3.0'
|
33
|
-
spec.add_dependency 'net-smtp'
|
34
28
|
end
|
data/gemfiles/rails_5.gemfile
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
+
gem "activesupport", "~> 5.2"
|
5
6
|
gem "appraisal", "~> 2.2"
|
6
7
|
gem "honeybadger", "~> 4.11"
|
7
8
|
gem "pry"
|
@@ -11,8 +12,5 @@ gem "rspec"
|
|
11
12
|
gem "rspec_junit_formatter"
|
12
13
|
gem "rubocop"
|
13
14
|
gem "test-unit"
|
14
|
-
gem "actionmailer", "~> 5.2"
|
15
|
-
gem "actionpack", "~> 5.2"
|
16
|
-
gem "activesupport", "~> 5.2"
|
17
15
|
|
18
16
|
gemspec path: "../"
|
data/gemfiles/rails_6.gemfile
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
+
gem "activesupport", "~> 6.0"
|
5
6
|
gem "appraisal", "~> 2.2"
|
6
7
|
gem "honeybadger", "~> 4.11"
|
7
8
|
gem "pry"
|
@@ -11,8 +12,5 @@ gem "rspec"
|
|
11
12
|
gem "rspec_junit_formatter"
|
12
13
|
gem "rubocop"
|
13
14
|
gem "test-unit"
|
14
|
-
gem "actionmailer", "~> 6.0"
|
15
|
-
gem "actionpack", "~> 6.0"
|
16
|
-
gem "activesupport", "~> 6.0"
|
17
15
|
|
18
16
|
gemspec path: "../"
|
data/gemfiles/rails_7.gemfile
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
+
gem "activesupport", "~> 7.0"
|
5
6
|
gem "appraisal", "~> 2.2"
|
6
7
|
gem "honeybadger", "~> 4.11"
|
7
8
|
gem "pry"
|
@@ -11,8 +12,5 @@ gem "rspec"
|
|
11
12
|
gem "rspec_junit_formatter"
|
12
13
|
gem "rubocop"
|
13
14
|
gem "test-unit"
|
14
|
-
gem "actionmailer", "~> 7.0"
|
15
|
-
gem "actionpack", "~> 7.0"
|
16
|
-
gem "activesupport", "~> 7.0"
|
17
15
|
|
18
16
|
gemspec path: "../"
|
@@ -9,7 +9,7 @@ module ExceptionHandling
|
|
9
9
|
|
10
10
|
protected
|
11
11
|
|
12
|
-
delegate :log_error_rack, :log_warning, :log_info, :log_debug, :
|
12
|
+
delegate :log_error_rack, :log_warning, :log_info, :log_debug, :log_error, to: ExceptionHandling
|
13
13
|
|
14
14
|
def ensure_safe(exception_context = "")
|
15
15
|
yield
|
@@ -17,11 +17,5 @@ module ExceptionHandling
|
|
17
17
|
log_error ex, exception_context
|
18
18
|
nil
|
19
19
|
end
|
20
|
-
|
21
|
-
def ensure_alert(*args)
|
22
|
-
ExceptionHandling.ensure_alert(*args) do
|
23
|
-
yield
|
24
|
-
end
|
25
|
-
end
|
26
20
|
end
|
27
21
|
end
|
@@ -60,18 +60,5 @@ module ExceptionHandling
|
|
60
60
|
"LoggingMethodsControllerStub"
|
61
61
|
end
|
62
62
|
end
|
63
|
-
|
64
|
-
class MethodsControllerStub < ControllerStubBase
|
65
|
-
include ExceptionHandling::Methods
|
66
|
-
set_long_controller_action_timeout 2
|
67
|
-
|
68
|
-
def simulate_around_filter(&block)
|
69
|
-
set_current_controller(&block)
|
70
|
-
end
|
71
|
-
|
72
|
-
def controller_name
|
73
|
-
"MethodsControllerStub"
|
74
|
-
end
|
75
|
-
end
|
76
63
|
end
|
77
64
|
end
|