gds-api-adapters 63.6.0 → 67.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 +0 -1
- data/Rakefile +3 -4
- data/lib/gds_api.rb +0 -14
- data/lib/gds_api/base.rb +4 -3
- data/lib/gds_api/imminence.rb +2 -2
- data/lib/gds_api/json_client.rb +6 -6
- data/lib/gds_api/list_response.rb +6 -6
- data/lib/gds_api/performance_platform/data_out.rb +21 -21
- data/lib/gds_api/publishing_api.rb +2 -2
- data/lib/gds_api/response.rb +8 -4
- data/lib/gds_api/test_helpers/asset_manager.rb +0 -17
- data/lib/gds_api/test_helpers/calendars.rb +0 -9
- data/lib/gds_api/test_helpers/content_store.rb +0 -9
- data/lib/gds_api/test_helpers/email_alert_api.rb +8 -32
- data/lib/gds_api/test_helpers/imminence.rb +11 -14
- data/lib/gds_api/test_helpers/licence_application.rb +8 -16
- data/lib/gds_api/test_helpers/link_checker_api.rb +0 -8
- data/lib/gds_api/test_helpers/local_links_manager.rb +0 -13
- data/lib/gds_api/test_helpers/mapit.rb +15 -26
- data/lib/gds_api/test_helpers/organisations.rb +13 -18
- data/lib/gds_api/test_helpers/performance_platform/data_out.rb +34 -34
- data/lib/gds_api/test_helpers/publishing_api.rb +28 -49
- data/lib/gds_api/test_helpers/support.rb +0 -5
- data/lib/gds_api/test_helpers/support_api.rb +16 -20
- data/lib/gds_api/test_helpers/worldwide.rb +51 -31
- data/lib/gds_api/version.rb +1 -1
- metadata +2 -5
- data/lib/gds_api/publishing_api_v2.rb +0 -14
- data/lib/gds_api/test_helpers/alias_deprecated.rb +0 -13
- data/lib/gds_api/test_helpers/publishing_api_v2.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35ee9f533f626d99fe8f62ae41b6445e2f75729c333b096c52b90c49555e1d69
|
4
|
+
data.tar.gz: b1413571e9e8bf09d19497c88790549c947c66258fd25bd11884a6ade859acdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b05108e31ccb65d3c2e4735792de423580f2cdbb2ea8d8d0c6de92955b24084559f7e25b6aaed2cbca34b17734d37f2f9df98a5f8d676bcf8e072dc3880aef2b
|
7
|
+
data.tar.gz: 37ff704afc41d4b516ee043358099d9aadc4097ab0d6f70f47a3c38ed922e29d22c0f3b82a1bcac612c53af8c9649a72066709ddf8134ffe1279125f4e81d62f
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
1
|
require "rdoc/task"
|
4
2
|
require "rake/testtask"
|
5
3
|
|
@@ -13,7 +11,8 @@ Rake::TestTask.new("test") do |t|
|
|
13
11
|
t.test_files = FileList["test/**/*_test.rb"]
|
14
12
|
t.warning = false
|
15
13
|
end
|
16
|
-
|
14
|
+
|
15
|
+
task default: %i[lint test]
|
17
16
|
|
18
17
|
require "pact_broker/client/tasks"
|
19
18
|
|
@@ -31,5 +30,5 @@ end
|
|
31
30
|
|
32
31
|
desc "Run the linter against changed files"
|
33
32
|
task :lint do
|
34
|
-
sh "bundle exec rubocop --format clang
|
33
|
+
sh "bundle exec rubocop --format clang"
|
35
34
|
end
|
data/lib/gds_api.rb
CHANGED
@@ -11,7 +11,6 @@ require "gds_api/mapit"
|
|
11
11
|
require "gds_api/maslow"
|
12
12
|
require "gds_api/organisations"
|
13
13
|
require "gds_api/publishing_api"
|
14
|
-
require "gds_api/publishing_api_v2"
|
15
14
|
require "gds_api/router"
|
16
15
|
require "gds_api/search"
|
17
16
|
require "gds_api/support"
|
@@ -139,19 +138,6 @@ module GdsApi
|
|
139
138
|
)
|
140
139
|
end
|
141
140
|
|
142
|
-
# Creates a GdsApi::PublishingApiV2 adapter
|
143
|
-
#
|
144
|
-
# This will set a bearer token if a PUBLISHING_API_BEARER_TOKEN environment
|
145
|
-
# variable is set
|
146
|
-
#
|
147
|
-
# @return [GdsApi::PublishingApiV2]
|
148
|
-
def self.publishing_api_v2(options = {})
|
149
|
-
GdsApi::PublishingApiV2.new(
|
150
|
-
Plek.find("publishing-api"),
|
151
|
-
{ bearer_token: ENV["PUBLISHING_API_BEARER_TOKEN"] }.merge(options),
|
152
|
-
)
|
153
|
-
end
|
154
|
-
|
155
141
|
# Creates a GdsApi::Router adapter for communicating with Router API
|
156
142
|
#
|
157
143
|
# This will set a bearer token if a ROUTER_API_BEARER_TOKEN environment
|
data/lib/gds_api/base.rb
CHANGED
@@ -24,7 +24,8 @@ class GdsApi::Base
|
|
24
24
|
:put_json,
|
25
25
|
:patch_json,
|
26
26
|
:delete_json,
|
27
|
-
:get_raw,
|
27
|
+
:get_raw,
|
28
|
+
:get_raw!,
|
28
29
|
:put_multipart,
|
29
30
|
:post_multipart
|
30
31
|
|
@@ -69,9 +70,9 @@ private
|
|
69
70
|
param_pairs = params.sort.map { |key, value|
|
70
71
|
case value
|
71
72
|
when Array
|
72
|
-
value.map
|
73
|
+
value.map do |v|
|
73
74
|
"#{CGI.escape(key.to_s + '[]')}=#{CGI.escape(v.to_s)}"
|
74
|
-
|
75
|
+
end
|
75
76
|
else
|
76
77
|
"#{CGI.escape(key.to_s)}=#{CGI.escape(value.to_s)}"
|
77
78
|
end
|
data/lib/gds_api/imminence.rb
CHANGED
@@ -20,8 +20,8 @@ class GdsApi::Imminence < GdsApi::Base
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def self.parse_place_hash(place_hash)
|
23
|
-
location =
|
24
|
-
address =
|
23
|
+
location = extract_location_hash(place_hash["location"])
|
24
|
+
address = extract_address_hash(place_hash)
|
25
25
|
|
26
26
|
place_hash.merge(location).merge(address)
|
27
27
|
end
|
data/lib/gds_api/json_client.rb
CHANGED
@@ -29,7 +29,7 @@ module GdsApi
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.default_request_with_json_body_headers
|
32
|
-
|
32
|
+
default_request_headers.merge(json_body_headers)
|
33
33
|
end
|
34
34
|
|
35
35
|
def self.json_body_headers
|
@@ -109,7 +109,7 @@ module GdsApi
|
|
109
109
|
end
|
110
110
|
|
111
111
|
# If no custom response is given, just instantiate Response
|
112
|
-
create_response ||=
|
112
|
+
create_response ||= proc { |r| Response.new(r) }
|
113
113
|
create_response.call(response)
|
114
114
|
end
|
115
115
|
|
@@ -177,10 +177,10 @@ module GdsApi
|
|
177
177
|
::RestClient::Request.execute(method_params)
|
178
178
|
rescue Errno::ECONNREFUSED => e
|
179
179
|
logger.error loggable.merge(status: "refused", error_message: e.message, error_class: e.class.name, end_time: Time.now.to_f).to_json
|
180
|
-
raise GdsApi::EndpointNotFound
|
180
|
+
raise GdsApi::EndpointNotFound, "Could not connect to #{url}"
|
181
181
|
rescue RestClient::Exceptions::Timeout => e
|
182
182
|
logger.error loggable.merge(status: "timeout", error_message: e.message, error_class: e.class.name, end_time: Time.now.to_f).to_json
|
183
|
-
raise GdsApi::TimedOutException
|
183
|
+
raise GdsApi::TimedOutException
|
184
184
|
rescue URI::InvalidURIError => e
|
185
185
|
logger.error loggable.merge(status: "invalid_uri", error_message: e.message, error_class: e.class.name, end_time: Time.now.to_f).to_json
|
186
186
|
raise GdsApi::InvalidUrl
|
@@ -192,10 +192,10 @@ module GdsApi
|
|
192
192
|
raise
|
193
193
|
rescue Errno::ECONNRESET => e
|
194
194
|
logger.error loggable.merge(status: "connection_reset", error_message: e.message, error_class: e.class.name, end_time: Time.now.to_f).to_json
|
195
|
-
raise GdsApi::TimedOutException
|
195
|
+
raise GdsApi::TimedOutException
|
196
196
|
rescue SocketError => e
|
197
197
|
logger.error loggable.merge(status: "socket_error", error_message: e.message, error_class: e.class.name, end_time: Time.now.to_f).to_json
|
198
|
-
raise GdsApi::SocketErrorException
|
198
|
+
raise GdsApi::SocketErrorException
|
199
199
|
end
|
200
200
|
end
|
201
201
|
end
|
@@ -25,7 +25,7 @@ module GdsApi
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def has_next_page?
|
28
|
-
!
|
28
|
+
!page_link("next").nil?
|
29
29
|
end
|
30
30
|
|
31
31
|
def next_page
|
@@ -39,7 +39,7 @@ module GdsApi
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def has_previous_page?
|
42
|
-
!
|
42
|
+
!page_link("previous").nil?
|
43
43
|
end
|
44
44
|
|
45
45
|
def previous_page
|
@@ -70,12 +70,12 @@ module GdsApi
|
|
70
70
|
# point. Note that the responses are stored so subsequent pages will not be
|
71
71
|
# loaded multiple times.
|
72
72
|
def with_subsequent_pages
|
73
|
-
Enumerator.new
|
74
|
-
|
73
|
+
Enumerator.new do |yielder|
|
74
|
+
each { |i| yielder << i }
|
75
75
|
if has_next_page?
|
76
|
-
next_page.with_subsequent_pages.each
|
76
|
+
next_page.with_subsequent_pages.each { |i| yielder << i }
|
77
77
|
end
|
78
|
-
|
78
|
+
end
|
79
79
|
end
|
80
80
|
|
81
81
|
private
|
@@ -70,40 +70,40 @@ module GdsApi
|
|
70
70
|
|
71
71
|
def search_terms(slug)
|
72
72
|
options = {
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
73
|
+
slug: slug,
|
74
|
+
transaction: "search-terms",
|
75
|
+
group_by: "searchKeyword",
|
76
|
+
collect: "searchUniques:sum",
|
77
77
|
}
|
78
78
|
statistics(options)
|
79
79
|
end
|
80
80
|
|
81
81
|
def searches(slug, is_multipart)
|
82
82
|
options = {
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
83
|
+
slug: slug,
|
84
|
+
transaction: "search-terms",
|
85
|
+
group_by: "pagePath",
|
86
|
+
collect: "searchUniques:sum",
|
87
87
|
}
|
88
88
|
statistics(options, is_multipart)
|
89
89
|
end
|
90
90
|
|
91
91
|
def page_views(slug, is_multipart)
|
92
92
|
options = {
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
slug: slug,
|
94
|
+
transaction: "page-statistics",
|
95
|
+
group_by: "pagePath",
|
96
|
+
collect: "uniquePageviews:sum",
|
97
97
|
}
|
98
98
|
statistics(options, is_multipart)
|
99
99
|
end
|
100
100
|
|
101
101
|
def problem_reports(slug, is_multipart)
|
102
102
|
options = {
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
103
|
+
slug: slug,
|
104
|
+
transaction: "page-contacts",
|
105
|
+
group_by: "pagePath",
|
106
|
+
collect: "total:sum",
|
107
107
|
}
|
108
108
|
statistics(options, is_multipart)
|
109
109
|
end
|
@@ -114,11 +114,11 @@ module GdsApi
|
|
114
114
|
# Backdrop can be found here: https://github.com/alphagov/backdrop
|
115
115
|
def statistics(options, is_multipart = false)
|
116
116
|
params = {
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
117
|
+
group_by: options[:group_by],
|
118
|
+
collect: options[:collect],
|
119
|
+
duration: 42,
|
120
|
+
period: "day",
|
121
|
+
end_at: Date.today.to_time.getutc.iso8601,
|
122
122
|
}
|
123
123
|
|
124
124
|
filter_param = is_multipart ? :filter_by_prefix : :filter_by
|
@@ -381,7 +381,7 @@ class GdsApi::PublishingApi < GdsApi::Base
|
|
381
381
|
# @see https://github.com/alphagov/publishing-api/blob/master/doc/api.md#get-v2linkables
|
382
382
|
def get_linkables(document_type: nil)
|
383
383
|
if document_type.nil?
|
384
|
-
raise ArgumentError
|
384
|
+
raise ArgumentError, "Please provide a `document_type`"
|
385
385
|
end
|
386
386
|
|
387
387
|
get_json("#{endpoint}/v2/linkables?document_type=#{document_type}")
|
@@ -486,7 +486,7 @@ class GdsApi::PublishingApi < GdsApi::Base
|
|
486
486
|
# publishing_app: 'content-publisher',
|
487
487
|
# rendering_app: 'government-frontend',
|
488
488
|
# }
|
489
|
-
#)
|
489
|
+
# )
|
490
490
|
#
|
491
491
|
# @see https://github.com/alphagov/publishing-api/blob/master/doc/api.md#put-publish-intentbase_path
|
492
492
|
def put_intent(base_path, payload)
|
data/lib/gds_api/response.rb
CHANGED
@@ -74,9 +74,13 @@ module GdsApi
|
|
74
74
|
@parsed_content ||= transform_parsed(JSON.parse(@http_response.body))
|
75
75
|
end
|
76
76
|
|
77
|
-
def present
|
77
|
+
def present?
|
78
|
+
true
|
79
|
+
end
|
78
80
|
|
79
|
-
def blank
|
81
|
+
def blank?
|
82
|
+
false
|
83
|
+
end
|
80
84
|
|
81
85
|
private
|
82
86
|
|
@@ -85,7 +89,7 @@ module GdsApi
|
|
85
89
|
|
86
90
|
case value
|
87
91
|
when Hash
|
88
|
-
Hash[value.map
|
92
|
+
Hash[value.map do |k, v|
|
89
93
|
# NOTE: Don't bother transforming if the value is nil
|
90
94
|
if k == "web_url" && v
|
91
95
|
# Use relative URLs to route when the web_url value is on the
|
@@ -98,7 +102,7 @@ module GdsApi
|
|
98
102
|
else
|
99
103
|
[k, transform_parsed(v)]
|
100
104
|
end
|
101
|
-
|
105
|
+
end]
|
102
106
|
when Array
|
103
107
|
value.map { |v| transform_parsed(v) }
|
104
108
|
else
|
@@ -1,10 +1,6 @@
|
|
1
|
-
require "gds_api/test_helpers/alias_deprecated"
|
2
|
-
|
3
1
|
module GdsApi
|
4
2
|
module TestHelpers
|
5
3
|
module AssetManager
|
6
|
-
extend AliasDeprecated
|
7
|
-
|
8
4
|
ASSET_MANAGER_ENDPOINT = Plek.current.find("asset-manager")
|
9
5
|
|
10
6
|
def stub_any_asset_manager_call
|
@@ -107,19 +103,6 @@ module GdsApi
|
|
107
103
|
def stub_asset_manager_delete_asset_failure(asset_id)
|
108
104
|
stub_request(:delete, "#{ASSET_MANAGER_ENDPOINT}/assets/#{asset_id}").to_return(status: 500)
|
109
105
|
end
|
110
|
-
|
111
|
-
alias_deprecated :asset_manager_updates_any_asset, :stub_asset_manager_updates_any_asset
|
112
|
-
alias_deprecated :asset_manager_deletes_any_asset, :stub_asset_manager_deletes_any_asset
|
113
|
-
alias_deprecated :asset_manager_has_an_asset, :stub_asset_manager_has_an_asset
|
114
|
-
alias_deprecated :asset_manager_has_a_whitehall_asset, :stub_asset_manager_has_a_whitehall_asset
|
115
|
-
alias_deprecated :asset_manager_does_not_have_an_asset, :stub_asset_manager_does_not_have_an_asset
|
116
|
-
alias_deprecated :asset_manager_does_not_have_a_whitehall_asset, :stub_asset_manager_does_not_have_a_whitehall_asset
|
117
|
-
alias_deprecated :asset_manager_receives_an_asset, :stub_asset_manager_receives_an_asset
|
118
|
-
alias_deprecated :asset_manager_upload_failure, :stub_asset_manager_upload_failure
|
119
|
-
alias_deprecated :asset_manager_update_asset, :stub_asset_manager_update_asset
|
120
|
-
alias_deprecated :asset_manager_update_failure, :stub_asset_manager_update_asset_failure
|
121
|
-
alias_deprecated :asset_manager_delete_asset, :stub_asset_manager_delete_asset
|
122
|
-
alias_deprecated :asset_manager_delete_failure, :stub_asset_manager_delete_asset_failure
|
123
106
|
end
|
124
107
|
end
|
125
108
|
end
|
@@ -1,10 +1,6 @@
|
|
1
|
-
require "gds_api/test_helpers/alias_deprecated"
|
2
|
-
|
3
1
|
module GdsApi
|
4
2
|
module TestHelpers
|
5
3
|
module Calendars
|
6
|
-
extend AliasDeprecated
|
7
|
-
|
8
4
|
def calendars_endpoint(in_division: nil)
|
9
5
|
endpoint = "#{Plek.new.website_root}/bank-holidays"
|
10
6
|
endpoint += "/#{in_division}" unless in_division.nil?
|
@@ -55,11 +51,6 @@ module GdsApi
|
|
55
51
|
def stub_calendars_has_a_bank_holiday_on(date, in_division: nil)
|
56
52
|
stub_calendars_has_bank_holidays_on([date], in_division: in_division)
|
57
53
|
end
|
58
|
-
|
59
|
-
# Aliases for DEPRECATED methods
|
60
|
-
alias_deprecated :calendars_has_no_bank_holidays, :stub_calendars_has_no_bank_holidays
|
61
|
-
alias_deprecated :calendars_has_bank_holidays_on, :stub_calendars_has_bank_holidays_on
|
62
|
-
alias_deprecated :calendars_has_a_bank_holiday_on, :stub_calendars_has_a_bank_holiday_on
|
63
54
|
end
|
64
55
|
end
|
65
56
|
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require "gds_api/test_helpers/alias_deprecated"
|
2
1
|
require "gds_api/test_helpers/json_client_helper"
|
3
2
|
require "gds_api/test_helpers/content_item_helpers"
|
4
3
|
require "json"
|
@@ -6,7 +5,6 @@ require "json"
|
|
6
5
|
module GdsApi
|
7
6
|
module TestHelpers
|
8
7
|
module ContentStore
|
9
|
-
extend AliasDeprecated
|
10
8
|
include ContentItemHelpers
|
11
9
|
|
12
10
|
def content_store_endpoint(draft = false)
|
@@ -93,13 +91,6 @@ module GdsApi
|
|
93
91
|
|
94
92
|
stub_request(:get, url).to_return(body: body)
|
95
93
|
end
|
96
|
-
|
97
|
-
# Aliases for DEPRECATED methods
|
98
|
-
alias_deprecated :content_store_has_item, :stub_content_store_has_item
|
99
|
-
alias_deprecated :content_store_does_not_have_item, :stub_content_store_does_not_have_item
|
100
|
-
alias_deprecated :content_store_has_gone_item, :stub_content_store_has_gone_item
|
101
|
-
alias_deprecated :content_store_isnt_available, :stub_content_store_isnt_available
|
102
|
-
alias_deprecated :content_store_has_incoming_links, :stub_content_store_has_incoming_links
|
103
94
|
end
|
104
95
|
end
|
105
96
|
end
|
@@ -83,12 +83,12 @@ module GdsApi
|
|
83
83
|
# stub_email_alert_api_has_subscriptions([
|
84
84
|
# {
|
85
85
|
# id: 'id-of-my-subscriber-list',
|
86
|
-
#
|
86
|
+
# frequency: 'weekly',
|
87
87
|
# ended: true,
|
88
88
|
# },
|
89
89
|
# {
|
90
90
|
# id: 'id-of-my-subscriber-list',
|
91
|
-
#
|
91
|
+
# frequency: 'daily',
|
92
92
|
# },
|
93
93
|
# ])
|
94
94
|
#
|
@@ -176,7 +176,7 @@ module GdsApi
|
|
176
176
|
|
177
177
|
def assert_email_alert_api_content_change_created(attributes = nil)
|
178
178
|
if attributes
|
179
|
-
matcher =
|
179
|
+
matcher = lambda do |request|
|
180
180
|
payload = JSON.parse(request.body)
|
181
181
|
payload.select { |k, _| attributes.key?(k) } == attributes
|
182
182
|
end
|
@@ -187,7 +187,7 @@ module GdsApi
|
|
187
187
|
|
188
188
|
def assert_email_alert_api_message_created(attributes = nil)
|
189
189
|
if attributes
|
190
|
-
matcher =
|
190
|
+
matcher = lambda do |request|
|
191
191
|
payload = JSON.parse(request.body)
|
192
192
|
payload.select { |k, _| attributes.key?(k) } == attributes
|
193
193
|
end
|
@@ -222,21 +222,21 @@ module GdsApi
|
|
222
222
|
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriptions")
|
223
223
|
.with(
|
224
224
|
body: { subscriber_list_id: subscriber_list_id, address: address, frequency: frequency }.to_json,
|
225
|
-
|
225
|
+
).to_return(status: 201, body: { subscription_id: returned_subscription_id }.to_json)
|
226
226
|
end
|
227
227
|
|
228
228
|
def stub_email_alert_api_creates_an_existing_subscription(subscriber_list_id, address, frequency, returned_subscription_id)
|
229
229
|
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriptions")
|
230
230
|
.with(
|
231
231
|
body: { subscriber_list_id: subscriber_list_id, address: address, frequency: frequency }.to_json,
|
232
|
-
|
232
|
+
).to_return(status: 200, body: { subscription_id: returned_subscription_id }.to_json)
|
233
233
|
end
|
234
234
|
|
235
235
|
def stub_email_alert_api_refuses_to_create_subscription(subscriber_list_id, address, frequency)
|
236
236
|
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriptions")
|
237
237
|
.with(
|
238
238
|
body: { subscriber_list_id: subscriber_list_id, address: address, frequency: frequency }.to_json,
|
239
|
-
|
239
|
+
).to_return(status: 422)
|
240
240
|
end
|
241
241
|
|
242
242
|
def stub_email_alert_api_sends_subscription_verification_email(address, frequency, topic_id)
|
@@ -292,7 +292,7 @@ module GdsApi
|
|
292
292
|
body: {
|
293
293
|
subscriber_list: returned_attributes,
|
294
294
|
}.to_json,
|
295
|
-
|
295
|
+
)
|
296
296
|
end
|
297
297
|
|
298
298
|
def stub_email_alert_api_does_not_have_subscriber_list_by_slug(slug:)
|
@@ -300,30 +300,6 @@ module GdsApi
|
|
300
300
|
.to_return(status: 404)
|
301
301
|
end
|
302
302
|
|
303
|
-
# Aliases for DEPRECATED methods
|
304
|
-
alias_method :email_alert_api_has_updated_subscriber, :stub_email_alert_api_has_updated_subscriber
|
305
|
-
alias_method :email_alert_api_does_not_have_updated_subscriber, :stub_email_alert_api_does_not_have_updated_subscriber
|
306
|
-
alias_method :email_alert_api_has_updated_subscription, :stub_email_alert_api_has_updated_subscription
|
307
|
-
alias_method :email_alert_api_does_not_have_updated_subscription, :stub_email_alert_api_does_not_have_updated_subscription
|
308
|
-
alias_method :email_alert_api_has_subscriber_subscriptions, :stub_email_alert_api_has_subscriber_subscriptions
|
309
|
-
alias_method :email_alert_api_does_not_have_subscriber_subscriptions, :stub_email_alert_api_does_not_have_subscriber_subscriptions
|
310
|
-
alias_method :email_alert_api_has_subscription, :stub_email_alert_api_has_subscription
|
311
|
-
alias_method :email_alert_api_has_subscriptions, :stub_email_alert_api_has_subscriptions
|
312
|
-
alias_method :email_alert_api_has_subscriber_list, :stub_email_alert_api_has_subscriber_list
|
313
|
-
alias_method :email_alert_api_does_not_have_subscriber_list, :stub_email_alert_api_does_not_have_subscriber_list
|
314
|
-
alias_method :email_alert_api_creates_subscriber_list, :stub_email_alert_api_creates_subscriber_list
|
315
|
-
alias_method :email_alert_api_refuses_to_create_subscriber_list, :stub_email_alert_api_refuses_to_create_subscriber_list
|
316
|
-
alias_method :email_alert_api_accepts_unpublishing_message, :stub_email_alert_api_accepts_unpublishing_message
|
317
|
-
alias_method :email_alert_api_unsubscribes_a_subscription, :stub_email_alert_api_unsubscribes_a_subscription
|
318
|
-
alias_method :email_alert_api_has_no_subscription_for_uuid, :stub_email_alert_api_has_no_subscription_for_uuid
|
319
|
-
alias_method :email_alert_api_unsubscribes_a_subscriber, :stub_email_alert_api_unsubscribes_a_subscriber
|
320
|
-
alias_method :email_alert_api_has_no_subscriber, :stub_email_alert_api_has_no_subscriber
|
321
|
-
alias_method :email_alert_api_creates_a_subscription, :stub_email_alert_api_creates_a_subscription
|
322
|
-
alias_method :email_alert_api_creates_an_existing_subscription, :stub_email_alert_api_creates_an_existing_subscription
|
323
|
-
alias_method :email_alert_api_refuses_to_create_subscription, :stub_email_alert_api_refuses_to_create_subscription
|
324
|
-
alias_method :email_alert_api_has_subscriber_list_by_slug, :stub_email_alert_api_has_subscriber_list_by_slug
|
325
|
-
alias_method :email_alert_api_does_not_have_subscriber_list_by_slug, :stub_email_alert_api_does_not_have_subscriber_list_by_slug
|
326
|
-
|
327
303
|
private
|
328
304
|
|
329
305
|
def get_subscriber_response(id, address)
|