Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add parsing of previous catkeys to purl xml model; add tests that were pending #31

Merged
merged 1 commit into from
Mar 2, 2017

Conversation

peetucket
Copy link
Contributor

@peetucket peetucket commented Mar 1, 2017

this will be used in https://github.com/sul-dlss/sw-indexer to call the 856 record service for when previous catkeys are present in the record

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 99.007% when pulling 85c8089 on add-previous-catkey-parsing into dc2739b on master.

@peetucket peetucket changed the title add parsing of previous catkeys to purl xml model; add tests that wer… add parsing of previous catkeys to purl xml model; add tests that were pending Mar 1, 2017
@peetucket peetucket self-assigned this Mar 2, 2017
@@ -209,6 +210,11 @@ def parse_catkey
get_value(@purlxml_ng_doc.xpath("/publicObject/identityMetadata/otherId[@name='catkey']"))
end

# @return previous catkey values from the DOR identity_metadata as an array, or empty array if there are no previous catkeys
def parse_previous_catkeys
@purlxml_ng_doc.xpath("/publicObject/identityMetadata/otherId[@name='previous_catkey']").map { |node| node.content }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit: style-wise i think this should be collect, not map.

@drh-stanford drh-stanford merged commit 41096f9 into master Mar 2, 2017
@drh-stanford drh-stanford removed the 3.1 label Mar 2, 2017
@drh-stanford drh-stanford deleted the add-previous-catkey-parsing branch March 2, 2017 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants