Skip to content

dailydrip/exchequer-server

Repository files navigation

Build Status

Exchequer Server

Exchequer is a unified transaction processing platform for Church of the Highlands. It is written in Ruby on Rails and backed by Postgres.

Setup

  • $ first set RAILS_MASTER_KEY in your environment
  • $ bundle install --deployment --path vendor/bundle
  • $ bundle exec rake db:setup
  • $ bundle exec rake db:test:prepare

Then to setup your local environment:

  • sign in via HighlandsAuth by going to http://localhost:3000/admin
  • You'll get redirected to the visitor index, but your local user will have been created.
  • in console, run User.last.update_attribute(:admin, true)
  • Now you can visit the admin at: http://localhost:3000/admin

To create a stack of local instances to work on

Environment Variables

To run this project, you'll need a handful of environment variables for the Highlands Auth gem.

SSO_KEY=""
SSO_SECRET=""
HIGHLANDS_AUTH_REDIRECT=""
HIGHLANDS_AUTH_SUPPORT_EMAIL=""
HIGHLANDS_SSO_EMAIL=""
HIGHLANDS_SSO_PASSWORD=""

Internally to this project we solely use Rails 5.1 Encrypted Secrets..

For each of development, test, and production environments, we set:

secret_key_base: foo
spreedly_environment: bar
spreedly_key: baz
spreedly_secret: bez
gateway_token: boz

Tests

We use Rubocop for Ruby linting, stylelint for CSS linting, rspec for unit tests, and spinach for integration tests. You can run all four simply by running rake or indivdually with the following commands:

  • $ bundle exec rubocop
  • $ bundle exec stylelint
  • $ bundle exec rspec
  • $ bundle exec spinach

Documentation

We are using rspec_api_documentation to test our API. To generate the docs, you can:

rake docs:generate

And it will be saved in: doc/api/index.{html,json}.

We are using apitome to visualize our docs.

About

Rails based centralized billing system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •