relaton-bipm 1.11.4 → 1.11.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_bipm/bipm_bibliography.rb +8 -0
- data/lib/relaton_bipm/version.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: 9822a21eb0d3947f49b05a86cf1df7052ea0ff0b5647b1deff72a8c1a0baa615
|
4
|
+
data.tar.gz: aaac7bd97c5b86e084badcb0e3428c3cb8f3b72570e80f0a26f5499e5f6be6c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '039efcd3fff34694d66b65ec2183fefa2bccd0e7730d1de17ff090c78c0819faf17a26942df134d9b31c2faf02f5bd17d102c5166168ea47c34ed3dbd45111d9'
|
7
|
+
data.tar.gz: aa6cf69ed87904d7775ad614c6392ca2b5d56f7b4db579fdec4d82d88752a015adbc509626b4db0967de360d5a172750b280e7f814d2800016302cadacef48a4
|
@@ -4,6 +4,13 @@ module RelatonBipm
|
|
4
4
|
class BipmBibliography
|
5
5
|
GH_ENDPOINT = "https://raw.githubusercontent.com/relaton/relaton-data-bipm/master/data/".freeze
|
6
6
|
IOP_DOMAIN = "https://iopscience.iop.org".freeze
|
7
|
+
TYPES = {
|
8
|
+
"Déclaration" => "Declaration",
|
9
|
+
"Réunions" => "Meetings",
|
10
|
+
"Recommandation" => "Recommandation",
|
11
|
+
"Résolution" => "Resolution",
|
12
|
+
"Décision" => "Decision",
|
13
|
+
}.freeze
|
7
14
|
|
8
15
|
class << self
|
9
16
|
# @param text [String]
|
@@ -43,6 +50,7 @@ module RelatonBipm
|
|
43
50
|
rf = ref.sub(/(?:(\d{1,2})\s)?\(?(\d{4})(?!-)\)?/) do
|
44
51
|
"#{$2}-#{$1.to_s.rjust(2, '0')}"
|
45
52
|
end
|
53
|
+
TYPES.each { |fr, en| rf.sub! fr, en }
|
46
54
|
path_parts = rf.split.map &:downcase
|
47
55
|
path_parts.insert(1, "meetings") unless path_parts[1] == "meetings"
|
48
56
|
url = "#{GH_ENDPOINT}#{path_parts.join '/'}.yaml"
|
data/lib/relaton_bipm/version.rb
CHANGED
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.11.
|
4
|
+
version: 1.11.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|