gds-api-adapters 27.2.1 → 27.2.2
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/content_store.rb +3 -6
- data/lib/gds_api/version.rb +1 -1
- data/test/content_store_test.rb +2 -2
- 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: ec59f652b313b666e00d8e28f492ced7eac9503e
|
4
|
+
data.tar.gz: 390ba656eeca3dcd8d8e279bcbc4d47484011468
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4584b7704c08f63348fd6b39290157c6f385f865440baefa251b5ddbd4d0a388bce713b56410a86b27cebbbfbd5f36eae926a0bd73eb3fce7df5a6fb7bb82f1a
|
7
|
+
data.tar.gz: 37b0ef21a0d88a5433c2a47e239c51ba877d53c9511477db1c4ce1ea0ca2c6324a1841b3ca528a13114028f630928af45ee2007f178f46462671f0a7a9d2dec3
|
@@ -13,8 +13,9 @@ class GdsApi::ContentStore < GdsApi::Base
|
|
13
13
|
get_json(content_item_url(base_path))
|
14
14
|
end
|
15
15
|
|
16
|
-
def incoming_links!(base_path)
|
17
|
-
|
16
|
+
def incoming_links!(base_path, params = {})
|
17
|
+
query = query_string(params)
|
18
|
+
get_json!("#{endpoint}/incoming-links#{base_path}#{query}")
|
18
19
|
rescue GdsApi::HTTPNotFound => e
|
19
20
|
raise ItemNotFound.build_from(e)
|
20
21
|
end
|
@@ -30,8 +31,4 @@ class GdsApi::ContentStore < GdsApi::Base
|
|
30
31
|
def content_item_url(base_path)
|
31
32
|
"#{endpoint}/content#{base_path}"
|
32
33
|
end
|
33
|
-
|
34
|
-
def incoming_links_url(base_path)
|
35
|
-
"#{endpoint}/incoming-links#{base_path}"
|
36
|
-
end
|
37
34
|
end
|
data/lib/gds_api/version.rb
CHANGED
data/test/content_store_test.rb
CHANGED
@@ -51,10 +51,10 @@ describe GdsApi::ContentStore do
|
|
51
51
|
|
52
52
|
describe "#incoming_links!" do
|
53
53
|
it "returns the item" do
|
54
|
-
base_path = "/test-from-content-store"
|
54
|
+
base_path = "/test-from-content-store?types%5B%5D=a&types%5B%5D=b"
|
55
55
|
content_store_has_incoming_links(base_path, [ { title: "Yolo" }])
|
56
56
|
|
57
|
-
response = @api.incoming_links!(
|
57
|
+
response = @api.incoming_links!('/test-from-content-store', types: [:a, :b])
|
58
58
|
|
59
59
|
assert_equal [ { "title" => "Yolo" } ], response.to_hash
|
60
60
|
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: 27.2.
|
4
|
+
version: 27.2.2
|
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-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plek
|