This README documents the steps necessary to get the application up and running.
- ...
Install Ruby 2.5.1 (Check the version specified in the .ruby-version file, in case this readme is stale).
Example instructions for rbenv
installed through Homebrew on Mac:
brew update
brew upgrade rbenv
brew upgrade ruby-build
rbenv install 2.5.1
Install language-specific package dependencies
bundle install # Ruby gems
yarn install # Node modules
There are two primary ways of running the CAP app:
- Running the CAP app and all dependencies locally using Docker, or...
- Running only the CAP app and redis, and using an existing environment such as Integration as an API backend.
In order to run against Preint environment: https://github.com/ca-cwds/env-store/blob/master/envs/county-admin/.env.development.local
- Create a
.env
file and copy its body from the CWDS env-store repo's county-admin/.env.development.local (the repo is private, for CWDS developers usage only). - Run local instance of Redis (
docker-compose up redis
orredis-server
if you have it installed) - Run CAP application:
- Run Rails (
rails s
), and the webpack dev server (yarn start
or./bin/webpack-dev-server
). - OR Run rails and webpack dev sever using single comamnd
yarn dev
, which runs the Procfile.dev with foreman, so make sure foreman utility is installed on your machine. You can quickly install foreman usinggem install foreman
at CAP root folder. Please do not include the foreman gem in the Gemfile
- Run Rails (
You will need a full .env file for this. Copy it from the CWDS env-store repo's .env (the repo is private, for CWDS developers usage only).
In the .env file, update your DEV_IP value to represent your network IP address, for Perry redirection.
Once you have your .env file next to the docker-compose.yml file, start up your dependency applications by running:
docker-compose up
Then run Rails (rails s
) and the webpack development server (yarn start
or ./bin/webpack-dev-server
). OR Run rails and webpack dev sever using single comamnd yarn dev
, which runs the Procfile.dev with foreman, so make sure foreman utility is installed on your machine. You can quickly install foreman using gem install foreman
at CAP root folder. Please do not include the foreman gem in the Gemfile.
To run the React test suite with watcher:
yarn test
and a one-time run with coverage
yarn test:coverage
Other commands:
yarn test:rspec # runs Rspec unit tests
yarn test:jest # just the jest react tests
yarn lint
If you have any questions regarding the contents of this repository, please email the Office of Systems Integration at FOSS@osi.ca.gov.