relaton 0.5.8 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/relaton/db.rb +4 -1
- data/lib/relaton/static_cache/version +1 -1
- data/lib/relaton/version.rb +1 -1
- data/relaton/cache/version +1 -1
- data/spec/relaton/db_spec.rb +9 -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: 334ec7c58d9fb08799e2c1d215ef5a2201ecd39af4ce164358ec8aad050a6b34
|
4
|
+
data.tar.gz: 04f652f80d1aaec32952423f4b63ff24670d24049c53de50df925ef366c65781
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d49d7e029f54bc402406812639b22af591c77cb9257e2af8b0dacdf89a82b52de97c7e58b566218af1d7032526abf65a200db2690d019c7b80ae22e21a9c9a6e
|
7
|
+
data.tar.gz: b19e2e5e46352e65f118b678d03f431ac83f7c60619c7bc6d392f61c042b56836f3310f0596e6b060efcfb84ecbee33f726cbad83f1de803463f4f21e6ae8321
|
data/Gemfile.lock
CHANGED
data/lib/relaton/db.rb
CHANGED
@@ -149,7 +149,10 @@ module Relaton
|
|
149
149
|
|
150
150
|
db = @local_db || @db
|
151
151
|
altdb = @local_db && @db ? @db : nil
|
152
|
-
|
152
|
+
if db.nil?
|
153
|
+
bibentry = new_bib_entry(searchcode, year, opts, stdclass, db: db, id: id)
|
154
|
+
return bib_retval(bibentry, stdclass, id)
|
155
|
+
end
|
153
156
|
|
154
157
|
db.delete(id) unless db.valid_entry?(id, year)
|
155
158
|
if altdb
|
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.9
|
data/lib/relaton/version.rb
CHANGED
data/relaton/cache/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.9
|
data/spec/relaton/db_spec.rb
CHANGED
@@ -6,6 +6,14 @@ RSpec.describe Relaton::Db do
|
|
6
6
|
expect(db.docid_type("CN(GB/T 1.1)")).to eq ["Chinese Standard", "GB/T 1.1"]
|
7
7
|
end
|
8
8
|
|
9
|
+
it "doesn't use cache" do
|
10
|
+
db = Relaton::Db.new nil, nil
|
11
|
+
VCR.use_cassette "iso_19115_1" do
|
12
|
+
bib = db.fetch("ISO 19115-1", nil, {})
|
13
|
+
expect(bib).to be_instance_of RelatonIsoBib::IsoBibliographicItem
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
9
17
|
it "fetch when no local db" do
|
10
18
|
db = Relaton::Db.new "testcache", nil
|
11
19
|
VCR.use_cassette "iso_19115_1" do
|
@@ -23,7 +31,7 @@ RSpec.describe Relaton::Db do
|
|
23
31
|
end
|
24
32
|
|
25
33
|
context "fetch documents form static cache" do
|
26
|
-
let(:db) {
|
34
|
+
let(:db) { Relaton::Db.new nil, nil }
|
27
35
|
|
28
36
|
it "fetches ISO/IEC DIR 1 IEC SUP" do
|
29
37
|
bib = db.fetch "ISO/IEC DIR 1 IEC SUP"
|
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.5.
|
4
|
+
version: 0.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: relaton-gb
|