Once env variables are set up:
rackup config.ru
Tax Tribunal Downloader requires several environment variables to be set in order to run:
The Blob Storage container where the uploads will be stored.
You will need to get credentials from the azure portal
Enter the container names provided or create new containers in the Azure Portal container list
The access key for the MoJ Single Sign On server (MOJ SSO).
The secret key for the MOJ SSO.
The URI of the MOJ SSO.
The orgainisation given sign on rights on the MOJ SSO.
The role given permission to download documents on the MOJ SSO.
The full URI, including path, of the callback endpoint the Tax Tribunal
Downloader app (the path should normally be /oauth/callback
).
A callback parameter required by the OAuth2 get_token
method. It does
not have any application here, but is otherwise required.
Only needed in production environments to report unhandled exceptions to Sentry. If variable is not set, Sentry reporting will be disabled.
They are picked up automatically by the azure-storage-blob
gem if you use the environment
variables set in env.example
.
To set the required environment variables for testing, just copy
.env.example
to .env
and run your tests. It uses the dotenv
gem,
which is setup and scoped to spec_helper.rb
. See the note regarding Azure
credentials, above, as well.
It is easiest to work on this app against a locally running copy of
moj-sso
. The .env.example
already has settings for doing this with
a copy of moj-sso
running on port 5000 of your localhost. Once you
have set up moj-sso
, you will need to create an appropriate role to
associate with your app (.env.example
assumes viewer
) and add users.
Follow the directions on the moj-sso
repo to do so.