relaton 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/relaton/db.rb +11 -0
- data/lib/relaton/version.rb +1 -1
- data/spec/relaton/relaton_spec.rb +2 -1
- 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: 0c1beef6d057ce75ecd9f18f02d3ce887bf9c8d259c0ac7d159f24d8584134c3
|
4
|
+
data.tar.gz: 62db2b47dae11069a14dc8eb83dcc62090aec6a4d586508d00cf81736d9492a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83a73440d1eb4f63c12e33d296075a7e46759db37bafe40bda57369d6786202e57eb17426f4975d1c1b005fa7dab76fa06996ecc538f608060f269625605a3b0
|
7
|
+
data.tar.gz: e1e8ab5afcb76904239547bbbdc4dca80a3e8dd0b2ca7040f721487970224c010b5e50b2357b9a8121a6147c05091d2babed9745c8b626cd282199b6849f21b0
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
relaton (0.2.
|
4
|
+
relaton (0.2.5)
|
5
5
|
algoliasearch
|
6
6
|
gbbib (~> 0.3.1)
|
7
7
|
iecbib (~> 0.1.1)
|
@@ -47,7 +47,7 @@ GEM
|
|
47
47
|
guard-compat (~> 1.1)
|
48
48
|
rspec (>= 2.99.0, < 4.0)
|
49
49
|
httpclient (2.8.3)
|
50
|
-
iecbib (0.1.
|
50
|
+
iecbib (0.1.2)
|
51
51
|
addressable
|
52
52
|
iso-bib-item (~> 0.3.0)
|
53
53
|
ietfbib (0.4.1)
|
@@ -105,7 +105,7 @@ GEM
|
|
105
105
|
diff-lcs (>= 1.2.0, < 2.0)
|
106
106
|
rspec-support (~> 3.8.0)
|
107
107
|
rspec-support (3.8.0)
|
108
|
-
rubocop (0.59.
|
108
|
+
rubocop (0.59.2)
|
109
109
|
jaro_winkler (~> 1.5.1)
|
110
110
|
parallel (~> 1.10)
|
111
111
|
parser (>= 2.5, != 2.5.1.1)
|
data/lib/relaton/db.rb
CHANGED
@@ -41,6 +41,17 @@ module Relaton
|
|
41
41
|
check_bibliocache(code, year, opts, stdclass)
|
42
42
|
end
|
43
43
|
|
44
|
+
def fetch_std(code, year = nil, stdclass = nil, opts = {})
|
45
|
+
std = nil
|
46
|
+
@registry.processors.each do |name, processor|
|
47
|
+
std = name if processor.prefix == stdclass
|
48
|
+
end
|
49
|
+
unless std
|
50
|
+
std = standard_class(code) or return nil
|
51
|
+
end
|
52
|
+
check_bibliocache(code, year, opts, std)
|
53
|
+
end
|
54
|
+
|
44
55
|
# The document identifier class corresponding to the given code
|
45
56
|
def docid_type(code)
|
46
57
|
stdclass = standard_class(code) or return [nil, code]
|
data/lib/relaton/version.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
require "spec_helper"
|
2
|
+
require "fileutils"
|
2
3
|
|
3
4
|
RSpec.describe Relaton::Db do
|
4
5
|
# let!(:db) { Relaton::Db.new("testcache", "testcache2") }
|
5
6
|
|
6
7
|
before :each do
|
7
|
-
|
8
|
+
FileUtils.rm_f %w(testcache testcache2)
|
8
9
|
@db = Relaton::Db.new "testcache", "testcache2"
|
9
10
|
end
|
10
11
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: algoliasearch
|