Skip to content

Commit

Permalink
fix issue #38
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew2net committed Jun 9, 2020
1 parent d1db22e commit 4c0ba94
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
9 changes: 7 additions & 2 deletions lib/relaton_ietf/scrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,15 @@ def persons(reference)
# @return [Array<Hash{Symbol=>RelatonBib::Organization,Symbol=>Array<String>}>]
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

Expand Down
2 changes: 1 addition & 1 deletion lib/relaton_ietf/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RelatonIetf
VERSION = "1.1.0".freeze
VERSION = "1.1.1".freeze
end
8 changes: 7 additions & 1 deletion spec/examples/rfc_xml.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<bibdata type="standard">
<fetched>2020-05-22</fetched>
<fetched>2020-06-09</fetched>
<title format="text/plain" language="en" script="Latn">ACVP Secure Hash Algorithm (SHA) JSON Specification</title>
<docidentifier type="IETF">draft-ietf-acvp-subsha-1.0</docidentifier>
<date type="published">
Expand Down Expand Up @@ -33,6 +33,12 @@
<abbreviation>IETF</abbreviation>
</organization>
</contributor>
<contributor>
<role type="author"/>
<organization>
<name>National Institute of Standards and Technology</name>
</organization>
</contributor>
<language>en</language>
<script>Latn</script>
<abstract format="text/plain" language="en" script="Latn">This document defines the JSON schema for using SHA1 and SHA2 with the ACVP
Expand Down

0 comments on commit 4c0ba94

Please sign in to comment.