collectionspace-client 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/collectionspace/client/helpers.rb +4 -2
- data/lib/collectionspace/client/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: 5a277e829cdb93962794dccee85bf39be2a0b7c0
|
4
|
+
data.tar.gz: 526f6247317639c2d64bfac4fbb748fafc34424f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55fc821f75ad42f2cb4be9a1968a8c4204f2172db86f61af8083b12ba577aee3d512d292b80ae1f6ff67fa84cf38c19a92d3365171cae064efed7b679442f876
|
7
|
+
data.tar.gz: f5250cb10561dd24cb6f4f2a4eae42826ba2cf3ebd55311b1c4b25c2a4e697d9a89ccd1ce738abc512ba3009ea9648a87652d5083026c07582e049d02eb28991
|
@@ -78,13 +78,15 @@ module CollectionSpace
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def strip_refname(refname)
|
81
|
-
refname.match(/('.*')/)[0].delete("'")
|
81
|
+
stripped = refname.match(/('.*')/)[0].delete("'") rescue ''
|
82
|
+
stripped
|
82
83
|
end
|
83
84
|
|
84
85
|
# parsed record and map to get restructured object
|
85
|
-
def to_object(record, attribute_map)
|
86
|
+
def to_object(record, attribute_map, stringify_keys = false)
|
86
87
|
attributes = {}
|
87
88
|
attribute_map.each do |map|
|
89
|
+
map = map.inject({}) { |memo,(k,v)| memo[k.to_s] = v; memo} if stringify_keys
|
88
90
|
if map["with"]
|
89
91
|
as = deep_find(record, map["key"], map["nested_key"])
|
90
92
|
values = []
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: collectionspace-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Cooper
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|