relaton-bipm 1.10.2 → 1.10.3

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: 4b2dba1f1f291abb29c9a90122c060265b1165ef5c8a667fe7aa3cc1bc28c367
4
- data.tar.gz: 3782195ed79911afc17f0f235bb1bfb82484c06ca7fef87c869aa8d68017d6e6
3
+ metadata.gz: 82921528d18ccbfc6bbba60ae832fd711d92c9d338b887c19b500d81f911098b
4
+ data.tar.gz: 21db3cbf7e095003a51224b8c7c8a11f0b46164d52f161f45c83acd5677b65ad
5
5
  SHA512:
6
- metadata.gz: 8c5484395aeca285a53cf84ba9f50ca55db768cb7fbbe162fc8219424aa201af53423b34f5c9ecb8e6a25b776905447f5e987bc4a03e93b62dc808142d2b1501
7
- data.tar.gz: f2a4039b7e63b4ab8b8e721042b109b9cd6abb3200254e004970a52c74b6593ae0954a39105eaaaff3ea21f47839c99c492d4fc8977f58e1257122e42d369582
6
+ metadata.gz: 5df3c90e1dce934b765a738283b8cefc1de1516ffc869698bc5c161ca5a3ae290a30f799c00de19fe67513d589934ea469d3a9a4c5c3144e1afc6ca3174eea7b
7
+ data.tar.gz: 5516be3766704271ef92b49621fdf4ee38e01520ba986917f8ff0a8fd4d34eabb3530dadb8fc500dbbedf762d0128115c3987476cb430930c21cbe516e248cab
data/README.adoc CHANGED
@@ -8,7 +8,7 @@ image:https://codeclimate.com/github/relaton/relaton-bipm/badges/gpa.svg["Code C
8
8
  image:https://img.shields.io/github/issues-pr-raw/relaton/relaton-bipm.svg["Pull Requests", link="https://github.com/relaton/relaton-bipm/pulls"]
9
9
  image:https://img.shields.io/github/commits-since/relaton/relaton-bipm/latest.svg["Commits since latest",link="https://github.com/relaton/relaton-bipm/releases"]
10
10
 
11
- RelatonIec is a Ruby gem that implements the https://github.com/metanorma/metanorma-model-iso#iso-bibliographic-item[IsoBibliographicItem model].
11
+ RelatonBipm is a Ruby gem that implements the https://github.com/metanorma/metanorma-model-iso#iso-bibliographic-item[IsoBibliographicItem model].
12
12
 
13
13
  You can use it to retrieve metadata of BIPM Standards from https://www.bipm.org, and access such metadata through the `BipmBibliographicItem` object.
14
14
 
@@ -39,13 +39,18 @@ module RelatonBipm
39
39
  # @param ref [String]
40
40
  # @param agent [Mechanize]
41
41
  # @return [RelatonBipm::BipmBibliographicItem]
42
- def get_bipm(ref, agent)
42
+ def get_bipm(ref, agent) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
43
43
  url = "#{GH_ENDPOINT}#{ref.upcase.split.join '-'}.yaml"
44
44
  resp = agent.get url
45
45
  check_response resp
46
46
  return unless resp.code == "200"
47
47
 
48
- bib_hash = HashConverter.hash_to_bib YAML.safe_load(resp.body, [Date])
48
+ yaml = if Gem::Version.new(Psych::VERSION) >= Gem::Version.new("3.1.0.pre1")
49
+ YAML.safe_load(resp.body, permitted_classes: [Date])
50
+ else
51
+ YAML.safe_load(resp.body, [Date])
52
+ end
53
+ bib_hash = HashConverter.hash_to_bib yaml
49
54
  BipmBibliographicItem.new(**bib_hash)
50
55
  end
51
56
 
@@ -1,3 +1,3 @@
1
1
  module RelatonBipm
2
- VERSION = "1.10.2".freeze
2
+ VERSION = "1.10.3".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.10.2
4
+ version: 1.10.3
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-02-10 00:00:00.000000000 Z
11
+ date: 2022-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug