govuk_content_item_loader 2.1.0 → 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: 1be41cd01c785aed434eb244a0cdc2579c2cce361fe37d250eb2450b54200e9d
4
- data.tar.gz: 5767159a9c587dcadc63fce6658172a5f903a0e0682b7c0cb214ff9b059b361f
3
+ metadata.gz: ade47081a04c995b15d2af83f8d306dd5c5512dce1efc5d899d73aadb876e9b7
4
+ data.tar.gz: fe06de6a2378107a64b67fe4eb96166de241eb231855e942677c9171bb9b2449
5
5
  SHA512:
6
- metadata.gz: f6eda0a6528c721ea3ad797a274cb509ea4a8fb37c3b7b89a10fca30d4294cfe2e5ecd11dd3d53357cdc8a3709c740656fc748d7dab85e572fc13886c81bbb0a
7
- data.tar.gz: 74e84ced2858545e4416f9ae70e93d14f3af4f3a6f05d9d5471cc2635df7811ca3c9e27e73404332e15220b9a57f55821531ecb03a36c7f944f871f1b30da225
6
+ metadata.gz: 7232be220dcfa09a317e598d7af471187c79786cebe2bba0cd98c89e893039e110570908d8f1ab16ddfda52d81a9aecdb79dbb7e5fd0fc176477b512c1680992
7
+ data.tar.gz: 762c003298c0e2157eb614b251cf03117e79528fb357512991338a1e7c154342970a2bae8aa3d2ef58503fbef7ea5b9fce9de71e4b156712ff1a9bb302556b16
@@ -38,7 +38,7 @@ jobs:
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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
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
+
3
7
  ## 2.1.0
4
8
 
5
9
  * Drop support for Ruby 3.2
@@ -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.1.0".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.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
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