relaton-ietf 1.9.9 → 1.9.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b877d9712043836edc2a8bfc4fed64e403c2df5d413110620f4d16d5d8edc47c
4
- data.tar.gz: 432049ec32a601221c1c82601d2ec9a6d2287e1068fa31c5495f4255063ac26a
3
+ metadata.gz: b228ad21183ba091376ece03262981610397d4bd24dbbe4d25ecaade5919afc8
4
+ data.tar.gz: 7afaa7821c8402caf21880b5f89c8f6cedf726e9f7d63e373378d3bc23396af5
5
5
  SHA512:
6
- metadata.gz: 6d63daffca42a241bd32bd896abacc0747c49b1ca3512ab7842e5655d692d6610b7c62de8834853fc66939b367b12fc8b3e73585a9f37a373cae0df83adf53b7
7
- data.tar.gz: 797e01b58acd21ce291357a2baaa989bd7fc6e7ac5bc084b10c4a1cc94b06425c5ba98c2e96812190c8b37c0a6a73f20f25670efa8c72b1de92fd0491cf4af7a
6
+ metadata.gz: '019d2fe2d610aa3a5cd57d87e208c8b0eba266fd6a1239acbcc8cc20e080aaa7ab4939b05ecdff9fd455a45b4363cbc4cc514bd6d6b6d7b8fd21b46fb4115c86'
7
+ data.tar.gz: 9c4c8ca423d371e2702d7427014b30546e8da6a3c47f85f543ab7f6b6dabc4ff41114add59875fd1265857c8d04aeffc49e15324381fd92471ed11b9791069db
@@ -51,7 +51,10 @@ module RelatonIetf
51
51
  # @return [Array<RelatonBib::DocumentIdettifier>] document identifiers
52
52
  #
53
53
  def parse_docid
54
- ids = [RelatonBib::DocumentIdentifier.new(id: pub_id, type: "IETF")]
54
+ ids = [
55
+ RelatonBib::DocumentIdentifier.new(id: pub_id, type: "IETF"),
56
+ RelatonBib::DocumentIdentifier.new(id: code, type: "IETF", scope: "anchor"),
57
+ ]
55
58
  doi = @doc.at("./xmlns:doi").text
56
59
  ids << RelatonBib::DocumentIdentifier.new(id: doi, type: "DOI")
57
60
  ids
@@ -73,7 +76,8 @@ module RelatonIetf
73
76
  # @return [String] PubID
74
77
  #
75
78
  def pub_id
76
- "IETF #{code.sub(/^(RFC)(\d+)/, '\1 \2')}"
79
+ /^RFC(?<num>\d+)$/ =~ code
80
+ "RFC #{num.sub(/^0+/, '')}"
77
81
  end
78
82
 
79
83
  #
@@ -54,13 +54,14 @@ module RelatonIetf
54
54
 
55
55
  def parse_docid
56
56
  [
57
- RelatonBib::DocumentIdentifier.new(type: "IETF", scope: "anchor", id: anchor),
57
+ RelatonBib::DocumentIdentifier.new(type: "IETF", id: pub_id),
58
+ RelatonBib::DocumentIdentifier.new(type: "IETF", scope: "anchor", id: @doc_id),
58
59
  ]
59
60
  end
60
61
 
61
- # def pub_id
62
- # "IETF #{@name.upcase} #{@shortnum}"
63
- # end
62
+ def pub_id
63
+ "#{@name.upcase} #{@shortnum}"
64
+ end
64
65
 
65
66
  def anchor
66
67
  "#{@name.upcase}#{@shortnum}"
@@ -1,3 +1,3 @@
1
1
  module RelatonIetf
2
- VERSION = "1.9.9".freeze
2
+ VERSION = "1.9.10".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-ietf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.9
4
+ version: 1.9.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-28 00:00:00.000000000 Z
11
+ date: 2021-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml