
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
A Gem to harvest meta/data from DOR and the skeleton code to index it and write to Solr.
Add this line to your application's Gemfile:
gem 'harvestdor-indexer'
And then execute:
$ bundle
Or install it yourself as:
$ gem install harvestdor-indexer
You must override the index method and provide configuration options. It is recommended to write a script to run it, too - example below.
Create a yml config file for your collection going to a Solr index.
See spec/config/ap.yml for an example. You will want to copy that file and change the following settings:
The whitelist is how you specify which objects to index. The whitelist can be
If a druid, per the object's identityMetadata at purl page, is for a
In your code, override this method from the Harvestdor::Indexer class
# create Solr doc for the druid and add it to Solr
# NOTE: don't forget to send commit to Solr, either once at end (already in harvest_and_index), or for each add, or ...
def index resource
benchmark "Indexing #{resource.druid}" do
logger.debug "About to index #{resource.druid}"
doc_hash = {}
doc_hash[:id] = resource.druid
# you might add things from Indexer level class here
# (e.g. things that are the same across all documents in the harvest)
solr.add doc_hash
# TODO: provide call to code to update DOR object's workflow datastream??
end
end
(bundle install)
You may want to write a script to run the code. Your script might look like this:
#!/usr/bin/env ruby $LOAD_PATH.unshift(File.join(File.dirname(FILE), '..')) $LOAD_PATH.unshift(File.join(File.dirname(FILE), '..', 'lib')) require 'rubygems' begin require 'your_indexer' rescue LoadError require 'bundler/setup' require 'your_indexer' end config_yml_path = ARGV.pop if config_yml_path.nil? puts "** You must provide the full path to a collection config yml file **" exit end indexer = Harvestdor::Indexer.new(config_yml_path, opts) indexer.harvest_and_index
Then you run the script like so:
$ ./bin/indexer config/(your coll).yml
Run from deployed instance, as that box is already set up to be able to talk to DOR Fetcher service and to SUL Solr indexes.
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that harvestdor-indexer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.