A repository for depositing, managing, and discovering
Electronic Theses and Dissertations (ETDs).
Rosa Laevigata
or cherokee rose is the state flower of Georgia.
|
See the dotenv sample file for environment variables you may need to set in your development environment.
Laevigata depends on certain environment variables being set. In development mode, these can be set via a .env
file. You can see an example in dotenv.sample
. See also the dotenv project for more details about how this works. In production, values are set in a file called .env.production
. Expected values include:
BOX_EXPIRY_TIME_IN_MINTUTES
- minutes before box upload links will expire, defaults to 360RAILS_HOST
- used to generate urls in notification emailsACTION_MAILER_SMTP_ADDRESS
ACTION_MAILER_PORT
ACTION_MAILER_USER_NAME
ACTION_MAILER_PASSWORD
HONEYBADGER_API_KEY
BOX_OAUTH_CLIENT_ID
BOX_OAUTH_CLIENT_SECRET
FITS_PATH
LIBREOFFICE_PATH
UPLOAD_PATH
CACHE_PATH
DERIVATIVES_PATH
WORKING_PATH
FFMPEG_PATH
DATABASE_NAME
DATABASE_USERNAME
DATABASE_PASSWORD
PROQUEST_SFTP_HOST
PROQUEST_SFTP_USER
PROQUEST_SFTP_PASSWORD
PROQUEST_NOTIFICATION_EMAIL
REGISTRAR_DATA_PATH
- the file from which to load registrar data (e.g., for graduation status and dates)NEW_UI_ENABLED
(should be set to default to false in all .env files)
There are certain cron jobs that are expected to run in production. These include graduation job,
fixity audit, embargo expiration, and others. We use the whenever
gem to manage these.
If you need to make changes to the scheduled jobs, please update config/schedule.rb
and the new crontab should be installed via capistrano when the code is deployed.
Please note that in order to run as expected, the PATH must be defined: run crontab -e
as the deploy
user and
ensure these lines are at the top of your cron file:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
Please ensure that any scheduled jobs write to the rails log file so we can track whether they are running as expected.
If an email address is bouncing, or if someone prefers not to receive email notifications,
add the email address to the list in config/emory/do_not_send.yml
- Change to your working directory for new development projects
cd .
- Clone this repo
git clone https://github.com/curationexperts/laevigata.git
- Change to the application directory
cd laevigata
- Use set your ruby version to 2.4.2 and the gemset of your choice
eg.
rvm use --create 2.4.2@laevigata
- Install gem dependencies
bundle install
- Ensure you have
yarn
installed:brew install yarn
ornpm install -g yarn
- Install yarn dependencies
yarn install
- Start redis
redis-server &
note: use&
to start in the background, or run redis in a new terminal session - Setup environment variables for your development environment:
cp dotenv.sample .env.development
, see the Environment variables in development section for more details - Read the section on 'Database Authentication' below and decide if you want to set up your environment for database authentication.
- Start the demo server in its own terminal session
bin/rails hydra:server
- Start the webpack dev server
bin/webpack-dev-server
- Run the first time setup script
bin/setup
- Run the test suite
bin/rails ci
In production, we use Shibboleth exclusively for user authentication. However, authenticating to Shibboleth from your local development environment might not be feasible. Instead, you'll want to set up local database authentication.
To set your dev environment for database authentication, you need to set this environment variable:
export LAEVIGATA_DATABASE_AUTH=true
Each Emory school has its own AdminSet, which determines the approval process for that
school, and who can approve deposited ETDs. Running rake db:seed
will create an AdminSet for each school in the schools.yml file, load the appropriate workflow, and set permissions such that any registered user can deposit. rake db:seed
should be idempotent -- you can run it over and over again safely.
A "superuser" can manage all admin_sets, edit all ETDs, and approve submissions
everywhere. To create a new superuser, add the user's email address to the config/emory/superusers.yml
file. Then run rake db:seed
to reload the config. Until we get real authentication running, the password for all superusers is 123456
Note: Do not run bin/setup
except the very first time you setup the application, or if you need to wipe out everything in your development instance. It will wipe your database but leave your AdminSets in place, making a huge mess that you can't easily recover from.
If you want to be able to test against remote uploads, e.g., with Box, set up Browse everything locally:
- Go to
https://app.box.com/developers/console/newapp
and log in as yourself (this will be your personal developer account credentials) - Select 'custom application' and hit 'next'
- Select 'Standard OAuth 2.0 (User Authentication)' and hit 'next'
- Give your app a unique name (e.g., "laevigata-bess") and it will give you a url like:
curl https://api.box.com/2.0/folders/0 -H \
"Authorization: Bearer lCuEl1KbmQzIQut6HVFR3IlZ4TkAaCMK"
- Go to
https://app.box.com/developers/console
- Click on your app name, and then on the 'Configuration' tab on the left.
- In a box labeled OAuth 2.0 Credentials you will see your OAuth credentials. You'll need these.
- Set the
OAuth 2.0 Redirect URI
value tohttp://localhost:3000
(or where ever you run your local development instance) - Save changes
- Follow these instructions: https://github.com/samvera/browse-everything/wiki/Configuring-browse-everything
rails g browse_everything:config
- copy the
client_id
andclient_secret
from box into your newly createdconfig/browse_everything_providers.yml
file and uncomment thebox
section - The generator will try to add the BrowseEverything mount to your
config/routes.rb
file. This already exists in Laevigata, so remove the line it added. - Save everything and restart your rails server and you should be good to go!