Nou blouweþ þe niwe frut . þat late bygan to springe
Þat to is kind eritage . mankunne schal bringe
The Digital SEL API the Rails backend of the Digital SEL, a digital humanities project whose aim is to provide a sophisticated, interactive digital edition of the South English Legendary, an important collection of Middle English saints' lives from the Middle Ages.
For more information about the project see the Digital SEL Blog. For a very very early version of the project (written before the maintainer was a software engineer) see the DigitalSEL.org.
If you are new to development and need help, please feel free to reach out to me via Twitter @william_ellet.
- RVM
- Ruby 2.4.4
- Rails 5.2.0
- PostgreSQL
If you are not sure about how to install the prerequisites, follow this guide.
Set the appropriate environment variables:
cp .env.example .env
In development, the relavant variables to set are DSEL_DB
, DEVISE_JWT_SECRET_KEY
, and RAILS_MASTER_KEY
. The values can be arbitrary, but to use the development database snapshot, set DSEL_DB
to dsel_development
.
If you do not have Ruby 2.4.4 apparent in rvm list
, do rvm install 2.4.4
.
Then do gem install bundler
.
Next, do bundle install
.
After you have your database server running, create and migrate the database:
rails db:create
rails db:migrate
Run the server:
rails s
rspec
rubocop
Download the latest vulnerability data
bundle-audit check --update
Run bundle-audit
bundle-audit
Though database state is not important to the software, it is very important to the project.
Make a snapshot of the database:
Run
make ENV=development snapshot
or copy and paste
pg_dump --no-acl --no-owner --clean dsel_development | gzip > dsel_development`date -u +'%Y-%m-%dT%H-%M-%SZ'`.sql.gz
Restore a snapshot of the database:
gunzip -c $FILENAME | psql dsel_development
A maintianed Postman collection of the API may be found in /postman
. Set the environment variable
base_url
to https://api.digitalsel.com
to use the collection against production.