Use cases and system design information is at system spec
- Production: https://membership-system.herokuapp.com/swagger
- Development: http://localhost:3000/swagger
bundle # install gems
rails db:setup # create db and seed
rails s # start server in http://localhost:300
# postgres db
brew install postgresql
brew services start postgresql
docker-compose build
docker-compose up
docker-compose run web rake db:setup
docker-compose down
# after change Gemfile or Compose file, rebuild it
docker-compose up --build
docker-compose run web bundle install # sync changes to Gemfile.lock
# shell of containers
docker-compose run web sh
Reference: https://docs.docker.com/compose/rails
To ensure code style and quality, we use rubocop
to check style and rspec
to test. Install overcommit
to install git hook for you.
overcommit --install # add git hook tool
overcommit --sign # apply git hook. execute it after changing .overcommit.yml
Before committing, git hook run rubocop
. Before pushing, git hook run rspec
. Setting file is at .overcommit.yml
Ignore git hook: SKIP=RuboCop git commit
Basically follow git flow.
- Create a new branch to solve an issue in issues page.
- Open a Pull Request. Make sure CI test pass.
- After reviewing and approving, merge the Pull Request.
bundle exec rake
heroku login
git remote add heroku https://git.heroku.com/membership-system.git
git push heroku master
heroku open
Reference: https://devcenter.heroku.com/articles/getting-started-with-rails5