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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1766746ac50ad7d2afad39df5c685fff98ef8e03
4
- data.tar.gz: 437a9ac5f9a4e71ab15fbd4cb676f9a8154372c5
3
+ metadata.gz: 5a277e829cdb93962794dccee85bf39be2a0b7c0
4
+ data.tar.gz: 526f6247317639c2d64bfac4fbb748fafc34424f
5
5
  SHA512:
6
- metadata.gz: f6247a252fddb9f618b0a3950ab61d554648da17ac0e2fb2d9f4cbb57f4a61c89d15cbd786760a67812d1483a841d98dfc284740c1269d4adcedbbff6a44d8c9
7
- data.tar.gz: c6304daeab5d53794fd38e82f73236643ded111a89556fbe011474adcbe088c63759d1126d963ccf592525811ef776cccbd6b5e1ae5f9c5a76b411df8531ac9f
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 = []
@@ -1,5 +1,5 @@
1
1
  module CollectionSpace
2
2
  class Client
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
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.0
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-01-15 00:00:00.000000000 Z
11
+ date: 2016-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty