From 4c0ba94a4c8028dea696fee6f32e58fe23f2117c Mon Sep 17 00:00:00 2001 From: Andrei Kislichenko Date: Tue, 9 Jun 2020 11:43:19 +0200 Subject: [PATCH] fix issue #38 --- lib/relaton_ietf/scrapper.rb | 9 +++++++-- lib/relaton_ietf/version.rb | 2 +- spec/examples/rfc_xml.xml | 8 +++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/relaton_ietf/scrapper.rb b/lib/relaton_ietf/scrapper.rb index cca4244..9cc4aae 100644 --- a/lib/relaton_ietf/scrapper.rb +++ b/lib/relaton_ietf/scrapper.rb @@ -206,10 +206,15 @@ def persons(reference) # @return [ArrayRelatonBib::Organization,Symbol=>Array}>] def organizations(reference) publisher = { entity: new_org, role: [type: "publisher"] } - reference.xpath("./seriesinfo").reduce([publisher]) do |mem, si| + orgs = reference.xpath("./seriesinfo").reduce([publisher]) do |mem, si| next mem unless si[:stream] - mem << { entity: new_org(si[:stream]), role: [type: "author"] } + mem << { entity: new_org(si[:stream], nil), role: [type: "author"] } + end + orgs + reference.xpath( + "front/author/organization[string-length(.) > 0]", + ).map do |org| + { entity: new_org(org.text, nil), role: [type: "author"] } end end diff --git a/lib/relaton_ietf/version.rb b/lib/relaton_ietf/version.rb index 25d034f..8bddd06 100644 --- a/lib/relaton_ietf/version.rb +++ b/lib/relaton_ietf/version.rb @@ -1,3 +1,3 @@ module RelatonIetf - VERSION = "1.1.0".freeze + VERSION = "1.1.1".freeze end diff --git a/spec/examples/rfc_xml.xml b/spec/examples/rfc_xml.xml index 8dc55cc..f759469 100644 --- a/spec/examples/rfc_xml.xml +++ b/spec/examples/rfc_xml.xml @@ -1,5 +1,5 @@ - 2020-05-22 + 2020-06-09 ACVP Secure Hash Algorithm (SHA) JSON Specification draft-ietf-acvp-subsha-1.0 @@ -33,6 +33,12 @@ IETF + + + + National Institute of Standards and Technology + + en This document defines the JSON schema for using SHA1 and SHA2 with the ACVP