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

validate dct_references as parseable serialized json string #51

Merged
merged 1 commit into from
Aug 5, 2016

Conversation

mejackreed
Copy link
Member

@mejackreed mejackreed commented Aug 5, 2016

This PR fixes #21

@mejackreed mejackreed changed the title wip dct_ref validator validate dct_references as parseable serialized json string Aug 5, 2016
def dct_references_valid?
return true unless metadata.key?('dct_references_s')
begin
JSON.parse(metadata['dct_references_s'])
Copy link
Member

Choose a reason for hiding this comment

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

I would also check to make sure the parsed data are a Hash

Copy link
Member Author

Choose a reason for hiding this comment

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

Added

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 99.356% when pulling b2d6e6e on validate-dct-ref into 68a14dc on master.

@drh-stanford drh-stanford merged commit 58d1317 into master Aug 5, 2016
@drh-stanford drh-stanford deleted the validate-dct-ref branch August 5, 2016 17:37
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.

Add in dct_references_s validator
3 participants