gds-api-adapters 96.0.3 → 97.0.0
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 +4 -4
- data/README.md +24 -0
- data/lib/gds_api/content_store.rb +1 -5
- data/lib/gds_api/router.rb +1 -2
- data/lib/gds_api/test_helpers/router.rb +3 -4
- data/lib/gds_api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6c352a48f1552b0934b7bdd88e8783b8c598b727353559ca6ca30a27877833a6
|
|
4
|
+
data.tar.gz: aaba187980a1326a859de794faca1e7e836c5385a32f7d12ea3c9c13a7d5a9ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d06232b4511622aa14a0d8169b338d6f12eb320d38c2c16e0796a6b476c3fc2a9fe54b779fc4f43d886b37978864e24f787c6c6c0c4453a37838f5d0545785d2
|
|
7
|
+
data.tar.gz: f7247d52a2e02f6fca017f3b44f2aee212f63ddb3fd868862deb4b005e703bcf412cd74777b3ec1e94145eec476ff70bef7443e9e9426f4dd6f0d12a5d6beeef
|
data/README.md
CHANGED
|
@@ -110,6 +110,30 @@ Then at the PSQL command line:
|
|
|
110
110
|
|
|
111
111
|
`template1=# CREATE EXTENSION IF NOT EXISTS "uuid-ossp";`
|
|
112
112
|
|
|
113
|
+
## Releasing
|
|
114
|
+
|
|
115
|
+
1. Read the CHANGELOG.md and decide on the new semantic version number
|
|
116
|
+
1. Create a release branch, eg. `release-96.0.3`
|
|
117
|
+
1. Update the CHANGELOG.md
|
|
118
|
+
- Declare a new version number
|
|
119
|
+
- Move all unreleased changes beneath it
|
|
120
|
+
1. Update `lib/gds_api/version.rb` to match, eg
|
|
121
|
+
|
|
122
|
+
```ruby
|
|
123
|
+
module GdsApi
|
|
124
|
+
VERSION = "96.0.3".freeze
|
|
125
|
+
end
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
1. Copy the lines from the CHANGELOG.md into the git commit
|
|
129
|
+
1. Propose and merge the pull request into `main`
|
|
130
|
+
|
|
131
|
+
Nb:
|
|
132
|
+
|
|
133
|
+
- You do not need to set any git tags
|
|
134
|
+
- After merging, CI will release the new version of the gem and Dependabot will
|
|
135
|
+
propose the new version of the gem to help distribute the changes to consumers
|
|
136
|
+
|
|
113
137
|
## Licence
|
|
114
138
|
|
|
115
139
|
Released under the MIT Licence, a copy of which can be found in the file
|
|
@@ -53,7 +53,7 @@ private
|
|
|
53
53
|
"#{Plek.new.website_root}#{destination_uri}"
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
-
[url,
|
|
56
|
+
[url, 301]
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
private_class_method :new
|
|
@@ -105,10 +105,6 @@ private
|
|
|
105
105
|
|
|
106
106
|
uri.to_s
|
|
107
107
|
end
|
|
108
|
-
|
|
109
|
-
def status_code(redirect)
|
|
110
|
-
redirect["redirect_type"] == "temporary" ? 302 : 301
|
|
111
|
-
end
|
|
112
108
|
end
|
|
113
109
|
|
|
114
110
|
class UnresolvedRedirect < GdsApi::BaseError; end
|
data/lib/gds_api/router.rb
CHANGED
|
@@ -33,7 +33,7 @@ class GdsApi::Router < GdsApi::Base
|
|
|
33
33
|
)
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
def add_redirect_route(path, type, destination,
|
|
36
|
+
def add_redirect_route(path, type, destination, options = {})
|
|
37
37
|
put_json(
|
|
38
38
|
"#{endpoint}/routes",
|
|
39
39
|
route: {
|
|
@@ -41,7 +41,6 @@ class GdsApi::Router < GdsApi::Base
|
|
|
41
41
|
route_type: type,
|
|
42
42
|
handler: "redirect",
|
|
43
43
|
redirect_to: destination,
|
|
44
|
-
redirect_type:,
|
|
45
44
|
segments_mode: options[:segments_mode],
|
|
46
45
|
},
|
|
47
46
|
)
|
|
@@ -21,8 +21,8 @@ module GdsApi
|
|
|
21
21
|
stub_router_has_route(path, handler: "backend", backend_id:, disabled:, route_type:)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
def stub_router_has_redirect_route(path, redirect_to:,
|
|
25
|
-
stub_router_has_route(path, handler: "redirect", redirect_to:,
|
|
24
|
+
def stub_router_has_redirect_route(path, redirect_to:, route_type: "exact", disabled: false)
|
|
25
|
+
stub_router_has_route(path, handler: "redirect", redirect_to:, disabled:, route_type:)
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def stub_router_has_gone_route(path, route_type: "exact", disabled: false)
|
|
@@ -52,14 +52,13 @@ module GdsApi
|
|
|
52
52
|
})
|
|
53
53
|
end
|
|
54
54
|
|
|
55
|
-
def stub_redirect_registration(path, type, destination,
|
|
55
|
+
def stub_redirect_registration(path, type, destination, segments_mode = nil)
|
|
56
56
|
stub_route_put({
|
|
57
57
|
route: {
|
|
58
58
|
incoming_path: path,
|
|
59
59
|
route_type: type,
|
|
60
60
|
handler: "redirect",
|
|
61
61
|
redirect_to: destination,
|
|
62
|
-
redirect_type:,
|
|
63
62
|
segments_mode:,
|
|
64
63
|
},
|
|
65
64
|
})
|
data/lib/gds_api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gds-api-adapters
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 97.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GOV.UK Dev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-10-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|
|
@@ -402,7 +402,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
402
402
|
- !ruby/object:Gem::Version
|
|
403
403
|
version: '0'
|
|
404
404
|
requirements: []
|
|
405
|
-
rubygems_version: 3.5.
|
|
405
|
+
rubygems_version: 3.5.22
|
|
406
406
|
signing_key:
|
|
407
407
|
specification_version: 4
|
|
408
408
|
summary: Adapters to work with GDS APIs
|