relaton-bipm 1.11.7 → 1.11.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +3 -3
- data/lib/relaton_bipm/bipm_bibliography.rb +5 -4
- data/lib/relaton_bipm/processor.rb +1 -1
- 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: d9f54a255e430e5079420ef5a4073baa326b29cbb3d687406b9c940fd1ad7406
|
4
|
+
data.tar.gz: 2e26e487ef00db549f1fa10075c27de47c520b38544c3e408274299805aae4ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b20367d802b0f7b46794cc28d149c411ec8f7ec88af5b22195b465051eb28fcd4ae5f49fdcf41a78a8651f79d197a4a96f861ab126801563dfaf8c089b0e5c06
|
7
|
+
data.tar.gz: c06515b865194bf25520c942025419a0502eb03bff3bc80c9ebb649c91634210cf89afc239319278d81f105cb2af726349ce0c9c4aebfc3ff72c0f6bed90d261
|
data/README.adoc
CHANGED
@@ -53,9 +53,9 @@ bib = RelatonBipm::BipmBibliography.get "BIPM Metrologia 29 6 373"
|
|
53
53
|
...
|
54
54
|
|
55
55
|
# get CGPM meetings
|
56
|
-
RelatonBipm::BipmBibliography.get "CGPM
|
57
|
-
[relaton-bipm] ("CGPM
|
58
|
-
[relaton-bipm] ("CGPM
|
56
|
+
RelatonBipm::BipmBibliography.get "CGPM Meeting 1"
|
57
|
+
[relaton-bipm] ("CGPM Meeting 1") fetching...
|
58
|
+
[relaton-bipm] ("CGPM Meeting 1") found CGPM Meeting 1
|
59
59
|
=> #<RelatonBipm::BipmBibliographicItem:0x00007fd4f7cba038
|
60
60
|
...
|
61
61
|
|
@@ -4,12 +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
|
-
|
7
|
+
SUBSTITUTES = {
|
8
8
|
"Déclaration" => "Declaration",
|
9
|
-
"
|
9
|
+
"Réunion" => "Meeting",
|
10
10
|
"Recommandation" => "Recommendation",
|
11
11
|
"Résolution" => "Resolution",
|
12
12
|
"Décision" => "Decision",
|
13
|
+
"CCDS" => "CCTF",
|
13
14
|
}.freeze
|
14
15
|
|
15
16
|
class << self
|
@@ -50,9 +51,9 @@ module RelatonBipm
|
|
50
51
|
rf = ref.sub(/(?:(\d{1,2})\s)?\(?(\d{4})(?!-)\)?/) do
|
51
52
|
"#{$2}-#{$1.to_s.rjust(2, '0')}"
|
52
53
|
end
|
53
|
-
|
54
|
+
SUBSTITUTES.each { |fr, en| rf.sub! fr, en }
|
54
55
|
path_parts = rf.split.map &:downcase
|
55
|
-
path_parts.insert(1, "
|
56
|
+
path_parts.insert(1, "meeting") unless path_parts[1] == "meeting"
|
56
57
|
url = "#{GH_ENDPOINT}#{path_parts.join '/'}.yaml"
|
57
58
|
resp = agent.get url
|
58
59
|
check_response resp
|
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.8
|
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-06-
|
11
|
+
date: 2022-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|