relaton-bipm 1.19.0 → 1.19.1

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: f192fd171fc919d9b30fabc3ba8f0e17ecc1a3c58e0ade979f42847c4266ed06
4
- data.tar.gz: bcf449487cef0842578309f4c00305ac25dd0da5154748c662c2499a1e04cc21
3
+ metadata.gz: 6169158d13f03ec83666123ca52d0e87b7960ba13fe5b6d5051228c54158f93c
4
+ data.tar.gz: 46236ffb5e1f875fd042dd89fe866251962a553497dd9a8a474edcd6aa18e2fa
5
5
  SHA512:
6
- metadata.gz: 0da90de53422e0c080b29fb73cd5472a36018beeece575afe413eac28a698497b7be6d7a3ba352684d7dda6467136be08a3f6bfe0ef99a992991303a54257cc5
7
- data.tar.gz: 866df7ec30e56762cc588bb710450b2dcf58ca2b8f066f9473410957f340034856e8426d7705223fc44357c4142d54fca88525554ca3fa649363cdde80929978
6
+ metadata.gz: d1b01efea043f825d7e08dcecc6396e21b56c75ab0131dffd6b5e936ea10e185e9f8412ddf9c30fa21f64eaf9e97408da92e06fedc2a7cbb1d9da581151ab0ea
7
+ data.tar.gz: 8cc33bc1d0b431ecd6d55c640ddcf5d715e640dfd2a926a5e2db5d72f442fefe93f527275f17236e2a815302cdb65ec9c47f71dd970b9d0eb708133765654d92
@@ -2,7 +2,7 @@ require "mechanize"
2
2
 
3
3
  module RelatonBipm
4
4
  class BipmBibliography
5
- GH_ENDPOINT = "https://raw.githubusercontent.com/relaton/relaton-data-bipm/master/".freeze
5
+ GH_ENDPOINT = "https://raw.githubusercontent.com/relaton/relaton-data-bipm/main/".freeze
6
6
  INDEX_FILE = "index2.yaml".freeze
7
7
 
8
8
  class << self
@@ -161,10 +161,9 @@ module RelatonBipm
161
161
  # @return [RelatonBib::FullName] full name
162
162
  #
163
163
  def fullname(name)
164
- fname = forename name.at("./given-names")
165
- sname = name.at("./surname").text
166
- surname = RelatonBib::LocalizedString.new sname, "en", "Latn"
167
- RelatonBib::FullName.new surname: surname, forename: fname
164
+ cname = [name.at("./given-names"), name.at("./surname")].compact.map(&:text).join(" ")
165
+ completename = RelatonBib::LocalizedString.new cname, "en", "Latn"
166
+ RelatonBib::FullName.new completename: completename
168
167
  end
169
168
 
170
169
  #
@@ -31,7 +31,7 @@ module RelatonBipm
31
31
  def fetch_articles # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
32
32
  Dir["#{DIR}/**/*.xml"].each do |path|
33
33
  item = ArticleParser.parse path
34
- file = "#{item.docidentifier.first.id.downcase.gsub(' ', '-')}.#{@data_fetcher.ext}"
34
+ file = "#{item.docidentifier.first.id.downcase.tr(' ', '-')}.#{@data_fetcher.ext}"
35
35
  out_path = File.join(@data_fetcher.output, file)
36
36
  key = Id.new.parse(item.docidentifier.first.id).to_hash
37
37
  @data_fetcher.index2.add_or_update key, out_path
@@ -1,3 +1,3 @@
1
1
  module RelatonBipm
2
- VERSION = "1.19.0".freeze
2
+ VERSION = "1.19.1".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.19.0
4
+ version: 1.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-03 00:00:00.000000000 Z
11
+ date: 2024-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday