relaton-bipm 1.8.1 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 834295d50c55fd5ce154bc9238757fbf10f8570e3c8673d3d0505766a28ad526
4
- data.tar.gz: 8303d6981539925d974973310f36cbcd4f59de70fc88d99cf7f2f51b08d1bfd4
3
+ metadata.gz: 62e2b0e8e3e760434471aee77019fa507d36cab63dc64efe988723adc198c87a
4
+ data.tar.gz: 305943e857f09997c5d883967ef2bc25904ff6958bce9ccd2788199aa1b3cbee
5
5
  SHA512:
6
- metadata.gz: 5da926b9da9941a1b0166d9361d20e6d3ed2aa0ae7af959a4580c5812217f1e8e6424ba9b9c7b6bfa4905b3401ae4272946341654cbff232281f6c037d1ecf82
7
- data.tar.gz: f4af6280a919b0fc11182cba3dc1bbf00632853ad6558979d7a61212dde9674949f71f95c74fd35937f6964d85089fab842ef27f19d9d68b7b29e897f788133b
6
+ metadata.gz: 5ecfd3a440ccd9d40d88b93a8621e5cac30b340acccc18cad7f44fd383334f0354f3ceb7963b99b4dc4eb58ff9a397565d940dd3d1463304faa1358a0dd78967
7
+ data.tar.gz: 013f356a1d17c03058f359b7e9ce20b5338d45e90f25a9bcbc8481239acad75949b26472bf1bf654dcfae868197702f7c0337e186ca0137a108683e18b8cadf9
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
  steps:
33
23
  - uses: actions/checkout@v2
34
24
  with:
data/.rubocop.yml CHANGED
@@ -2,9 +2,11 @@
2
2
  # https://github.com/riboseinc/oss-guides
3
3
  # All project-specific additions and overrides should be specified in this file.
4
4
 
5
+ require: rubocop-rails
6
+
5
7
  inherit_from:
6
8
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
9
  AllCops:
8
- TargetRubyVersion: 2.4
10
+ TargetRubyVersion: 2.5
9
11
  Rails:
10
12
  Enabled: false
data/README.adoc CHANGED
@@ -46,11 +46,25 @@ item = RelatonBipm::BipmBibliography.get "BIPM si-brochure"
46
46
  ...
47
47
 
48
48
  # get BIPM Metrologia article
49
- RelatonBipm::BipmBibliography.get "BIPM Metrologia 29 6 373"
49
+ bib = RelatonBipm::BipmBibliography.get "BIPM Metrologia 29 6 373"
50
50
  [relaton-bipm] ("BIPM Metrologia 29 6 373") fetching...
51
51
  [relaton-bipm] ("BIPM Metrologia 29 6 373") found Metrologia 29 6 373
52
52
  => #<RelatonBipm::BipmBibliographicItem:0x007f8857f94d40
53
53
  ...
54
+
55
+ # get CGPM resolutions
56
+ RelatonBipm::BipmBibliography.get "BIPM CGPM01 1"
57
+ [relaton-bipm] ("BIPM CGPM01 1") fetching...
58
+ [relaton-bipm] ("BIPM CGPM01 1") found CGPM01-1
59
+ => #<RelatonBipm::BipmBibliographicItem:0x00007f9e92817968
60
+ ...
61
+
62
+ # get CIPM resolutions
63
+ RelatonBipm::BipmBibliography.get "BIPM CIPM101 1"
64
+ [relaton-bipm] ("BIPM CIPM101 1") fetching...
65
+ [relaton-bipm] ("BIPM CIPM101 1") found CIPM101-1
66
+ => #<RelatonBipm::BipmBibliographicItem:0x00007f9e9293d658
67
+ ...
54
68
  ----
55
69
 
56
70
  === XML serialization
@@ -90,6 +104,7 @@ item.to_xml bibdata: true
90
104
  <fetched>2021-01-10</fetched>
91
105
  <title format="text/plain" language="en" script="Latn">The International System of Units (SI)</title>
92
106
  <title format="text/plain" language="fr" script="Latn">Le Système international d’unités (SI)</title>
