govuk_app_config 4.10.1 → 4.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49d2ba8d4a28f3bcbe72bebb31f5516123964e8142dcf93a08c69f7efecc8d30
4
- data.tar.gz: 061e91536be46ef802a5c6379dfa5a465e04cdb7657faa18371cecd439484a24
3
+ metadata.gz: 9a99ab31af0eeb89e3d7b1fb7538ea6095d52d93e08dbccd8cf17a9431beaa1e
4
+ data.tar.gz: f3664830daf4a0900bad8f5087daf791969a9310e6a8d39c1b71165519600d2c
5
5
  SHA512:
6
- metadata.gz: 4d526f99f686189933127e1e440f0153682a6147f6b21f1d44003fb1c7de129c151cffb6b8145ff3560af5963e80cae48d97c0b0d3c551b64948ea6eda0fc547
7
- data.tar.gz: 5791cd78d85920e76bc58ae734ceadd50b636fccb2e16fb91952bd00e15ed45e3aaccc191e9947626721c43326c535b8f05655b3c2e20ddde2b3ebd992ef04f6
6
+ metadata.gz: 13ae8c4325ed10df67460a2eabce7fd6bd9da83b0d250ac7cbbefc78ab8d32fad2370f106cb323b38c14f379c27e881300ecc63adb4971caa3acd5aaa75df13d
7
+ data.tar.gz: 6b439e2ea5f9970c9e9eb7ecd38e6389ab4f4a028b62b566c107fa6b79459f62a5ddb5eae016f16b8fbd74258dee339d93e802335270e6c321c39041e56bde88
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
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
+
1
6
  # 4.10.1
2
7
 
3
8
  - Fix an object ownership/sharing bug where the Rails log level was erroneously being set to `WARN` when initialising Sentry.
@@ -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", "~> 4"
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.7.0"
40
+ spec.add_development_dependency "rubocop-govuk", "4.8.0"
41
41
  spec.add_development_dependency "webmock"
42
42
  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
- static_url = Plek.new.find("static")
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
 
@@ -1,3 +1,3 @@
1
1
  module GovukAppConfig
2
- VERSION = "4.10.1".freeze
2
+ VERSION = "4.11.0".freeze
3
3
  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: 4.10.1
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-10-24 00:00:00.000000000 Z
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.7.0
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.7.0
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.24
340
+ rubygems_version: 3.3.26
335
341
  signing_key:
336
342
  specification_version: 4
337
343
  summary: Base configuration for GOV.UK applications