govuk_content_item_loader 2.1.0 → 2.1.2

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: 6f5e34eeddc9736bc71c30bfe8e4436f784dcc3bcbbfa38d2a279417c10fcd81
4
+ data.tar.gz: 91cfa7d2d2634d3ba54886879ed0819eb43c41b1afb9e66406f35c5c1c02ae46
5
5
  SHA512:
6
- metadata.gz: f6eda0a6528c721ea3ad797a274cb509ea4a8fb37c3b7b89a10fca30d4294cfe2e5ecd11dd3d53357cdc8a3709c740656fc748d7dab85e572fc13886c81bbb0a
7
- data.tar.gz: 74e84ced2858545e4416f9ae70e93d14f3af4f3a6f05d9d5471cc2635df7811ca3c9e27e73404332e15220b9a57f55821531ecb03a36c7f944f871f1b30da225
6
+ metadata.gz: 11274dee77d5aeb0ab3df8f86ef8bceed0df7d0950886f45cb09ccf0f1a0e87556439b93bd4247cad689ce794fa1cde3b35da3310480d575c06ebb730b39eb9b
7
+ data.tar.gz: 47b85e09383cae415b5128a90d233c454368aa6a622f27a2590078f0a2c1d085bc9c4df5d753bd00356b1d480b1da299852277c5d333fb202825908d9aa0c1a1
@@ -26,19 +26,19 @@ jobs:
26
26
  dependency-review:
27
27
  name: Dependency Review scan
28
28
  uses: alphagov/govuk-infrastructure/.github/workflows/dependency-review.yml@main
29
-
29
+
30
30
  # Run the test suite against multiple Ruby and Rails versions
31
31
  test_matrix:
32
32
  strategy:
33
33
  fail-fast: false
34
34
  matrix:
35
- ruby: [3.3, 3.4]
35
+ ruby: [3.3, 3.4, 4.0]
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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.1.2
4
+
5
+ * Test against Ruby 4.0
6
+
7
+ ## 2.1.1
8
+
9
+ * Add optional `base_path` argument to `GovukConditionalContentItemLoader`, allowing a different path from the original request to be retrieved.
10
+ * Update dependencies
11
+
3
12
  ## 2.1.0
4
13
 
5
14
  * 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.2".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.2
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