relaton 1.13.0 → 1.14.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +0 -2
  3. data/.github/workflows/release.yml +22 -0
  4. data/docs/README.adoc +11 -11
  5. data/lib/relaton/db.rb +2 -2
  6. data/lib/relaton/version.rb +1 -1
  7. data/relaton.gemspec +22 -22
  8. data/spec/relaton/db_spec.rb +12 -2
  9. data/spec/relaton_spec.rb +20 -15
  10. data/spec/spec_helper.rb +1 -0
  11. data/spec/vcr_cassetes/3gpp_tr_00_01u_umts_3_0_0.yml +15 -14
  12. data/spec/vcr_cassetes/api_relaton_org.yml +8 -8
  13. data/spec/vcr_cassetes/api_relaton_org_unavailable.yml +16 -16
  14. data/spec/vcr_cassetes/async_fetch.yml +1205 -1468
  15. data/spec/vcr_cassetes/bipm_i18n_async_fetch.yml +60 -268
  16. data/spec/vcr_cassetes/bipm_metrologia_29_6_373.yml +294 -0
  17. data/spec/vcr_cassetes/bsi_bs_en_iso_8848.yml +31 -28
  18. data/spec/vcr_cassetes/cc_dir_10005_2019.yml +20 -24
  19. data/spec/vcr_cassetes/cie_001_1980.yml +21 -19
  20. data/spec/vcr_cassetes/ecma_6.yml +14 -15
  21. data/spec/vcr_cassetes/en_10160_1999.yml +28 -28
  22. data/spec/vcr_cassetes/fisp_140.yml +6 -6
  23. data/spec/vcr_cassetes/gb_t_20223_2006.yml +12 -12
  24. data/spec/vcr_cassetes/iana_service_names_port_numbers.yml +14 -14
  25. data/spec/vcr_cassetes/iec_60050_102_2007.yml +32 -42
  26. data/spec/vcr_cassetes/iec_combined_included.yml +95 -107
  27. data/spec/vcr_cassetes/ieee_528_2019.yml +11 -11
  28. data/spec/vcr_cassetes/iho_b_11.yml +10 -10
  29. data/spec/vcr_cassetes/iso_111111119115_1.yml +63 -4
  30. data/spec/vcr_cassetes/iso_19115_1.yml +15 -15
  31. data/spec/vcr_cassetes/iso_19115_1_2.yml +33 -33
  32. data/spec/vcr_cassetes/iso_19115_all_parts.yml +15 -15
  33. data/spec/vcr_cassetes/iso_19133_2005.yml +17 -17
  34. data/spec/vcr_cassetes/iso_combined_applied.yml +31 -31
  35. data/spec/vcr_cassetes/iso_combined_included.yml +33 -33
  36. data/spec/vcr_cassetes/iso_dis.yml +194 -0
  37. data/spec/vcr_cassetes/itu_combined_included.yml +163 -234
  38. data/spec/vcr_cassetes/oasis_amqp_core_types_v1_0_pt1.yml +10 -10
  39. data/spec/vcr_cassetes/ogc_19_025r1.yml +11 -11
  40. data/spec/vcr_cassetes/omg_ami4ccm_1_0.yml +23 -13
  41. data/spec/vcr_cassetes/rfc_8341.yml +47 -29
  42. data/spec/vcr_cassetes/sp_800_38b.yml +6 -6
  43. data/spec/vcr_cassetes/threads_from_env.yml +48 -72
  44. data/spec/vcr_cassetes/un_rtade_cefact_2004_32.yml +29 -29
  45. data/spec/vcr_cassetes/w3c_json_ld11.yml +26 -27
  46. metadata +52 -50
  47. data/spec/vcr_cassetes/iso_dis_14093.yml +0 -194
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31661a61a6de1d8269b64bbebe270c5abc32dd9f4aef453a39079d520082e487
4
- data.tar.gz: 6372e5f8467476af1dd723e7c2f807512eee51c97f9835abce6ae77ce2f7ec9f
3
+ metadata.gz: daac667938a21bbd4b7c80a0b79d44130092ea1033ce4b67a2e2b07b5656f8cd
4
+ data.tar.gz: df6cf30dba325af54327d6a73c1305d092f6dced4fd88f480685ec629e3d8c0d
5
5
  SHA512:
