gds-api-adapters 55.0.2 → 56.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/lib/gds_api/content_store.rb +0 -4
- data/lib/gds_api/publishing_api.rb +0 -5
- data/lib/gds_api/publishing_api_v2.rb +0 -5
- data/lib/gds_api/router.rb +1 -4
- data/lib/gds_api/rummager.rb +0 -10
- data/lib/gds_api/test_helpers/rummager.rb +0 -7
- data/lib/gds_api/version.rb +1 -1
- metadata +2 -3
- data/lib/gds_api/helpers.rb +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 711e3cac1f92b9ec958cddcaa8d5d33cd22d5da600fe301f364aca15cbbad924
|
4
|
+
data.tar.gz: b8c32528299910a131982ac14de2254dd8bb328d04e01f3f19e2c231c9aceebc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbbe240bbb229854cced2b41e489bdf518c5bc1816899f366178f2494af1eb498bdab28672840c311e837a45e35c15097b8d357a0cfb587fca80d658d6e94ef6
|
7
|
+
data.tar.gz: 8b333ce86b7db2ba07f1fa12d18437742eb312239b1e65ec4c63bb090b6c30920a741e65e58664b9cd4645430cd697e2cb9186bf3e2f7e6360dee41c7596c5f5
|
@@ -16,10 +16,6 @@ class GdsApi::ContentStore < GdsApi::Base
|
|
16
16
|
raise ItemNotFound.build_from(e)
|
17
17
|
end
|
18
18
|
|
19
|
-
def content_item!(_)
|
20
|
-
raise "`ContentStore#content_item!` is deprecated. Use `ContentStore#content_item` instead"
|
21
|
-
end
|
22
|
-
|
23
19
|
# Returns an array tuple of destination url with status code e.g
|
24
20
|
# ["https://www.gov.uk/destination", 301]
|
25
21
|
def self.redirect_for_path(content_item, request_path, request_query = "")
|
@@ -33,11 +33,6 @@ class GdsApi::PublishingApiV2 < GdsApi::Base
|
|
33
33
|
get_json(content_url(content_id, params))
|
34
34
|
end
|
35
35
|
|
36
|
-
# @private
|
37
|
-
def get_content!(*)
|
38
|
-
raise "`PublishingApiV2#get_content!` is deprecated. Use `PublishingApiV2#get_content`"
|
39
|
-
end
|
40
|
-
|
41
36
|
# Find the content_ids for a list of base_paths.
|
42
37
|
#
|
43
38
|
# @param base_paths [Array]
|
data/lib/gds_api/router.rb
CHANGED
@@ -17,10 +17,7 @@ class GdsApi::Router < GdsApi::Base
|
|
17
17
|
|
18
18
|
### Routes
|
19
19
|
|
20
|
-
def get_route(path
|
21
|
-
if type
|
22
|
-
warn "DEPRECATION WARNING: passing type to GdsApi::Router#get_route is deprecated and will be removed in a future version. Caller: #{caller(1..1)}"
|
23
|
-
end
|
20
|
+
def get_route(path)
|
24
21
|
get_json("#{endpoint}/routes?incoming_path=#{CGI.escape(path)}")
|
25
22
|
end
|
26
23
|
|
data/lib/gds_api/rummager.rb
CHANGED
@@ -144,11 +144,6 @@ module GdsApi
|
|
144
144
|
delete_json(request_url)
|
145
145
|
end
|
146
146
|
|
147
|
-
# @private
|
148
|
-
def delete_content!(*)
|
149
|
-
raise "`Rummager#delete_content!` is deprecated. Use `Rummager#delete_content`"
|
150
|
-
end
|
151
|
-
|
152
147
|
# Retrieve a content-document from the index.
|
153
148
|
#
|
154
149
|
# Content documents are pages on GOV.UK that have a base path and are
|
@@ -162,11 +157,6 @@ module GdsApi
|
|
162
157
|
get_json(request_url)
|
163
158
|
end
|
164
159
|
|
165
|
-
# @private
|
166
|
-
def get_content!(*)
|
167
|
-
raise "`Rummager#get_content!` is deprecated. Use `Rummager#get_content`"
|
168
|
-
end
|
169
|
-
|
170
160
|
# Delete a non-content document from the search index.
|
171
161
|
#
|
172
162
|
# For example, best bets, recommended links, or contacts.
|
@@ -16,13 +16,6 @@ module GdsApi
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
def stub_any_rummager_post_with_queueing_enabled
|
20
|
-
warn "stub_any_rummager_post_with_queueing_enabled is deprecated: use stub_any_rummager_post instead"
|
21
|
-
|
22
|
-
stub_request(:post, %r{#{RUMMAGER_ENDPOINT}/documents}) \
|
23
|
-
.to_return(status: [202, "Accepted"])
|
24
|
-
end
|
25
|
-
|
26
19
|
def assert_rummager_posted_item(attributes, index: nil, **options)
|
27
20
|
if index
|
28
21
|
url = RUMMAGER_ENDPOINT + "/#{index}/documents"
|
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: 56.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:
|
11
|
+
date: 2019-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -364,7 +364,6 @@ files:
|
|
364
364
|
- lib/gds_api/email_alert_api.rb
|
365
365
|
- lib/gds_api/exceptions.rb
|
366
366
|
- lib/gds_api/govuk_headers.rb
|
367
|
-
- lib/gds_api/helpers.rb
|
368
367
|
- lib/gds_api/imminence.rb
|
369
368
|
- lib/gds_api/json_client.rb
|
370
369
|
- lib/gds_api/licence_application.rb
|
data/lib/gds_api/helpers.rb
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
require 'gds_api/asset_manager'
|
2
|
-
require 'gds_api/content_store'
|
3
|
-
require 'gds_api/imminence'
|
4
|
-
require 'gds_api/licence_application'
|
5
|
-
require 'gds_api/worldwide'
|
6
|
-
require 'gds_api/email_alert_api'
|
7
|
-
|
8
|
-
# This module is deprecated and should be removed in the next major release
|
9
|
-
# Apps using this are encouraged to use GdsApi module methods
|
10
|
-
# (e.g. GdsApi.asset_manger) rather than using this mixin
|
11
|
-
module GdsApi
|
12
|
-
module Helpers
|
13
|
-
def asset_manager_api(options = {})
|
14
|
-
@asset_manager_api ||= GdsApi::AssetManager.new(Plek.current.find('asset-manager'), options)
|
15
|
-
end
|
16
|
-
|
17
|
-
def content_store(options = {})
|
18
|
-
@content_store ||= GdsApi::ContentStore.new(Plek.current.find("content-store"), options)
|
19
|
-
end
|
20
|
-
|
21
|
-
def imminence_api(options = {})
|
22
|
-
@imminence_api ||= GdsApi::Imminence.new(Plek.current.find("imminence"), options)
|
23
|
-
end
|
24
|
-
|
25
|
-
def licence_application_api(options = {})
|
26
|
-
@licence_application_api ||= GdsApi::LicenceApplication.new(Plek.current.find("licensify"), options)
|
27
|
-
end
|
28
|
-
|
29
|
-
def worldwide_api(options = {})
|
30
|
-
@worldwide_api ||= GdsApi::Worldwide.new(Plek.current.find("whitehall-admin"), options)
|
31
|
-
end
|
32
|
-
|
33
|
-
def email_alert_api(options = {})
|
34
|
-
@email_alert_api ||= EmailAlertApi.new(Plek.current.find("email-alert-api"), options)
|
35
|
-
end
|
36
|
-
|
37
|
-
def self.included(klass)
|
38
|
-
if klass.respond_to?(:helper_method)
|
39
|
-
klass.helper_method :imminence_api, :licence_application_api
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|