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 +4 -4
- data/lib/contentdm_api/item.rb +6 -2
- data/lib/contentdm_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: 0b6ad5e4ac9f7cdeeb896c9e8957608471c40cd2
|
4
|
+
data.tar.gz: 7abbdc14a69d9c5c4f1dc7c1de59c30c94657654
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3371d238254a839e0e02b15b7fb5375ae4cd132a7d4d29aa5fc39e699597776a051ae6e487a5fda6cf4d539ac6dad0ba0a7b16caecd1a3e5286e8c8699063692
|
7
|
+
data.tar.gz: de207844df90f746c89ac1368cde20724f26584ee7179459998c926a37078cc4b5055d2c2461ad1d978a0046600783c3e82abdd162a005c0d188669be704be7a
|
data/lib/contentdm_api/item.rb
CHANGED
@@ -42,17 +42,21 @@ module CONTENTdmAPI
|
|
42
42
|
# dmGetCompoundObjectInfo functions
|
43
43
|
def metadata
|
44
44
|
result.merge('id' => "#{collection}/#{id}")
|
45
|
-
|
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
|
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,
|
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.
|
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-
|
11
|
+
date: 2016-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|