relaton 0.5.8 → 0.5.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 820f5618b385e02a874c867b48cd1ffe0d829d876a4dd0a62f1402856d401368
4
- data.tar.gz: 94c2a2c5688e638a8bd8b4527b854f5502fc43e2d9f7a2b3de5edfe4b67a8e66
3
+ metadata.gz: 334ec7c58d9fb08799e2c1d215ef5a2201ecd39af4ce164358ec8aad050a6b34
4
+ data.tar.gz: 04f652f80d1aaec32952423f4b63ff24670d24049c53de50df925ef366c65781
5
5
  SHA512:
6
- metadata.gz: 2c45d2721c47c9a499adf79cf1f65efd0af0f22906677659046e55f4ef7df3bac1ff88b4f99709da2ca258e62be278d790508f28a12cbc26ac5ec651fffbebf4
7
- data.tar.gz: 3b0e24e4f6e90f9f3dcebc42f66491be2bb0e06e494b2705430d981e52cc19112537423f9674018cddd5fe5e9b9f2245cbd14aa76d06932254a36aa8c878ea59
6
+ metadata.gz: d49d7e029f54bc402406812639b22af591c77cb9257e2af8b0dacdf89a82b52de97c7e58b566218af1d7032526abf65a200db2690d019c7b80ae22e21a9c9a6e
7
+ data.tar.gz: b19e2e5e46352e65f118b678d03f431ac83f7c60619c7bc6d392f61c042b56836f3310f0596e6b060efcfb84ecbee33f726cbad83f1de803463f4f21e6ae8321
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- relaton (0.5.8)
4
+ relaton (0.5.9)
5
5
  relaton-gb (~> 0.6.0)
6
6
  relaton-iec (~> 0.4.0)
7
7
  relaton-ietf (~> 0.6.0)
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
- return bib_retval(bibentry, stdclass, id) if db.nil?
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.8
1
+ 0.5.9
@@ -1,3 +1,3 @@
1
1
  module Relaton
2
- VERSION = "0.5.8".freeze
2
+ VERSION = "0.5.9".freeze
3
3
  end
@@ -1 +1 @@
1
- 0.5.8
1
+ 0.5.9
@@ -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) { db = Relaton::Db.new nil, nil }
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.8
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-25 00:00:00.000000000 Z
11
+ date: 2019-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: relaton-gb