107
+ <uri type="src">https://www.bipm.org/en/publications/si-brochure</uri>
93
108
  <docidentifier type="BIPM">si-brochure</docidentifier>
94
109
  <date type="updated">
95
110
  <on>2019-05-20</on>
@@ -112,6 +127,17 @@ item.to_xml bibdata: true
112
127
  </bibdata>"
113
128
  ----
114
129
 
130
+ === Typed links
131
+
132
+ Each BIPM document has `src` type link and optional `doi` type link.
133
+
134
+ [source,ruby]
135
+ ----
136
+ bib.link
137
+ => [#<RelatonBib::TypedUri:0x00007fa6d6a51728 @content=#<Addressable::URI:0xc29c URI:https://iopscience.iop.org/article/10.1088/0026-1394/29/6/001>, @type="src">,
138
+ #<RelatonBib::TypedUri:0x00007fa6d6a29250 @content=#<Addressable::URI:0xc2b0 URI:https://doi.org/10.1088/0026-1394/29/6/001>, @type="doi">]
139
+ ----
140
+
115
141
  === Create bibliographic item from XML
116
142
 
117
143
  [source,ruby]
@@ -173,9 +173,11 @@
173
173
  <data type="dateTime"/>
174
174
  </attribute>
175
175
  </optional>
176
- <attribute name="from">
177
- <data type="IDREF"/>
178
- </attribute>
176
+ <optional>
177
+ <attribute name="from">
178
+ <data type="IDREF"/>
179
+ </attribute>
180
+ </optional>
179
181
  <optional>
180
182
  <attribute name="to">
181
183
  <data type="IDREF"/>
@@ -624,6 +626,9 @@
624
626
  <choice>
625
627
  <ref name="PureTextElement"/>
626
628
  <ref name="stem"/>
629
+ <ref name="eref"/>
630
+ <ref name="xref"/>
631
+ <ref name="hyperlink"/>
627
632
  </choice>
628
633
  </zeroOrMore>
629
634
  </element>
@@ -634,6 +639,9 @@
634
639
  <choice>
635
640
  <ref name="PureTextElement"/>
636
641
  <ref name="stem"/>
642
+ <ref name="eref"/>
643
+ <ref name="xref"/>
644
+ <ref name="hyperlink"/>
637
645
  </choice>
638
646
  </zeroOrMore>
639
647
  </element>
@@ -641,7 +649,12 @@
641
649
  <define name="tt">
642
650
  <element name="tt">
643
651
  <zeroOrMore>
644
- <ref name="PureTextElement"/>
652
+ <choice>
653
+ <ref name="PureTextElement"/>
654
+ <ref name="eref"/>
655
+ <ref name="xref"/>
656
+ <ref name="hyperlink"/>
657
+ </choice>
645
658
  </zeroOrMore>
646
659
  </element>
647
660
  </define>
@@ -822,7 +835,9 @@
822
835
  <attribute name="alt"/>
823
836
  </optional>
824
837
  <ref name="CitationType"/>
825
- <text/>
838
+ <oneOrMore>
839
+ <ref name="PureTextElement"/>
840
+ </oneOrMore>
826
841
  </define>
827
842
  <define name="hyperlink">
828
843
  <element name="link">
@@ -835,7 +850,9 @@
835
850
  <optional>
836
851
  <attribute name="alt"/>
837
852
  </optional>
838
- <text/>
853
+ <oneOrMore>
854
+ <ref name="PureTextElement"/>
855
+ </oneOrMore>
839
856
  </element>
840
857
  </define>
841
858
  <define name="xref">
@@ -849,7 +866,9 @@
849
866
  <optional>
850
867
  <attribute name="alt"/>
851
868
  </optional>
852
- <text/>
869
+ <oneOrMore>
870
+ <ref name="PureTextElement"/>
871
+ </oneOrMore>
853
872
  </element>
854
873
  </define>
855
874
  <define name="fn">
data/grammars/biblio.rng CHANGED
@@ -401,9 +401,9 @@
401
401
  <choice>
402
402
  <!-- iso191606 TODO -->
403
403
  <group>
404
- <oneOrMore>
404
+ <zeroOrMore>
405
405
  <ref name="street"/>
406
- </oneOrMore>
406
+ </zeroOrMore>
407
407
  <ref name="city"/>
408
408
  <optional>
409
409
  <ref name="state"/>
@@ -787,6 +787,7 @@
787
787
  <value>adapted</value>
788
788
  <value>vote-started</value>
789
789
  <value>vote-ended</value>
790
+ <value>announced</value>
790
791
  </choice>
791
792
  </define>
792
793
  <define name="bdate">
data/grammars/bipm.rng CHANGED
@@ -16,6 +16,13 @@
16
16
  <param name="pattern">\i\c*|\c+#\c+</param>
17
17
  </data>
18
18
  </attribute>
19
+ <optional>
20
+ <attribute name="to">
21
+ <data type="string">
22
+ <param name="pattern">\i\c*|\c+#\c+</param>
23
+ </data>
24
+ </attribute>
25
+ </optional>
19
26
  <optional>
20
27
  <attribute name="type">
21
28
  <ref name="ReferenceFormat"/>
@@ -93,14 +100,9 @@
93
100
  </optional>
94
101
  <group>
95
102
  <choice>
96
- <group>
97
- <zeroOrMore>
98
- <ref name="BasicBlock"/>
99
- </zeroOrMore>
100
- <zeroOrMore>
101
- <ref name="note"/>
102
- </zeroOrMore>
103
- </group>
103
+ <zeroOrMore>
104
+ <ref name="BasicBlock"/>
105
+ </zeroOrMore>
104
106
  <ref name="amend"/>
105
107
  </choice>
106
108
  <zeroOrMore>
@@ -108,6 +110,7 @@
108
110
  <ref name="clause-subsection"/>
109
111
  <ref name="terms"/>
110
112
  <ref name="definitions"/>
113
+ <ref name="floating-title"/>
111
114
  </choice>
112
115
  </zeroOrMore>
113
116
  </group>
@@ -146,20 +149,16 @@
146
149
  <ref name="section-title"/>
147
150
  </optional>
148
151
  <group>
149
- <group>
150
- <zeroOrMore>
151
- <ref name="BasicBlock"/>
152
- </zeroOrMore>
153
- <zeroOrMore>
154
- <ref name="note"/>
155
- </zeroOrMore>
156
- </group>
152
+ <zeroOrMore>
153
+ <ref name="BasicBlock"/>
154
+ </zeroOrMore>
157
155
  <zeroOrMore>
158
156
  <choice>
159
157
  <ref name="annex-subsection"/>
160
158
  <ref name="terms"/>
161
159
  <ref name="definitions"/>
162
160
  <ref name="references"/>
161
+ <ref name="floating-title"/>
163
162
  </choice>
164
163
  </zeroOrMore>
165
164
  </group>
@@ -179,6 +178,14 @@
179
178
  <data type="boolean"/>
180
179
  </attribute>
181
180
  </optional>
181
+ <optional>
182
+ <attribute name="tag"/>
183
+ </optional>
184
+ <optional>
185
+ <attribute name="multilingual-rendering">
186
+ <ref name="MultilingualRenderingType"/>
187
+ </attribute>
188
+ </optional>
182
189
  <attribute name="type">
183
190
  <choice>
184
191
  <value>roman</value>
@@ -245,6 +252,9 @@
245
252
  <optional>
246
253
  <ref name="doctype"/>
247
254
  </optional>
255
+ <optional>
256
+ <ref name="docsubtype"/>
257
+ </optional>
248
258
  <ref name="editorialgroup"/>
249
259
  <optional>
250
260
  <ref name="comment-period"/>
@@ -304,7 +314,7 @@
304
314
  <value>CCT</value>
305
315
  <value>CCTF</value>
306
316
  <value>CCU</value>
307
- <value>CCL-CCTF</value>
317
+ <value>CCL-CCTF-WGFS</value>
308
318
  <value>JCGM</value>
309
319
  <value>JCRB</value>
310
320
  <value>JCTLM</value>