Avalon Media System is an open source system for managing large collections of digital audio and video. The project is led by the libraries of Indiana University and Northwestern University with funding in part by a three-year National Leadership Grant from the Institute of Museum and Library Services.
For more information and regular project updates visit the Avalon blog.
Installation instructions are available on Avalon's documentation site:
Using Docker is the recommended method of setting up an Avalon Media System Development Environment. It can be completed in minutes without installing any dependencies beside Docker itself. It should be noted that the docker-compose.yml provided here is for development only and will be updated continually. All application settings should be set in config/settings.local.yml
so your local settings will not be overwritten by changes.
- Install Docker and docker-compose
git clone https://github.com/uhlibraries-digital/avalon.git
cd avalon
cp config/controlled_vocabulary.yml.example config/controlled_vocabulary.yml
docker-compose pull
docker-compose run --rm app yarn install
docker-compose run --rm app rake db:migrate
docker-compose run --rm app rake avalon:user:create avalon_username=smithj [email protected] avalon_groups=administrator
docker-compose up app worker
- Try loading Avalon in your browser:
localhost:3000
This instance of Avalon is setup to use SAML authentication. The development environment comes with a IDP Fake AzureAD with 2 users available. (NOTE: Fake AzureAD is not to be used in a production environment)
Administrator Account:
Username | Password |
---|---|
smithj | password |
Basic User Account:
Username | Password |
---|---|
doej | password |
To run tests, first bring up the test stack then run Rspec as usual:
docker-compose up test
docker-compose exec test bash -c "bundle exec rspec"
To run Cypress E2E tests, first bring up the development stack, manually create testing users, and then bring up the cypress container:
docker-compose up avalon
- Create the two testing users and one testing media object:
docker-compose exec avalon bash -c "bundle exec rake avalon:user:create [email protected] avalon_password=password avalon_groups=administrator"
docker-compose exec avalon bash -c "bundle exec rake avalon:user:create [email protected] avalon_password=password"
docker-compose exec avalon bash -c "bundle exec rake avalon:test:media_object id=123456789 collection=123456789"
docker-compose up cypress
In order to run eslint on javascript files to check prior to creating a pull request do the following:
- Install eslint globally, locally on dev machine:
npm install -g eslint
- Run
eslint app/assets/javascripts/ --ext .js,.es6
To maintain a consistent style of .js/.es6 code, the Prettier package should be used to clean up code before submitting a pull request.
- Install Prettier globally, locally on dev machine: (https://prettier.io/)
yarn global add prettier
ornpm install --global prettier
- (optional) To be safe, you may want to commit your code before running through Prettier.
- Run the
prettier
CLI command from the application root directory, for example:prettier --write "app/assets/javascripts/media_player_wrapper/*.es6"
- Commit your re-formatted, beautiful code.
Testing support for Avalon Media System is provided by BrowserStack.