6
- metadata.gz: 72cf2b30872b9d37c01697554dddf15a8a44b68d417563a09bb740e8a21ac9079250873b638cf4d8e1ec960d354ba69ca27ef581b31d5fea01beada2398bf7a6
7
- data.tar.gz: 979c928dc30b43b4baa3475e2daf4e13777f101f2f7cec6872b0f38830a542aeff4eaa3d86be226a2986b1fbc205a8486c75d642d30ffcc257b2e7c32232a0b1
6
+ metadata.gz: 87b8d95ab3e0364209617f60e9562e3dae280c105dd885442a85a6bae5156c84814343d26953daeaeb85b864268f84729e4882de426cb3871d1e8d2110d945a8
7
+ data.tar.gz: ddeec0e3e31863fdee5ff09ba444188498f42775e1310c8f2b3c32831ff9f693ca42446292a2554febbc62a071b04bbba7285aa8a6c421a90fd6e4e5ca2d7f9f
@@ -5,10 +5,8 @@ name: rake
5
5
  on:
6
6
  push:
7
7
  branches: [ master, main ]
8
- tags: [ v* ]
9
8
  pull_request:
10
9
 
11
10
  jobs:
12
11
  rake:
13
12
  uses: relaton/support/.github/workflows/rake.yml@master
14
-
@@ -0,0 +1,22 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: release
4
+
5
+ on:
6
+ workflow_dispatch:
7
+ inputs:
8
+ next_version:
9
+ description: |
10
+ Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
11
+ required: true
12
+ default: 'skip'
13
+ push:
14
+ tags: [ v* ]
15
+
16
+ jobs:
17
+ release:
18
+ uses: relaton/support/.github/workflows/release.yml@master
19
+ with:
20
+ next_version: ${{ github.event.inputs.next_version }}
21
+ secrets:
22
+ rubygems-api-key: ${{ secrets.RELATON_CI_RUBYGEMS_API_KEY }}
data/docs/README.adoc CHANGED
@@ -12,13 +12,13 @@ Gem for importing and caching bibliographic references to technical standards.
12
12
 
13
13
  == Scope
14
14
 
