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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d2555915b5d69ad8c15524c8f877683304c6c4c8
4
- data.tar.gz: 1e5f35033578543f092550da455351b4cd3b11b6
3
+ metadata.gz: 66e74267e0f6000e782fdb7a29edc89458d17d1c
4
+ data.tar.gz: ea45a63f2bb0cb8e8dd03c2f8078ac78c294af1a
5
5
  SHA512:
6
- metadata.gz: 236561122353b68ccf5be91f61c19330def6b148337960dd5459d5ac9ca01df7c83855301d7d51d06de85ce899b6f98d2ce5a986b123ceebe2f75681cbe3dc99
7
- data.tar.gz: 420733946206a10016daf9a4c501f9d98b53a62ac5f59b3571727f09d936848ff4cf671cd8409adcc27b6a7d3f3196f8a2eafcc57fdd78f36a87a2003aeaf778
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 stub_default_publishing_api_put
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 assert_publishing_api_put_item(content_id, attributes_or_matcher = {}, times = 1)
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
- assert_publishing_api_put(url, attributes_or_matcher, times)
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 assert_publishing_api_put(url, attributes_or_matcher = {}, times = 1)
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(:put, url, times: times, &matcher)
66
+ assert_requested(verb, url, times: times, &matcher)
54
67
  else
55
- assert_requested(:put, url, times: times)
68
+ assert_requested(verb, url, times: times)
56
69
  end
57
70
  end
58
71
 
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '25.3.0'
2
+ VERSION = '26.0.0'
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: 25.3.0
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-23 00:00:00.000000000 Z
11
+ date: 2015-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek