Skip to content

a Hydra application enabling deposit of digital objects into the Stanford Digital Repository for preservation and access.

Notifications You must be signed in to change notification settings

LynnMcRae/hydrus

 
 

Repository files navigation

Hydrus

A Hydra application enabling deposit of digital objects into the Stanford Digital Repository for preservation and access.

This code has dependencies on non-public code:


  • Stanford’s dor-services gem

  • Stanford’s sul-chrome gem

Getting your environment setup:

rvm install 1.9.3

git clone [email protected]:sul-dlss/hydrus.git
cd hydrus

bundle install

git submodule init
git submodule update

rake hydra:jetty:config

rake jetty:start

rake db:migrate
rake db:test:prepare
rake db:migrate RAILS_ENV=test

rake hydrus:loadfix
rake hydrus:loadfix RAILS_ENV=test

Starting the app

rake jetty:start
rails server

Go to http://localhost:3000

Default user

Note that you will need to be logged in to see any objects, since there is an authentication and permissions system preventing read access to the default fixtures. Login with the following default user:

username: [email protected]
password: beatcal

Developing

Recommended workflow:

0. Create a local working branch

git branch working

1. Go to your local working branch

git checkout working

- make changes -

git add -A
git commit -m ‘i did lots of cool stuff’

2. Get updates from remote server and switch back to the develop branch

git fetch git checkout develop

3a. If the git fetch pulled updates from the server, then:

git merge origin/develop git checkout working git rebase develop git checkout develop git merge working git push origin develop

If you get a conflict on the push to origin (last line), you’ll need to rebase your local changes on top of the remote branch:

git rebase origin/develop

And then repush:

git push origin develop

Skip step 3b and go to 4

3b. If from step 2 the git fetch didn’t pull any updates from the server, then:

git merge working git push origin develop

You can use “gitx —all” at any time to see the history of each branch.

4. When you’re ready to develop more code, go back to step 1. You can use multiple working branches if you are developing multiple features at once that you don’t want to mix together. Just create a different local branch and replace “working” above with your local branch name.

Useful commands

Using Rails console:

rails console

Dropping databases entirely:

rake db:drop:all

Most of the rake commands are environment specific, so they can be run in test environment by adding ‘RAILS_ENV=test’ to the end.

Migrating databases to the latest version (which will also set them up if they don’t exist, assuming you are using sqllite):

rake db:migrate

Fixtures:

rake hydrus:refreshfix # deletes and then reloads fixtures (most common)
rake hydrus:loadfix # loads fixtures (will fail if they exist)
rake hydrus:deletefix # deletes fixtures

Tests:

rake local_ci # run all tests (will shut down jetty, runs ‘rake ci’ task and then restart jetty)
rake rspec # just run rspec tests
open coverage/rcov/index.html # check your test coverage (won’t exist until tests run at least once)

App URLs:

http://localhost:3000

Local services provided by jetty, assuming it’s running (most will have both a development and a test instance):

http://localhost:8983/ # lists all services
http://localhost:8983/fedora/admin/ # fedora admin (username and password are “fedoraAdmin”)
http://localhost:8983/fedora/objects # find fedora objects
http://localhost:8983/solr/ # solr
http://localhost:8983/solr/development/select/ # show all solr index information

About

a Hydra application enabling deposit of digital objects into the Stanford Digital Repository for preservation and access.

Resources

Stars

Watchers

Forks

Packages

No packages published