15
- The Relaton gem obtains authoritative bibliographic entries for technical standards from online sources, and expresses them in a consistent format, which can be used in document authoring. (It is the underlying bibliographic tool for the https://github.com/metanorma/metanorma[Metanorma] toolset.)
15
+ The Relaton gem obtains authoritative bibliographic entries for technical standards from online sources and expresses them in a consistent format, which can be used in document authoring. (It is the underlying bibliographic tool for the https://github.com/metanorma/metanorma[Metanorma] toolset.)
16
16
 
17
- The gem also caches entries it has retrieved, so that subsequent iterations do not need to go back online to retrieve the same entries. The gem uses two caches: a global cache (for all bibliographic entries retrieved by the user), and a local cache (intended to store references specific to the current document being processed.)
17
+ The gem also caches entries it has retrieved so that subsequent iterations do not need to go back online to retrieve the same entries. The gem uses two caches: a global cache (for all bibliographic entries retrieved by the user), and a local cache (intended to store references specific to the current document being processed.)
18
18
 
19
- Entries are retrieved and stored in the https://github.com/relaton/relaton-models[Relaton bibliographic model], which is an expression of ISO 690. The subset of the model used and serialised for Relaton is defined in the https://github.com/relaton/relaton-bib[relaton-bib] and https://github.com/relaton/relaton-iso-bib[relaton-iso-bib] gems.
19
+ Entries are retrieved and stored in https://github.com/relaton/relaton-models[Relaton bibliographic model], which is an expression of ISO 690. The subset of the model used and serialized for Relaton is defined in the https://github.com/relaton/relaton-bib[relaton-bib] and https://github.com/relaton/relaton-iso-bib[relaton-iso-bib] gems.
20
20
 
21
- Entries are serialised to and from an internal data model, and multiple formats are intended to be supported. Currently only https://github.com/relaton/relaton-models/blob/master/grammars/biblio.rnc[Relaton XML] is supported.
21
+ Entries are serialized to and from an internal data model, and multiple formats are intended to be supported. Currently only https://github.com/relaton/relaton-models/blob/master/grammars/biblio.rnc[Relaton XML] is supported.
22
22
 
23
23
  Relaton imports bibliographic entries from:
24
24
 
@@ -31,21 +31,21 @@ Relaton imports bibliographic entries from:
31
31
  The identifiers for which bibliographic entries are to be retrieved need to indicate which standards body they belong to. To do so, this gem adopts the convention of bracketing identifiers, and preceding them with a code that indicates the standards body:
32
32
 
33
33
  * If the standards body is the national standards body, the wrapper uses the ISO country code. So `CN(GM/T 0009-2012)` is Chinese sector standard GM/T 0009-2012.
34
- * Otherwise, the wrappers uses the agreed abbreviation of the standards body. So `IETF(I-D.ribose-asciirfc-08)` identifies `I-D.ribose-asciirfc` as an Internet Engineering Task Force identifier.
35
- * Some prefixes to identifiers indicate the standards body they belong to unambiguously; e.g. `ISO` followed by slash or space. The scope wrapper is not required for those prefixes: `ISO(ISO 639-1)` can be recognised as just `ISO 639-1`.
34
+ * Otherwise, the wrappers use the agreed abbreviation of the standards body. So `IETF(I-D.ribose-asciirfc-08)` identifies `I-D.ribose-asciirfc` as an Internet Engineering Task Force identifier.
35
+ * Some prefixes to identifiers indicate the standards body they belong to unambiguously; e.g. `ISO` followed by a slash or space. The scope wrapper is not required for those prefixes: `ISO(ISO 639-1)` can be recognized as just `ISO 639-1`.
36
36
 
37
37
  The gem can be extended to use other standards-specific gems. Standards-specific gems like isobib register themselves against Relaton using `Relaton::Registry.instance.register`, which takes as an argument a subclass of `Relaton::Processor` defined in the gem; see isobib/lib/relaton for an example. The processor within the standards-specific gem needs to define
38
38
 
39
39
  * `@short`, the name of the gem
40
40
  * `@prefix`, the regex which scopes the identifier, and constrains it to belong to a particular standards class.
41
- * `@defaultprefix`, the identifier prefixes which can be recognised without a scope wrapper.
41
+ * `@defaultprefix`, the identifier prefixes which can be recognized without a scope wrapper.
42
42
  * `@idtype`, the type assigned to document identifiers for the standard class.
43
43
  * `get(code, date, opts)`, which takes a standards code, a year, and a hash of options, and returns an iso-bib-item bibliographic entry
44
44
  ** `date == nil`: an ISO reference is treated as a generic reference to the latest available version of the reference. The latest
45
- version retrieved has its date of publicatipn stripped. The dated reference is retained as an `instanceOf` relation to the reference.
45
+ version retrieved has its date of publication stripped. The dated reference is retained as an `instanceOf` relation to the reference.
46
46
  e.g. `get("ISO 19115-1", nil)` is transformed from a reference to `ISO 19115-1:2014` (the latest available online) to an undated reference
47
47
  to `ISO 19115-1`.
48
- ** `opts[:keep_date] == true`: undoes the behaviour of `date == nil`: the most recent dated instance of the reference is retrieved.
48
+ ** `opts[:keep_date] == true`: undoes the behavior of `date == nil`: the most recent dated instance of the reference is retrieved.
49
49
  e.g. `get("ISO 19115-1", nil, keep_date: true)` returns a reference to `ISO 19115-1:2014`
50
50
  ** `opts[:all_parts] == true`: an ISO reference for a specific document part is transformed into a reference to all parts of the document
51
51
  (which does not have a distinct web page). The reference to the specific document part is retained as a `partOf` relation to the reference.
@@ -64,9 +64,9 @@ e.g. `get("ISO 19115-1", "2014", all_parts: true)` is transformed into a referen
64
64
 
65
65
  === Configuration
66
66
 
67
- * `logs` - is array of log levels. Allowed values: `:info`, `:warning`, `:error`, `:debug`. Default values are `[:info, :error]`.
67
+ * `logs` - is an array of log levels. Allowed values: `:info`, `:warning`, `:error`, `:debug`. Default values are `[:info, :error]`.
68
68
  * `use_api` - `true` if it needs to use an online cache, `false` inf not. Default value is `true`.
69
- * `api_host` - url of an online cache. Default value is https://api.relaton.org.
69
+ * `api_host` - url of an online cache. The default value is https://api.relaton.org.
70
70
 
71
71
  [source,ruby]
72
72
  ----
data/lib/relaton/db.rb CHANGED
@@ -277,6 +277,8 @@ module Relaton
277
277
  # RelatonBipm::BipmBibliographicItem, RelatonIho::IhoBibliographicItem,
278
278
  # RelatonOmg::OmgBibliographicItem, RelatonW3c::W3cBibliographicItem]
279
279
  def combine_doc(code, year, opts, stdclass) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
280
+ return if stdclass == :relaton_bipm
281
+
280
282
  if (refs = code.split " + ").size > 1
281
283
  reltype = "derivedFrom"
282
284
  reldesc = nil
@@ -528,8 +530,6 @@ module Relaton
528
530
  Relaton::Db.new(globalname, localname)
529
531
  end
530
532
 
531
- private
532
-
533
533
  def flush_caches(gcache, lcache)
534
534
  FileUtils.rm_rf gcache unless gcache.nil?
535
535
  FileUtils.rm_rf lcache unless lcache.nil?
@@ -1,3 +1,3 @@
1
1
  module Relaton
2
- VERSION = "1.13.0".freeze
2
+ VERSION = "1.14.1".freeze
3
3
  end
data/relaton.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  This gem is in active development.
21
21
  DESCRIPTION
22
22
 
23
- spec.homepage = "https://github.com/relato/relaton"
23
+ spec.homepage = "https://github.com/relaton/relaton"
24
24
  spec.license = "BSD-2-Clause"
25
25
 
26
26
  spec.bindir = "bin"
@@ -29,27 +29,27 @@ Gem::Specification.new do |spec|
29
29
  # spec.test_files = `git ls-files -- {spec}/*`.split("\n")
30
30
  spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
31
31
 
32
- spec.add_dependency "relaton-3gpp", "~> 1.13.0"
33
- spec.add_dependency "relaton-bipm", "~> 1.13.0"
34
- spec.add_dependency "relaton-bsi", "~> 1.13.0"
35
- spec.add_dependency "relaton-calconnect", "~> 1.13.0"
36
- spec.add_dependency "relaton-cen", "~> 1.13.0"
37
- spec.add_dependency "relaton-cie", "~> 1.13.0"
38
- spec.add_dependency "relaton-ecma", "~> 1.13.0"
39
- spec.add_dependency "relaton-gb", "~> 1.13.0"
40
- spec.add_dependency "relaton-iana", "~> 1.13.0"
41
- spec.add_dependency "relaton-iec", "~> 1.13.0"
42
- spec.add_dependency "relaton-ieee", "~> 1.13.0"
43
- spec.add_dependency "relaton-ietf", "~> 1.13.0"
44
- spec.add_dependency "relaton-iho", "~> 1.13.0"
45
- spec.add_dependency "relaton-iso", "~> 1.13.0"
46
- spec.add_dependency "relaton-itu", "~> 1.13.0"
47
- spec.add_dependency "relaton-nist", "~> 1.13.0"
48
- spec.add_dependency "relaton-oasis", "~> 1.13.0"
49
- spec.add_dependency "relaton-ogc", "~> 1.13.0"
50
- spec.add_dependency "relaton-omg", "~> 1.13.0"
51
- spec.add_dependency "relaton-un", "~> 1.13.0"
52
- spec.add_dependency "relaton-w3c", "~> 1.13.0"
32
+ spec.add_dependency "relaton-3gpp", "~> 1.14.0"
33
+ spec.add_dependency "relaton-bipm", "~> 1.14.0"
34
+ spec.add_dependency "relaton-bsi", "~> 1.14.0"
35
+ spec.add_dependency "relaton-calconnect", "~> 1.14.0"
36
+ spec.add_dependency "relaton-cen", "~> 1.14.0"
37
+ spec.add_dependency "relaton-cie", "~> 1.14.0"
38
+ spec.add_dependency "relaton-ecma", "~> 1.14.0"
39
+ spec.add_dependency "relaton-gb", "~> 1.14.0"
40
+ spec.add_dependency "relaton-iana", "~> 1.14.0"
41
+ spec.add_dependency "relaton-iec", "~> 1.14.0"
42
+ spec.add_dependency "relaton-ieee", "~> 1.14.0"
43
+ spec.add_dependency "relaton-ietf", "~> 1.14.0"
44
+ spec.add_dependency "relaton-iho", "~> 1.14.0"
45
+ spec.add_dependency "relaton-iso", "~> 1.14.0"
46
+ spec.add_dependency "relaton-itu", "~> 1.14.0"
47
+ spec.add_dependency "relaton-nist", "~> 1.14.0"
48
+ spec.add_dependency "relaton-oasis", "~> 1.14.0"
49
+ spec.add_dependency "relaton-ogc", "~> 1.14.0"
50
+ spec.add_dependency "relaton-omg", "~> 1.14.0"
51
+ spec.add_dependency "relaton-un", "~> 1.14.0"
52
+ spec.add_dependency "relaton-w3c", "~> 1.14.0"
53
53
 
54
54
  spec.add_development_dependency "byebug", "~> 11.0"
55
55
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
@@ -24,6 +24,14 @@ RSpec.describe Relaton::Db do
24
24
  end.to output("[relaton] (ISO 123) not found.\n").to_stderr
25
25
  end
26
26
  end
27
+
28
+ context "#combine_doc" do
29
+ it "retrun nil for BIPM documents" do
30
+ code = double "code"
31
+ expect(code).not_to receive(:split)
32
+ expect(subject.send(:combine_doc, code, nil, {}, :relaton_bipm)).to be_nil
33
+ end
34
+ end
27
35
  end
28
36
 
29
37
  context "class methods" do
@@ -209,8 +217,10 @@ RSpec.describe Relaton::Db do
209
217
  it "BIPM i18n" do
210
218
  expect(File).to receive(:exist?).with(/index\.yaml/).and_return false
211
219
  allow(File).to receive(:exist?).and_call_original
212
- refs = ["CGPM Resolution 1889-00", "CGPM Résolution 1889-00",
213
- "CGPM Réunion 9", "CGPM Meeting 9"]
220
+ # refs = ["CGPM Resolution 1889-00", "CGPM Résolution 1889-00",
221
+ # "CGPM Réunion 9", "CGPM Meeting 9"]
222
+ refs = ["CGPM -- Resolution (1889)", "CGPM -- Résolution (1889)",
223
+ "CGPM -- Réunion 9 (1948)", "CGPM -- Meeting 9 (1948)"]
214
224
  results = []
215
225
  VCR.use_cassette "bipm_i18n_async_fetch", match_requests_on: %i[method uri body] do
216
226
  refs.each do |ref|
data/spec/relaton_spec.rb CHANGED
@@ -15,15 +15,15 @@ RSpec.describe Relaton::Db do
15
15
  VCR.use_cassette "iso_19115_1" do
16
16
  bib = @db.fetch("ISO 19115-1", nil, {})
17
17
  expect(bib).to be_instance_of RelatonIsoBib::IsoBibliographicItem
18
- expect(bib.to_xml(bibdata: true)).to include "<project-number part=\"1\">"\
18
+ expect(bib.to_xml(bibdata: true)).to include "<project-number part=\"1\">" \
19
19
  "ISO 19115</project-number>"
20
20
  expect(File.exist?("testcache")).to be true
21
21
  expect(File.exist?("testcache2")).to be true
22
22
  testcache = Relaton::DbCache.new "testcache"
23
- expect(testcache["ISO(ISO 19115-1)"]).to include "<project-number part=\"1\">"\
23
+ expect(testcache["ISO(ISO 19115-1)"]).to include "<project-number part=\"1\">" \
24
24
  "ISO 19115</project-number>"
25
25
  testcache = Relaton::DbCache.new "testcache2"
26
- expect(testcache["ISO(ISO 19115-1)"]).to include "<project-number part=\"1\">"\
26
+ expect(testcache["ISO(ISO 19115-1)"]).to include "<project-number part=\"1\">" \
27
27
  "ISO 19115</project-number>"
28
28
  end
29
29
  bib = @db.fetch("ISO 19115-1", nil, {})
@@ -34,8 +34,8 @@ RSpec.describe Relaton::Db do
34
34
  VCR.use_cassette "iso_19133_2005" do
35
35
  bib = @db.fetch("ISO 19133:2005")
36
36
  expect(bib).to be_instance_of RelatonIsoBib::IsoBibliographicItem
37
- expect(bib.to_xml).to include '<bibitem id="ISO19133-2005" '\
38
- 'type="standard">'
37
+ expect(bib.to_xml).to include '<bibitem id="ISO19133-2005" ' \
38
+ 'type="standard" schema-version="v1.2.1">'
39
39
  testcache = Relaton::DbCache.new "testcache"
40
40
  expect(
41
41
  testcache.valid_entry?("ISO(ISO 19133:2005)", Date.today.year.to_s),
@@ -60,9 +60,9 @@ RSpec.describe Relaton::Db do
60
60
  end
61
61
 
62
62
  it "gets sn ISO/DIS reference" do
63
- VCR.use_cassette "iso_dis_14093" do
64
- bib = @db.fetch "ISO/DIS 14093"
65
- expect(bib.docidentifier[0].id).to eq "ISO/DIS 14093"
63
+ VCR.use_cassette "iso_dis" do
64
+ bib = @db.fetch "ISO/DIS 14460"
65
+ expect(bib.docidentifier[0].id).to eq "ISO/DIS 14460"
66
66
  end
67
67
  end
68
68
  end
@@ -191,7 +191,7 @@ RSpec.describe Relaton::Db do
191
191
  VCR.use_cassette "rfc_8341" do
192
192
  bib = @db.fetch "RFC 8341", nil, {}
193
193
  expect(bib).to be_instance_of RelatonIetf::IetfBibliographicItem
194
- expect(bib.to_xml).to include "<bibitem id=\"RFC8341\" type=\"standard\">"
194
+ expect(bib.to_xml).to include "<bibitem id=\"RFC8341\" type=\"standard\" schema-version=\"v1.2.1\">"
195
195
  expect(File.exist?("testcache")).to be true
196
196
  expect(File.exist?("testcache2")).to be true
197
197
  testcache = Relaton::DbCache.new "testcache"
@@ -274,14 +274,14 @@ RSpec.describe Relaton::Db do
274
274
  it "get ECMA reference" do
275
275
  VCR.use_cassette "ecma_6" do
276
276
  bib = @db.fetch "ECMA-6"
277
- expect(bib).to be_instance_of RelatonBib::BibliographicItem
277
+ expect(bib).to be_instance_of RelatonEcma::BibliographicItem
278
278
  end
279
279
  end
280
280
 
281
281
  it "get CIE reference" do
282
282
  VCR.use_cassette "cie_001_1980" do
283
283
  bib = @db.fetch "CIE 001-1980"
284
- expect(bib).to be_instance_of RelatonBib::BibliographicItem
284
+ expect(bib).to be_instance_of RelatonCie::BibliographicItem
285
285
  end
286
286
  end
287
287
 
@@ -295,14 +295,14 @@ RSpec.describe Relaton::Db do
295
295
  it "get CEN reference" do
296
296
  VCR.use_cassette "en_10160_1999" do
297
297
  bib = @db.fetch "EN 10160:1999"
298
- expect(bib).to be_instance_of RelatonIsoBib::IsoBibliographicItem
298
+ expect(bib).to be_instance_of RelatonCen::BibliographicItem
299
299
  end
300
300
  end
301
301
 
302
302
  it "get IANA reference" do
303
303
  VCR.use_cassette "iana_service_names_port_numbers" do
304
304
  bib = @db.fetch "IANA service-names-port-numbers"
305
- expect(bib).to be_instance_of RelatonBib::BibliographicItem
305
+ expect(bib).to be_instance_of RelatonIana::IanaBibliographicItem
306
306
  end
307
307
  end
308
308
 
@@ -320,6 +320,11 @@ RSpec.describe Relaton::Db do
320
320
  end
321
321
  end
322
322
 
323
+ it "get BIPM reference", vcr: "bipm_metrologia_29_6_373" do
324
+ bib = @db.fetch "BIPM Metrologia 29 6 373"
325
+ expect(bib).to be_instance_of RelatonBipm::BipmBibliographicItem
326
+ end
327
+
323
328
  context "get combined documents" do
324
329
  context "ISO" do
325
330
  it "included" do
@@ -330,7 +335,7 @@ RSpec.describe Relaton::Db do
330
335
  expect(bib.relation[0].bibitem.docidentifier[0].id).to eq "ISO 19115-1"
331
336
  expect(bib.relation[1].type).to eq "derivedFrom"
332
337
  expect(bib.relation[1].description).to be_nil
333
- expect(bib.relation[1].bibitem.docidentifier[0].id).to eq "ISO 19115-1/Amd 1:2018"
338
+ expect(bib.relation[1].bibitem.docidentifier[0].id).to eq "ISO 19115-1:2014/Amd 1"
334
339
  end
335
340
  end
336
341
 
@@ -342,7 +347,7 @@ RSpec.describe Relaton::Db do
342
347
  expect(bib.relation[0].bibitem.docidentifier[0].id).to eq "ISO 19115-1"
343
348
  expect(bib.relation[1].type).to eq "complements"
344
349
  expect(bib.relation[1].description.content).to eq "amendment"
345
- expect(bib.relation[1].bibitem.docidentifier[0].id).to eq "ISO 19115-1/Amd 1:2018"
350
+ expect(bib.relation[1].bibitem.docidentifier[0].id).to eq "ISO 19115-1:2014/Amd 1"
346
351
  end
347
352
  end
348
353
  end
data/spec/spec_helper.rb CHANGED
@@ -16,6 +16,7 @@ VCR.configure do |c|
16
16
  allow_playback_repeats: true,
17
17
  }
18
18
  c.hook_into :webmock
19
+ c.configure_rspec_metadata!
19
20
  end
20
21
 
21
22
  SimpleCov.start do
@@ -31,7 +31,7 @@ http_interactions:
31
31
  Content-Type:
32
32
  - text/plain; charset=utf-8
33
33
  Etag:
34
- - W/"bbd7f0c87384dd6862c84526ceedcbe809814a4681ced8f1e2a03507a6d36cf4"
34
+ - W/"7c959a43129b264a7c1e12e965e5c264a2a5f981072544989a9873d021c46a8d"
35
35
  Strict-Transport-Security:
36
36
  - max-age=31536000
37
37
  X-Content-Type-Options:
@@ -41,29 +41,29 @@ http_interactions:
41
41
  X-Xss-Protection:
42
42
  - 1; mode=block
43
43
  X-Github-Request-Id:
44
- - 9006:DC11:12120DE:1335553:630104F9
44
+ - 7496:0207:4FD3F2:6988C4:6388D860
45
45
  Accept-Ranges:
46
46
  - bytes
47
47
  Date:
48
- - Sat, 20 Aug 2022 15:59:54 GMT
48
+ - Thu, 01 Dec 2022 16:37:52 GMT
49
49
  Via:
50
50
  - 1.1 varnish
51
51
  X-Served-By:
52
- - cache-vie6372-VIE
52
+ - cache-atl18456-ATL
53
53
  X-Cache:
54
54
  - MISS
55
55
  X-Cache-Hits:
56
56
  - '0'
57
57
  X-Timer:
58
- - S1661011194.827084,VS0,VE239
58
+ - S1669912673.825654,VS0,VE158
59
59
  Vary:
60
60
  - Authorization,Accept-Encoding,Origin
61
61
  Access-Control-Allow-Origin:
62
62
  - "*"
63
63
  X-Fastly-Request-Id:
64
- - 6f05c12cc285982fd536c28ecfc3afbe554d15b9
64
+ - cccf475f5d37d90f0494ab5079476a56f722fe36
65
65
  Expires:
66
- - Sat, 20 Aug 2022 16:04:54 GMT
66
+ - Thu, 01 Dec 2022 16:42:52 GMT
67
67
  Source-Age:
68
68
  - '0'
69
69
  body:
@@ -72,10 +72,10 @@ http_interactions:
72
72
  ---
73
73
  id: 3GPPTR00.01U-UMTS/3.0.0
74
74
  title:
75
- - type: main
76
- content: Work programme for the standardization of Universal Mobile Telecommunications
75
+ - content: Work programme for the standardization of Universal Mobile Telecommunications
77
76
  System (UMTS)
78
77
  format: text/plain
78
+ type: main
79
79
  link:
80
80
  - content: http://www.3gpp.org/ftp/Specs/archive/00_series/00.01U/0001U-300.zip
81
81
  type: src
@@ -91,8 +91,9 @@ http_interactions:
91
91
  contributor:
92
92
  - organization:
93
93
  name:
94
- - 3rd Generation Partnership Project
95
- abbreviation: 3GPP
94
+ - content: 3rd Generation Partnership Project
95
+ abbreviation:
96
+ content: 3GPP
96
97
  contact:
97
98
  - address:
98
99
  street:
@@ -115,7 +116,7 @@ http_interactions:
115
116
  affiliation:
116
117
  - organization:
117
118
  name:
118
- - PHILIPS CONSUMER COMMUNICATION
119
+ - content: PHILIPS CONSUMER COMMUNICATION
119
120
  role:
120
121
  - author
121
122
  revdate: '1994-11-18'
@@ -128,7 +129,7 @@ http_interactions:
128
129
  value: withdrawn
129
130
  place:
130
131
  - Sophia Antipolis Cedex, France
131
- fetched: '2022-07-22'
132
+ fetched: '2022-09-21'
132
133
  doctype: TR
133
134
  editorialgroup:
134
135
  - name: SMG5
@@ -144,5 +145,5 @@ http_interactions:
144
145
  freeze_stage3_meeting: SMG-28
145
146
  close_meeting: SP-28
146
147
  project_end: '1999-02-12'
147
- recorded_at: Sat, 20 Aug 2022 15:59:54 GMT
148
+ recorded_at: Thu, 01 Dec 2022 16:37:52 GMT
148
149
  recorded_with: VCR 6.1.0
@@ -27,30 +27,30 @@ http_interactions:
27
27
  Connection:
28
28
  - keep-alive
29
29
  Date:
30
- - Sat, 20 Aug 2022 16:01:39 GMT
30
+ - Thu, 01 Dec 2022 16:55:22 GMT
31
31
  X-Amzn-Requestid:
32
- - 1729d638-dff5-42f2-8b1f-bdd57e517802
32
+ - 0ebd0acb-abd3-4253-b3c0-89ef416a8202
33
33
  Access-Control-Allow-Origin:
34
34
  - "*"
35
35
  Access-Control-Allow-Headers:
36
36
  - Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token
37
37
  X-Amz-Apigw-Id:
38
- - XK3FQHxeoAMF22Q=
38
+ - cedg-ELToAMFRYA=
39
39
  Access-Control-Allow-Methods:
40
40
  - GET, POST, OPTIONS
41
41
  X-Amzn-Trace-Id:
42
- - Root=1-63010554-546b0c1f1f8a145820963cc6;Sampled=0
42
+ - Root=1-6388dc6c-5c2e92d874c7f14915f322f6;Sampled=0
43
43
  X-Cache:
44
44
  - Miss from cloudfront
45
45
  Via:
46
- - 1.1 a3c3236fb9c392e8c5978c750d2f8308.cloudfront.net (CloudFront)
46
+ - 1.1 af4b82f24e15a32a618ba4f9be9cbf92.cloudfront.net (CloudFront)
47
47
  X-Amz-Cf-Pop:
48
- - BUD50-C1
48
+ - ATL51-C1
49
49
  X-Amz-Cf-Id:
50
- - KJ8PErIQ8jfHLXym7AHTycyyOHyZ44-DCEmRQwYSz4p48Vz4mlE7DQ==
50
+ - tjKQZ-O8rTQG0Wm9dDRehdkHWmVPXjulldVxDSObQN3Qoq-Q9ug6Aw==
51
51
  body:
52
52
  encoding: ASCII-8BIT
53
53
  string: !binary |-
54
54
  PGJpYmRhdGEgdHlwZT0ic3RhbmRhcmQiPgogIDxmZXRjaGVkPjIwMjEtMDctMTE8L2ZldGNoZWQ+CiAgPHRpdGxlIHR5cGU9InRpdGxlLWludHJvIiBmb3JtYXQ9InRleHQvcGxhaW4iIGxhbmd1YWdlPSJlbiIgc2NyaXB0PSJMYXRuIj5HZW9ncmFwaGljIGluZm9ybWF0aW9uPC90aXRsZT4KICA8dGl0bGUgdHlwZT0idGl0bGUtbWFpbiIgZm9ybWF0PSJ0ZXh0L3BsYWluIiBsYW5ndWFnZT0iZW4iIHNjcmlwdD0iTGF0biI+TWV0YWRhdGE8L3RpdGxlPgogIDx0aXRsZSB0eXBlPSJ0aXRsZS1wYXJ0IiBmb3JtYXQ9InRleHQvcGxhaW4iIGxhbmd1YWdlPSJlbiIgc2NyaXB0PSJMYXRuIj5QYXJ0IDI6IEV4dGVuc2lvbnMgZm9yIGFjcXVpc2l0aW9uIGFuZCBwcm9jZXNzaW5nPC90aXRsZT4KICA8dGl0bGUgdHlwZT0ibWFpbiIgZm9ybWF0PSJ0ZXh0L3BsYWluIiBsYW5ndWFnZT0iZW4iIHNjcmlwdD0iTGF0biI+R2VvZ3JhcGhpYyBpbmZvcm1hdGlvbiAtIE1ldGFkYXRhIC0gUGFydCAyO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