Hyrax::DOI

Code: CircleCI Code Climate

Docs: Contribution Guidelines Apache 2.0 License

Jump in: Slack Status

Hyrax-doi is a Hyrax plugin that provides tools for working with DOIs including model attributes, minting, and fetching descriptive metadata.

Compatibilty

Hyrax-doi is compatible with Hyrax 2.9+ and tested with a Hyrax 2.9.0 test application that mirrors the generated app used by Hyrax internally for testing.

Installation

Add this line to your application's Gemfile:

gem 'hyrax-doi'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hyrax-doi

Usage

Setup work type for hyrax-doi

Run the generator to add DOI support to a given work type:

rails g hyrax:doi:add_to_work_type MyWorkType

Development

Running Rake Tasks and Generators

When working on this engine rake tasks from Hyku can be run by prepending the app namespace (e.g. rake app:db:migrate). Generators provided by rails or other gems/engines can be run like normal from this engine's root (e.g. rails g job UbiquityExporter).

Development Server

To run a development server locally outside of docker do the following with each line in its own shell from the root of the engine:

solr_wrapper -v --config .solr_wrapper.yml
fcrepo_wrapper -v --config .fcrepo_wrapper.yml
bundle exec rails server -b 0.0.0.0

Testing

Tests are run automatically on CircleCI with rubocop and codeclimate. These tests must pass before pull requests can be merged.

To run the tests locally outside of docker do the following with each line in its own shell from the root of the engine:

solr_wrapper -v --config .solr_wrapper_test.yml
fcrepo_wrapper -v --config .fcrepo_wrapper_test.yml
bundle exec rspec

You shouldn't need to run anything from inside spec/internal_test_hyrax unless explicitly told to do so.