gds-api-adapters 25.3.0 → 26.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/test_helpers/publishing_api_v2.rb +20 -7
- 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: 66e74267e0f6000e782fdb7a29edc89458d17d1c
|
4
|
+
data.tar.gz: ea45a63f2bb0cb8e8dd03c2f8078ac78c294af1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25d4e1618e12b774d0687f2fd2a2e0cd6bfdd99e0d5c369a5d309fda42b6356e67b7526a64ef9f18aa27e22b67e152687a3562929cfbf1ac75be4628cb36b0cb
|
7
|
+
data.tar.gz: 91b34e5c8efb6732c07ad3966287f67ce868663dc152064fcb212c73b3d46b733dc80f31659da508fbfe6bad76a36759ebbf0bb7013d9381cb1433aaba254abc
|
@@ -33,16 +33,29 @@ module GdsApi
|
|
33
33
|
stubs
|
34
34
|
end
|
35
35
|
|
36
|
-
def
|
37
|
-
stub_request(:put, %r{\A#{PUBLISHING_API_V2_ENDPOINT}/content})
|
36
|
+
def stub_any_publishing_api_put_content
|
37
|
+
stub_request(:put, %r{\A#{PUBLISHING_API_V2_ENDPOINT}/content/})
|
38
38
|
end
|
39
39
|
|
40
|
-
def
|
40
|
+
def stub_any_publishing_api_put_links
|
41
|
+
stub_request(:put, %r{\A#{PUBLISHING_API_V2_ENDPOINT}/links/})
|
42
|
+
end
|
43
|
+
|
44
|
+
def stub_any_publishing_api_call
|
45
|
+
stub_request(:any, %r{\A#{PUBLISHING_API_V2_ENDPOINT}})
|
46
|
+
end
|
47
|
+
|
48
|
+
def assert_publishing_api_put_content(content_id, attributes_or_matcher = {}, times = 1)
|
41
49
|
url = PUBLISHING_API_V2_ENDPOINT + "/content/" + content_id
|
42
|
-
|
50
|
+
assert_publishing_api(:put, url, attributes_or_matcher, times)
|
51
|
+
end
|
52
|
+
|
53
|
+
def assert_publishing_api_publish(content_id, attributes_or_matcher = {}, times = 1)
|
54
|
+
url = PUBLISHING_API_V2_ENDPOINT + "/content/#{content_id}/publish"
|
55
|
+
assert_publishing_api(:post, url, attributes_or_matcher, times)
|
43
56
|
end
|
44
57
|
|
45
|
-
def
|
58
|
+
def assert_publishing_api(verb, url, attributes_or_matcher = {}, times = 1)
|
46
59
|
if attributes_or_matcher.is_a?(Hash)
|
47
60
|
matcher = attributes_or_matcher.empty? ? nil : request_json_matching(attributes_or_matcher)
|
48
61
|
else
|
@@ -50,9 +63,9 @@ module GdsApi
|
|
50
63
|
end
|
51
64
|
|
52
65
|
if matcher
|
53
|
-
assert_requested(
|
66
|
+
assert_requested(verb, url, times: times, &matcher)
|
54
67
|
else
|
55
|
-
assert_requested(
|
68
|
+
assert_requested(verb, url, times: times)
|
56
69
|
end
|
57
70
|
end
|
58
71
|
|
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: 26.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Stewart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plek
|