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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e2f279aa3d9a7e19735b40e8bc8c35f6cccbe038
4
- data.tar.gz: f3f11d44a629ec3c0b00be1c96a8ce177ddff29c
3
+ metadata.gz: ec59f652b313b666e00d8e28f492ced7eac9503e
4
+ data.tar.gz: 390ba656eeca3dcd8d8e279bcbc4d47484011468
5
5
  SHA512:
6
- metadata.gz: 8189ca648010ca2a59cb275201bd26ec5638e93593fa89213e49d8bd2af60d883834a24d2c3b49a2cbbb4f19dcd482f1f5f7ba9ae73939a55cc19b7f34bbac36
7
- data.tar.gz: 303c315106e8e21598118b975f5defbb5fdd0d0051b7437b316c1a8558cf1bbbeda9a54979b2e22fa3329c71b9b17015f8dfd18cbe6e11f2db14c49e1576b992
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
- get_json!(incoming_links_url(base_path))
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
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '27.2.1'
2
+ VERSION = '27.2.2'
3
3
  end
@@ -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!(base_path)
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.1
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-09 00:00:00.000000000 Z
11
+ date: 2016-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek