dor-fetcher 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/dor-fetcher.rb +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmVkZGI2MzEwMDY1YzBlMDUxNTZhOTRmMDhjOWFiMTg2YzVkNjUyYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTgyNDAxM2M1MWJkYmEyMmMyODlkYWJlYmRhMGIyYjYxYWFmNDJiMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjY3ZTM4MjUxNTBkNGIxMmE1NzM3NWIzNDcxNDk5ZTVjYzhmOTI3MTUxYTQ2
|
10
|
+
NDQ4NWMxNDQ0NzQyMDFmYmM2NzQzMWNmYmY3OGNiMjNmZGY0ZmVjZGFmNmJh
|
11
|
+
NWZmOTM4OGVlNWNiZThhZTU4ZWI5MmE0NzU2NDVmNjBjYzcwYTQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjIyMzAwNDkyYjM0Y2I2ZmUyYTM2Yzk5MTAwOTk2ZGYzMzVhMTZhZWFmYWJm
|
14
|
+
MzVhODAwMThhYTkyMTgwNjJhNzgzMzg5ODgxY2NhMTNlYjhkOTE4Y2RhY2I5
|
15
|
+
MmQzYmVhYWI5NWQ4NjM0MjgyOWFkYjFmMTAwOTcyYjI5MDc3MjU=
|
data/lib/dor-fetcher.rb
CHANGED
@@ -100,14 +100,19 @@ module DorFetcher
|
|
100
100
|
#Method to parse full Hash into an array containing only the druids
|
101
101
|
#
|
102
102
|
#@param response [Hash] Hash as returned by query_api
|
103
|
+
#@param no_prefix [boolean] if true (default), remove the druid: prefix on all druids, if false, leave alone
|
103
104
|
#@return [Array] the array listing all druids in the supplied Hash
|
104
|
-
def druid_array(response)
|
105
|
+
def druid_array(response,params={})
|
105
106
|
return_list = []
|
106
107
|
j = response
|
107
108
|
j.keys.each do |key|
|
108
109
|
if key != @@counts_key
|
109
110
|
j[key].each do |item|
|
110
|
-
|
111
|
+
if item['druid'] != nil
|
112
|
+
druid=item['druid'].downcase
|
113
|
+
druid.gsub!('druid:','') if params[:no_prefix]
|
114
|
+
return_list << druid
|
115
|
+
end
|
111
116
|
end
|
112
117
|
end
|
113
118
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-fetcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carrick Rogers
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-11-
|
13
|
+
date: 2014-11-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|