gared 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gared/primo.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5b31908b108520003b9d2f7e4c37a3d7f8ccab124f577343b5e5a7b7f1473432
|
|
4
|
+
data.tar.gz: 7ebd7bf7246c5c703f021f403460aa8b3ba1107842df23ebc1e6b0f40e89b9a5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 169547fe7caaf6f0777460b7c76cae17c6583a4b3c064e130dd6ddc33bf50bf7984576b216a3c8554dd08f6911a7b2f930e6b4d6f1b2713df729c2c3fc3617ed
|
|
7
|
+
data.tar.gz: dea903b2aee797c53f62956645bdfa99737fa29eec4019f670a139cac34ee46dca97954b52b217594c0d314d9513b2f6f08f9cea8b474b94248101d18d3628f1
|
data/lib/gared/primo.rb
CHANGED
|
@@ -23,14 +23,14 @@ module Gared
|
|
|
23
23
|
def query_publications_by_person(person, ctx = nil)
|
|
24
24
|
ret = []
|
|
25
25
|
begin
|
|
26
|
-
url = @options[:url]+"?institution=#{@options[:institution]}&query=creator,contains,#{URI.escape(person)}&indx=1&bulkSize=50&query=facet_rtype,exact,books
|
|
26
|
+
url = @options[:url]+"?institution=#{@options[:institution]}&query=creator,contains,#{URI.escape(person)}&indx=1&bulkSize=50&query=facet_rtype,exact,books&json=true"
|
|
27
27
|
json = JSON.parse(RestClient.get(url))
|
|
28
28
|
total = json['SEGMENTS']['JAGROOT']['RESULT']['DOCSET']['@TOTALHITS'].to_i
|
|
29
29
|
start_at = 1
|
|
30
30
|
recs = json['SEGMENTS']['JAGROOT']['RESULT']['DOCSET']['DOC'] # stash the records
|
|
31
31
|
while recs.length < total
|
|
32
32
|
start_at += 50
|
|
33
|
-
url = @options[:url]+"?institution=#{@options[:institution]}&query=creator,contains,#{URI.escape(person)}&indx=#{start_at}&bulkSize=50&query=facet_rtype,exact,books
|
|
33
|
+
url = @options[:url]+"?institution=#{@options[:institution]}&query=creator,contains,#{URI.escape(person)}&indx=#{start_at}&bulkSize=50&query=facet_rtype,exact,books&json=true"
|
|
34
34
|
json = JSON.parse(RestClient.get(url))
|
|
35
35
|
recs += json['SEGMENTS']['JAGROOT']['RESULT']['DOCSET']['DOC']
|
|
36
36
|
sleep 1 # respect the server and avoid flood-blocking
|
|
@@ -68,4 +68,4 @@ module Gared
|
|
|
68
68
|
return ret
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
|
-
end
|
|
71
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gared
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.21
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Asaf Bartov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: zoom
|