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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 577489488123046a6bf239ae2eab422e697482e6
4
- data.tar.gz: e7136513270b9aa473c1f7da292aab95ad8a98ef
3
+ metadata.gz: e902ac4880261bd833cfaaf435bb6c6887337f7f
4
+ data.tar.gz: 078679c8c239e9f431da180ebf87a205a8683f9b
5
5
  SHA512:
6
- metadata.gz: 9330d84309333e80d96a025b4402aad25c4dc4e91bfe116ff90fe9912a43338981c87afabaa2a1e4a1a379563bb320dd754824df24e9d2421efe163a01fb40ce
7
- data.tar.gz: 53199536bc83afd241d1a8626798fec1736a5c6ce3c937663ba5c25f04165c73867855b760a1e4e5160572a721d23feabc8067bf3ff3adf976ffafb2f8a58832
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
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '28.1.0'
2
+ VERSION = '28.1.1'
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: 28.1.0
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-17 00:00:00.000000000 Z
11
+ date: 2016-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek