gds-api-adapters 28.1.0 → 28.1.1
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/test_helpers/publishing_api_v2.rb +14 -0
- data/lib/gds_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e902ac4880261bd833cfaaf435bb6c6887337f7f
|
|
4
|
+
data.tar.gz: 078679c8c239e9f431da180ebf87a205a8683f9b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eca01f58f14c1e86a7c947480ede2b024fd5e8d179442388b9f3336d3d18e34f207c897740a40a5f1f566ab079c4150bb61b531115a9ce8a99607063b132d7e6
|
|
7
|
+
data.tar.gz: b02e5d2a3f9696d48d7ca587b86ea132a4186ecf5b74029bf4a9487b0681c389ccd999546c7924bda4c38932d369c22401294e2e2a595bec2501567c97ffb5bf
|
|
@@ -154,6 +154,11 @@ module GdsApi
|
|
|
154
154
|
stub_request(:get, url).to_return(status: 200, body: item.to_json, headers: {})
|
|
155
155
|
end
|
|
156
156
|
|
|
157
|
+
def publishing_api_does_not_have_item(content_id)
|
|
158
|
+
url = PUBLISHING_API_V2_ENDPOINT + "/content/" + content_id
|
|
159
|
+
stub_request(:get, url).to_return(status: 404, body: item_not_found(content_id).to_json, headers: {})
|
|
160
|
+
end
|
|
161
|
+
|
|
157
162
|
def publishing_api_has_links(links)
|
|
158
163
|
links = links.with_indifferent_access
|
|
159
164
|
url = PUBLISHING_API_V2_ENDPOINT + "/links/" + links[:content_id]
|
|
@@ -185,6 +190,15 @@ module GdsApi
|
|
|
185
190
|
object
|
|
186
191
|
end
|
|
187
192
|
end
|
|
193
|
+
|
|
194
|
+
def item_not_found(content_id)
|
|
195
|
+
{
|
|
196
|
+
error: {
|
|
197
|
+
code: 404,
|
|
198
|
+
message: "Could not find content item with content_id: #{content_id}",
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
end
|
|
188
202
|
end
|
|
189
203
|
end
|
|
190
204
|
end
|
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: 28.1.
|
|
4
|
+
version: 28.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Stewart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-02-
|
|
11
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: plek
|