|
1 | 1 | # Contributing
|
2 | 2 |
|
3 |
| -1. Fork it |
4 |
| -2. Create your feature branch (`git checkout -b my-new-feature`) |
5 |
| -3. Add your tests |
6 |
| -4. Add your feature or bugfix |
7 |
| -5. Run the tests. We only accept pull requests with passing tests. |
8 |
| -6. Commit your changes (`git commit -am 'Add some feature'`) |
9 |
| -7. Make sure your changes adhere to the |
| 3 | +We love pull requests. Here's a quick guide: |
| 4 | + |
| 5 | +1. Fork the repo. |
| 6 | +2. Run the tests. We only take pull requests with passing tests, and it's great |
| 7 | + to know that you have a clean slate: `bundle && rake` |
| 8 | +3. Add a test for your change. Only refactoring and documentation changes |
| 9 | + require no new tests. If you are adding functionality or fixing a bug, we need |
| 10 | + a test! |
| 11 | +4. Make the test pass. |
| 12 | +5. Make sure your changes adhere to the |
10 | 13 | [thoughtbot Style Guide](https://github.com/thoughtbot/guides/tree/master/style)
|
11 |
| -8. Push to the branch (`git push origin my-new-feature`) |
12 |
| -9. Create new Pull Request |
| 14 | +6. Push to your fork and submit a pull request. |
| 15 | +7. At this point you're waiting on us. We like to at least comment on, if not |
| 16 | + accept, pull requests within three business days (and, typically, one business |
| 17 | + day). We may suggest some changes or improvements or alternatives. |
| 18 | + |
| 19 | +## Increase your chances of getting merged |
| 20 | + |
| 21 | +Some things that will increase the chance that your pull request is accepted, |
| 22 | +taken straight from the Ruby on Rails guide: |
| 23 | + |
| 24 | +1. Use Rails idioms and helpers |
| 25 | +2. Include tests that fail without your code, and pass with it |
| 26 | +3. Update the documentation, the surrounding one, examples elsewhere, guides, |
| 27 | + whatever is affected by your contribution |
| 28 | +4. Syntax: |
| 29 | + * Two spaces, no tabs. |
| 30 | + * No trailing whitespace. Blank lines should not have any space. |
| 31 | + * Prefer `&&`/`||` over `and`/`or`. |
| 32 | + * `MyClass.my_method(my_arg)` not `my_method( my_arg )` or `my_method my_arg`. |
| 33 | + * `a = b` and not `a=b`. |
| 34 | + * Follow the conventions you see used in the source already. |
| 35 | +5. And in case we didn't emphasize it enough: we love tests! |
0 commit comments