govuk_app_config 4.10.0 → 4.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/govuk_app_config.gemspec +2 -2
- data/lib/govuk_app_config/govuk_error/configuration.rb +4 -0
- data/lib/govuk_app_config/govuk_error.rb +0 -2
- data/lib/govuk_app_config/govuk_i18n.rb +32 -0
- data/lib/govuk_app_config/railtie.rb +1 -2
- data/lib/govuk_app_config/version.rb +1 -1
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a99ab31af0eeb89e3d7b1fb7538ea6095d52d93e08dbccd8cf17a9431beaa1e
|
4
|
+
data.tar.gz: f3664830daf4a0900bad8f5087daf791969a9310e6a8d39c1b71165519600d2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13ae8c4325ed10df67460a2eabce7fd6bd9da83b0d250ac7cbbefc78ab8d32fad2370f106cb323b38c14f379c27e881300ecc63adb4971caa3acd5aaa75df13d
|
7
|
+
data.tar.gz: 6b439e2ea5f9970c9e9eb7ecd38e6389ab4f4a028b62b566c107fa6b79459f62a5ddb5eae016f16b8fbd74258dee339d93e802335270e6c321c39041e56bde88
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
# 4.11.0
|
2
|
+
|
3
|
+
- Update Plek support to allow version 5
|
4
|
+
- Add I18n plural rules for Welsh (cy), Maltese (mt) and Chinese (zh) since Rails-I18n has [dropped support](https://github.com/svenfuchs/rails-i18n/pull/1017) for them in 7.0.6 ([#266](https://github.com/alphagov/govuk_app_config/pull/266))
|
5
|
+
|
6
|
+
# 4.10.1
|
7
|
+
|
8
|
+
- Fix an object ownership/sharing bug where the Rails log level was erroneously being set to `WARN` when initialising Sentry.
|
9
|
+
|
1
10
|
# 4.10.0
|
2
11
|
|
3
12
|
- Reduce log level for the Sentry gem from `INFO` to `WARN` to avoid polluting logs with uninformative messages. This only affects log messages from the Sentry gem itself, which go to `stdout`.
|
data/govuk_app_config.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.require_paths = %w[lib]
|
22
22
|
|
23
23
|
spec.add_dependency "logstasher", "~> 2.1"
|
24
|
-
spec.add_dependency "plek", "
|
24
|
+
spec.add_dependency "plek", ">= 4", "< 6"
|
25
25
|
spec.add_dependency "prometheus_exporter", "~> 2.0"
|
26
26
|
spec.add_dependency "puma", ">= 5.6", "< 7.0"
|
27
27
|
spec.add_dependency "rack-proxy", "~> 0.7"
|
@@ -37,6 +37,6 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.add_development_dependency "rake", "~> 13.0"
|
38
38
|
spec.add_development_dependency "rspec", "~> 3.10"
|
39
39
|
spec.add_development_dependency "rspec-its", "~> 1.3"
|
40
|
-
spec.add_development_dependency "rubocop-govuk", "4.
|
40
|
+
spec.add_development_dependency "rubocop-govuk", "4.8.0"
|
41
41
|
spec.add_development_dependency "webmock"
|
42
42
|
end
|
@@ -74,6 +74,10 @@ module GovukError
|
|
74
74
|
"GdsApi::ContentStore::ItemNotFound",
|
75
75
|
]
|
76
76
|
|
77
|
+
# Avoid "Sending envelope with items ... to Sentry" logspew, since we
|
78
|
+
# don't use Sentry's automatic session tracking.
|
79
|
+
self.auto_session_tracking = false
|
80
|
+
|
77
81
|
@before_send_callbacks = [
|
78
82
|
ignore_excluded_exceptions_in_data_sync,
|
79
83
|
increment_govuk_statsd_counters,
|
@@ -40,8 +40,6 @@ module GovukError
|
|
40
40
|
|
41
41
|
Sentry.init do |sentry_config|
|
42
42
|
config = Configuration.new(sentry_config)
|
43
|
-
# Avoid "Sending envelope with items ... to Sentry" logspew on stdout.
|
44
|
-
config.logger.level = Sentry::Logger::WARN
|
45
43
|
yield config if block_given?
|
46
44
|
end
|
47
45
|
end
|
@@ -3,6 +3,19 @@ module GovukI18n
|
|
3
3
|
{
|
4
4
|
# Azerbaijani
|
5
5
|
az: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
6
|
+
# Welsh
|
7
|
+
cy: { i18n: { plural: { keys: %i[zero one two few many other],
|
8
|
+
rule:
|
9
|
+
lambda do |n|
|
10
|
+
case n
|
11
|
+
when 0 then :zero
|
12
|
+
when 1 then :one
|
13
|
+
when 2 then :two
|
14
|
+
when 3 then :few
|
15
|
+
when 6 then :many
|
16
|
+
else :other
|
17
|
+
end
|
18
|
+
end } } },
|
6
19
|
# Dari - this isn't an iso code. Probably should be 'prs' as per ISO 639-3.
|
7
20
|
dr: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
8
21
|
# Latin America and Caribbean Spanish
|
@@ -31,12 +44,31 @@ module GovukI18n
|
|
31
44
|
kk: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
32
45
|
# Punjabi Shahmukhi
|
33
46
|
"pa-pk": { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
47
|
+
# Maltese
|
48
|
+
mt: { i18n: { plural: { keys: %i[one few many other],
|
49
|
+
rule:
|
50
|
+
lambda do |n|
|
51
|
+
n ||= 0
|
52
|
+
mod100 = n % 100
|
53
|
+
|
54
|
+
if n == 1
|
55
|
+
:one
|
56
|
+
elsif n.zero? || (2..10).to_a.include?(mod100)
|
57
|
+
:few
|
58
|
+
elsif (11..19).to_a.include?(mod100)
|
59
|
+
:many
|
60
|
+
else
|
61
|
+
:other
|
62
|
+
end
|
63
|
+
end } } },
|
34
64
|
# Sinhalese
|
35
65
|
si: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
36
66
|
# Turkish
|
37
67
|
tr: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
38
68
|
# Uzbek
|
39
69
|
uz: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
70
|
+
# Chinese
|
71
|
+
zh: { i18n: { plural: { keys: %i[other], rule: ->(_) { :other } } } },
|
40
72
|
# Chinese Hong Kong
|
41
73
|
"zh-hk" => { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
42
74
|
# Chinese Taiwan
|
@@ -4,8 +4,7 @@ module GovukAppConfig
|
|
4
4
|
class Railtie < Rails::Railtie
|
5
5
|
initializer "govuk_app_config.configure_govuk_proxy" do |app|
|
6
6
|
if ENV["GOVUK_PROXY_STATIC_ENABLED"] == "true"
|
7
|
-
|
8
|
-
app.middleware.use GovukProxy::StaticProxy, backend: static_url
|
7
|
+
app.middleware.use GovukProxy::StaticProxy, backend: Plek.find("static")
|
9
8
|
end
|
10
9
|
end
|
11
10
|
|
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: 4.
|
4
|
+
version: 4.11.0
|
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: 2022-
|
11
|
+
date: 2022-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstasher
|
@@ -28,16 +28,22 @@ dependencies:
|
|
28
28
|
name: plek
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '4'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '6'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '4'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '6'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: prometheus_exporter
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -246,14 +252,14 @@ dependencies:
|
|
246
252
|
requirements:
|
247
253
|
- - '='
|
248
254
|
- !ruby/object:Gem::Version
|
249
|
-
version: 4.
|
255
|
+
version: 4.8.0
|
250
256
|
type: :development
|
251
257
|
prerelease: false
|
252
258
|
version_requirements: !ruby/object:Gem::Requirement
|
253
259
|
requirements:
|
254
260
|
- - '='
|
255
261
|
- !ruby/object:Gem::Version
|
256
|
-
version: 4.
|
262
|
+
version: 4.8.0
|
257
263
|
- !ruby/object:Gem::Dependency
|
258
264
|
name: webmock
|
259
265
|
requirement: !ruby/object:Gem::Requirement
|
@@ -331,7 +337,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
331
337
|
- !ruby/object:Gem::Version
|
332
338
|
version: '0'
|
333
339
|
requirements: []
|
334
|
-
rubygems_version: 3.3.
|
340
|
+
rubygems_version: 3.3.26
|
335
341
|
signing_key:
|
336
342
|
specification_version: 4
|
337
343
|
summary: Base configuration for GOV.UK applications
|