contentdm_api 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a99e0e09f6f03e49d1cc865298d95210d9d64061
4
- data.tar.gz: addb4954df2d7194eaed207298d7e4aa0e3d9504
3
+ metadata.gz: 0b6ad5e4ac9f7cdeeb896c9e8957608471c40cd2
4
+ data.tar.gz: 7abbdc14a69d9c5c4f1dc7c1de59c30c94657654
5
5
  SHA512:
6
- metadata.gz: e87ac286838d39786bafb05d9e6755e9d96ce9644a5fe176498e5f38fab9ad859de2436480e4ec7647fa5ada9898ca4e54487aef9243a25f2f4a103290c400fd
7
- data.tar.gz: 66f938079601e6a7a9b92ef13d17abcbadaa07cd07e07524cd7b6f95194e22c5110acb49612fdf1d4c1ecc9fe37f282fe0739ad80cc84ec1eca879582e2b31f7
6
+ metadata.gz: 3371d238254a839e0e02b15b7fb5375ae4cd132a7d4d29aa5fc39e699597776a051ae6e487a5fda6cf4d539ac6dad0ba0a7b16caecd1a3e5286e8c8699063692
7
+ data.tar.gz: de207844df90f746c89ac1368cde20724f26584ee7179459998c926a37078cc4b5055d2c2461ad1d978a0046600783c3e82abdd162a005c0d188669be704be7a
@@ -42,17 +42,21 @@ module CONTENTdmAPI
42
42
  # dmGetCompoundObjectInfo functions
43
43
  def metadata
44
44
  result.merge('id' => "#{collection}/#{id}")
45
- .merge('page' => compounds(result.fetch('page', [])))
45
+ .merge('page' => compounds(page))
46
46
  end
47
47
 
48
48
  private
49
49
 
50
+ def page
51
+ result.fetch('page', [])
52
+ end
53
+
50
54
  def result
51
55
  values.first.merge(values.last)
52
56
  end
53
57
 
54
58
  def compounds(page)
55
- return page unless with_compound
59
+ return [] unless with_compound
56
60
  page.map do |compound|
57
61
  compound.merge(self.class.new(base_url: base_url,
58
62
  collection: collection,
@@ -1,3 +1,3 @@
1
1
  module CONTENTdmAPI
2
- VERSION = '0.3.1'.freeze
2
+ VERSION = '0.3.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentdm_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Fennell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-22 00:00:00.000000000 Z
11
+ date: 2016-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler