govuk_app_config 9.8.1 → 9.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +5 -0
- data/.govuk_dependabot_merger.yml +10 -0
- data/.rubocop.yml +2 -0
- data/CHANGELOG.md +4 -0
- data/README.md +2 -2
- data/govuk_app_config.gemspec +2 -2
- data/lib/govuk_app_config/govuk_error/configuration.rb +5 -7
- data/lib/govuk_app_config/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a349225515e547a17b98fdeccff77f3ed83c8b877186e683b82a4c70e7dee16
|
4
|
+
data.tar.gz: fefce175f60a2be6ee9bcba77e0164a7d311893dc49dcfd7645794be735b7f2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2971e35ad62205b4b6d6589c24dac49f0070caa6b5df5be3a014750ffbb160df4073c2fd987b5725eb4cd6061ca517982f4a8c804e0bde4a5e710f5dede33d86
|
7
|
+
data.tar.gz: 7b734c3239cc3d8c481e1e8832c4eaf86c426edabd3fde26146544ef418cf52c0e2eafbe08386559c28d462d9a4197f675695f76cb0a4b89012725bd19a0a7bd
|
data/.github/workflows/ci.yml
CHANGED
@@ -11,6 +11,11 @@ on:
|
|
11
11
|
type: string
|
12
12
|
|
13
13
|
jobs:
|
14
|
+
snyk-security:
|
15
|
+
name: SNYK security analysis
|
16
|
+
uses: alphagov/govuk-infrastructure/.github/workflows/snyk-security.yml@main
|
17
|
+
secrets: inherit
|
18
|
+
|
14
19
|
codeql-sast:
|
15
20
|
name: CodeQL SAST scan
|
16
21
|
uses: alphagov/govuk-infrastructure/.github/workflows/codeql-analysis.yml@main
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -96,9 +96,9 @@ and occurs at the time of a data sync, then it will be excluded even if the cust
|
|
96
96
|
|
97
97
|
```ruby
|
98
98
|
GovukError.configure do |config|
|
99
|
-
config.before_send =
|
99
|
+
config.before_send = ->(event, hint) {
|
100
100
|
hint[:exception].is_a?(ErrorWeWantToIgnore) ? nil : event
|
101
|
-
|
101
|
+
}
|
102
102
|
end
|
103
103
|
```
|
104
104
|
|
data/govuk_app_config.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.add_dependency "logstasher", "~> 2.1"
|
24
24
|
spec.add_dependency "opentelemetry-exporter-otlp", ">= 0.25", "< 0.27"
|
25
|
-
spec.add_dependency "opentelemetry-instrumentation-all", ">= 0.39.1", "< 0.
|
25
|
+
spec.add_dependency "opentelemetry-instrumentation-all", ">= 0.39.1", "< 0.57.0"
|
26
26
|
spec.add_dependency "opentelemetry-sdk", "~> 1.2"
|
27
27
|
spec.add_dependency "plek", ">= 4", "< 6"
|
28
28
|
spec.add_dependency "prometheus_exporter", "~> 2.0"
|
@@ -39,6 +39,6 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_development_dependency "rake", "~> 13.0"
|
40
40
|
spec.add_development_dependency "rspec", "~> 3.10"
|
41
41
|
spec.add_development_dependency "rspec-its", "~> 1.3"
|
42
|
-
spec.add_development_dependency "rubocop-govuk", "4.
|
42
|
+
spec.add_development_dependency "rubocop-govuk", "4.13.0"
|
43
43
|
spec.add_development_dependency "webmock"
|
44
44
|
end
|
@@ -72,9 +72,7 @@ module GovukError
|
|
72
72
|
]
|
73
73
|
# Need to invoke an arbitrary `before_send=` in order to trigger the
|
74
74
|
# `before_send_callbacks` behaviour
|
75
|
-
self.before_send =
|
76
|
-
error_or_event
|
77
|
-
}
|
75
|
+
self.before_send = ->(error_or_event, _hint) { error_or_event }
|
78
76
|
end
|
79
77
|
|
80
78
|
def before_send=(closure)
|
@@ -85,7 +83,7 @@ module GovukError
|
|
85
83
|
protected
|
86
84
|
|
87
85
|
def ignore_excluded_exceptions_in_data_sync
|
88
|
-
|
86
|
+
->(event, hint) {
|
89
87
|
data_sync_ignored_error = data_sync_excluded_exceptions.any? do |exception_to_ignore|
|
90
88
|
exception_to_ignore = Object.const_get(exception_to_ignore) unless exception_to_ignore.is_a?(Module)
|
91
89
|
exception_chain = Sentry::Utils::ExceptionCauseChain.exception_to_array(hint[:exception])
|
@@ -101,7 +99,7 @@ module GovukError
|
|
101
99
|
end
|
102
100
|
|
103
101
|
def increment_govuk_statsd_counters
|
104
|
-
|
102
|
+
->(event, hint) {
|
105
103
|
if hint[:exception]
|
106
104
|
GovukStatsd.increment("errors_occurred")
|
107
105
|
GovukStatsd.increment("error_types.#{hint[:exception].class.name.split('::').last.underscore}")
|
@@ -111,14 +109,14 @@ module GovukError
|
|
111
109
|
end
|
112
110
|
|
113
111
|
def run_before_send_callbacks
|
114
|
-
|
112
|
+
->(event, hint) {
|
115
113
|
result = event
|
116
114
|
@before_send_callbacks.each do |callback|
|
117
115
|
result = callback.call(event, hint)
|
118
116
|
break if result.nil?
|
119
117
|
end
|
120
118
|
result
|
121
|
-
|
119
|
+
}
|
122
120
|
end
|
123
121
|
end
|
124
122
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_app_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.8.
|
4
|
+
version: 9.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstasher
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
version: 0.39.1
|
54
54
|
- - "<"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
56
|
+
version: 0.57.0
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -63,7 +63,7 @@ dependencies:
|
|
63
63
|
version: 0.39.1
|
64
64
|
- - "<"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: 0.
|
66
|
+
version: 0.57.0
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: opentelemetry-sdk
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -292,14 +292,14 @@ dependencies:
|
|
292
292
|
requirements:
|
293
293
|
- - '='
|
294
294
|
- !ruby/object:Gem::Version
|
295
|
-
version: 4.
|
295
|
+
version: 4.13.0
|
296
296
|
type: :development
|
297
297
|
prerelease: false
|
298
298
|
version_requirements: !ruby/object:Gem::Requirement
|
299
299
|
requirements:
|
300
300
|
- - '='
|
301
301
|
- !ruby/object:Gem::Version
|
302
|
-
version: 4.
|
302
|
+
version: 4.13.0
|
303
303
|
- !ruby/object:Gem::Dependency
|
304
304
|
name: webmock
|
305
305
|
requirement: !ruby/object:Gem::Requirement
|
@@ -324,6 +324,7 @@ files:
|
|
324
324
|
- ".github/dependabot.yml"
|
325
325
|
- ".github/workflows/ci.yml"
|
326
326
|
- ".gitignore"
|
327
|
+
- ".govuk_dependabot_merger.yml"
|
327
328
|
- ".rspec"
|
328
329
|
- ".rubocop.yml"
|
329
330
|
- ".ruby-version"
|
@@ -375,7 +376,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
375
376
|
- !ruby/object:Gem::Version
|
376
377
|
version: '0'
|
377
378
|
requirements: []
|
378
|
-
rubygems_version: 3.5.
|
379
|
+
rubygems_version: 3.5.5
|
379
380
|
signing_key:
|
380
381
|
specification_version: 4
|
381
382
|
summary: Base configuration for GOV.UK applications
|