-
Notifications
You must be signed in to change notification settings - Fork 27
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
Set earliest/latest timestamp to current time for empty results #33
Set earliest/latest timestamp to current time for empty results #33
Conversation
A couple of things:
|
To be clear, I think we should fix this and get the 7.x gems released! This is impacting some of our apps as well, and I'll pitch in to get this done. |
Interesting…my read of the spec is that In any case, I'm happy to backport syntax to Ruby 2.1 compatibility, and try to add some tests as well. |
Oh, I see what you mean re: |
- separate unit and integration specs for SolrDocumentWrapper
9b0ac69
to
54ff6a3
Compare
Coming back to this since it had been some time: I fixed up the Ruby 2.1 syntax (and some other style issues in the spec), split off the legacy specs that actually use Solr into an integration suite, and added unit specs for the specific change in this PR. |
@barmintor I approved the PR, but I do not have write access to this repo, so I cannot merge it. |
@barmintor Thanks for revisiting this and fixing it up! |
This, it turns out, was a regression: 5713d30 But we clearly needed the tests! |
Fixes #26.
This falls back to a timestamp generated from the current time if there are no Solr documents or timestamps present.
According to the OAI-PMH spec, the
earliestDatestamp
element this will be used in has the following criteria:Since in this case there are no records with datestamps, using the current timestamp should be fine, and result in no differences from the case where a repository has a set of records with an earliest datestamp and then later has a new record added later on with an earlier datestamp (since the
earliestDatestamp
will update accordingly).I've also made a backport onto the v6.1.1 tag here: https://github.com/ryanfb/blacklight_oai_provider/tree/default-earliest-datestamp-6.1.1-backport