-
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.2.2
- 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 FIREFOX FOR CUCUMBER TESTS: You will need firefox version 46.x or below for cucumber tests (that use javascript) to run successfully.
-
Download FF46.0.1 and extract the compressed firefox to a directory of your choice. Download for:
-
include an environment variable called
FIREFOX_BINARY_PATH
in your.bashrc
file. The environmental is the absolute path to the firefox executable:export FIREFOX_BINARY_PATH="/path/to/extracted/firefox"
-
When you download FF, you may have to turn off auto-updates - that is, FF may be installed by default to automatically look for - and install - updates upon starting. You can turn this off in FF preferences - select the option "Never check for updates (not recommended: security risk)". Note also that you may have an issue with FF auto-updating its version when you start it - before you can turn off auto-update. In this case, we have been able to defeat the auto-update by deleting or renaming the executable that performs the auto-update. If you have this problem, contact the team and we will sort it out.
-
Working in a Cloud9 environment
$ bundle exec rails s
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