govuk_app_config 4.0.0 → 4.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c537dcfbb4c9d9f5c3780934fd66b9a31d0e9dade0b9972b837650ab99c69f4
|
4
|
+
data.tar.gz: cc4db9f009c6a15015d3c06e1a765d96f6ae28873ff5540a05168954df83414a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9c3ad899bd4e81c750e809adc50dc8e094cb89cabb6641a7ba75b7840c56c91a4cae43c1f2291031f21b1c92fccce527ee34eb34b15601cc4c52ce7adee5aed
|
7
|
+
data.tar.gz: 940fca52216b248625ef93aac95198c20df19bda11d98bd5195a42e4921ad12739d56d966dd35343ee48f2f7d5b1802a8d7cb1562933fa835c9d8e11fd04dd65
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
# 4.3.0
|
2
|
+
|
3
|
+
- Remove Speedcurve's LUX from the connect-src policy ([#216](https://github.com/alphagov/govuk_app_config/pull/216)).
|
4
|
+
|
5
|
+
# 4.2.0
|
6
|
+
|
7
|
+
- Add pluralisation rules for Azerbaijani, Persian, Georgian, and Turkish. ([#219](https://github.com/alphagov/govuk_app_config/pull/219))
|
8
|
+
|
9
|
+
# 4.1.0
|
10
|
+
|
11
|
+
- Add Puma to dependencies ([#214](https://github.com/alphagov/govuk_app_config/pull/214)).
|
12
|
+
|
13
|
+
# 4.0.1
|
14
|
+
|
15
|
+
- Update Content Security Policy with new klick2contact.com subdomain ([#213](https://github.com/alphagov/govuk_app_config/pull/213)).
|
16
|
+
|
1
17
|
# 4.0.0
|
2
18
|
|
3
19
|
- BREAKING: replaces deprecated `sentry-raven` with `sentry-ruby` and `sentry-rails`. Follow the **[migration guide](https://docs.sentry.io/platforms/ruby/migration/)** before upgrading to this version of govuk_app_config to ensure full compatibility with the new gems.
|
data/govuk_app_config.gemspec
CHANGED
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.require_paths = %w[lib]
|
22
22
|
|
23
23
|
spec.add_dependency "logstasher", ">= 1.2.2", "< 2.2.0"
|
24
|
+
spec.add_dependency "puma", "~> 5.0"
|
24
25
|
spec.add_dependency "sentry-rails", "~> 4.5.0"
|
25
26
|
spec.add_dependency "sentry-ruby", "~> 4.5.0"
|
26
27
|
spec.add_dependency "statsd-ruby", "~> 1.5.0"
|
@@ -76,15 +76,9 @@ module GovukContentSecurityPolicy
|
|
76
76
|
# Allow JSON call to Nuance - HMRC web chat provider
|
77
77
|
"hmrc-uk.digital.nuance.com",
|
78
78
|
# Allow JSON call to klick2contact - HMPO web chat provider
|
79
|
-
"
|
79
|
+
"hmpowebchat.klick2contact.com",
|
80
80
|
# Allow connecting to Verify to check whether the user is logged in
|
81
|
-
"www.signin.service.gov.uk"
|
82
|
-
# Allow connection to Speedcurve's CDN for LUX - used for
|
83
|
-
# real user metrics on GOV.UK. This loads using an image
|
84
|
-
# (see image policy), but returns a JavaScript file -
|
85
|
-
# which is why this has to be added to the `connect-src`
|
86
|
-
# policy as well.
|
87
|
-
"lux.speedcurve.com"
|
81
|
+
"www.signin.service.gov.uk"
|
88
82
|
|
89
83
|
# Disallow all <object>, <embed>, and <applet> elements
|
90
84
|
#
|
@@ -1,10 +1,14 @@
|
|
1
1
|
module GovukI18n
|
2
2
|
def self.plurals
|
3
3
|
{
|
4
|
+
# Azerbaijani
|
5
|
+
az: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
4
6
|
# Dari - this isn't an iso code. Probably should be 'prs' as per ISO 639-3.
|
5
7
|
dr: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
6
8
|
# Latin America and Caribbean Spanish
|
7
9
|
"es-419": { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
10
|
+
# Persian
|
11
|
+
fa: { i18n: { plural: { keys: %i[one other], rule: ->(n) { [0, 1].include?(n) ? :one : :other } } } },
|
8
12
|
# Scottish Gaelic
|
9
13
|
gd: { i18n: { plural: { keys: %i[one two few other],
|
10
14
|
rule:
|
@@ -21,12 +25,16 @@ module GovukI18n
|
|
21
25
|
end } } },
|
22
26
|
# Armenian
|
23
27
|
hy: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
28
|
+
# Georgian
|
29
|
+
ka: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
24
30
|
# Kazakh
|
25
31
|
kk: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
26
32
|
# Punjabi Shahmukhi
|
27
33
|
"pa-pk": { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
28
34
|
# Sinhalese
|
29
35
|
si: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
36
|
+
# Turkish
|
37
|
+
tr: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
30
38
|
# Uzbek
|
31
39
|
uz: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
32
40
|
# Chinese Hong Kong
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module GovukPuma
|
2
|
+
def self.configure_rails(config)
|
3
|
+
config.port ENV.fetch("PORT", 3000)
|
4
|
+
|
5
|
+
config.environment ENV.fetch("RAILS_ENV", "development")
|
6
|
+
|
7
|
+
if ENV["GOVUK_APP_LOGROOT"]
|
8
|
+
config.stdout_redirect "#{ENV['GOVUK_APP_LOGROOT']}/app.out.log" "#{ENV['GOVUK_APP_LOGROOT']}/app.err.log"
|
9
|
+
end
|
10
|
+
|
11
|
+
# `worker_timeout` specifies how many seconds Puma will wait before terminating a worker.
|
12
|
+
timeout = ENV.fetch("RAILS_ENV", "development") == "development" ? 3600 : 15
|
13
|
+
config.worker_timeout timeout
|
14
|
+
|
15
|
+
# When changing the min/max threads for Puma, also consider changing ActiveRecord to match.
|
16
|
+
max_threads_count = ENV.fetch("RAILS_MAX_THREADS", 5)
|
17
|
+
min_threads_count = ENV.fetch("RAILS_MIN_THREADS", max_threads_count)
|
18
|
+
config.threads min_threads_count, max_threads_count
|
19
|
+
|
20
|
+
# `workers` specifies the number of worker processes that Puma will fork.
|
21
|
+
# The overall concurrency limit is worker count * max threads per worker.
|
22
|
+
config.workers ENV.fetch("WEB_CONCURRENCY", 2)
|
23
|
+
|
24
|
+
# `preload_app!` tells Puma to load application code before forking worker processes.
|
25
|
+
# This reduces RAM wastage by making better use of copy-on-write.
|
26
|
+
config.preload_app!
|
27
|
+
|
28
|
+
config.before_fork do |_server|
|
29
|
+
next unless ENV["GOVUK_APP_ROOT"]
|
30
|
+
|
31
|
+
ENV["BUNDLE_GEMFILE"] = "#{ENV['GOVUK_APP_ROOT']}/Gemfile"
|
32
|
+
end
|
33
|
+
|
34
|
+
# Allow puma to be restarted by `rails restart` command.
|
35
|
+
config.plugin :tmp_restart
|
36
|
+
end
|
37
|
+
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.
|
4
|
+
version: 4.3.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:
|
11
|
+
date: 2022-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstasher
|
@@ -30,6 +30,20 @@ dependencies:
|
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.2.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: puma
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '5.0'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '5.0'
|
33
47
|
- !ruby/object:Gem::Dependency
|
34
48
|
name: sentry-rails
|
35
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,6 +268,7 @@ files:
|
|
254
268
|
- lib/govuk_app_config/govuk_healthcheck/sidekiq_redis.rb
|
255
269
|
- lib/govuk_app_config/govuk_i18n.rb
|
256
270
|
- lib/govuk_app_config/govuk_logging.rb
|
271
|
+
- lib/govuk_app_config/govuk_puma.rb
|
257
272
|
- lib/govuk_app_config/govuk_statsd.rb
|
258
273
|
- lib/govuk_app_config/govuk_unicorn.rb
|
259
274
|
- lib/govuk_app_config/rails_ext/action_dispatch/debug_exceptions.rb
|