gared 0.0.14 → 0.0.15

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gared/primo.rb +18 -14
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 286e7492b38fde6e12e7bc5bbe47828e970328c134b82edef3e2313c52351237
4
- data.tar.gz: 4d51a740a2c4c62f15a0a2c02955d5ac17148e9e0db0274e4d91471f7ddae2fc
3
+ metadata.gz: 92b01b48da01e7d98c739cb47863b91b13f4b6929e3a3cf5804a704eadd30b69
4
+ data.tar.gz: 9dbd85a6a41498c1f7dab6e8b8de8a7d89124154466c7d9b1b857771c999b9d7
5
5
  SHA512:
6
- metadata.gz: aeddb91957ab79ae8b1926bca68b50106d014f04e7c0b6b264f4642153be2545f2fcc5f938bfc9fb93afe7b5162fd6de93fa8f1d080a9ead24c29127439cffe9
7
- data.tar.gz: f8e39a2ce1b525fc315155b42fe57329e08ae10b6154465afded022f37a9d4a3587091a38e0ca519950d49c6b5e2d27f2a74cfec511dad07fc8f14aac086e02c
6
+ metadata.gz: c108c92177e80b16b22e2b9e1d971d0bb6bb119fecffe513cb5f4a17403039a90ab7c3e2fa12a3f55e18457abff52a1b22fa0c2967fe09a49de0104e132a43eb
7
+ data.tar.gz: f8796bfcbdc2ebfddd01f937871b133887a172d4c610a348373feee0938feaa866ab437764955305eee2a7bb06075ead1ec4bc5ebe5e1c502a1cd3839382cf86
@@ -36,20 +36,24 @@ module Gared
36
36
  sleep 1 # respect the server and avoid flood-blocking
37
37
  end
38
38
  recs.each do |r|
39
- deets = r['PrimoNMBib']['record']['display']
40
- p = Publication.new(ctx)
41
- p.title = deets['title']
42
- p.author_line = deets['creator']
43
- p.language = deets['language']
44
- p.notes = deets['format']+"\n"+deets['subject']
45
- p.publisher_line = deets['publisher']
46
- p.pub_year = deets['creationdate']
47
- p.source_id = r['PrimoNMBib']['record']['control']['sourcerecordid']
48
- h = Holding.new
49
- h.source_id = p.source_id
50
- h.source_name = 'Primo:'+@options[:institution]
51
- p.add_holding(h)
52
- ret << p
39
+ begin
40
+ deets = r['PrimoNMBib']['record']['display']
41
+ p = Publication.new(ctx)
42
+ p.title = deets['title']
43
+ p.author_line = deets['creator']
44
+ p.language = deets['language']
45
+ p.notes = "#{deets['format']}\n#{deets['subject']}"
46
+ p.publisher_line = deets['publisher']
47
+ p.pub_year = deets['creationdate']
48
+ p.source_id = r['PrimoNMBib']['record']['control']['sourcerecordid']
49
+ h = Holding.new
50
+ h.source_id = p.source_id
51
+ h.source_name = 'Primo:'+@options[:institution]
52
+ p.add_holding(h)
53
+ ret << p
54
+ rescue Exception
55
+ puts $!
56
+ end
53
57
  end
54
58
  rescue Exception
55
59
  puts $!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gared
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Asaf Bartov