gds-api-adapters 3.1.0 → 3.2.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.
- data/lib/gds_api/test_helpers/content_api.rb +11 -0
- data/lib/gds_api/version.rb +1 -1
- metadata +4 -4
@@ -95,6 +95,17 @@ module GdsApi
|
|
95
95
|
stub_request(:get, url).to_return(status: 404, body: body.to_json, headers: {})
|
96
96
|
end
|
97
97
|
|
98
|
+
def content_api_has_an_archived_artefact(slug)
|
99
|
+
body = {
|
100
|
+
"_response_info" => {
|
101
|
+
"status" => "gone",
|
102
|
+
"status_message" => "This item is no longer available"
|
103
|
+
}
|
104
|
+
}
|
105
|
+
url = "#{CONTENT_API_ENDPOINT}/#{slug}.json"
|
106
|
+
stub_request(:get, url).to_return(status: 410, body: body.to_json, headers: {})
|
107
|
+
end
|
108
|
+
|
98
109
|
def stub_content_api_default_artefact
|
99
110
|
stub_request(:get, %r{\A#{CONTENT_API_ENDPOINT}/[a-z0-9-]+\.json}).to_return { |request|
|
100
111
|
slug = request.uri.path.split('/').last.chomp('.json')
|
data/lib/gds_api/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: gds-api-adapters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 3.
|
5
|
+
version: 3.2.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- James Stewart
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-10-
|
13
|
+
date: 2012-10-05 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: plek
|
@@ -205,7 +205,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
205
205
|
requirements:
|
206
206
|
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
hash:
|
208
|
+
hash: 827207644748547205
|
209
209
|
segments:
|
210
210
|
- 0
|
211
211
|
version: "0"
|
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
requirements:
|
215
215
|
- - ">="
|
216
216
|
- !ruby/object:Gem::Version
|
217
|
-
hash:
|
217
|
+
hash: 827207644748547205
|
218
218
|
segments:
|
219
219
|
- 0
|
220
220
|
version: "0"
|