govuk_app_config 4.0.0.pre.4 → 4.2.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: 494d23c9b999e7cfd6a7e2fac76f1a52cdf70aa5b7c62509e48693c13bb07d7c
4
- data.tar.gz: ccd962b2f670063ead978e49f38affcf925b1e05a47b4a97066b88b5243dcbaa
3
+ metadata.gz: f1c91ef4af1e3ddee565df434c56247bd49948c2c610a37add40f2f1c9ecfd58
4
+ data.tar.gz: 653a72692c7fbbe97f5717adac39d282a54834e05b2d934d6c2d5c22a8671000
5
5
  SHA512:
6
- metadata.gz: 624aefd37a2c76460bfecdbf17071991fa3745249ac27b9bb6026bc67e4e335cd94bdf67d82f8521557c8661fca36ced879a68a346bfe592786e88df0f06ddbe
7
- data.tar.gz: 7cbbc37819f1b176dde9d4d90bf71b333621cdfabfd042b2fe439223aa47a98c43713b86f2784c6ced2c43a9f28cb01bf83f021e724de7def9e4a7a74dd0c264
6
+ metadata.gz: ba9588d5172ca683b37ebbe74768fa1fc040c2b7b7aedf7bb7c794f14f15ae5c0b16689293a601ad3d8247d20155fb18f53d8c76aef6ffe6a769549bf1162aca
7
+ data.tar.gz: b23829fa60d1c5cb50f0ace75d5c26e8dd6daab88344bdb4dfb33e6690fd70c959885e23c3996240474fd27de4b0aa02f11f151570424a5c0b9cd99bdfb666f5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ # 4.2.0
2
+
3
+ - Add pluralisation rules for Azerbaijani, Persian, Georgian, and Turkish. ([#219](https://github.com/alphagov/govuk_app_config/pull/219))
4
+
5
+ # 4.1.0
6
+
7
+ - Add Puma to dependencies ([#214](https://github.com/alphagov/govuk_app_config/pull/214)).
8
+
9
+ # 4.0.1
10
+
11
+ - Update Content Security Policy with new klick2contact.com subdomain ([#213](https://github.com/alphagov/govuk_app_config/pull/213)).
12
+
13
+ # 4.0.0
14
+
15
+ - 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.
16
+ - BREAKING: `GovukError.configure` can only be called once, and non-Rails apps will have to manually call `GovukError.configure` in order to initialise Sentry.
17
+ - BREAKING: apps will no longer increment the `error_reports_failed` statsd if events fail to get sent to Sentry.
18
+ - BREAKING: the behaviour of `before_send` has changed, and the `should_capture` method is deprecated.
19
+ - See pre-release notes below for details.
20
+ - PR: [#212](https://github.com/alphagov/govuk_app_config/pull/212)
21
+
1
22
  # 4.0.0.pre.4
2
23
 
3
24
  - Fix Sentry client initialisation ([#205](https://github.com/alphagov/govuk_app_config/pull/205)).
@@ -16,9 +37,17 @@
16
37
  # 4.0.0.pre.1
17
38
 
18
39
  - BREAKING: upgrades Sentry gem from `sentry-raven` to `sentry-ruby` ([#199](https://github.com/alphagov/govuk_app_config/pull/199)). There is a **[migration guide](https://docs.sentry.io/platforms/ruby/migration/)** you should follow before upgrading to this version of govuk_app_config.
19
- - This release also fixes the `data_sync_excluded_exceptions` behaviour that has been broken since v3.1.0.
40
+ - This release also fixes the `data_sync_excluded_exceptions` behaviour that was broken in v3.1.0 (later fixed in v3.3.0, which was released after 4.0.0.pre.1).
20
41
  - Released as a pre-release to identify and fix any problems before a wider rollout.
21
42
 
43
+ # 3.3.0
44
+
45
+ - Revert the `should_capture`/`before_send` consolidation introduced in 3.1.0. This fixes the `data_sync_excluded_exceptions` behaviour that has been broken since v3.1.0. ([#211](https://github.com/alphagov/govuk_app_config/pull/211))
46
+
47
+ # 3.2.0
48
+
49
+ - Add Speedcurve's LUX to connect-src policy ([#206](https://github.com/alphagov/govuk_app_config/pull/206))
50
+
22
51
  # 3.1.1
23
52
 
24
53
  - Fix the new before_send behaviour & tests, and add documentation ([#197](https://github.com/alphagov/govuk_app_config/pull/197))
@@ -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,9 +76,15 @@ 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
- "gov.klick2contact.com",
79
+ "hmpowebchat.klick2contact.com",
80
80
  # Allow connecting to Verify to check whether the user is logged in
81
- "www.signin.service.gov.uk"
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"
82
88
 
83
89
  # Disallow all <object>, <embed>, and <applet> elements
84
90
  #
@@ -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
@@ -1,3 +1,3 @@
1
1
  module GovukAppConfig
2
- VERSION = "4.0.0.pre.4".freeze
2
+ VERSION = "4.2.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.0.0.pre.4
4
+ version: 4.2.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: 2021-06-10 00:00:00.000000000 Z
11
+ date: 2022-01-20 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
@@ -274,9 +289,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
274
289
  version: '2.6'
275
290
  required_rubygems_version: !ruby/object:Gem::Requirement
276
291
  requirements:
277
- - - ">"
292
+ - - ">="
278
293
  - !ruby/object:Gem::Version
279
- version: 1.3.1
294
+ version: '0'
280
295
  requirements: []
281
296
  rubygems_version: 3.0.3
282
297
  signing_key: