gds-api-adapters 96.0.3 → 97.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3182c86f70e20b3d92c0cf4f28f63a487e343dff7394d41de0f0953b51fde3fa
4
- data.tar.gz: 2e31481af69353c207b13cc4e94c6e59a7f151c94c5eda22d5b2a0d0c4ef86ef
3
+ metadata.gz: 6c352a48f1552b0934b7bdd88e8783b8c598b727353559ca6ca30a27877833a6
4
+ data.tar.gz: aaba187980a1326a859de794faca1e7e836c5385a32f7d12ea3c9c13a7d5a9ec
5
5
  SHA512:
6
- metadata.gz: 3b4d1743e125d8d1d8928fc7d4bc705fee3dd0eae19342d75d5c07f28dcea2590f8986efc3fd4671885ad610c311cf88deb62bccecd580cef39c3231cbe93834
7
- data.tar.gz: a3a01fd52aa66cf83a346c90a025fa7972aee550f19f81de5ff3d033d98415101cf900a2e3e455286e245675a6aaa85ed7a3c1c93a6ac974355cb59eadac4845
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, status_code(redirect)]
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
@@ -33,7 +33,7 @@ class GdsApi::Router < GdsApi::Base
33
33
  )
34
34
  end
35
35
 
36
- def add_redirect_route(path, type, destination, redirect_type = "permanent", options = {})
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:, redirect_type: "permanent", route_type: "exact", disabled: false)
25
- stub_router_has_route(path, handler: "redirect", redirect_to:, redirect_type:, disabled:, route_type:)
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, redirect_type, segments_mode = nil)
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
  })
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = "96.0.3".freeze
2
+ VERSION = "97.0.0".freeze
3
3
  end
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: 96.0.3
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-08-30 00:00:00.000000000 Z
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.18
405
+ rubygems_version: 3.5.22
406
406
  signing_key:
407
407
  specification_version: 4
408
408
  summary: Adapters to work with GDS APIs