relaton-bipm 1.11.1 → 1.11.2

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: b7aff4405e5c4f5c22dd1dcb4a01fc8d7c26d16b0dbff5d3e194e29ea3b245af
4
- data.tar.gz: a9a5c5d7bb80c5ab3c5f5a414f36b42d0b468b179b510759baa30396016b032a
3
+ metadata.gz: ff32d2538d50008590df750214025152ebe40eef58b249eb940ca435ac33967f
4
+ data.tar.gz: abaaa5ff94b879d5d5c91a2f7dd4f2ce14116f361a5a21d379532a5db168cd2d
5
5
  SHA512:
6
- metadata.gz: 5b77c6c27b1ea7df08b8436ab6730ef60d7ed0c119c60ac2399c4366e7c3caf0a07a152929b003f331e4e4fd148bd5908bbfe8ffea017eacf37038a03c5c2093
7
- data.tar.gz: 4906d0bf50841a154634c1b44161be904142880669ad8c1ba1b82b30eace2d3a4acdf9594f973f64af80bcc812afb754078fed025b4871fbe686ad98cc8f8cc2
6
+ metadata.gz: afa46e8f2ebf060da46d159f59155e4ae92d0d1a50fa73136be0c46a9065790606f83f9526e4365756e17d617e01770e1ecefa1d13d4b6305671368b0cf8a9e5
7
+ data.tar.gz: 4a804b81bec63e039320fa3e9deaf86d02542108def5c04528e30667d06b7855cf56793b6ea73c94d593098bc0d45364ecad0759063fa18d9692fdfa4f3ab22c
data/README.adoc CHANGED
@@ -53,18 +53,43 @@ bib = RelatonBipm::BipmBibliography.get "BIPM Metrologia 29 6 373"
53
53
  ...
54
54
 
55
55
  # get CGPM resolutions
56
- RelatonBipm::BipmBibliography.get "BIPM CGPM Resolution 1"
57
- [relaton-bipm] ("BIPM CGPM Resolution 1") fetching...
58
- [relaton-bipm] ("BIPM CGPM Resolution 1") found BIPM CR 01
56
+ RelatonBipm::BipmBibliography.get "CGPM Resolution 1"
57
+ [relaton-bipm] ("CGPM Resolution 1") fetching...
58
+ [relaton-bipm] ("CGPM Resolution 1") found CGPM Resolution 1
59
59
  => #<RelatonBipm::BipmBibliographicItem:0x00007fd4f7cba038
60
60
  ...
61
61
 
62
- # get CIPM resolutions
63
- RelatonBipm::BipmBibliography.get "BIPM CIPM Decision 101-1"
64
- [relaton-bipm] ("BIPM CIPM Decision 101-1") fetching...
65
- [relaton-bipm] ("BIPM CIPM Decision 101-1") found BIPM CIPM Decision 101-1
62
+ # get CIPM decision
63
+ RelatonBipm::BipmBibliography.get "CIPM Decision 101-1"
64
+ [relaton-bipm] ("CIPM Decision 101-1") fetching...
65
+ [relaton-bipm] ("CIPM Decision 101-1") found CIPM Decision 101-1
66
66
  => #<RelatonBipm::BipmBibliographicItem:0x00007fed16dfcfe0
67
67
  ...
68
+
69
+ RelatonBipm::BipmBibliography.get "CIPM Decision 01 (2012)"
70
+ [relaton-bipm] ("CIPM Decision 01 (2012)") fetching...
71
+ [relaton-bipm] ("CIPM Decision 01 (2012)") found CIPM Decision 01 (2012)
72
+ => #<RelatonBipm::BipmBibliographicItem:0x00007fb6b9bbec08
73
+ ...
74
+
75
+ RelatonBipm::BipmBibliography.get "CIPM Decision 2012-01"
76
+ [relaton-bipm] ("CIPM Decision 2012-01") fetching...
77
+ [relaton-bipm] ("CIPM Decision 2012-01") found CIPM Decision 01 (2012)
78
+ => #<RelatonBipm::BipmBibliographicItem:0x00007fb6d98ddd98
79
+ ...
80
+
81
+ # get CIPM resolution
82
+ RelatonBipm::BipmBibliography.get "CIPM Resolution (1948)"
83
+ [relaton-bipm] ("CIPM Resolution (1948)") fetching...
84
+ [relaton-bipm] ("CIPM Resolution (1948)") found CIPM Resolution (1948)
85
+ => #<RelatonBipm::BipmBibliographicItem:0x00007fb6bb1c4a98
86
+ ...
87
+
88
+ RelatonBipm::BipmBibliography.get "CIPM Resolution 1948"
89
+ [relaton-bipm] ("CIPM Resolution 1948") fetching...
90
+ [relaton-bipm] ("CIPM Resolution 1948") found CIPM Resolution (1948)
91
+ => #<RelatonBipm::BipmBibliographicItem:0x00007fb6b9be5510
92
+ ...
68
93
  ----
69
94
 
70
95
  === XML serialization
@@ -40,7 +40,8 @@ module RelatonBipm
40
40
  # @param agent [Mechanize]
41
41
  # @return [RelatonBipm::BipmBibliographicItem]
42
42
  def get_bipm(ref, agent) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
43
- url = "#{GH_ENDPOINT}#{ref.downcase.split.join '/'}.yaml"
43
+ rf = ref.sub(/(\d{2})\s\((\d{4})\)/, "\\2-\\1").sub(/\((\d{4})\)/, "\\1")
44
+ url = "#{GH_ENDPOINT}#{rf.downcase.split.join '/'}.yaml"
44
45
  resp = agent.get url
45
46
  check_response resp
46
47
  return unless resp.code == "200"
@@ -7,7 +7,7 @@ module RelatonBipm
7
7
  def initialize
8
8
  @short = :relaton_bipm
9
9
  @prefix = "BIPM"
10
- @defaultprefix = %r{^BIPM\s}
10
+ @defaultprefix = %r{^(?:BIPM|CCTF|CGPM|CIPM)\s}
11
11
  @idtype = "BIPM"
12
12
  end
13
13
 
@@ -1,3 +1,3 @@
1
1
  module RelatonBipm
2
- VERSION = "1.11.1".freeze
2
+ VERSION = "1.11.2".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.11.1
4
+ version: 1.11.2
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-04-26 00:00:00.000000000 Z
11
+ date: 2022-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug