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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ade47081a04c995b15d2af83f8d306dd5c5512dce1efc5d899d73aadb876e9b7
|
|
4
|
+
data.tar.gz: fe06de6a2378107a64b67fe4eb96166de241eb231855e942677c9171bb9b2449
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7232be220dcfa09a317e598d7af471187c79786cebe2bba0cd98c89e893039e110570908d8f1ab16ddfda52d81a9aecdb79dbb7e5fd0fc176477b512c1680992
|
|
7
|
+
data.tar.gz: 762c003298c0e2157eb614b251cf03117e79528fb357512991338a1e7c154342970a2bae8aa3d2ef58503fbef7ea5b9fce9de71e4b156712ff1a9bb302556b16
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -32,13 +32,13 @@ jobs:
|
|
|
32
32
|
strategy:
|
|
33
33
|
fail-fast: false
|
|
34
34
|
matrix:
|
|
35
|
-
ruby: [3.
|
|
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@
|
|
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.
|
|
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.
|
|
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
|
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.
|
|
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.
|
|
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.
|
|
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
|