Sign inSign up

nulib/donut

By nulib

•Updated almost 5 years ago

Digital Repository / Northwestern University Toolkit

Image
0

7.8K

nulib/donut repository overview

⁠DONUT

Donut is a Hydra head based on Hyrax⁠

Build Status

⁠Dependencies

⁠Initial Setup

  • Clone the Donut GitHub repository

  • Install dependencies: bundle install

  • Run rake docker:dev:up in a separate tab to start solr, fedora, cantaloupe, and localstack

  • Setup the database: rake db:setup

  • Generate roles: rake generate_roles

  • Run rake donut:seed to initialize the stack.

    • Optional arguments to donut:seed (may be used in combination):
      • ADMIN_USER=[your NetID] ADMIN_EMAIL=[your email] to automatically add an admin user
      • SEED_FILE=[path to YAML file] to automatically add users and admin_sets. There is a sample seed file in spec/fixtures/files/test_seed.yml

⁠Running the Tests

Run the test suite:

$ rake donut:ci

You can run rubocop and the specs independently with:

$ rake donut:ci:rubocop
$ rake donut:ci:rspec

You may also want to run the Fedora and Solr servers in one window with:

$ rake docker:test:up

You'll need to run the SEED task for the test environment as well:

$ rake donut:seed RAILS_ENV=test

And run the test suite in another window:

$ rake spec
⁠Run the JavaScript tests

Run Jasmine server:

$ rake jasmine

Run all tests:

$ http://localhost:8888

Run the javascript test suite:

$ rake jasmine:ci
⁠Running the Batch importer from the command line
  • Run the rake donut:seed or rake s3:setup rake task to create and populate the S3 bucket
  • Run the importer from the application root directory with the command:
$ bin/import_from_s3 dev-batch sample.csv
⁠Running the tests for our new CSV importer work from hyrax

the active elastic job gem requires an environment variable to be set otherwise all the specs fail. so run this first:

$ export PROCESS_ACTIVE_ELASTIC_JOBS=true

⁠Notes on the Docker stack

  • You can replace up with daemon in docker:dev:up and docker:test:up to run the Docker services in the background instead of in a separate tab. To stop the stack, use (for example) rake docker:dev:down.
  • The test stack always cleans up its data when it comes down. To clean the dev stack, use rake docker:dev:clean.

⁠Adding an Admin user and assigning workflow roles

  1. Run the development servers with rake docker:dev:up (or daemon) and rails s
  2. Go to http://devbox.library.northwestern.edu/⁠ and login with OpenAM
  3. To make the user who logged in an admin, run rake donut:add_admin_role ADMIN_USER[your NetID]
  4. Go to http://devbox.library.northwestern.edu/admin/workflow_roles⁠ and grant workflow roles if needed

Tag summary

Content type

Image

Digest

Size

621 MB

Last updated

over 8 years ago

docker pull nulib/donut