govuk_app_config 9.13.1 → 9.14.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: e033399f0e7231123a899cdfb56dcf3123b683b6c1eaaa269ef4b75b95b8923f
4
- data.tar.gz: 7cd8242c79f23ae3407750fe30db75f051523abddf2cd0e8cb3d0cbc2056c7f1
3
+ metadata.gz: db01a15a905d234563b938adb16cfd6a3c84f042e4aee00251f26391eeeb438a
4
+ data.tar.gz: 0f9644f39d848621e5b7c3054cee4ba4f5ce592d010c1d00744858ca9b903969
5
5
  SHA512:
6
- metadata.gz: 42e29730110ed7a84968c5c1cdd629a2d4e3842ad64374b86f76b53260aefe6fadf7ac29185d9124bfa865efa33d201554b013fb8de0a3c473a76d4a476db4c6
7
- data.tar.gz: 41a194f3fd410be4011a5e9f0d0ce8c8657170164ae3e79666b2c8d211556050a899eb647bf440e2bfdb72f5dcf6a6d5dd6b17ea5d7e72c8242d642d4126f989
6
+ metadata.gz: 6623d2ad3c9b3654d668ddad890e767fb72190924e5f9e02c96c1148e17d957a56ab64f94eee1a4b71b5afb3c37cfe8833361206b59e782b5d1409810f871334
7
+ data.tar.gz: fe4b351982fe4c942c0a047028501ed650fdce01954e288d3abaf0489bb7b60dd14a36f7d1d0020b49bea8dcbaef6a794cfcfea1680a46ec152e645fd0a1f695
@@ -0,0 +1,9 @@
1
+ on:
2
+ workflow_dispatch: {}
3
+ pull_request: {}
4
+
5
+ jobs:
6
+ gem-bump-checker:
7
+ uses: alphagov/govuk-infrastructure/.github/workflows/gem-bump-checker.yml@main
8
+ secrets:
9
+ GH_TOKEN: ${{ secrets.GOVUK_CI_GITHUB_API_TOKEN }}
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 9.14.0
2
+
3
+ * Configure `time_zone` with `govuk_time_zone` [#392](https://github.com/alphagov/govuk_app_config/pull/392)
4
+
1
5
  # 9.13.1
2
6
 
3
7
  * Update dependencies
data/README.md CHANGED
@@ -184,7 +184,17 @@ Some frontend apps support languages that are not defined in the i18n gem. This
184
184
 
185
185
  ## Time zone
186
186
 
187
- This gem sets `config.time_zone` to `"London"` - this cannot currently be overridden in application config.
187
+ This gem sets `config.time_zone` to `"London"` by default.
188
+
189
+ If you require a different time zone, you can set it with `config.govuk_time_zone`:
190
+
191
+ ```ruby
192
+ config.govuk_time_zone = "UTC"
193
+ ```
194
+
195
+ Note that we've introduced a new config field (`govuk_time_zone`) here, because
196
+ it's otherwise not possible to distinguish between an app using UTC as the
197
+ default and an app explicitly asking for UTC.
188
198
 
189
199
  ## License
190
200
 
data/docs/healthchecks.md CHANGED
@@ -80,4 +80,4 @@ It is expected that these methods may cache their results for performance
80
80
  reasons, if a user wants to ensure they have the latest value they should
81
81
  create a new instance of the check first.
82
82
 
83
- Put custom health checks for your app into a `Healtcheck` module. Each custom check class should end with `Check`.
83
+ Put custom health checks for your app into a `Healthcheck` module. Each custom check class should end with `Check`.
@@ -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.29"
25
- spec.add_dependency "opentelemetry-instrumentation-all", ">= 0.39.1", "< 0.62.0"
25
+ spec.add_dependency "opentelemetry-instrumentation-all", ">= 0.39.1", "< 0.63.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,7 +39,7 @@ 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", "5.0.1"
42
+ spec.add_development_dependency "rubocop-govuk", "5.0.2"
43
43
  spec.add_development_dependency "simplecov"
44
44
  spec.add_development_dependency "webmock"
45
45
  end
@@ -1,14 +1,12 @@
1
1
  module GovukTimezone
2
2
  def self.configure(config)
3
- case config.time_zone
4
- when "UTC"
5
- Rails.logger.info "govuk_app_config changing time_zone from UTC (the default) to London"
6
- when "London"
7
- Rails.logger.info "govuk_app_config always sets time_zone to London - there is no need to set config.time_zone in your app"
3
+ raise "govuk_app_config prevents configuring time_zone with config.time_zone - use config.govuk_time_zone instead" unless config.time_zone == "UTC"
4
+
5
+ if config.respond_to?(:govuk_time_zone) && config.govuk_time_zone.present?
6
+ config.time_zone = config.govuk_time_zone
8
7
  else
9
- raise "govuk_app_config prevents configuring time_zones other than London - config.time_zone was set to #{config.time_zone}"
8
+ Rails.logger.info 'govuk_app_config changing time_zone from UTC (the rails default) to London (the GOV.UK default). Set config.govuk_time_zone = "UTC" if you need UTC.'
9
+ config.time_zone = "London"
10
10
  end
11
-
12
- config.time_zone = "London"
13
11
  end
14
12
  end
@@ -1,3 +1,3 @@
1
1
  module GovukAppConfig
2
- VERSION = "9.13.1".freeze
2
+ VERSION = "9.14.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: 9.13.1
4
+ version: 9.14.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: 2024-07-03 00:00:00.000000000 Z
11
+ date: 2024-07-24 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.62.0
56
+ version: 0.63.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.62.0
66
+ version: 0.63.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: 5.0.1
295
+ version: 5.0.2
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: 5.0.1
302
+ version: 5.0.2
303
303
  - !ruby/object:Gem::Dependency
304
304
  name: simplecov
305
305
  requirement: !ruby/object:Gem::Requirement
@@ -339,6 +339,7 @@ files:
339
339
  - ".github/pull_request_template.md"
340
340
  - ".github/workflows/autorelease.yml"
341
341
  - ".github/workflows/ci.yml"
342
+ - ".github/workflows/gem-bump-checker.yml"
342
343
  - ".gitignore"
343
344
  - ".govuk_dependabot_merger.yml"
344
345
  - ".rspec"
@@ -394,7 +395,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
394
395
  - !ruby/object:Gem::Version
395
396
  version: '0'
396
397
  requirements: []
397
- rubygems_version: 3.5.14
398
+ rubygems_version: 3.5.16
398
399
  signing_key:
399
400
  specification_version: 4
400
401
  summary: Base configuration for GOV.UK applications