high_level_browse 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/lib/high_level_browse/db.rb +1 -1
- data/lib/high_level_browse/version.rb +1 -1
- data/spec/high_level_browse_spec.rb +4 -0
- metadata +2 -4
- data/spec/data/hlb.json.gz +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddcefc7f49726e4004b5e8bf584b52f1fdc64b8fe0a98a16aa52a4e8c1c16a75
|
4
|
+
data.tar.gz: d2d4ee602e56cc1f7a6a72c98b007b7f38885c5e7398f1dc6fd78da1f5e87239
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a469408f0cb72101c6cd7886c5c020e9446541dbd1a5c5fd7bb43315a3be42bc1719cd5e4a62db1a548cefb0eef1342b755e02ad3d8b475bbe98b6bdb629af6e
|
7
|
+
data.tar.gz: cd4f82a52bf77987f28ab40fbbab661509b63ac26c4e852f623cbef46afed80923ef3000f93d0ec69d8cf9374b65289ab5a02948eb730bcb720ba5384d9c547d
|
data/.github/workflows/ruby.yml
CHANGED
@@ -30,7 +30,7 @@ jobs:
|
|
30
30
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
31
31
|
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
32
32
|
# uses: ruby/setup-ruby@v1
|
33
|
-
uses: ruby/setup-ruby@
|
33
|
+
uses: ruby/setup-ruby@v1
|
34
34
|
with:
|
35
35
|
ruby-version: ${{ matrix.ruby-version }}
|
36
36
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
data/lib/high_level_browse/db.rb
CHANGED
@@ -108,7 +108,7 @@ class HighLevelBrowse::DB
|
|
108
108
|
# @param [Array<String>] decendent_xpaths A list of xpaths to the decendents of this node
|
109
109
|
# @param [Array<String>] topic_array An array with all levels of the topics associated with this node
|
110
110
|
# @return [Array<HighLevelBrowse::CallNumberRange>]
|
111
|
-
def cnrs_within_noko_node(node:, decendent_xpaths: ["/hlb/subject", "topic"], topic_array: [])
|
111
|
+
def cnrs_within_noko_node(node:, decendent_xpaths: ["/hlb/subject", "topic", "sub-topic"], topic_array: [])
|
112
112
|
if decendent_xpaths.empty?
|
113
113
|
[] # base case -- we're as low as we're going to go
|
114
114
|
else
|
@@ -20,4 +20,8 @@ RSpec.describe HighLevelBrowse do
|
|
20
20
|
loaded = HighLevelBrowse.load(dir: dir)
|
21
21
|
expect(loaded['QA1']).to eq [["Science", "Mathematics"]]
|
22
22
|
end
|
23
|
+
|
24
|
+
it "finds a three-level item" do
|
25
|
+
expect(hlb["pc1100"]).to include ["Humanities", "Romance Languages and Literatures", "Italian Language and Literatures"]
|
26
|
+
end
|
23
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: high_level_browse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bill Dueber
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -122,7 +122,6 @@ files:
|
|
122
122
|
- lib/high_level_browse/db.rb
|
123
123
|
- lib/high_level_browse/range_tree.rb
|
124
124
|
- lib/high_level_browse/version.rb
|
125
|
-
- spec/data/hlb.json.gz
|
126
125
|
- spec/high_level_browse_spec.rb
|
127
126
|
- spec/spec_helper.rb
|
128
127
|
homepage: ''
|
@@ -149,6 +148,5 @@ signing_key:
|
|
149
148
|
specification_version: 4
|
150
149
|
summary: Map LC call numbers to academic categories.
|
151
150
|
test_files:
|
152
|
-
- spec/data/hlb.json.gz
|
153
151
|
- spec/high_level_browse_spec.rb
|
154
152
|
- spec/spec_helper.rb
|
data/spec/data/hlb.json.gz
DELETED
Binary file
|