relaton-bipm 1.11.3 → 1.11.4

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: 90b15ba099e66ff04bb59b8e79fb61a97a6ee82b93cdc4025f64e0489590b9bb
4
- data.tar.gz: '09d38f02f831f995b5cc1e3fd99291480ddf7b06272374569954915a21d4d0e4'
3
+ metadata.gz: 48b49b85ee677df9306a704d0b33a2b90460435ae807c03020e5d101f19cd429
4
+ data.tar.gz: 9d20d295e87eefc521522d45ffa0ae91a47afabba05c976572240cbaa07c362a
5
5
  SHA512:
6
- metadata.gz: 300fb81135a9fc290b07b3bacdd43c1a126c131a0f52da8ddb249be79d87ced921b772b2b0623552e9d7d3f3ded76f107457c2d5f8864c91e1751d6d0876509f
7
- data.tar.gz: 23a157ad9db09dd266d0eaae6c29b6198483530d80e04beb2b7bd88a05d45115a4f5d4d995752b2ab7a71b0e1e593a3204ba9be6d1e698b651b1fdd264efb852
6
+ metadata.gz: 37cfcbf1cc3bb77c6fd162fed2580e7844308a8baf1f172ab10c041b6576bedbcb902baf763da699de9b5f32359fbcd5a390a1d482d9793d6e7fd089698c682c
7
+ data.tar.gz: e00b2c77e4fe20599959e855423d3775d3e8992d74240cabb4e01a6e0a0dde7386ff02b5e61a57c6181733fbb11efc40d0cc1a02b578fccdf5ced7d8aa8d9a59
data/README.adoc CHANGED
@@ -52,7 +52,7 @@ bib = RelatonBipm::BipmBibliography.get "BIPM Metrologia 29 6 373"
52
52
  => #<RelatonBipm::BipmBibliographicItem:0x007f8857f94d40
53
53
  ...
54
54
 
55
- # get CGPM resolutions
55
+ # get CGPM meetings
56
56
  RelatonBipm::BipmBibliography.get "CGPM Meetings 1"
57
57
  [relaton-bipm] ("CGPM Meetings 1") fetching...
58
58
  [relaton-bipm] ("CGPM Meetings 1") found CGPM Meetings 1
@@ -62,7 +62,19 @@ RelatonBipm::BipmBibliography.get "CGPM Meetings 1"
62
62
  # get CGPM resolutions
63
63
  RelatonBipm::BipmBibliography.get "CGPM Resolution 1889-00"
64
64
  [relaton-bipm] ("CGPM Resolution 1889-00") fetching...
65
- [relaton-bipm] ("CGPM Resolution 1889-00") found CGPM Resolution 0 (1889)
65
+ [relaton-bipm] ("CGPM Resolution 1889-00") found CGPM Resolution (1889)
66
+ => #<RelatonBipm::BipmBibliographicItem:0x00007ff0d1ffae50
67
+ ...
68
+
69
+ RelatonBipm::BipmBibliography.get "CGPM Resolution (1889)"
70
+ [relaton-bipm] ("CGPM Resolution (1889)") fetching...
71
+ [relaton-bipm] ("CGPM Resolution (1889)") found CGPM Resolution (1889)
72
+ => #<RelatonBipm::BipmBibliographicItem:0x00007ff0d1ffae50
73
+ ...
74
+
75
+ RelatonBipm::BipmBibliography.get "CGPM Resolution 1889"
76
+ [relaton-bipm] ("CGPM Resolution 1889") fetching...
77
+ [relaton-bipm] ("CGPM Resolution 1889") found CGPM Resolution (1889)
66
78
  => #<RelatonBipm::BipmBibliographicItem:0x00007ff0d1ffae50
67
79
  ...
68
80
 
@@ -40,7 +40,9 @@ 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
- rf = ref.sub(/(\d{1,2})\s\((\d{4})\)/) { "#{$2}-#{$1.rjust(2, '0')}" }.sub(/\((\d{4})\)/, "\\1")
43
+ rf = ref.sub(/(?:(\d{1,2})\s)?\(?(\d{4})(?!-)\)?/) do
44
+ "#{$2}-#{$1.to_s.rjust(2, '0')}"
45
+ end
44
46
  path_parts = rf.split.map &:downcase
45
47
  path_parts.insert(1, "meetings") unless path_parts[1] == "meetings"
46
48
  url = "#{GH_ENDPOINT}#{path_parts.join '/'}.yaml"
@@ -1,3 +1,3 @@
1
1
  module RelatonBipm
2
- VERSION = "1.11.3".freeze
2
+ VERSION = "1.11.4".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bipm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.3
4
+ version: 1.11.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.