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

Fixes cheksum failure when :md5sum option is a URL. #114

Closed
wants to merge 2 commits into from

Conversation

dkinzer
Copy link

@dkinzer dkinzer commented Jan 26, 2018

According to the current docs md5sum is either a path or URL to a file
containing an md5sum.

When the md5sum is a URL either it is treated as an md5sum string failing
checksum test (because it's a URL) or it is not used and default md5sum url for
the default mirror is used instead. In either case there is a check sum failure.

This commit fixes that issue by overriing the default md5url when md5sum
is a url.

@dkinzer
Copy link
Author

dkinzer commented Jan 26, 2018

I think that maybe there is a missing md5sum method in settings.rb that could possibly fix this also.. not sure.

@dkinzer
Copy link
Author

dkinzer commented Jan 26, 2018

ok, i added the missing method in order to keep backwards compatibility

dkinzer added a commit to tulibraries/tul_cob that referenced this pull request Jan 26, 2018
Even though the solr_wrapper docs say the mad5sum takes a URL to an
md5sum or a file path, it actual fails in those cases.  Looking at the
code it will work fine if we pass the actual md5sum here (I think).

I made a PR against solr_wrapper to fix the issue I found:
cbeer/solr_wrapper#114
@dkinzer dkinzer changed the title Fixes cheksum failure when mdsum is URL. Fixes cheksum failure when :m5dsum option is a URL. Jan 27, 2018
@dkinzer dkinzer changed the title Fixes cheksum failure when :m5dsum option is a URL. Fixes cheksum failure when :md5sum option is a URL. Jan 27, 2018
When the :md5sum option is a URL either it is treated as an mdsum string
failing checksum test or it is not used and default mdsum url for
default mirror is used.  In either case there is a check sum failure.

This commit fixes that issue by overriding the default md5url when mdsum
is a url.

This commit also add some tests for this bug fix as well as fixes
a bug in the download URL code that throws an error when a file request
is stubbed.
skng5 pushed a commit to tulibraries/tul_cob that referenced this pull request Jan 29, 2018
* Refactor sort electronic url

* Fixes bug where an empty accumulater gets clobbered.
* Removes unused fixtures.
* Adds  smoke test to verify code sorts as expected.
* Adds test against bug

* Update solr-wrapper download url.

* Update solr zip url via params.

* Update md5sum url.

* Add md5url not md5sum.

* Use md5sum instead of URL to md5sum file.

Even though the solr_wrapper docs say the mad5sum takes a URL to an
md5sum or a file path, it actual fails in those cases.  Looking at the
code it will work fine if we pass the actual md5sum here (I think).

I made a PR against solr_wrapper to fix the issue I found:
cbeer/solr_wrapper#114

* Use valid checksum
dkinzer pushed a commit to tulibraries/tul_cob that referenced this pull request Jan 30, 2018
* List in descending chronological order

* Intermediate commit - Extend sorting

- Breaks out sort function into separate method
- Extends sort to end date and title

* Fine tune sort and place make it a separate method

* Fix tertiary sort

- Teritary sort on title instead of ID and title

* Remove unused fixture file

* Refactor sort electronic url (#221)

* Refactor sort electronic url

* Fixes bug where an empty accumulater gets clobbered.
* Removes unused fixtures.
* Adds  smoke test to verify code sorts as expected.
* Adds test against bug

* Update solr-wrapper download url.

* Update solr zip url via params.

* Update md5sum url.

* Add md5url not md5sum.

* Use md5sum instead of URL to md5sum file.

Even though the solr_wrapper docs say the mad5sum takes a URL to an
md5sum or a file path, it actual fails in those cases.  Looking at the
code it will work fine if we pass the actual md5sum here (I think).

I made a PR against solr_wrapper to fix the issue I found:
cbeer/solr_wrapper#114

* Use valid checksum

* Rescue from bad record on sort.
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.

1 participant