Refactor rake tasks into harvester and indexer classes #132
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This mostly moves logic out of rake tasks and into dedicated classes, which makes it easier to test. It also separates the harvesting portion from the indexing portion; this might make it easier to have the geoblacklight harvester inherit some of this behavior later. The denylist is one of the things the harvester class includes, which closes #119. I think the logic mentioned in #112 was already in place, so this closes #112 too.
It also adds logic to filter indexing based on your desired schema version (set
SCHEMA_VERSION
toAardvark
to index only aardvark records; the default is 1.0), which fixes #130.I added a dependency on ruby-git to do the git pull/clone instead of just calling out to
system()
, which made things easier to test and might also allow for things to run on windows.