This is the repository for the Green Commons project.
branch | environment | remote | URL |
---|---|---|---|
master |
production | git@heroku.com:greencommons.git |
greencommons.net |
Note: Pushing to master
will auto-deploy to production.
We follow thoughtbot's git guide to determine the development workflow.
You can install most of the above with Homebrew. For Postgres, @ptrikutam uses Postgres.app but you're welcome to set it up however you like.
Clone the repo and run the setup script:
git clone git@github.com:greencommons/commons.git
cd commons
./bin/setup
To start the app locally run the command (make sure postgres is running):
foreman start -f Procfile.dev
You should be able to visit http://localhost:3000/ within your browser and see the Green Commons homepage.
You will need to run the following while you have foreman running in another terminal window, otherwise you will get ElasticSearch errors:
rake elasticsearch:create:all_indices
You can optionally use guard-livereload
to refresh the page automatically
when you've saved changes to a file.
Run
bundle exec guard
and be sure to install the appropriate browser extension
listed in the gem's README.md
.
Anything added, created, or deleted in the Resource
model will automatically be indexed in ElasticSearch. If you'd like to recreate the index for any reason, you can use the following rake task:
bundle exec rake elasticsearch:reset_resource_index
This will delete the index and re-import all the records in the resources table.
We test using rspec/rspec-rails. You can run the test suite by running:
bundle exec rake
We should update gems regularly for security and bugfix reasons.
We use a tool called bummr to update the dependencies for us.
It will update each gem individually, then run the tests and if any fail,
use git bisect
to figure out which one is the problem.
Every week or so, run this command:
bummr update
See ETL.md for more information.
See API.md for more information.