Setup dependencies and run the test suite:
$ bundle install
$ rake db:migrate
You can run the Fedora and Solr servers in one window with:
$ rake hydra:test_server
And run the test suite in another window:
$ rake spec
You can then run rubocop with:
$ rubocop
Or may also use the following rake task to do everything at once (rubocop/setup test servers/run rspec):
$ rake hydranorth:ci
This is not ideal and hopefully a temporary solution. But currently in development you must host your own shibboleth service provider (SP) and connect with http://testshib.org Identiy Provider (IdP) (or use another IdP of your choice) to use authentication in this application. To set this up you can do the following:
$ sudo apt-get install apache2
)$ sudo apt-get install libapache2-mod-shib2
)$ sudo gem install passenger
and $ sudo apt-get install libapache2-mod-passenger
and configure it accordingly. (You can use $ passenger-install-apache2-module
to configure on Ubuntu)Change apache config to get it all working together. My config file looks something like the following:
<VirtualHost *:80>
ServerName 129.128.46.172
DocumentRoot /directory/of/Code/Hydranorth2/public
RailsEnv development
<Location />
Allow from all
Options -MultiViews
Require all granted
</Location>
<Location /Shibboleth.sso>
SetHandler shib-handler
PassengerEnabled off
</Location>
<Location /auth/CCID/callback>
AuthType shibboleth
ShibRequestSetting requireSession 1
ShibUseHeaders On
Require valid-user
</Location>
Alias /shibboleth-sp /usr/share/shibboleth
<Location /shibboleth-sp>
Satisfy any
</Location>
# ... etc #
</VirtualHost>
Some helpful links for more information:
You can build docker image for Hydranorth2 following precedure below. There is a copy of ualibraries/hydranorth2 image that can be pulled from dockerhub
docker build -t ualibraries/hydranorth2 .