iso-bib-item 0.2.3 → 0.2.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: d9cb5e4bea651968a0d44b55b2b5f0de83a5a57160aa9ce3edc3a3e900aa55e1
4
- data.tar.gz: 7391ff666d1d2a31b9540c4184670f116c9a3b403ba820806317f79b66c82c6e
3
+ metadata.gz: 423970a46ac3548707c24f614d31e459ede59b5cf402ed4d073dccf405f40920
4
+ data.tar.gz: 91540a5d39dd4f2a522bf47d584de113bf66218c393ef6e9b04b054b9933bc20
5
5
  SHA512:
6
- metadata.gz: 20ca6ca1ce0d1e447adc25c8510224f4a6c0f06436c955c206df5c4e1f66c90e383c82f56339b58391e9297e9805fe2c2f68dc9ab0be646a4887e3f02e34cbfa
7
- data.tar.gz: d8525c1e17e9fed3743e00e1ad119248de90b55280e8d720186dc7a1df0619e340926010bc3ba40fd6ac97fe0293e327193a7fad6def8d8fe995f885b392fd0e
6
+ metadata.gz: f63914c86938dbf6279e1d04830fabbc6229bbcbd92bd1800927a70af0c2936856ef0a9aa3aae5ca84e323e9f0ffb462629561386b291fa56c520285e76b9078
7
+ data.tar.gz: 0c7a2f6acf70632d5d75e1a9dde3a36b0c5a583f20eea2725e150ccfec4961db6cb3f6933fdd2d5dafa231c2e5dd1fd90c0b92c4506eb044ae4482f4b3ae06f0
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- iso-bib-item (0.2.2)
4
+ iso-bib-item (0.2.4)
5
5
  isoics (~> 0.1.6)
6
6
  nokogiri (~> 1.8.4)
7
7
  ruby_deep_clone (~> 0.8.0)
@@ -28,10 +28,11 @@ module IsoBibItem
28
28
  def fetch_docid(doc)
29
29
  did = doc.at('/bibitem/docidentifier')
30
30
  return unless did
31
+ did.text == "IEV" and return IsoBibItem::IsoDocumentId.new(project_number: "IEV", part_number: nil, prefix: nil)
31
32
  id = did.text.match(/(?<project>\d+)(?<hyphen>-)?(?(<hyphen>)(?<part>\d*))/)
32
- IsoBibItem::IsoDocumentId.new project_number: id[:project],
33
- part_number: id[:part],
34
- prefix: nil
33
+ IsoBibItem::IsoDocumentId.new(project_number: id.nil? ? nil : id[:project],
34
+ part_number: id.nil? ? nil : id[:part],
35
+ prefix: nil)
35
36
  end
36
37
 
37
38
  def fetch_titles(doc)
@@ -241,6 +241,7 @@ module IsoBibItem
241
241
  return nil if attribute && !@id_attribute
242
242
  contribs = publishers.map { |p| p&.entity&.abbreviation }.join '/'
243
243
  idstr = "#{contribs}#{delim}#{@docidentifier.project_number}"
244
+ idstr = "IEV" if @docidentifier.project_number == "IEV"
244
245
  if @docidentifier.part_number&.size&.positive?
245
246
  idstr << "-#{@docidentifier.part_number}"
246
247
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module IsoBibItem
4
- VERSION = '0.2.3'.freeze
4
+ VERSION = '0.2.4'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iso-bib-item
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-25 00:00:00.000000000 Z
11
+ date: 2018-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler