-
Notifications
You must be signed in to change notification settings - Fork 66
Project Setup
Note: The following assumes you have a ruby development environment setup on your local machine.
- GitHub Account
- Git
- Ruby v2.3.3
- Rails 4.2.3
Forking the project creates a copy of the code base which you can modify without affecting the main code base. Once you are satisfied with your changes, you can make a pull request to the main repository.
Visit the project homepage on GitHub https://github.com/AgileVentures/MetPlus_PETS Fork the project by clicking the Fork button on the top-right hand corner. Wait while the repository is being forked. All done!
Now that you have a fork of the project, copy the URL for the repository (just below the sidebar on the right) and clone the project using Git:
$ cd to/some/directory
$ git clone https://github.com/<your-github-username>/MetPlus_PETS.git
You also need to configure remote to point to the main project repository in order to get latest updates. (This will be required at a later stage when submitting your features)
$ cd MetPlus_PETS
$ git remote add upstream https://github.com/AgileVentures/MetPlus_PETS.git
$ bundle install --without production
Sensitive or secret information (e.g. email server credentials) are maintained in this file:
config/application.yml
That file will not be present in the environment because it is not maintained in git and thus is not pulled down from github. Contact one of the project members to get the contents of that file (for example via private message in Slack).
$ bundle exec rake db:migrate
$ bundle exec rake db:seed
See "Note" below regarding subsequent updates to the database.
$ bundle exec rspec
$ bundle exec rake cucumber
Discuss any errors with the team.
NOTE REGARDING TESTING JAVASCRIPT: You will need to install chromedriver so that cucumber tests that use javascript can run successfully.
-
See https://sites.google.com/a/chromium.org/chromedriver/downloads
-
Working in a Cloud9 environment
$ bundle exec rails s
$ bundle exec rake jobs:work
(we use delayed_job gem for processing certain actions asynchronously - such as sending emails. This process scans the associated DB table for jobs periodically and processes those jobs)
We use waffle (from Github) for issues and story tracking. To be added as a collaborator to waffle (so you can take ownership of a story, for example), please provide your Github user name to João Pereira on slack (joaopereira) and ask to be added as a collaborator.
- Updating the database - updates to the development DB (after the first described above) should be performed with this command:
rake db:drop db:migrate db:seed
This is because some of the migration files actually add records to the DB. These need to be present for the seeding to work. (that is, rake db:reset
will not work because it does not actually run the migration files, but simply reloads the DB schema from db/schema.rb).
You can find some solutions on this page