A portal for leasing agents, sales agents, and developers to manage listings.
- Use Ruby 2.5.3 (Set the version using RVM or rbenv)
- Install Bundler for this version of Ruby
gem install bundler -v 2.0.2 - Use Node v12.1.x (npm v6.9.x) — If you need to manage multiple Node versions on your dev machine, install NVM and run
nvm use - Install Yarn (if you have Homebrew you can run
brew install yarn) - Run
yarn install - Run
bundle install- see here if you have issues installing
pggem with Postgres.app, you may need to use:gem install pg -v 0.21.0 -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config
- see here if you have issues installing
- Run
rails g dahlia_data_models:installto generate database migrations - Setup your local database by running
rails db:create && rails db:migrate - Run
overcommit --install - Run
gem install foreman
- Run
foreman start -f Procfile.development - Access the app at http://localhost:3000/
grunt
To lint Ruby code run: rubocop
To lint the React code run: yarn lint
bundle exec rake spec
yarn test:unit
Updating snapshots
If you made a legitimate change in the view and a snapshot fails then you have to tell Jest to update the snapshots. Run:
yarn test:unit -u
Note: Snapshots should be pushed to the repo
To view the e2e tests as they're running, set HEADLESS to false in this file
Run tests
yarn rails-server-test to start the test server.
yarn test:e2e to run the e2e tests.
yarn rails-teardown-test to stop the test server.
To run all tests (unit and e2e):
yarn test:all
To run an individual test:
yarn test:all path/to/test