|
1 |
| -# Contributing |
| 1 | +# Contributing Guidelines |
2 | 2 |
|
3 |
| -Thank you for considering contributing to COVID Shield! |
| 3 | +Welcome, and thank you for considering contributing to COVID Shield! |
4 | 4 |
|
5 | 5 | We’d love to get your issues (if you find any bugs) and PRs (if you have any fixes)!
|
6 | 6 |
|
| 7 | +- [Code of Conduct](#code-of-conduct) |
| 8 | +- [Reporting Security Issues](#reporting-security-issues) |
| 9 | +- [Contributing](#contributing) |
| 10 | + - [Contributing Documentation](#contributing-documentation) |
| 11 | + - [Contributing Code](#contributing-code) |
| 12 | +- [Running COVID Shield](#running-covid-shield) |
| 13 | + - [From Scratch](#from-scratch) |
| 14 | + |
| 15 | +## Code of Conduct |
| 16 | + |
7 | 17 | First, please review this document and the [Code of Conduct](CODE_OF_CONDUCT.md).
|
8 | 18 |
|
9 |
| -## Contributing documentation and non-code changes |
| 19 | +## Reporting Security Issues |
| 20 | + |
| 21 | +COVID Shield takes security very seriously. In the interest of coordinated disclosure, |
| 22 | +we request that any potential vulnerabilities be reported privately in accordance with |
| 23 | +our [security policy](SECURITY.md). |
| 24 | + |
| 25 | +## Contributing |
| 26 | + |
| 27 | +### Contributing Documentation |
10 | 28 |
|
11 | 29 | If you'd like to contribute a documentation or static file change, please
|
12 |
| -feel free to fork the project in Github and open a PR from that fork against |
13 |
| -this repository. |
| 30 | +feel free to fork the project in Github and open a PR from that fork against this repository. |
| 31 | + |
| 32 | +### Contributing Code |
14 | 33 |
|
15 |
| -## Contributing code |
| 34 | +If you'd like to contribute code changes, the following steps will help you |
| 35 | +setup a local development environment. If you're a Shopify employee, `dev up` |
| 36 | +will install the above dependencies and `dev {console,test,etc.}` will work |
| 37 | +as you'd expect. |
16 | 38 |
|
17 |
| -If you'd like to contribute code changes, please first setup a local development |
18 |
| -environment following [the steps outlined in the README](README.md#local-development). |
| 39 | +If you're not at Shopify, please see below. |
19 | 40 |
|
20 | 41 | Once you're happy with your changes, please fork the repository and push your
|
21 | 42 | code to your fork, then open a PR against this repository.
|
| 43 | + |
| 44 | +## Running COVID Shield |
| 45 | + |
| 46 | +### From Scratch |
| 47 | + |
| 48 | +#### Prerequisites |
| 49 | + |
| 50 | +The setup steps expect the following tools to be installed on the system: |
| 51 | + |
| 52 | +* [Ruby](https://guides.rubyonrails.org/getting_started.html#installing-ruby) |
| 53 | +* [MySQL](https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/) |
| 54 | +* [Node.js](https://guides.rubyonrails.org/getting_started.html#installing-node-js-and-yarn) |
| 55 | +* [Rails](https://guides.rubyonrails.org/getting_started.html#creating-a-new-rails-project-installing-rails-installing-rails) |
| 56 | +* [COVID Shield Diagnosis Server](https://github.com/CovidShield/server) |
| 57 | + |
| 58 | +#### Running |
| 59 | + |
| 60 | +1. Check out the repository |
| 61 | + |
| 62 | +```bash |
| 63 | +git clone git@github.com:CovidShield/portal.git |
| 64 | +``` |
| 65 | + |
| 66 | +2. Update database.yml file |
| 67 | + |
| 68 | +Update the database.yml file with your MySQL configuration as required. |
| 69 | + |
| 70 | +3. Create and set up the database |
| 71 | + |
| 72 | +Run the following commands to create and set up the database. |
| 73 | + |
| 74 | +```ruby |
| 75 | +bundle exec rake db:create |
| 76 | +bundle exec rake db:setup |
| 77 | +bundle exec rake db:seed |
| 78 | +``` |
| 79 | + |
| 80 | +4. Start the Rails server |
| 81 | + |
| 82 | +You can start the rails server using the command given below (replacing the KEY_CLAIM_HOST to match your running diagnosis server config). |
| 83 | + |
| 84 | +```ruby |
| 85 | +KEY_CLAIM_HOST=localhost:8000 bundle exec rails s |
| 86 | +``` |
| 87 | + |
| 88 | +And now you can visit the site with the URL http://localhost:8000 |
| 89 | + |
| 90 | +The default username and password is `admin@covidshield.app` and `password`. |
0 commit comments