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

Import Metadata from Pulfa/Bibdata #6

Merged
merged 6 commits into from
Jul 27, 2017
Merged

Import Metadata from Pulfa/Bibdata #6

merged 6 commits into from
Jul 27, 2017

Conversation

tpendragon
Copy link
Contributor

I'm doing my best to avoid VCR.

attribute :title
attribute :label
attribute :visibility
def imported_schema
Copy link
Member

Choose a reason for hiding this comment

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

I like the idea of imported_schema, but it does make me think we should have a MarcRelatorsSchema etc. classes to clearly identify where some of these are coming from.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we make an issue for that? I'm not sure the neatest way to bisect them. The only reason this exists is so that importing metadata won't wipe out all the non-imported metadata (IE source_metadata_identifier)

Copy link
Member

Choose a reason for hiding this comment

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

👍 #7

private

def jsonld_request
@jsonld_request ||= Faraday.get("https://bibdata.princeton.edu/bibliographic/#{source_metadata_identifier}/jsonld")
Copy link
Member

Choose a reason for hiding this comment

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

TODO: we shouldn't be generating bibdata and pulfa URLs in our apps — I've added a ticket to pul_metadata_services for this: pulibrary/pul_metadata_services#18

@@ -0,0 +1,34 @@
# frozen_string_literal: true
module BibdataStubbing
Copy link
Member

Choose a reason for hiding this comment

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

👍 This is a lot simpler than VCR, and in particular, I'm looking forward to having human-readable sample records on disk instead of VCR's gnarly raw captures.

Gemfile Outdated
@@ -16,7 +16,7 @@ gem "simple_form"
gem "sprockets", ">= 3.0.0"
gem "title"
gem "uglifier"
gem "valkyrie", git: "https://github.com/samvera-labs/valkyrie.git"
gem "valkyrie", git: "https://github.com/samvera-labs/valkyrie.git", branch: "fix_date_parsing"
Copy link
Member

Choose a reason for hiding this comment

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

You can point this at master now that samvera/valkyrie#180 is merged

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.

2 participants