berkeley_library-location 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +8 -0
- data/lib/berkeley_library/location/module_info.rb +3 -3
- data/lib/berkeley_library/location/xlsx_writer.rb +11 -12
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27ec12d4fe5561d87ad2b96cdcedb68d935aa2b36d0df9ed28dd25570af071b4
|
4
|
+
data.tar.gz: 1e0fefbfafda0938e0dd8cb714a5a0d0da4ea96e8476a922f7ff55aba91bd550
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cdfc0b0f370d282d4a86e791a15bfc5de856e821d360840a058b6bfd6385816fcb032a48dd9dd5a182a04767e2013990295ddb79841c41902f270e28b5208cd
|
7
|
+
data.tar.gz: 18c2c7c1d25beed576a4bcef69863e9cb1b8beed29e33c5e1180c38cba0e374189bf65811c5e93daf47cb7fd74f4fcb60716fbb34c121a7762b799d2943aa289
|
data/CHANGES.md
CHANGED
@@ -2,12 +2,12 @@ module BerkeleyLibrary
|
|
2
2
|
module Location
|
3
3
|
module ModuleInfo
|
4
4
|
NAME = 'berkeley_library-location'.freeze
|
5
|
-
AUTHOR = '
|
6
|
-
AUTHOR_EMAIL = '
|
5
|
+
AUTHOR = 'UC Berkeley Library IT'.freeze
|
6
|
+
AUTHOR_EMAIL = 'libdevelopers@lists.berkeley.edu'.freeze
|
7
7
|
SUMMARY = 'Locaton-related utilities for the UC Berkeley Library'.freeze
|
8
8
|
DESCRIPTION = 'A collection of location-related utilities for the UC Berkeley Library'.freeze
|
9
9
|
LICENSE = 'MIT'.freeze
|
10
|
-
VERSION = '
|
10
|
+
VERSION = '3.0.0'.freeze
|
11
11
|
HOMEPAGE = 'https://github.com/BerkeleyLibrary/location'.freeze
|
12
12
|
end
|
13
13
|
end
|
@@ -30,9 +30,11 @@ module BerkeleyLibrary
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def <<(result)
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
r_indices = row_indices_for(result.oclc_number)
|
34
|
+
r_indices.each do |idx|
|
35
|
+
write_wc_cols(idx, result) if rlf || uc
|
36
|
+
write_ht_cols(idx, result) if hathi_trust
|
37
|
+
end
|
36
38
|
end
|
37
39
|
|
38
40
|
private
|
@@ -57,8 +59,8 @@ module BerkeleyLibrary
|
|
57
59
|
ht_col_index if hathi_trust
|
58
60
|
end
|
59
61
|
|
60
|
-
def
|
61
|
-
row_index =
|
62
|
+
def row_indices_for(oclc_number)
|
63
|
+
row_index = row_indices_by_oclc_number[oclc_number]
|
62
64
|
return row_index if row_index
|
63
65
|
|
64
66
|
raise ArgumentError, "Unknown OCLC number: #{oclc_number}"
|
@@ -121,18 +123,15 @@ module BerkeleyLibrary
|
|
121
123
|
@ht_err_col_index ||= ss.ensure_column!(COL_HATHI_TRUST_ERROR)
|
122
124
|
end
|
123
125
|
|
124
|
-
def
|
126
|
+
def row_indices_by_oclc_number
|
125
127
|
# Start at 1 to skip header row
|
126
|
-
@
|
128
|
+
@row_indices_by_oclc_number ||= (1...ss.row_count).each_with_object({}) do |r_index, r_indices|
|
127
129
|
oclc_number_raw = ss.value_at(r_index, oclc_col_index)
|
128
130
|
next unless oclc_number_raw
|
129
131
|
|
130
132
|
oclc_number = oclc_number_raw.to_s
|
131
|
-
|
132
|
-
|
133
|
-
else
|
134
|
-
r_indices[oclc_number] = r_index
|
135
|
-
end
|
133
|
+
r_indices[oclc_number] ||= []
|
134
|
+
r_indices[oclc_number] << r_index
|
136
135
|
end
|
137
136
|
end
|
138
137
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: berkeley_library-location
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
autorequire:
|
7
|
+
- UC Berkeley Library IT
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: berkeley_library-logging
|
@@ -255,7 +255,7 @@ dependencies:
|
|
255
255
|
- !ruby/object:Gem::Version
|
256
256
|
version: '3.12'
|
257
257
|
description: A collection of location-related utilities for the UC Berkeley Library
|
258
|
-
email:
|
258
|
+
email: libdevelopers@lists.berkeley.edu
|
259
259
|
executables: []
|
260
260
|
extensions: []
|
261
261
|
extra_rdoc_files: []
|
@@ -291,7 +291,7 @@ metadata:
|
|
291
291
|
source_code_uri: https://github.com/BerkeleyLibrary/location
|
292
292
|
changelog_uri: https://github.com/BerkeleyLibrary/location/CHANGELOG.md
|
293
293
|
rubygems_mfa_required: 'true'
|
294
|
-
post_install_message:
|
294
|
+
post_install_message:
|
295
295
|
rdoc_options: []
|
296
296
|
require_paths:
|
297
297
|
- lib
|
@@ -306,8 +306,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
306
|
- !ruby/object:Gem::Version
|
307
307
|
version: '0'
|
308
308
|
requirements: []
|
309
|
-
rubygems_version: 3.
|
310
|
-
signing_key:
|
309
|
+
rubygems_version: 3.4.10
|
310
|
+
signing_key:
|
311
311
|
specification_version: 4
|
312
312
|
summary: Locaton-related utilities for the UC Berkeley Library
|
313
313
|
test_files: []
|