relaton-bipm 1.17.0 → 1.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/basicdoc.rng +38 -35
- data/grammars/biblio.rng +21 -0
- data/lib/relaton_bipm/bipm_bibliography.rb +2 -1
- data/lib/relaton_bipm/id_parser.rb +3 -3
- data/lib/relaton_bipm/version.rb +1 -1
- data/lib/relaton_bipm.rb +1 -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: 4b1fb15e763da98895e7053e9fc0e9c8d171e479e4b89e6a0353dd1399955a0d
|
4
|
+
data.tar.gz: ac9db3bb0fc7bccebf5eb8e11cc392b98a8f16514e07aa5436b3817e4b54253d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2b145a2a5facc0782ad9600c7240357e80367f191205fe5e2e40a0e2b1c36019cb638d77130b17183cca67b2f35ab1868a30aa097913dbcc1c83e2598cdf127
|
7
|
+
data.tar.gz: 2dd15163fcfb619fa3c5b63705cdce127d13d17799e120d5a4e506747042d52133929c92e8f2a5e40012bb8a2a052928ca2f51021b6d37a19adc28c3698e7d80
|
data/grammars/basicdoc.rng
CHANGED
@@ -914,44 +914,47 @@
|
|
914
914
|
-->
|
915
915
|
<define name="image">
|
916
916
|
<element name="image">
|
917
|
-
<
|
918
|
-
|
917
|
+
<ref name="Image"/>
|
918
|
+
</element>
|
919
|
+
</define>
|
920
|
+
<define name="Image">
|
921
|
+
<attribute name="id">
|
922
|
+
<data type="ID"/>
|
923
|
+
</attribute>
|
924
|
+
<attribute name="src">
|
925
|
+
<data type="anyURI"/>
|
926
|
+
</attribute>
|
927
|
+
<attribute name="mimetype"/>
|
928
|
+
<optional>
|
929
|
+
<attribute name="filename"/>
|
930
|
+
</optional>
|
931
|
+
<optional>
|
932
|
+
<attribute name="width">
|
933
|
+
<choice>
|
934
|
+
<data type="int"/>
|
935
|
+
<value>auto</value>
|
936
|
+
</choice>
|
919
937
|
</attribute>
|
920
|
-
|
938
|
+
</optional>
|
939
|
+
<optional>
|
940
|
+
<attribute name="height">
|
941
|
+
<choice>
|
942
|
+
<data type="int"/>
|
943
|
+
<value>auto</value>
|
944
|
+
</choice>
|
945
|
+
</attribute>
|
946
|
+
</optional>
|
947
|
+
<optional>
|
948
|
+
<attribute name="alt"/>
|
949
|
+
</optional>
|
950
|
+
<optional>
|
951
|
+
<attribute name="title"/>
|
952
|
+
</optional>
|
953
|
+
<optional>
|
954
|
+
<attribute name="longdesc">
|
921
955
|
<data type="anyURI"/>
|
922
956
|
</attribute>
|
923
|
-
|
924
|
-
<optional>
|
925
|
-
<attribute name="filename"/>
|
926
|
-
</optional>
|
927
|
-
<optional>
|
928
|
-
<attribute name="width">
|
929
|
-
<choice>
|
930
|
-
<data type="int"/>
|
931
|
-
<value>auto</value>
|
932
|
-
</choice>
|
933
|
-
</attribute>
|
934
|
-
</optional>
|
935
|
-
<optional>
|
936
|
-
<attribute name="height">
|
937
|
-
<choice>
|
938
|
-
<data type="int"/>
|
939
|
-
<value>auto</value>
|
940
|
-
</choice>
|
941
|
-
</attribute>
|
942
|
-
</optional>
|
943
|
-
<optional>
|
944
|
-
<attribute name="alt"/>
|
945
|
-
</optional>
|
946
|
-
<optional>
|
947
|
-
<attribute name="title"/>
|
948
|
-
</optional>
|
949
|
-
<optional>
|
950
|
-
<attribute name="longdesc">
|
951
|
-
<data type="anyURI"/>
|
952
|
-
</attribute>
|
953
|
-
</optional>
|
954
|
-
</element>
|
957
|
+
</optional>
|
955
958
|
</define>
|
956
959
|
<define name="video">
|
957
960
|
<element name="video">
|
data/grammars/biblio.rng
CHANGED
@@ -348,6 +348,9 @@
|
|
348
348
|
<zeroOrMore>
|
349
349
|
<ref name="contact"/>
|
350
350
|
</zeroOrMore>
|
351
|
+
<optional>
|
352
|
+
<ref name="logo"/>
|
353
|
+
</optional>
|
351
354
|
</element>
|
352
355
|
</define>
|
353
356
|
<define name="orgname">
|
@@ -366,6 +369,21 @@
|
|
366
369
|
</choice>
|
367
370
|
</element>
|
368
371
|
</define>
|
372
|
+
<define name="logo">
|
373
|
+
<element name="logo">
|
374
|
+
<ref name="image"/>
|
375
|
+
</element>
|
376
|
+
</define>
|
377
|
+
<define name="depiction">
|
378
|
+
<element name="depiction">
|
379
|
+
<optional>
|
380
|
+
<attribute name="scope"/>
|
381
|
+
</optional>
|
382
|
+
<zeroOrMore>
|
383
|
+
<ref name="image"/>
|
384
|
+
</zeroOrMore>
|
385
|
+
</element>
|
386
|
+
</define>
|
369
387
|
<define name="NameWithVariants">
|
370
388
|
<element name="primary">
|
371
389
|
<ref name="LocalizedString"/>
|
@@ -752,6 +770,9 @@
|
|
752
770
|
<optional>
|
753
771
|
<ref name="validity"/>
|
754
772
|
</optional>
|
773
|
+
<optional>
|
774
|
+
<ref name="depiction"/>
|
775
|
+
</optional>
|
755
776
|
</define>
|
756
777
|
<define name="ReducedBibliographicItem">
|
757
778
|
<optional>
|
@@ -50,7 +50,8 @@ module RelatonBipm
|
|
50
50
|
rows = index.search { |r| ref_id == r[:id] }
|
51
51
|
return unless rows.any?
|
52
52
|
|
53
|
-
|
53
|
+
row = rows.sort_by { |r| r[:id][:year] }.last
|
54
|
+
url = "#{GH_ENDPOINT}#{row[:file]}"
|
54
55
|
resp = Mechanize.new.get url
|
55
56
|
return unless resp.code == "200"
|
56
57
|
|
@@ -94,9 +94,9 @@ module RelatonBipm
|
|
94
94
|
#
|
95
95
|
def ==(other) # rubocop:disable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity,Metrics/AbcSize
|
96
96
|
other_hash = other.is_a?(Id) ? other.to_hash : normalize_hash(other)
|
97
|
-
hash = to_hash
|
98
|
-
hash.delete(:number) if other_hash[:number].nil? && hash[:number] == "1"
|
99
|
-
other_hash.delete(:number) if hash[:number].nil? && other_hash[:number] == "1"
|
97
|
+
hash = to_hash.dup
|
98
|
+
hash.delete(:number) if other_hash[:number].nil? && hash[:number] == "1" && hash[:year]
|
99
|
+
other_hash.delete(:number) if hash[:number].nil? && other_hash[:number] == "1" && other_hash[:year]
|
100
100
|
# hash.delete(:year) unless other_hash[:year]
|
101
101
|
other_hash.delete(:year) unless hash[:year]
|
102
102
|
hash.delete(:lang) unless other_hash[:lang]
|
data/lib/relaton_bipm/version.rb
CHANGED
data/lib/relaton_bipm.rb
CHANGED
@@ -28,7 +28,7 @@ require "relaton_bipm/rawdata_bipm_metrologia/article_parser"
|
|
28
28
|
module RelatonBipm
|
29
29
|
class Error < StandardError; end
|
30
30
|
|
31
|
-
# Returns hash of
|
31
|
+
# Returns hash of gems versions used to generate the data model.
|
32
32
|
# @return [String]
|
33
33
|
def grammar_hash
|
34
34
|
# gem_path = File.expand_path "..", __dir__
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-bipm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.17.
|
4
|
+
version: 1.17.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|