govuk_content_item_loader 2.0.1 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bb947b61c830b418c2941913dc207c17b6f175e3d6ba2a0ed13051ba60a0fc4
4
- data.tar.gz: '024586893b7ad6492cec7ca9f7c52dbf0f6eab6fd480b0f1910727d9bd4becf9'
3
+ metadata.gz: ade47081a04c995b15d2af83f8d306dd5c5512dce1efc5d899d73aadb876e9b7
4
+ data.tar.gz: fe06de6a2378107a64b67fe4eb96166de241eb231855e942677c9171bb9b2449
5
5
  SHA512:
6
- metadata.gz: 6561e782d74861fc4b641f37924d55b92a5337c2cff0bd90d7331bbaaae6eaa91ea6320d4e3f4b6f0d9f337ca06a2caaa79dc9362692ac43134d579e634db82f
7
- data.tar.gz: 2afa336300d20386fa0525edd2e97105e8d1291a70467cfb91fe629a81e268c799f1c49e6832ea045342c0b67ca2e5e5ed4f63561e21823a7d00878cefc70917
6
+ metadata.gz: 7232be220dcfa09a317e598d7af471187c79786cebe2bba0cd98c89e893039e110570908d8f1ab16ddfda52d81a9aecdb79dbb7e5fd0fc176477b512c1680992
7
+ data.tar.gz: 762c003298c0e2157eb614b251cf03117e79528fb357512991338a1e7c154342970a2bae8aa3d2ef58503fbef7ea5b9fce9de71e4b156712ff1a9bb302556b16
@@ -32,13 +32,13 @@ jobs:
32
32
  strategy:
33
33
  fail-fast: false
34
34
  matrix:
35
- ruby: [3.2, 3.3, 3.4]
35
+ ruby: [3.3, 3.4]
36
36
  runs-on: ubuntu-latest
37
37
  steps:
38
38
  - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
39
39
  with:
40
40
  ref: ${{ inputs.ref || github.ref }}
41
- - uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
41
+ - uses: ruby/setup-ruby@e65c17d16e57e481586a6a5a0282698790062f92 # v1.300.0
42
42
  with:
43
43
  ruby-version: ${{ matrix.ruby }}
44
44
  bundler-cache: true
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.9
1
+ 3.3.11
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.1.1
4
+
5
+ * Add optional `base_path` argument to `GovukConditionalContentItemLoader`, allowing a different path from the original request to be retrieved.
6
+
7
+ ## 2.1.0
8
+
9
+ * Drop support for Ruby 3.2
10
+
3
11
  ## 2.0.1
4
12
 
5
13
  * Add `stub_conditional_content_loader_isnt_available` test helper.
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.homepage = "https://github.com/alphagov/govuk_content_item_loader"
13
13
  spec.license = "MIT"
14
14
 
15
- spec.required_ruby_version = ">= 3.2"
15
+ spec.required_ruby_version = ">= 3.3"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
18
  spec.bindir = "exe"
@@ -1,11 +1,11 @@
1
1
  class GovukConditionalContentItemLoader
2
2
  attr_reader :content_store_client, :publishing_api_client, :request, :base_path
3
3
 
4
- def initialize(request:, content_store_client: GdsApi.content_store, publishing_api_client: GdsApi.publishing_api)
4
+ def initialize(request:, content_store_client: GdsApi.content_store, publishing_api_client: GdsApi.publishing_api, base_path: nil)
5
5
  @content_store_client = content_store_client
6
6
  @publishing_api_client = publishing_api_client
7
7
  @request = request
8
- @base_path = request&.path
8
+ @base_path = base_path || request&.path
9
9
  end
10
10
 
11
11
  def load
@@ -1,3 +1,3 @@
1
1
  module GovukContentItemLoader
2
- VERSION = "2.0.1".freeze
2
+ VERSION = "2.1.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_content_item_loader
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
@@ -203,14 +203,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
203
  requirements:
204
204
  - - ">="
205
205
  - !ruby/object:Gem::Version
206
- version: '3.2'
206
+ version: '3.3'
207
207
  required_rubygems_version: !ruby/object:Gem::Requirement
208
208
  requirements:
209
209
  - - ">="
210
210
  - !ruby/object:Gem::Version
211
211
  version: '0'
212
212
  requirements: []
213
- rubygems_version: 4.0.9
213
+ rubygems_version: 4.0.10
214
214
  specification_version: 4
215
215
  summary: Provides a standardised content item loader for GOV.UK frontend apps with
216
216
  configurable GraphQL traffic routing and automatic fallback to the Content Store