2014-10-16 15:59:07 +00:00
|
|
|
We love contributions from the community! Here's a quick guide to making a pull
|
2015-04-03 02:04:18 +00:00
|
|
|
request.
|
2012-03-19 00:39:15 +00:00
|
|
|
|
2015-04-03 02:04:18 +00:00
|
|
|
## Overview
|
2015-03-15 22:16:18 +00:00
|
|
|
|
2015-04-15 15:57:03 +00:00
|
|
|
0. If you haven't contributed before, please read and understand the [Code of
|
|
|
|
Conduct].
|
|
|
|
|
2012-03-19 00:39:15 +00:00
|
|
|
1. Fork the repo.
|
|
|
|
|
2015-03-15 22:16:18 +00:00
|
|
|
2. Install [dependencies](#installing-dependencies).
|
|
|
|
|
|
|
|
3. Run the tests. We only take pull requests with passing tests, and it's great
|
2014-01-20 18:35:10 +00:00
|
|
|
to know that you have a clean slate: `bundle && bundle exec rake`
|
2012-03-19 00:39:15 +00:00
|
|
|
|
2015-03-15 22:16:18 +00:00
|
|
|
4. If you're adding functionality or fixing a bug, add a failing test for the
|
2014-10-16 15:59:07 +00:00
|
|
|
issue first.
|
2012-03-19 00:39:15 +00:00
|
|
|
|
2015-03-15 22:16:18 +00:00
|
|
|
5. Make the test pass.
|
2012-03-19 00:39:15 +00:00
|
|
|
|
2015-04-03 02:04:18 +00:00
|
|
|
6. Finally, push to your fork and submit a pull request.
|
2012-03-19 00:39:15 +00:00
|
|
|
|
2014-10-16 15:59:07 +00:00
|
|
|
At this point you're waiting on us. We try to respond to issues and pull
|
|
|
|
requests within a few business days. We may suggest some changes to make to your
|
|
|
|
code to fit with our [code style] or the project style, or discuss alternate
|
|
|
|
ways of addressing the issue in question. When we're happy with everything,
|
|
|
|
we'll bring your changes into master. Now you're a contributor!
|
2012-03-19 00:39:15 +00:00
|
|
|
|
2015-04-03 02:04:18 +00:00
|
|
|
## Installing Dependencies
|
2015-03-15 22:16:18 +00:00
|
|
|
|
2015-04-03 02:04:18 +00:00
|
|
|
### On Debian/Ubuntu-based systems
|
2015-03-15 22:16:18 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
sudo apt-get install -y ruby-dev libpq-dev libsqlite3-dev nodejs
|
|
|
|
```
|
|
|
|
|
|
|
|
Ubuntu, as of 14.04, ships with Ruby 1.9.2. shoulda-matchers is only compatible
|
|
|
|
with Ruby 2, so use your Ruby version manager of choice to install the latest
|
|
|
|
version of Ruby (2.2.1 at the time of this writing).
|
|
|
|
|
|
|
|
```
|
|
|
|
# RVM
|
|
|
|
rvm install 2.2
|
|
|
|
rvm use 2.2
|
|
|
|
|
|
|
|
# rbenv
|
|
|
|
rbenv install 2.2.1
|
2015-04-03 02:04:18 +00:00
|
|
|
rbenv shell 2.2.1
|
2015-03-15 22:16:18 +00:00
|
|
|
```
|
|
|
|
|
2015-04-03 02:04:18 +00:00
|
|
|
### On RedHat-based systems
|
2015-03-15 22:16:18 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
sudo yum install -y ruby-devel postgresql-devel sqlite-devel zlib-devel
|
|
|
|
```
|
|
|
|
|
|
|
|
Also, install one of the JavaScript runtimes supported by [execjs]. For
|
|
|
|
instance, to install node.js:
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo su
|
|
|
|
curl -sL https://rpm.nodesource.com/setup | bash -
|
|
|
|
yum install -y nodejs
|
|
|
|
```
|
|
|
|
|
2015-04-15 15:57:03 +00:00
|
|
|
[Code of Conduct]: https://thoughtbot.com/open-source-code-of-conduct
|
2014-10-16 15:59:07 +00:00
|
|
|
[code style]: https://github.com/thoughtbot/guides/tree/master/style
|
2015-03-15 22:16:18 +00:00
|
|
|
[execjs]: https://github.com/sstephenson/execjs
|
|
|
|
[install rvm]: https://rvm.io/rvm/install
|