Skip to content

uohull/hyhull

Repository files navigation

Hydra at Hull

Hydra project at the University of Hull. This is the hyhull repo based upon the latest the hydra software, for more information about the Hydra project see:-

hydra project site: http://projecthydra.org/
hydra gem: https://github.com/projecthydra/hydra
hydra-head gem: https://github.com/projecthydra/hydra-head

Important information

If you are interesting in trying hyhull in your own environment, we recommend that you use the ‘community’ branch. The community branch includes a few small changes to make setting up hyhull much easier, for example CAS based authentication is replaced with simple DB auth.

Please see Community branch

Code Status

Installation/Setup

Installation Prerequisites

git clone https://github.com/uohull/hyhull.git

Change the current directory to “hyhull”

Install hydra-jetty. Note, jetty has been added to hyhull as a git submodule (this may take several minutes):

git submodule init
git submodule update

Install the dependencies by running:

bundle install

The database

Migrate the database

rake db:migrate

Seed the database with the pre-defined Repo roles (contentAccessTeam, staff, student etc..).

Note: At the end of db/seeds.rb there is sample code to add users to the ‘People’ table and roles to the ‘Roles’ tables. This is important if there is need to walk through sample logins in development mode.
To seed the data…

rake db:seed

Jetty

Configure jetty:

rake hydra:jetty:config

hyhull includes full text indexing. The necessary solr libraries are not included with Jetty as default, copy to solr using:

rake hyhull:config:solr_text_extraction

hyhull also makes use of the saxon xslt processor (generally bundled with fedora-commons) to generate metadata different schemas from the mods source metadata. To include the required war and context file, use:

rake hyhull:config:saxon_xslt_engine

Then start jetty:

rake jetty:start

Load some sample data:

rake hyhull:default_fixtures:refresh

Start the webserver

rails s

You should now be able to see the application at: http://localhost:3000/

Irus Analytics

hyhull currently uses the “irus_analytics” library to send statistics to the IRUS-UK service (see https://github.com/uohull/irus_analytics. The configuration for IRUS is stored in config/initializers/irus_analytics.rb. The customisations to enable download analytics are specified in app/controllers/assets_controller.rb.

To start the resque workers for this, we run:

QUEUE=irus_analytics rake resque:work

The resque console is available at “http://localhost:3000/resque”

Testing

The quickest way to test is to run this task

rake hyhull:test

If you prefer a more manual approach, start by loading fixtures:

Migrate and seed the database

RAILS_ENV=test rake db:migrate
RAILS_ENV=test rake db:seed

Then you can run specs:

rake spec

And cucumber features:

rake cucumber:ok