- Ruby 59.3%
- Haml 27.5%
- CSS 5.8%
- JavaScript 3.9%
- SCSS 2.3%
- Other 1.2%
| app | Fixed meal validation | |
| bin | ||
| config | Added household tab in member profile page | |
| db | Added registration_deadline column to meals | |
| deploy | ||
| doc | ||
| lib | ||
| public | ||
| spec | ||
| storage | ||
| vendor | ||
| .dockerignore | ||
| .gitattributes | ||
| .gitignore | ||
| .mise.toml | ||
| .rspec | ||
| .rubocop.yml | ||
| .ruby-version | ||
| .tool-versions | ||
| Capfile | ||
| config.ru | ||
| Gemfile | ||
| Gemfile.lock | ||
| LICENSE | ||
| Procfile | ||
| Rakefile | ||
| README.md | ||
Treehouse
This Rails application provides services used by members of the Treehouse Village Ecohousing community.
Development setup
-
Set up your local environment using
asdf. Alternatively, feel free to skip the following and install Ruby, Postgresql and NodeJS manually.To set up your environment with
asdf:- Install asdf locally.
- Make sure you install dependencies needed for the asdf Postgres plugin.
- If you're a Debian-based distro user, you may also want to add the
following package:
libpq-dev.
- Install all
asdfplugins needed for this project, get all needed gems and setup your local database by running the following:
bin/dev_setup -
At this point, your local database will be setup for the application. It's time to seed it:
bundle exec rails db:seed -
Finally, start your server to access the app by running:
foreman startThe app is now available at http://localhost:3000. To log in with an admin, use
admin@example.com. Otherwise, useuser@example.com. The password for both these accounts ispassword.
Tests
To run all tests:
bundle exec rspec
Deployments
To deploy main to home.treehousevillage.ca, simply run the following from
the project root:
bin/deploy
This script will first run all tests, and if no test fails, then it will proceed with the deployment.
What if something is broken after deployment?
No worries! Take a deep breath then run the following command from the project root:
bundle exec cap production deploy:rollback
This will revert to the previous deployed revision (side note: the last 5 deployment revisions are kept on the server).
After this rollback has taken effect and you've checked that everything is working again, please consider writing a test will cover this scenario.
Maintenance mode
On the server:
touch ~/maintenance_is_enabled
Remove the file to leave maintenance mode.