relaton-ietf 1.12.5 → 1.12.8

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: 0eddad3431b1f0aade4e139456c33ae9cd067eaec9dd38b64257be00e285efd7
4
- data.tar.gz: 156d9d50c7964ec4167526fc1f31460134c717fbd48c4dd41b7d4bc42450c094
3
+ metadata.gz: cf939eb8fbf40547a0fcfad3bd4c23494374fabb316f1b73e504c1dbb90787de
4
+ data.tar.gz: cc4ad5a95dad765a8f03007d1a7b98d7e452b8e63d917627fc6f7376017b7621
5
5
  SHA512:
6
- metadata.gz: ab78ea185c4bf6e7be09f78a7457f36ac3f1951b46bc0b2c3c33b6465fcdee9cdad00cb69f3fc606144bba3efe2e94e765a340933d129a67dfd29aa6c8dfa14f
7
- data.tar.gz: 8e5e48e4257c89edcca19c85e54d5ef2dfc8a941ebed64cd3b826f63373774d25f2ef6b9c65ae2752e36fb7efa118874be489e5ee9f6faefceae674d9919e4dd
6
+ metadata.gz: 2fca716e0d98b6a38dbf97f9dfffc7aad28028c8289f214dc90627ac060977101e2a9a1950a8c24e80a065877650c8e2fea609b9737a460ea412f4e32fcbe61f
7
+ data.tar.gz: 59b10d824cbe656afb0c9ef74c480b4267fdd48c1a9097d8ef4afee59017c7b0112aa96533b9195bf6611de1547805bb1c05c20968cf7f33959eb825d4f58b5b
@@ -67,7 +67,7 @@ module RelatonIetf
67
67
  versions = Dir["bibxml-ids/*.xml"].each_with_object([]) do |path, vers|
68
68
  file = File.basename path, ".xml"
69
69
  if file.include?("D.draft-")
70
- vers << file.sub(/^reference\.I-D\./, "")
70
+ vers << file.sub(/^reference\.I-D\./, "").downcase
71
71
  /(?<ver>\d+)$/ =~ file
72
72
  end
73
73
  bib = BibXMLParser.parse(File.read(path, encoding: "UTF-8"))
@@ -92,7 +92,7 @@ module RelatonIetf
92
92
  match = /(?<series>draft-.+)-(?<ver>\d{2})\.#{@ext}$/.match file
93
93
  if match
94
94
  if series != match[:series]
95
- bib_versions = versions.grep(/^#{match[:series]}-\d{2}/)
95
+ bib_versions = versions.grep(/^#{Regexp.quote match[:series]}-\d{2}/)
96
96
  create_series match[:series], bib_versions
97
97
  series = match[:series]
98
98
  end
@@ -115,8 +115,6 @@ module RelatonIetf
115
115
  # @param [Array<String>] versions list of versions
116
116
  #
117
117
  def create_series(ref, versions) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
118
- return if versions.size < 2
119
-
120
118
  vs = versions.sort_by { |v| v.match(/\d+$/).to_s.to_i }
121
119
  fref = RelatonBib::FormattedRef.new content: ref
122
120
  docid = RelatonBib::DocumentIdentifier.new type: "Internet-Draft", id: ref, primary: true
@@ -6,7 +6,7 @@ module RelatonIetf
6
6
  def initialize # rubocop:disable Lint/MissingSuper
7
7
  @short = :relaton_ietf
8
8
  @prefix = "IETF"
9
- @defaultprefix = /^(IETF|RFC|BCP|FYI|STD)\s/
9
+ @defaultprefix = /^((IETF|RFC|BCP|FYI|STD)\s|I-D[.\s])/
10
10
  @idtype = "IETF"
11
11
  @datasets = %w[ietf-rfcsubseries ietf-internet-drafts ietf-rfc-entries]
12
12
  end
@@ -218,7 +218,7 @@ module RelatonIetf
218
218
  def initials(int)
219
219
  return [] unless int
220
220
 
221
- int.split(/\.-?\s?|\s/).map { |i| RelatonBib::LocalizedString.new i, "en", "Latn" }
221
+ int.split(/(?<=\.)-?\s?|\s/).map { |i| RelatonBib::LocalizedString.new i, "en", "Latn" }
222
222
  end
223
223
 
224
224
  #
@@ -31,7 +31,7 @@ module RelatonIetf
31
31
  when /^RFC/ then RFC
32
32
  when /^(?:BCP|FYI|STD)/ then RSS
33
33
  when /^I-D/
34
- ref.sub!(/^I-D\./, "")
34
+ ref.sub!(/^I-D[.\s]/, "")
35
35
  IDS
36
36
  else return
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonIetf
2
- VERSION = "1.12.5".freeze
2
+ VERSION = "1.12.8".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.12.5
4
+ version: 1.12.8
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-07-22 00:00:00.000000000 Z
11
+ date: 2022-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml