Skip to content
A Rails application exposing Digital Object Registry functions as a RESTful HTTP API. Intended to be used as a replacement for the dor-services gem.
XSLT Ruby Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

CircleCI Coverage Status GitHub version Docker image OpenAPI Validator

DOR Services App

This Ruby application provides a REST API for DOR Services. There is a (OAS 3.0 spec)[] that documents the API in [openapi.json]. If you clone this repo, you can view this by opening [docs/index.html].


To generate an authentication token run rake generate_token on the prod server. This will use the HMAC secret to sign the token. It will ask you to submit a value for "Account". This should be the name of the calling service, or a username if this is to be used by a specific individual. This value is used for traceability of errors and can be seen in the "Context" section of a Honeybadger error. For example:

{"invoked_by" => "workflow-service"}

Seeding the staging environment

It's possible to clear out and re-seed the staging environment by using the following rake task:

./bin/rake delete_all_objects

This will load all the FOXML from

Developer Notes

DOR Services App is a Rails app.

Background Jobs

Dor Services App uses Sidekiq to process background jobs, which requires Redis. You can either install this locally, if running services locally, or run it via docker-compose. To spin up Sidekiq, run:

bundle exec sidekiq # use -d option to daemonize/run in the background

See the output of bundle exec sidekiq --help for more information.

Note that the application has a web UI for monitoring Sidekiq activity at /queues.

Running Tests

First, ensure the database container is spun up:

docker-compose up db # use -d to daemonize/run in background

And if you haven't yet prepared the test database, run:

RAILS_ENV=test rails db:test:prepare

To run the tests:

bundle exec rake

To run rubocop separately (auto run with tests):

bundle exec rake rubocop

Console and Development Server

Using Docker

First, you'll need both Docker and docker-compose installed.

Run dor-services-app and its dependencies using:

docker-compose up -d

Update Docker image

docker build -t suldlss/dor-services-app:latest .
docker push suldlss/dor-services-app:latest

Without Docker

First you'll need to setup configuration files to connect to a valid Fedora and SOLR instance. See the "config/settings.yml" file for a template. Create a folder called "config/settings" and then copy that settings.yml file and rename it for the environment you wish to setup (e.g. "config/settings/development.local.yml").

Edit this file to add the appropriate URLs. You may also need certs to talk to actual Fedora servers. Once you have this file in place, you can start your Rails server or console in development mode:

To spin up a local rails console:

bundle exec rails c

To spin up a local development server:

bundle exec rails s

You can’t perform that action at this time.