A Rails engine for metadata aggregation, enhancement, and quality control. Digital Public Library of America uses Kri-Kri as part of Heiðrún, its metadata ingestion system.
More information about Heidrun and Kri-kri can be found on DPLA's Technology Team site.
krikrigem to your Gemfile.
bundle exec rails g krikri:install
This will modify your Gemfile, so you should check it for redundancies.
The install task will have added
mount Krikri::Engine => '/krikri'to your routes.rb. You may customize the path.
bundle exec rake db:migrate
You may run
bundle exec rake routesto inspect the new routes that will have been added, and
bundle exec rails sto check that the new resources are served.
See the Resque documentation on how to run queue workers. There will be a console for the Resque job queue available as '/resque' under the Krikri base path in your web application.
Check out this repository and run:
bundle install rake jetty:unzip rake jetty:config
Run the tests with:
Or you can start the dummy (test) application with:
rake engine_cart:generate bundle update rake jetty:start rake engine_cart:server
The generated dummy application is located in
.internal_test_app by default.
To update/restart dummy (test) application, from the root KriKri directory:
git pull bundle update rake engine_cart:clean rake engine_cart:generate rake engine_cart:server
To update/restart jetty, from the root KriKri directory:
git pull bundle update rake jetty:stop rake jetty:config rake jetty:start
Krikri uses Blacklight. Blacklight's installation process includes the
creation of some routes that Krikri does not use. Blacklight also roots to one
of these un-used routes. We suggested removing both the un-used routes and the
root route by deleting the following line from
blacklight_for :catalog root :to => "catalog#index"
You can then choose a different route to root to, for example:
root :to => "krikri_records#index"
Note that whether or not you delete the un-used Blacklight routes, Blacklight's controllers, models, and views still exists within your application. Be careful not to unintentionally open them by using identical names for your controllers, models, and views. For more information, see Blacklight's website.
To save a sample record to Solr and Marmotta, from
To save an invalid sample record to Solr and Marmotta:
To delete all sample records:
To save a sample institution and harvest source, from
To delete the sample institution and harvest source:
Using Vagrant for development (experimental)
- VirtualBox (Version 4.3)
- Vagrant (Version 1.6)
vagrant plugin install vagrant-vbguest)
- Ansible (Version 1.7 or greater; installation instructions)
vagrant up vagrant reload # Because of o/s packages having been upgraded vagrant ssh cd /vagrant bundle exec rake jetty:start cd spec/internal bundle exec rake krikri:index_sample_data bundle exec rails s
Then access the wrapper application at http://localhost:3000/
From then on, to start things up, do:
vagrant up vagrant ssh cd /vagrant bundle exec rake jetty:start cd /vagrant/spec/internal bundle exec rails s
You may re-run the provisioning with
vagrant provision. This will
clean and re-create the Jetty installation. (So don't do it if you want to
preserve your Marmotta or Solr.) A future update will include more
specific configuration and update tasks.
Please see the notes in our automation project README regarding the use of this VM.
Using Guard for tests
Guard is configured with RSpec; you can run
guard to enable specs to run as
configured in the
krikri:install generator will install Blacklight.
Blacklight is known not to work well with
turbolinks, so you should
uninstall that if it's installed already:
Please observe the following guidelines:
- Write tests for your contributions.
- Document methods you add using YARD annotations.
- Follow the included style guidelines (i.e. run
- Use well formed commit messages.
Copyright & License
- Copyright Digital Public Library of America, 2014-2017
- License: MIT