relaton 1.19.0 → 1.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton/registry.rb +4 -2
- data/lib/relaton/version.rb +1 -1
- data/relaton.gemspec +1 -0
- data/spec/relaton/registry_spec.rb +36 -0
- data/spec/relaton_spec.rb +9 -0
- data/spec/vcr_cassetes/3gpp_tr_00_01u_umts_3_0_0.yml +12200 -11280
- data/spec/vcr_cassetes/api_relaton_org.yml +8 -8
- data/spec/vcr_cassetes/api_relaton_org_unavailable.yml +11 -11
- data/spec/vcr_cassetes/cc_dir_10005_2019.yml +14 -14
- data/spec/vcr_cassetes/cie_001_1980.yml +21 -21
- data/spec/vcr_cassetes/doi_10_6028_nist_ir_8245.yml +6 -6
- data/spec/vcr_cassetes/ecma_6.yml +133 -133
- data/spec/vcr_cassetes/en_10160_1999.yml +10168 -10170
- data/spec/vcr_cassetes/gb_t_20223_2006.yml +413 -419
- data/spec/vcr_cassetes/ieee_528_2019.yml +2157 -2149
- data/spec/vcr_cassetes/iso_19115_1.yml +1567 -1424
- data/spec/vcr_cassetes/iso_19115_1_2.yml +21 -21
- data/spec/vcr_cassetes/iso_19115_1_std.yml +1565 -1444
- data/spec/vcr_cassetes/iso_19115_all_parts.yml +11 -11
- data/spec/vcr_cassetes/iso_19133_2005.yml +10 -10
- data/spec/vcr_cassetes/iso_combined_applied.yml +22 -22
- data/spec/vcr_cassetes/iso_combined_included.yml +22 -22
- data/spec/vcr_cassetes/iso_dis.yml +10 -10
- data/spec/vcr_cassetes/ogc_19_025r1.yml +16 -16
- data/spec/vcr_cassetes/omg_ami4ccm_1_0.yml +1205 -1211
- data/spec/vcr_cassetes/rfc_8341.yml +135 -135
- metadata +16 -3
- data/spec/vcr_cassetes/iso_111111119115_1.yml +0 -75
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a133026bf858511b0385b639ec7cc96ab0f855c31a5446d1d118d009eda235d
|
4
|
+
data.tar.gz: b9b89a70476bf01a6c9ca710047ccf13f4531174dafa12e5b37908bdf668d44c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d35962b592b2eb4ed65261bed9638d304bd91ffc09baf1cb40c7e245692381b28d6d4985fe321d326d09770afa738ea3cce1e15ab499501d4221228559051140
|
7
|
+
data.tar.gz: 46d9116df1ae0f23d7aea5763908bb4b5ac3ec3073d2bbd8b67578c94b85ab5ab89f327747f420ca2226409955ff78de41a4eeabd7992cb32383491386a45b99
|
data/lib/relaton/registry.rb
CHANGED
@@ -10,7 +10,7 @@ module Relaton
|
|
10
10
|
relaton_ogc relaton_calconnect relaton_omg relaton_un relaton_w3c
|
11
11
|
relaton_ieee relaton_iho relaton_bipm relaton_ecma relaton_cie relaton_bsi
|
12
12
|
relaton_cen relaton_iana relaton_3gpp relaton_oasis relaton_doi relaton_jis
|
13
|
-
relaton_xsf relaton_ccsds relaton_etsi relaton_isbn
|
13
|
+
relaton_xsf relaton_ccsds relaton_etsi relaton_isbn relaton/plateau
|
14
14
|
].freeze
|
15
15
|
|
16
16
|
include Singleton
|
@@ -107,7 +107,9 @@ module Relaton
|
|
107
107
|
private
|
108
108
|
|
109
109
|
def camel_case(gem_name)
|
110
|
-
gem_name.split("
|
110
|
+
gem_name.split("/").map do |part|
|
111
|
+
part.split("_").map(&:capitalize).join
|
112
|
+
end.join("::")
|
111
113
|
end
|
112
114
|
end
|
113
115
|
end
|
data/lib/relaton/version.rb
CHANGED
data/relaton.gemspec
CHANGED
@@ -53,6 +53,7 @@ Gem::Specification.new do |spec|
|
|
53
53
|
spec.add_dependency "relaton-oasis", "~> 1.19.0"
|
54
54
|
spec.add_dependency "relaton-ogc", "~> 1.19.0"
|
55
55
|
spec.add_dependency "relaton-omg", "~> 1.19.0"
|
56
|
+
spec.add_dependency "relaton-plateau", "~> 1.19.0"
|
56
57
|
spec.add_dependency "relaton-un", "~> 1.19.0"
|
57
58
|
spec.add_dependency "relaton-w3c", "~> 1.19.0"
|
58
59
|
spec.add_dependency "relaton-xsf", "~> 1.19.0"
|
@@ -127,6 +127,42 @@ RSpec.describe Relaton::Registry do
|
|
127
127
|
it "ISBN" do
|
128
128
|
expect(Relaton::Registry.instance.by_type("ISBN")).to be_instance_of RelatonIsbn::Processor
|
129
129
|
end
|
130
|
+
|
131
|
+
context "PLATEAU" do
|
132
|
+
let(:processor) { Relaton::Registry.instance.by_type("PLATEAU") }
|
133
|
+
before { processor }
|
134
|
+
|
135
|
+
it "finds processor" do
|
136
|
+
expect(processor).to be_instance_of Relaton::Plateau::Processor
|
137
|
+
end
|
138
|
+
|
139
|
+
it "fetch data" do
|
140
|
+
expect(Relaton::Plateau::Fetcher).to receive(:fetch).with("plateau-handbooks", output: "dir", format: "xml")
|
141
|
+
processor.fetch_data "plateau-handbooks", output: "dir", format: "xml"
|
142
|
+
end
|
143
|
+
|
144
|
+
it "from_xml" do
|
145
|
+
expect(Relaton::Plateau::XMLParser).to receive(:from_xml).with(:xml).and_return :bibitem
|
146
|
+
expect(processor.from_xml(:xml)).to eq :bibitem
|
147
|
+
end
|
148
|
+
|
149
|
+
it "hash_to_bib" do
|
150
|
+
expect(Relaton::Plateau::HashConverter).to receive(:hash_to_bib).with(:hash).and_return bib: :bib
|
151
|
+
expect(Relaton::Plateau::BibItem).to receive(:new).with(bib: :bib).and_return :bibitem
|
152
|
+
expect(processor.hash_to_bib(:hash)).to eq :bibitem
|
153
|
+
end
|
154
|
+
|
155
|
+
it "grammar_hash" do
|
156
|
+
expect(processor.grammar_hash).to be_instance_of String
|
157
|
+
end
|
158
|
+
|
159
|
+
it "remove_index_file" do
|
160
|
+
index = double "index"
|
161
|
+
expect(index).to receive(:remove_file)
|
162
|
+
expect(Relaton::Index).to receive(:find_or_create).and_return index
|
163
|
+
processor.remove_index_file
|
164
|
+
end
|
165
|
+
end
|
130
166
|
end
|
131
167
|
|
132
168
|
it "find processot by dataset" do
|
data/spec/relaton_spec.rb
CHANGED
@@ -373,6 +373,15 @@ RSpec.describe Relaton::Db do
|
|
373
373
|
expect(bib.docidentifier.first.id).to eq "ISBN 978-0-580-50101-4"
|
374
374
|
end
|
375
375
|
|
376
|
+
it "get PLATEAU reference" do
|
377
|
+
docid = RelatonBib::DocumentIdentifier.new(id: "PLATEAU Hanbook #01", type: "PLATEAU")
|
378
|
+
item = Relaton::Plateau::BibItem.new docid: [docid]
|
379
|
+
expect(Relaton::Plateau::Bibliography).to receive(:get).with("PLATEAU Hanbook #01", nil, {}).and_return item
|
380
|
+
bib = @db.fetch "PLATEAU Hanbook #01"
|
381
|
+
expect(bib).to be_instance_of Relaton::Plateau::BibItem
|
382
|
+
expect(bib.docidentifier.first.id).to eq "PLATEAU Hanbook #01"
|
383
|
+
end
|
384
|
+
|
376
385
|
context "get combined documents" do
|
377
386
|
context "ISO" do
|
378
387
|
it "included" do
|