relaton-bib 1.9.18 → 1.9.19

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: 974c021271bddc8c3ab783eae039697f62010c33f035e24b2bb96051a6138b8a
4
- data.tar.gz: 71157a9ac56ec96549886354db9b6a301ead662e43ec8abefea1bdc27ec8539c
3
+ metadata.gz: fcf7272c206af7f7206cc3886a744db7a1c0084d1f999164f7971829c16e640e
4
+ data.tar.gz: c5260c213ab4542c98e5df926bb638451345fded8b7ebaa76897212aab9bb7c5
5
5
  SHA512:
6
- metadata.gz: fec9fcd2fad29d5128b739fb478b0198bdeeb1a6ab2b9806d8dc73c51290ddcea19fe3481fdc5f104369c34f26fd6e7661a02d5927cf3eed7416b58516cbd915
7
- data.tar.gz: 85890cd5bde2fee2e9fefe9188f4a892019b92414b235bbde5e91453b878b6bbe31d5d8d364939ec6662859c0ec0f9362836d938447ac0b2921fd2ce7863a40c
6
+ metadata.gz: 5a60302d3043fdac1e1ca6b1ebfbd7244b2788a266d5c6392f1279797f4e4c6fc7f3a951cc05b79bf24c7f2bfc7267bf1d1740ddfefe8534a54156233bb1664a
7
+ data.tar.gz: c5f46067ab37b963dee5c04fa9294a9e3522906ae011af2397eb18f88b0c48d37b0727eb44ca78dd17ba77e493a4246a8feef4c338ae68564a320e1cd148c0bf
@@ -937,10 +937,8 @@ module RelatonBib
937
937
 
938
938
  ab = org.abbreviation&.content
939
939
  on = org.name.first&.content
940
- orgname = if ab == "IEEE" || on == "Istitute of Electrical and Electronics Engineers"
941
- "IEEE"
942
- elsif ab == "W3C" || on == "World Wide Web Consortium" then "W3C"
943
- else on || ab
940
+ orgname = if BibXMLParser::ORGNAMES.key?(ab) then ab
941
+ else BibXMLParser::ORGNAMES.key(on) || on || ab
944
942
  end
945
943
  o = builder.organization orgname
946
944
  o[:abbrev] = ab if ab
@@ -2,6 +2,10 @@ module RelatonBib
2
2
  module BibXMLParser
3
3
  SERIESINFONAMES = ["DOI", "Internet-Draft"].freeze
4
4
  FLAVOR = nil
5
+ ORGNAMES = {
6
+ "IEEE" => "Istitute of Electrical and Electronics Engineers",
7
+ "W3C" => "World Wide Web Consortium",
8
+ }.freeze
5
9
 
6
10
  def parse(bibxml, url: nil, is_relation: false, ver: nil)
7
11
  doc = Nokogiri::XML bibxml
@@ -209,7 +213,8 @@ module RelatonBib
209
213
  # "front/author[not(@surname)][not(@fullname)]/organization",
210
214
  # ).map do |org|
211
215
  org = contrib.at("./organization")
212
- { entity: new_org(org.text, org[:abbrev]), role: [contributor_role(contrib)] }
216
+ name = ORGNAMES[org.text] || org.text
217
+ { entity: new_org(name, org[:abbrev]), role: [contributor_role(contrib)] }
213
218
  # end
214
219
  end
215
220
 
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.9.18".freeze
2
+ VERSION = "1.9.19".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.18
4
+ version: 1.9.19
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-01-09 00:00:00.000000000 Z
11
+ date: 2022-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug