exception_handling 2.9.0 → 3.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +0 -3
- data/.ruby-version +1 -1
- data/Gemfile +16 -11
- data/Gemfile.lock +104 -96
- data/README.md +3 -7
- data/Rakefile +11 -8
- data/exception_handling.gemspec +10 -10
- data/lib/exception_handling/exception_info.rb +10 -13
- data/lib/exception_handling/honeybadger_callbacks.rb +1 -1
- data/lib/exception_handling/log_stub_error.rb +1 -2
- data/lib/exception_handling/methods.rb +53 -6
- data/lib/exception_handling/testing.rb +10 -20
- data/lib/exception_handling/version.rb +1 -1
- data/lib/exception_handling.rb +13 -42
- data/semaphore_ci/setup.sh +3 -0
- data/{spec → test}/helpers/controller_helpers.rb +0 -0
- data/{spec → test}/helpers/exception_helpers.rb +2 -2
- data/{spec/spec_helper.rb → test/test_helper.rb} +42 -63
- data/test/unit/exception_handling/exception_catalog_test.rb +85 -0
- data/test/unit/exception_handling/exception_description_test.rb +82 -0
- data/{spec/unit/exception_handling/exception_info_spec.rb → test/unit/exception_handling/exception_info_test.rb} +114 -153
- data/{spec/unit/exception_handling/honeybadger_callbacks_spec.rb → test/unit/exception_handling/honeybadger_callbacks_test.rb} +20 -20
- data/{spec/unit/exception_handling/log_error_stub_spec.rb → test/unit/exception_handling/log_error_stub_test.rb} +22 -38
- data/{spec/unit/exception_handling/mailer_spec.rb → test/unit/exception_handling/mailer_test.rb} +18 -17
- data/test/unit/exception_handling/methods_test.rb +84 -0
- data/test/unit/exception_handling/sensu_test.rb +52 -0
- data/test/unit/exception_handling_test.rb +1109 -0
- metadata +53 -86
- data/.jenkins/Jenkinsfile +0 -113
- data/.jenkins/ruby_build_pod.yml +0 -18
- data/.rspec +0 -3
- data/Appraisals +0 -19
- data/CHANGELOG.md +0 -77
- data/gemfiles/.bundle/config +0 -2
- data/gemfiles/rails_4.gemfile +0 -19
- data/gemfiles/rails_5.gemfile +0 -19
- data/gemfiles/rails_6.gemfile +0 -19
- data/lib/exception_handling/escalate_callback.rb +0 -19
- data/lib/exception_handling/logging_methods.rb +0 -27
- data/spec/rake_test_warning_false.rb +0 -20
- data/spec/unit/exception_handling/escalate_callback_spec.rb +0 -81
- data/spec/unit/exception_handling/exception_catalog_spec.rb +0 -85
- data/spec/unit/exception_handling/exception_description_spec.rb +0 -82
- data/spec/unit/exception_handling/logging_methods_spec.rb +0 -38
- data/spec/unit/exception_handling/methods_spec.rb +0 -105
- data/spec/unit/exception_handling/sensu_spec.rb +0 -51
- data/spec/unit/exception_handling_spec.rb +0 -1249
metadata
CHANGED
@@ -1,146 +1,123 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exception_handling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Colin Kelley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.2'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '7.0'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '4.2'
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '7.0'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: actionpack
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
|
-
- - "
|
31
|
+
- - "~>"
|
38
32
|
- !ruby/object:Gem::Version
|
39
33
|
version: '4.2'
|
40
|
-
- - "<"
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '7.0'
|
43
34
|
type: :runtime
|
44
35
|
prerelease: false
|
45
36
|
version_requirements: !ruby/object:Gem::Requirement
|
46
37
|
requirements:
|
47
|
-
- - "
|
38
|
+
- - "~>"
|
48
39
|
- !ruby/object:Gem::Version
|
49
40
|
version: '4.2'
|
50
|
-
- - "<"
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: '7.0'
|
53
41
|
- !ruby/object:Gem::Dependency
|
54
42
|
name: activesupport
|
55
43
|
requirement: !ruby/object:Gem::Requirement
|
56
44
|
requirements:
|
57
|
-
- - "
|
45
|
+
- - "~>"
|
58
46
|
- !ruby/object:Gem::Version
|
59
47
|
version: '4.2'
|
60
|
-
- - "<"
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '7.0'
|
63
48
|
type: :runtime
|
64
49
|
prerelease: false
|
65
50
|
version_requirements: !ruby/object:Gem::Requirement
|
66
51
|
requirements:
|
67
|
-
- - "
|
52
|
+
- - "~>"
|
68
53
|
- !ruby/object:Gem::Version
|
69
54
|
version: '4.2'
|
70
|
-
- - "<"
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: '7.0'
|
73
55
|
- !ruby/object:Gem::Dependency
|
74
56
|
name: contextual_logger
|
75
57
|
requirement: !ruby/object:Gem::Requirement
|
76
58
|
requirements:
|
77
|
-
- - "
|
59
|
+
- - ">="
|
78
60
|
- !ruby/object:Gem::Version
|
79
|
-
version: '0
|
61
|
+
version: '0'
|
80
62
|
type: :runtime
|
81
63
|
prerelease: false
|
82
64
|
version_requirements: !ruby/object:Gem::Requirement
|
83
65
|
requirements:
|
84
|
-
- - "
|
66
|
+
- - ">="
|
85
67
|
- !ruby/object:Gem::Version
|
86
|
-
version: '0
|
68
|
+
version: '0'
|
87
69
|
- !ruby/object:Gem::Dependency
|
88
|
-
name:
|
70
|
+
name: eventmachine
|
89
71
|
requirement: !ruby/object:Gem::Requirement
|
90
72
|
requirements:
|
91
73
|
- - "~>"
|
92
74
|
- !ruby/object:Gem::Version
|
93
|
-
version: '0
|
75
|
+
version: '1.0'
|
94
76
|
type: :runtime
|
95
77
|
prerelease: false
|
96
78
|
version_requirements: !ruby/object:Gem::Requirement
|
97
79
|
requirements:
|
98
80
|
- - "~>"
|
99
81
|
- !ruby/object:Gem::Version
|
100
|
-
version: '0
|
82
|
+
version: '1.0'
|
101
83
|
- !ruby/object:Gem::Dependency
|
102
|
-
name:
|
84
|
+
name: hobo_support
|
103
85
|
requirement: !ruby/object:Gem::Requirement
|
104
86
|
requirements:
|
105
|
-
- - "
|
87
|
+
- - ">="
|
106
88
|
- !ruby/object:Gem::Version
|
107
|
-
version: '
|
89
|
+
version: '0'
|
108
90
|
type: :runtime
|
109
91
|
prerelease: false
|
110
92
|
version_requirements: !ruby/object:Gem::Requirement
|
111
93
|
requirements:
|
112
|
-
- - "
|
94
|
+
- - ">="
|
113
95
|
- !ruby/object:Gem::Version
|
114
|
-
version: '
|
96
|
+
version: '0'
|
115
97
|
- !ruby/object:Gem::Dependency
|
116
98
|
name: invoca-utils
|
117
99
|
requirement: !ruby/object:Gem::Requirement
|
118
100
|
requirements:
|
119
101
|
- - "~>"
|
120
102
|
- !ruby/object:Gem::Version
|
121
|
-
version: '0.
|
103
|
+
version: '0.0'
|
122
104
|
type: :runtime
|
123
105
|
prerelease: false
|
124
106
|
version_requirements: !ruby/object:Gem::Requirement
|
125
107
|
requirements:
|
126
108
|
- - "~>"
|
127
109
|
- !ruby/object:Gem::Version
|
128
|
-
version: '0.
|
110
|
+
version: '0.0'
|
129
111
|
description: Exception handling logger/emailer
|
130
112
|
email:
|
131
|
-
-
|
113
|
+
- colindkelley@gmail.com
|
132
114
|
executables: []
|
133
115
|
extensions: []
|
134
116
|
extra_rdoc_files: []
|
135
117
|
files:
|
136
118
|
- ".gitignore"
|
137
|
-
- ".jenkins/Jenkinsfile"
|
138
|
-
- ".jenkins/ruby_build_pod.yml"
|
139
|
-
- ".rspec"
|
140
119
|
- ".rubocop.yml"
|
141
120
|
- ".ruby-version"
|
142
|
-
- Appraisals
|
143
|
-
- CHANGELOG.md
|
144
121
|
- Gemfile
|
145
122
|
- Gemfile.lock
|
146
123
|
- LICENSE
|
@@ -148,38 +125,30 @@ files:
|
|
148
125
|
- Rakefile
|
149
126
|
- config/exception_filters.yml
|
150
127
|
- exception_handling.gemspec
|
151
|
-
- gemfiles/.bundle/config
|
152
|
-
- gemfiles/rails_4.gemfile
|
153
|
-
- gemfiles/rails_5.gemfile
|
154
|
-
- gemfiles/rails_6.gemfile
|
155
128
|
- lib/exception_handling.rb
|
156
|
-
- lib/exception_handling/escalate_callback.rb
|
157
129
|
- lib/exception_handling/exception_catalog.rb
|
158
130
|
- lib/exception_handling/exception_description.rb
|
159
131
|
- lib/exception_handling/exception_info.rb
|
160
132
|
- lib/exception_handling/honeybadger_callbacks.rb
|
161
133
|
- lib/exception_handling/log_stub_error.rb
|
162
|
-
- lib/exception_handling/logging_methods.rb
|
163
134
|
- lib/exception_handling/mailer.rb
|
164
135
|
- lib/exception_handling/methods.rb
|
165
136
|
- lib/exception_handling/sensu.rb
|
166
137
|
- lib/exception_handling/testing.rb
|
167
138
|
- lib/exception_handling/version.rb
|
168
|
-
-
|
169
|
-
-
|
170
|
-
-
|
171
|
-
-
|
172
|
-
-
|
173
|
-
-
|
174
|
-
-
|
175
|
-
-
|
176
|
-
-
|
177
|
-
-
|
178
|
-
-
|
179
|
-
-
|
180
|
-
-
|
181
|
-
- spec/unit/exception_handling/sensu_spec.rb
|
182
|
-
- spec/unit/exception_handling_spec.rb
|
139
|
+
- semaphore_ci/setup.sh
|
140
|
+
- test/helpers/controller_helpers.rb
|
141
|
+
- test/helpers/exception_helpers.rb
|
142
|
+
- test/test_helper.rb
|
143
|
+
- test/unit/exception_handling/exception_catalog_test.rb
|
144
|
+
- test/unit/exception_handling/exception_description_test.rb
|
145
|
+
- test/unit/exception_handling/exception_info_test.rb
|
146
|
+
- test/unit/exception_handling/honeybadger_callbacks_test.rb
|
147
|
+
- test/unit/exception_handling/log_error_stub_test.rb
|
148
|
+
- test/unit/exception_handling/mailer_test.rb
|
149
|
+
- test/unit/exception_handling/methods_test.rb
|
150
|
+
- test/unit/exception_handling/sensu_test.rb
|
151
|
+
- test/unit/exception_handling_test.rb
|
183
152
|
- views/exception_handling/mailer/escalate_custom.html.erb
|
184
153
|
- views/exception_handling/mailer/escalation_notification.html.erb
|
185
154
|
- views/exception_handling/mailer/log_parser_exception_notification.html.erb
|
@@ -199,28 +168,26 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
199
168
|
version: '0'
|
200
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
170
|
requirements:
|
202
|
-
- - "
|
171
|
+
- - ">"
|
203
172
|
- !ruby/object:Gem::Version
|
204
|
-
version:
|
173
|
+
version: 1.3.1
|
205
174
|
requirements: []
|
206
|
-
|
175
|
+
rubyforge_project:
|
176
|
+
rubygems_version: 2.6.13
|
207
177
|
signing_key:
|
208
178
|
specification_version: 4
|
209
179
|
summary: Invoca's exception handling logger/emailer layer, based on exception_notifier.
|
210
180
|
Works with Rails or EventMachine or EventMachine+Synchrony.
|
211
181
|
test_files:
|
212
|
-
-
|
213
|
-
-
|
214
|
-
-
|
215
|
-
-
|
216
|
-
-
|
217
|
-
-
|
218
|
-
-
|
219
|
-
-
|
220
|
-
-
|
221
|
-
-
|
222
|
-
-
|
223
|
-
-
|
224
|
-
- spec/unit/exception_handling/methods_spec.rb
|
225
|
-
- spec/unit/exception_handling/sensu_spec.rb
|
226
|
-
- spec/unit/exception_handling_spec.rb
|
182
|
+
- test/helpers/controller_helpers.rb
|
183
|
+
- test/helpers/exception_helpers.rb
|
184
|
+
- test/test_helper.rb
|
185
|
+
- test/unit/exception_handling/exception_catalog_test.rb
|
186
|
+
- test/unit/exception_handling/exception_description_test.rb
|
187
|
+
- test/unit/exception_handling/exception_info_test.rb
|
188
|
+
- test/unit/exception_handling/honeybadger_callbacks_test.rb
|
189
|
+
- test/unit/exception_handling/log_error_stub_test.rb
|
190
|
+
- test/unit/exception_handling/mailer_test.rb
|
191
|
+
- test/unit/exception_handling/methods_test.rb
|
192
|
+
- test/unit/exception_handling/sensu_test.rb
|
193
|
+
- test/unit/exception_handling_test.rb
|
data/.jenkins/Jenkinsfile
DELETED
@@ -1,113 +0,0 @@
|
|
1
|
-
#!/usr/bin/groovy
|
2
|
-
@Library('jenkins-pipeline@v0.4.5')
|
3
|
-
import com.invoca.docker.*;
|
4
|
-
pipeline {
|
5
|
-
agent {
|
6
|
-
kubernetes {
|
7
|
-
defaultContainer "ruby"
|
8
|
-
yamlFile ".jenkins/ruby_build_pod.yml"
|
9
|
-
}
|
10
|
-
}
|
11
|
-
|
12
|
-
environment {
|
13
|
-
GITHUB_TOKEN = credentials('github_token')
|
14
|
-
GITHUB_KEY = credentials('github_key')
|
15
|
-
BUNDLE_GEM__FURY__IO = credentials('gemfury_deploy_token')
|
16
|
-
}
|
17
|
-
|
18
|
-
stages {
|
19
|
-
stage('Setup') {
|
20
|
-
steps {
|
21
|
-
script {
|
22
|
-
updateGitHubStatus('clean-build', 'pending', 'Unit tests.')
|
23
|
-
sh '''
|
24
|
-
# get SSH setup inside the container
|
25
|
-
eval `ssh-agent -s`
|
26
|
-
echo "$GITHUB_KEY" | ssh-add -
|
27
|
-
mkdir -p /root/.ssh
|
28
|
-
ssh-keyscan -t rsa github.com > /root/.ssh/known_hosts
|
29
|
-
|
30
|
-
bundle install
|
31
|
-
bundle exec appraisal install
|
32
|
-
'''
|
33
|
-
}
|
34
|
-
}
|
35
|
-
}
|
36
|
-
stage('Appraisals') {
|
37
|
-
parallel {
|
38
|
-
stage('Current') {
|
39
|
-
environment {
|
40
|
-
JUNIT_OUTPUT = 'spec/reports/current'
|
41
|
-
}
|
42
|
-
|
43
|
-
steps {
|
44
|
-
sh "bundle exec rspec --format RspecJunitFormatter --out ${JUNIT_OUTPUT}/rspec.xml"
|
45
|
-
}
|
46
|
-
|
47
|
-
post {
|
48
|
-
always { junit "${JUNIT_OUTPUT}/*.xml" }
|
49
|
-
}
|
50
|
-
}
|
51
|
-
|
52
|
-
stage('Rails 4') {
|
53
|
-
environment {
|
54
|
-
JUNIT_OUTPUT = 'spec/reports/rails-4'
|
55
|
-
}
|
56
|
-
|
57
|
-
steps {
|
58
|
-
sh "bundle exec appraisal rails-4 rspec --format RspecJunitFormatter --out ${JUNIT_OUTPUT}/rspec.xml"
|
59
|
-
}
|
60
|
-
|
61
|
-
post {
|
62
|
-
always { junit "${JUNIT_OUTPUT}/*.xml" }
|
63
|
-
}
|
64
|
-
}
|
65
|
-
|
66
|
-
stage('Rails 5') {
|
67
|
-
environment {
|
68
|
-
JUNIT_OUTPUT = 'spec/reports/rails-5'
|
69
|
-
}
|
70
|
-
|
71
|
-
steps {
|
72
|
-
sh "bundle exec appraisal rails-5 rspec --format RspecJunitFormatter --out ${JUNIT_OUTPUT}/rspec.xml"
|
73
|
-
}
|
74
|
-
|
75
|
-
post {
|
76
|
-
always { junit "${JUNIT_OUTPUT}/*.xml" }
|
77
|
-
}
|
78
|
-
}
|
79
|
-
|
80
|
-
stage('Rails 6') {
|
81
|
-
environment {
|
82
|
-
JUNIT_OUTPUT = 'spec/reports/rails-6'
|
83
|
-
}
|
84
|
-
|
85
|
-
steps {
|
86
|
-
sh "bundle exec appraisal rails-6 rspec --format RspecJunitFormatter --out ${JUNIT_OUTPUT}/rspec.xml"
|
87
|
-
}
|
88
|
-
|
89
|
-
post {
|
90
|
-
always { junit "${JUNIT_OUTPUT}/*.xml" }
|
91
|
-
}
|
92
|
-
}
|
93
|
-
}
|
94
|
-
|
95
|
-
post {
|
96
|
-
success { updateGitHubStatus('clean-build', 'success', 'Unit tests.') }
|
97
|
-
failure { updateGitHubStatus('clean-build', 'failure', 'Unit tests.') }
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
}
|
102
|
-
|
103
|
-
void updateGitHubStatus(String context, String status, String description) {
|
104
|
-
gitHubStatus([
|
105
|
-
repoSlug: 'Invoca/exception_handling',
|
106
|
-
sha: env.GIT_COMMIT,
|
107
|
-
description: description,
|
108
|
-
context: context,
|
109
|
-
targetURL: env.RUN_DISPLAY_URL,
|
110
|
-
token: env.GITHUB_TOKEN,
|
111
|
-
status: status
|
112
|
-
])
|
113
|
-
}
|
data/.jenkins/ruby_build_pod.yml
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
---
|
2
|
-
apiVersion: v1
|
3
|
-
kind: Pod
|
4
|
-
metadata:
|
5
|
-
labels:
|
6
|
-
jenkins/exception-handling: 'true'
|
7
|
-
namespace: jenkins
|
8
|
-
name: exception-handling
|
9
|
-
spec:
|
10
|
-
containers:
|
11
|
-
- name: ruby
|
12
|
-
image: ruby:2.6.5
|
13
|
-
tty: true
|
14
|
-
resources:
|
15
|
-
requests:
|
16
|
-
memory: "100Mi"
|
17
|
-
command:
|
18
|
-
- cat
|
data/.rspec
DELETED
data/Appraisals
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
appraise "rails-4" do
|
4
|
-
gem 'actionmailer', '~> 4.2'
|
5
|
-
gem 'actionpack', '~> 4.2'
|
6
|
-
gem 'activesupport', '~> 4.2'
|
7
|
-
end
|
8
|
-
|
9
|
-
appraise "rails-5" do
|
10
|
-
gem 'actionmailer', '~> 5.2'
|
11
|
-
gem 'actionpack', '~> 5.2'
|
12
|
-
gem 'activesupport', '~> 5.2'
|
13
|
-
end
|
14
|
-
|
15
|
-
appraise "rails-6" do
|
16
|
-
gem 'actionmailer', '~> 6.0'
|
17
|
-
gem 'actionpack', '~> 6.0'
|
18
|
-
gem 'activesupport', '~> 6.0'
|
19
|
-
end
|
data/CHANGELOG.md
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
# CHANGELOG for `exception_handling`
|
2
|
-
|
3
|
-
Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
4
|
-
|
5
|
-
Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
-
|
7
|
-
## [2.9.0] - 2020-03-02
|
8
|
-
### Added
|
9
|
-
- Automatically registers with the `escalate` gem's `on_escalate` callback.
|
10
|
-
|
11
|
-
## [2.8.1] - 2020-12-01
|
12
|
-
### Added
|
13
|
-
- If the `log_context` key `honeybadger_grouping:` is set, pass that value to the `controller:` keyword argument of `HoneyBadger.notify`.
|
14
|
-
|
15
|
-
## [2.8.0] - 2020-10-19
|
16
|
-
### Deprecated
|
17
|
-
- Deprecated Email Escalation Methods: `escalate_to_production_support`, `escalate_error`, `escalate_warning`, `ensure_escalation`
|
18
|
-
|
19
|
-
## [2.7.0] - 2020-10-14
|
20
|
-
### Added
|
21
|
-
- Added `LoggingMethods` as a replacement for `Methods` without setting controller or checking for long controller action.
|
22
|
-
### Deprecated
|
23
|
-
- Deprecated `Methods` in favor of `LoggingMethods`.
|
24
|
-
|
25
|
-
## [2.6.1] - 2020-10-14
|
26
|
-
### Fixed
|
27
|
-
- Fixed honeybadger_context_data to always merge `current_context_for_thread`, even if `log_context:` is passed as `nil`.
|
28
|
-
|
29
|
-
## [2.6.0] - 2020-08-26
|
30
|
-
### Changed
|
31
|
-
- Calling `log_warning` will now log with Severity::WARNING rather than FATAL.
|
32
|
-
- Reordered the logging to put the exception class next to the message.
|
33
|
-
|
34
|
-
## [2.5.0] - 2020-08-19
|
35
|
-
### Added
|
36
|
-
- The `**log_context` passed to `log_error`/`log_warning`/`log_info` is now
|
37
|
-
passed into `Honeybadger.notify()`, in `context: { log_context: ... }`.
|
38
|
-
|
39
|
-
### Fixed
|
40
|
-
- Silenced test warning noise by no longer running ruby -w.
|
41
|
-
- Renamed a constant to ALLOWLIST.
|
42
|
-
|
43
|
-
## [2.4.4] - 2020-08-10
|
44
|
-
### Fixed
|
45
|
-
- `ExceptionHandling.logger = nil` no longer displays an "implicit extend" deprecation warning.
|
46
|
-
|
47
|
-
## [2.4.3] - 2020-05-14
|
48
|
-
### Deprecated
|
49
|
-
- In `ExceptionHandling.logger=`, implicit `logger.extend ContextualLogger::LoggerMixin` is now deprecated.
|
50
|
-
This will be removed in version 3.0 and an `ArgumentError` will be raised if the logger
|
51
|
-
doesn't have that mixin. Instead of this implicit behavior, you should explicitly either `extend`
|
52
|
-
your logger instance or `include` that mixin into your `Logger` class.
|
53
|
-
|
54
|
-
## [2.4.2] - 2020-05-11
|
55
|
-
### Added
|
56
|
-
- Added support for rails 5 and 6.
|
57
|
-
- Added appraisal tests for all supported rails version: 4/5/6
|
58
|
-
|
59
|
-
### Changed
|
60
|
-
- Updated various test to be compatible with rails version 4/5/6
|
61
|
-
- Updated the CI pipeline to test against all three supported versions of rails
|
62
|
-
|
63
|
-
## [2.4.1] - 2020-04-29
|
64
|
-
### Changed
|
65
|
-
- No longer depends on hobo_support. Uses invoca-utils 0.3 instead.
|
66
|
-
|
67
|
-
[2.9.0]: https://github.com/Invoca/exception_handling/compare/v2.8.1...v2.9.0
|
68
|
-
[2.8.1]: https://github.com/Invoca/exception_handling/compare/v2.8.0...v2.8.1
|
69
|
-
[2.8.0]: https://github.com/Invoca/exception_handling/compare/v2.7.0...v2.8.0
|
70
|
-
[2.7.0]: https://github.com/Invoca/exception_handling/compare/v2.6.1...v2.7.0
|
71
|
-
[2.6.1]: https://github.com/Invoca/exception_handling/compare/v2.6.0...v2.6.1
|
72
|
-
[2.6.0]: https://github.com/Invoca/exception_handling/compare/v2.5.0...v2.6.0
|
73
|
-
[2.5.0]: https://github.com/Invoca/exception_handling/compare/v2.4.4...v2.5.0
|
74
|
-
[2.4.4]: https://github.com/Invoca/exception_handling/compare/v2.4.3...v2.4.4
|
75
|
-
[2.4.3]: https://github.com/Invoca/exception_handling/compare/v2.4.2...v2.4.3
|
76
|
-
[2.4.2]: https://github.com/Invoca/exception_handling/compare/v2.4.1...v2.4.2
|
77
|
-
[2.4.1]: https://github.com/Invoca/exception_handling/compare/v2.4.0...v2.4.1
|
data/gemfiles/.bundle/config
DELETED
data/gemfiles/rails_4.gemfile
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "actionmailer", "~> 4.2"
|
6
|
-
gem "activesupport", "~> 4.2"
|
7
|
-
gem "appraisal", "~> 2.2"
|
8
|
-
gem "escalate", "0.2.0.pre.1"
|
9
|
-
gem "honeybadger", "3.3.1-1", git: "git@github.com:Invoca/honeybadger-ruby", ref: "bb5f2b8a86e4147c38a6270d39ad610fab4dd5e6"
|
10
|
-
gem "pry"
|
11
|
-
gem "pry-byebug"
|
12
|
-
gem "rake"
|
13
|
-
gem "rspec"
|
14
|
-
gem "rspec_junit_formatter"
|
15
|
-
gem "rubocop"
|
16
|
-
gem "test-unit"
|
17
|
-
gem "actionpack", "~> 4.2"
|
18
|
-
|
19
|
-
gemspec path: "../"
|
data/gemfiles/rails_5.gemfile
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "actionmailer", "~> 5.2"
|
6
|
-
gem "activesupport", "~> 5.2"
|
7
|
-
gem "appraisal", "~> 2.2"
|
8
|
-
gem "escalate", "0.2.0.pre.1"
|
9
|
-
gem "honeybadger", "3.3.1-1", git: "git@github.com:Invoca/honeybadger-ruby", ref: "bb5f2b8a86e4147c38a6270d39ad610fab4dd5e6"
|
10
|
-
gem "pry"
|
11
|
-
gem "pry-byebug"
|
12
|
-
gem "rake"
|
13
|
-
gem "rspec"
|
14
|
-
gem "rspec_junit_formatter"
|
15
|
-
gem "rubocop"
|
16
|
-
gem "test-unit"
|
17
|
-
gem "actionpack", "~> 5.2"
|
18
|
-
|
19
|
-
gemspec path: "../"
|
data/gemfiles/rails_6.gemfile
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "actionmailer", "~> 6.0"
|
6
|
-
gem "activesupport", "~> 6.0"
|
7
|
-
gem "appraisal", "~> 2.2"
|
8
|
-
gem "escalate", "0.2.0.pre.1"
|
9
|
-
gem "honeybadger", "3.3.1-1", git: "git@github.com:Invoca/honeybadger-ruby", ref: "bb5f2b8a86e4147c38a6270d39ad610fab4dd5e6"
|
10
|
-
gem "pry"
|
11
|
-
gem "pry-byebug"
|
12
|
-
gem "rake"
|
13
|
-
gem "rspec"
|
14
|
-
gem "rspec_junit_formatter"
|
15
|
-
gem "rubocop"
|
16
|
-
gem "test-unit"
|
17
|
-
gem "actionpack", "~> 6.0"
|
18
|
-
|
19
|
-
gemspec path: "../"
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'escalate'
|
4
|
-
|
5
|
-
module ExceptionHandling
|
6
|
-
module EscalateCallback
|
7
|
-
class << self
|
8
|
-
def register_if_configured!
|
9
|
-
register! if ::ExceptionHandling.configured?
|
10
|
-
end
|
11
|
-
|
12
|
-
def register!
|
13
|
-
Escalate.on_escalate(log_first: false) do |exception, location_message, **context|
|
14
|
-
::ExceptionHandling.log_error(exception, location_message, **context)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'active_support/concern'
|
4
|
-
require 'active_support/core_ext/module/delegation.rb'
|
5
|
-
|
6
|
-
module ExceptionHandling
|
7
|
-
module LoggingMethods # included on models and controllers
|
8
|
-
extend ActiveSupport::Concern
|
9
|
-
|
10
|
-
protected
|
11
|
-
|
12
|
-
delegate :log_error_rack, :log_warning, :log_info, :log_debug, :escalate_error, :escalate_warning, :ensure_escalation, :alert_warning, :log_error, to: ExceptionHandling
|
13
|
-
|
14
|
-
def ensure_safe(exception_context = "")
|
15
|
-
yield
|
16
|
-
rescue => ex
|
17
|
-
log_error ex, exception_context
|
18
|
-
nil
|
19
|
-
end
|
20
|
-
|
21
|
-
def ensure_alert(*args)
|
22
|
-
ExceptionHandling.ensure_alert(*args) do
|
23
|
-
yield
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Rake 11+ has a misfeature where @warning = true by default
|
4
|
-
# See https://github.com/ruby/rake/pull/97/files
|
5
|
-
# This causes all tests to be run with `ruby -w`, causing a huge number of warnings
|
6
|
-
# from gems we don't control and overwhelming our test output.
|
7
|
-
# This patch reverts that.
|
8
|
-
|
9
|
-
_ = Rake::TestTask
|
10
|
-
|
11
|
-
class Rake::TestTask
|
12
|
-
module SetWarningFalseMixin
|
13
|
-
def initialize(*args)
|
14
|
-
super
|
15
|
-
self.warning = false
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
prepend SetWarningFalseMixin
|
20
|
-
end
|