gds-api-adapters 87.0.0 → 87.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gds_api/test_helpers/local_links_manager.rb +20 -13
- 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: 252fd93c8ba325603ea79d072ec0574500dd2866a66ca4d05c347acc75f19649
|
4
|
+
data.tar.gz: 97b3e1e58349fd011d41b8611253f1ec65cc9dd93a578555d6b1de7fd61f9f93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7a24ca2fa6c1e1f5c2e6867eac0b1bdb89b07b8280a65c34b25444755fdad8136d9ea57393cebfb67721a7932dd1519c1ab88822fe5c5b67243da87c59b4fb9
|
7
|
+
data.tar.gz: 82b38474030f15b6f1aa91b36f0f82f1e11109c2b78be2d5e086e924b73dd5bb4b4291cf308f5da6324c05aa7f80fbd5df7f6ca9dfa6376012b3e2258ed7b3b7
|
@@ -5,11 +5,11 @@ module GdsApi
|
|
5
5
|
module LocalLinksManager
|
6
6
|
LOCAL_LINKS_MANAGER_ENDPOINT = Plek.find("local-links-manager")
|
7
7
|
|
8
|
-
def stub_local_links_manager_has_a_link(authority_slug:, lgsl:, lgil:, url:, country_name: "England", status: "ok", snac: "00AG", local_custodian_code: nil)
|
8
|
+
def stub_local_links_manager_has_a_link(authority_slug:, lgsl:, lgil:, url:, country_name: "England", status: "ok", snac: "00AG", gss: "EE06000063", local_custodian_code: nil)
|
9
9
|
response = {
|
10
10
|
"local_authority" => {
|
11
11
|
"name" => authority_slug.capitalize,
|
12
|
-
"
|
12
|
+
"gss" => gss,
|
13
13
|
"tier" => "unitary",
|
14
14
|
"homepage_url" => "http://#{authority_slug}.example.com",
|
15
15
|
"country_name" => country_name,
|
@@ -22,6 +22,7 @@ module GdsApi
|
|
22
22
|
"status" => status,
|
23
23
|
},
|
24
24
|
}
|
25
|
+
response["local_authority"]["snac"] = snac if snac
|
25
26
|
|
26
27
|
stub_request(:get, "#{LOCAL_LINKS_MANAGER_ENDPOINT}/api/link")
|
27
28
|
.with(query: { authority_slug: authority_slug, lgsl: lgsl, lgil: lgil })
|
@@ -34,17 +35,18 @@ module GdsApi
|
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
37
|
-
def stub_local_links_manager_has_no_link(authority_slug:, lgsl:, lgil:, country_name: "England", snac: "00AG", local_custodian_code: nil)
|
38
|
+
def stub_local_links_manager_has_no_link(authority_slug:, lgsl:, lgil:, country_name: "England", snac: "00AG", gss: "EE06000063", local_custodian_code: nil)
|
38
39
|
response = {
|
39
40
|
"local_authority" => {
|
40
41
|
"name" => authority_slug.capitalize,
|
41
|
-
"
|
42
|
+
"gss" => gss,
|
42
43
|
"tier" => "unitary",
|
43
44
|
"homepage_url" => "http://#{authority_slug}.example.com",
|
44
45
|
"country_name" => country_name,
|
45
46
|
"slug" => authority_slug,
|
46
47
|
},
|
47
48
|
}
|
49
|
+
response["local_authority"]["snac"] = snac if snac
|
48
50
|
|
49
51
|
stub_request(:get, "#{LOCAL_LINKS_MANAGER_ENDPOINT}/api/link")
|
50
52
|
.with(query: { authority_slug: authority_slug, lgsl: lgsl, lgil: lgil })
|
@@ -57,17 +59,18 @@ module GdsApi
|
|
57
59
|
end
|
58
60
|
end
|
59
61
|
|
60
|
-
def stub_local_links_manager_has_no_link_and_no_homepage_url(authority_slug:, lgsl:, lgil:, country_name: "England", snac: "00AG", local_custodian_code: nil)
|
62
|
+
def stub_local_links_manager_has_no_link_and_no_homepage_url(authority_slug:, lgsl:, lgil:, country_name: "England", snac: "00AG", gss: "EE06000063", local_custodian_code: nil)
|
61
63
|
response = {
|
62
64
|
"local_authority" => {
|
63
65
|
"name" => authority_slug.capitalize,
|
64
|
-
"
|
66
|
+
"gss" => gss,
|
65
67
|
"tier" => "unitary",
|
66
68
|
"homepage_url" => nil,
|
67
69
|
"country_name" => country_name,
|
68
70
|
"slug" => authority_slug,
|
69
71
|
},
|
70
72
|
}
|
73
|
+
response["local_authority"]["snac"] = snac if snac
|
71
74
|
|
72
75
|
stub_request(:get, "#{LOCAL_LINKS_MANAGER_ENDPOINT}/api/link")
|
73
76
|
.with(query: { authority_slug: authority_slug, lgsl: lgsl, lgil: lgil })
|
@@ -98,7 +101,7 @@ module GdsApi
|
|
98
101
|
parameters
|
99
102
|
end
|
100
103
|
|
101
|
-
def stub_local_links_manager_has_a_local_authority(authority_slug, country_name: "England", snac: "00AG", local_custodian_code: nil)
|
104
|
+
def stub_local_links_manager_has_a_local_authority(authority_slug, country_name: "England", snac: "00AG", gss: "EE06000063", local_custodian_code: nil)
|
102
105
|
response = {
|
103
106
|
"local_authorities" => [
|
104
107
|
{
|
@@ -107,10 +110,11 @@ module GdsApi
|
|
107
110
|
"country_name" => country_name,
|
108
111
|
"tier" => "unitary",
|
109
112
|
"slug" => authority_slug,
|
110
|
-
"
|
113
|
+
"gss" => gss,
|
111
114
|
},
|
112
115
|
],
|
113
116
|
}
|
117
|
+
response["local_authorities"][0]["snac"] = snac if snac
|
114
118
|
|
115
119
|
stub_request(:get, "#{LOCAL_LINKS_MANAGER_ENDPOINT}/api/local-authority")
|
116
120
|
.with(query: { authority_slug: authority_slug })
|
@@ -123,7 +127,7 @@ module GdsApi
|
|
123
127
|
end
|
124
128
|
end
|
125
129
|
|
126
|
-
def stub_local_links_manager_has_a_district_and_county_local_authority(district_slug, county_slug, district_snac: "00AG", county_snac: "00LC", local_custodian_code: nil)
|
130
|
+
def stub_local_links_manager_has_a_district_and_county_local_authority(district_slug, county_slug, district_snac: "00AG", county_snac: "00LC", district_gss: "EE06000063", county_gss: "EE06000064", local_custodian_code: nil)
|
127
131
|
response = {
|
128
132
|
"local_authorities" => [
|
129
133
|
{
|
@@ -132,7 +136,7 @@ module GdsApi
|
|
132
136
|
"country_name" => "England",
|
133
137
|
"tier" => "district",
|
134
138
|
"slug" => district_slug,
|
135
|
-
"
|
139
|
+
"gss" => district_gss,
|
136
140
|
},
|
137
141
|
{
|
138
142
|
"name" => county_slug.capitalize,
|
@@ -140,10 +144,12 @@ module GdsApi
|
|
140
144
|
"country_name" => "England",
|
141
145
|
"tier" => "county",
|
142
146
|
"slug" => county_slug,
|
143
|
-
"
|
147
|
+
"gss" => county_gss,
|
144
148
|
},
|
145
149
|
],
|
146
150
|
}
|
151
|
+
response["local_authorities"][0]["snac"] = district_snac if district_snac
|
152
|
+
response["local_authorities"][1]["snac"] = county_snac if county_snac
|
147
153
|
|
148
154
|
stub_request(:get, "#{LOCAL_LINKS_MANAGER_ENDPOINT}/api/local-authority")
|
149
155
|
.with(query: { authority_slug: district_slug })
|
@@ -180,7 +186,7 @@ module GdsApi
|
|
180
186
|
.to_return(body: {}.to_json, status: 404)
|
181
187
|
end
|
182
188
|
|
183
|
-
def stub_local_links_manager_has_a_local_authority_without_homepage(authority_slug, country_name: "England", snac: "00AG", local_custodian_code: nil)
|
189
|
+
def stub_local_links_manager_has_a_local_authority_without_homepage(authority_slug, country_name: "England", snac: "00AG", gss: "EE06000063", local_custodian_code: nil)
|
184
190
|
response = {
|
185
191
|
"local_authorities" => [
|
186
192
|
{
|
@@ -189,10 +195,11 @@ module GdsApi
|
|
189
195
|
"country_name" => country_name,
|
190
196
|
"tier" => "unitary",
|
191
197
|
"slug" => authority_slug,
|
192
|
-
"
|
198
|
+
"gss" => gss,
|
193
199
|
},
|
194
200
|
],
|
195
201
|
}
|
202
|
+
response["local_authorities"][0]["snac"] = snac if snac
|
196
203
|
|
197
204
|
stub_request(:get, "#{LOCAL_LINKS_MANAGER_ENDPOINT}/api/local-authority")
|
198
205
|
.with(query: { authority_slug: authority_slug })
|
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: 87.
|
4
|
+
version: 87.1.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: 2023-
|
11
|
+
date: 2023-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -417,7 +417,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
417
417
|
- !ruby/object:Gem::Version
|
418
418
|
version: '0'
|
419
419
|
requirements: []
|
420
|
-
rubygems_version: 3.4.
|
420
|
+
rubygems_version: 3.4.13
|
421
421
|
signing_key:
|
422
422
|
specification_version: 4
|
423
423
|
summary: Adapters to work with GDS APIs
|