relaton-bipm 1.16.4 → 1.16.6

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: eca93d6c95f7d1da1f1b3609fa4d782a97fed79a5793b2d695fa342ec2cdfacf
4
- data.tar.gz: 5be9f8e7f259daa7f4f2c8d06f7c87e8d2fe4e1e41bb29faa413c462bc260d71
3
+ metadata.gz: fed200c28077ec8e08f755b1185ec918797d15bf6937b884f207efd95837e230
4
+ data.tar.gz: e252b80a27cf21e0fd9c66af2bec464eea8cc578b6da66b4c51316b707aa4b39
5
5
  SHA512:
6
- metadata.gz: d3903d6d1632947ece2712e2fbdfb4d690c20ae0840b225487e8e751b8d943560e58c5a3d21b971b2cdc1ce81336a70a3d278fda5a794daa08fa0284f1f820a0
7
- data.tar.gz: 04d3e61c0d11fe9578c1a8cc42979dd53e4567b035b33350c1fe58ed2f4a535f4f400e85d5c6cfaabdcda482b63663b1c2d6471e7bb41c58739f616fd00e3e81
6
+ metadata.gz: 7d73f4d65055a47285532d0bcc0f812e58fa75a0790fc92a1e396d40b444732a84192e9f81467246552c61d0ae780a6449333186417f2a0154c756ae555e5097
7
+ data.tar.gz: 7415e3f9f5bb4cacaa3e28f79b25a08a22814a6de7c52e5effd21f53632c59bcce41a6d4ef52a84169ad996efdd8e82687c7404f32cd22b199ee50a6cfbd77f8
data/README.adoc CHANGED
@@ -64,11 +64,11 @@ Allowed document names are:
64
64
 
65
65
  `BIPM Metrologia {JOURNAL} {VOLUME} {ISSUE}`
66
66
 
67
- - `{JOURNAL}` - journal number, required
67
+ - `{JOURNAL}` - journal number, optional
68
68
  - `{VOLUME}` - volume number, optional
69
69
  - `{ISSUE}` - issue number, optional
70
70
 
71
- ==== Reference structures for CCTF (CCDS), CGPM, CIPM documents
71
+ ==== Reference structures for Outcomes documents
72
72
 
73
73
  ===== Basic pattern
74
74
 
@@ -83,7 +83,7 @@ Short:
83
83
  {group name} {type-abbrev} {number} ({year}, {lang})
84
84
  ----
85
85
 
86
- - `group name` - a name of the group, required. A full list of group names is available https://github.com/metanorma/bipm-editor-guides/blob/main/sources/bipm-outcomes-en.adoc#appendix-a-bipm-groups-and-codes[here].
86
+ - `group name` - a name of the group, required. A full list of group names is available https://github.com/metanorma/bipm-editor-guides/blob/main/sources/bipm-references-en.adoc#appendix-a-bipm-groups-and-codes[here].
87
87
  - `type` - a type of document, required. A list of types is: Resolution (Résolution), Recommendation (Recommandation), Decision (Décision), Meeting (Réunion), Declaration (Déclaration).
88
88
  - `type-abbrev` - an abbreviation of the type, required. A list of abbreviations: RES (Resolution), REC (Recommendation), DECN (Decision).
89
89
  - `number` - a number of the document, optional. Can be with part, e.g. `1-2`.
@@ -62,7 +62,7 @@ module RelatonBipm
62
62
 
63
63
  def index
64
64
  Relaton::Index.find_or_create(
65
- :bipm, url: "#{GH_ENDPOINT}index2.zip", file: INDEX_FILE, id_keys: %i[group type number year]
65
+ :bipm, url: "#{GH_ENDPOINT}index2.zip", file: INDEX_FILE, id_keys: %i[group type number year corr]
66
66
  )
67
67
  end
68
68
 
@@ -14,7 +14,7 @@ module RelatonBipm
14
14
  rule(:lang) { comma >> space? >> match["A-Z"].repeat(1, 2).as(:lang) }
15
15
  rule(:lang?) { lang.maybe }
16
16
 
17
- rule(:numdash) { match["0-9-"].repeat(1).as(:number) }
17
+ rule(:numdash) { match["A-Z0-9-"].repeat(1).as(:number) }
18
18
  rule(:number) { numdash >> space? }
19
19
  rule(:number?) { number.maybe }
20
20
  rule(:num_suff) { numdash >> match["a-z"].repeat(1, 2) >> space }
@@ -47,7 +47,11 @@ module RelatonBipm
47
47
 
48
48
  rule(:metrologia) { str("Metrologia").as(:group) >> (space >> match["a-zA-Z0-9\s"].repeat(1).as(:number)).maybe }
49
49
 
50
- rule(:result) { outcome | brochure | metrologia }
50
+ rule(:corr) { space >> str("Corrigendum").as(:corr) }
51
+ rule(:corr?) { corr.maybe }
52
+ rule(:jcgm) { group >> space >> numdash >> (str(":") >> year).maybe >> corr? }
53
+
54
+ rule(:result) { outcome | brochure | metrologia | jcgm }
51
55
 
52
56
  root :result
53
57
  end
@@ -93,7 +97,7 @@ module RelatonBipm
93
97
  hash = to_hash
94
98
  hash.delete(:number) if other_hash[:number].nil? && hash[:number] == "1" and hash[:year]
95
99
  other_hash.delete(:number) if hash[:number].nil? && other_hash[:number] == "1"
96
- hash.delete(:year) unless other_hash[:year]
100
+ # hash.delete(:year) unless other_hash[:year]
97
101
  other_hash.delete(:year) unless hash[:year]
98
102
  hash.delete(:lang) unless other_hash[:lang]
99
103
  other_hash.delete(:lang) unless hash[:lang]
@@ -124,6 +128,7 @@ module RelatonBipm
124
128
  norm_num = normalized_number(src)
125
129
  hash[:number] = norm_num unless norm_num.nil? || norm_num.empty?
126
130
  hash[:year] = src[:year].to_s if src[:year]
131
+ hash[:corr] = true if src[:corr]
127
132
  hash[:lang] = src[:lang].to_s if src[:lang]
128
133
  hash
129
134
  end
@@ -7,7 +7,7 @@ module RelatonBipm
7
7
  def initialize
8
8
  @short = :relaton_bipm
9
9
  @prefix = "BIPM"
10
- @defaultprefix = %r{^(?:BIPM|CCTF|CCDS|CGPM|CIPM|JCRB)(?!\w)}
10
+ @defaultprefix = %r{^(?:BIPM|CCTF|CCDS|CGPM|CIPM|JCRB|JCGM)(?!\w)}
11
11
  @idtype = "BIPM"
12
12
  @datasets = %w[bipm-data-outcomes bipm-si-brochure rawdata-bipm-metrologia]
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonBipm
2
- VERSION = "1.16.4".freeze
2
+ VERSION = "1.16.6".freeze
3
3
  end
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.16.4
4
+ version: 1.16.6
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-10-23 00:00:00.000000000 Z
11
+ date: 2023-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday