relaton 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -1
- data/Gemfile.lock +10 -10
- data/lib/relaton/db.rb +10 -10
- data/lib/relaton/version.rb +1 -1
- data/relaton/cache/version +1 -1
- data/spec/relaton/db_cache_spec.rb +1 -1
- data/spec/relaton/relaton_spec.rb +1 -1
- data/spec/vcr_cassetes/fisp_140.yml +309 -309
- data/spec/vcr_cassetes/sp_800_38b.yml +24 -24
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2ca1c7dea3d3757e5dfae19c317f5c688a68b11f
|
4
|
+
data.tar.gz: e08d15f1a2743778895f749e427db6ea2b8efa0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29006cff91af9ea3358cad7d6f48906066ea2841595d67ce039172ccd1ce166abb18dbc499a549197e0f05a3ca64cece96da1882a496d6f1ddad570dd5f2599a
|
7
|
+
data.tar.gz: b6968ea0a1d63b900e703d74e433281cc924b0131613e7d2585b912dde4683fd42d2c45d268850d9bae3671c7062d00f88123c0dfbffedfb8b2651bb2bd21cf8
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
relaton (0.4.
|
4
|
+
relaton (0.4.1)
|
5
5
|
algoliasearch
|
6
6
|
relaton-gb (~> 0.5.0)
|
7
7
|
relaton-iec (~> 0.3.0)
|
@@ -76,36 +76,36 @@ GEM
|
|
76
76
|
pry-byebug (3.6.0)
|
77
77
|
byebug (~> 10.0)
|
78
78
|
pry (~> 0.10)
|
79
|
-
public_suffix (3.1.
|
79
|
+
public_suffix (3.1.1)
|
80
80
|
rainbow (3.0.0)
|
81
81
|
rake (12.3.2)
|
82
82
|
rb-fsevent (0.10.3)
|
83
83
|
rb-inotify (0.10.0)
|
84
84
|
ffi (~> 1.0)
|
85
|
-
relaton-bib (0.2.
|
85
|
+
relaton-bib (0.2.3)
|
86
86
|
addressable
|
87
87
|
nokogiri (~> 1.8.4)
|
88
|
-
relaton-gb (0.5.
|
88
|
+
relaton-gb (0.5.1)
|
89
89
|
cnccs (~> 0.1.1)
|
90
90
|
gb-agencies (~> 0.0.1)
|
91
91
|
relaton-iso-bib (~> 0.2.0)
|
92
|
-
relaton-iec (0.3.
|
92
|
+
relaton-iec (0.3.1)
|
93
93
|
addressable
|
94
94
|
relaton-iso-bib (~> 0.2.0)
|
95
|
-
relaton-ietf (0.5.
|
95
|
+
relaton-ietf (0.5.3)
|
96
96
|
relaton-iso-bib (~> 0.2.0)
|
97
|
-
relaton-iso (0.5.
|
97
|
+
relaton-iso (0.5.1)
|
98
98
|
algoliasearch
|
99
99
|
relaton-iec (~> 0.3.0)
|
100
100
|
relaton-iso-bib (~> 0.2.0)
|
101
|
-
relaton-iso-bib (0.2.
|
101
|
+
relaton-iso-bib (0.2.3)
|
102
102
|
isoics (~> 0.1.6)
|
103
103
|
nokogiri (~> 1.8.4)
|
104
104
|
relaton-bib (~> 0.2.0)
|
105
105
|
ruby_deep_clone (~> 0.8.0)
|
106
|
-
relaton-itu (0.2.
|
106
|
+
relaton-itu (0.2.1)
|
107
107
|
relaton-iso-bib (~> 0.2.0)
|
108
|
-
relaton-nist (0.2.
|
108
|
+
relaton-nist (0.2.1)
|
109
109
|
relaton-bib (~> 0.2.0)
|
110
110
|
rspec (3.8.0)
|
111
111
|
rspec-core (~> 3.8.0)
|
data/lib/relaton/db.rb
CHANGED
@@ -42,16 +42,16 @@ module Relaton
|
|
42
42
|
check_bibliocache(code, year, opts, stdclass)
|
43
43
|
end
|
44
44
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
45
|
+
def fetch_std(code, year = nil, stdclass = nil, opts = {})
|
46
|
+
std = nil
|
47
|
+
@registry.processors.each do |name, processor|
|
48
|
+
std = name if processor.prefix == stdclass
|
49
|
+
end
|
50
|
+
unless std
|
51
|
+
std = standard_class(code) or return nil
|
52
|
+
end
|
53
|
+
check_bibliocache(code, year, opts, std)
|
54
|
+
end
|
55
55
|
|
56
56
|
# def fetched(key)
|
57
57
|
# return @local_db.fetched key if @local_db
|
data/lib/relaton/version.rb
CHANGED
data/relaton/cache/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
@@ -8,7 +8,7 @@ RSpec.describe Relaton::DbCache do
|
|
8
8
|
Relaton::DbCache.init_bib_caches(global_cache: true, local_cache: "", flush_caches: true)
|
9
9
|
expect(File.exist?(File.expand_path("~/.relaton"))).to be true
|
10
10
|
expect(File.exist?("relaton")).to be true
|
11
|
-
FileUtils.mv "relaton1", File.expand_path("~/.relaton")
|
11
|
+
FileUtils.mv "relaton1", File.expand_path("~/.relaton") if File.exist? "relaton1"
|
12
12
|
end
|
13
13
|
|
14
14
|
# it "returns fetched" do
|
@@ -32,7 +32,7 @@ RSpec.describe Relaton::Db do
|
|
32
32
|
VCR.use_cassette "19133_2005" do
|
33
33
|
bib = @db.fetch("ISO 19133:2005")
|
34
34
|
expect(bib).to be_instance_of RelatonIsoBib::IsoBibliographicItem
|
35
|
-
expect(bib.to_xml).to include "<bibitem id=\"ISO19133-2005\">"
|
35
|
+
expect(bib.to_xml).to include "<bibitem id=\"ISO19133-2005\" type=\"standard\">"
|
36
36
|
testcache = Relaton::DbCache.new "testcache"
|
37
37
|
expect(testcache.valid_entry?("ISO(ISO 19133:2005)", "2019")).to eq Date.today.year.to_s
|
38
38
|
end
|