1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
thoughtbot--shoulda-matchers/CONTRIBUTING.md
2015-04-15 11:10:21 -06:00

1.9 KiB

We love contributions from the community! Here's a quick guide to making a pull request.

Overview

  1. If you haven't contributed before, please read and understand the Code of Conduct.

  2. Fork the repo.

  3. Install dependencies.

  4. Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean slate: bundle && bundle exec rake

  5. If you're adding functionality or fixing a bug, add a failing test for the issue first.

  6. Make the test pass.

  7. Finally, push to your fork and submit a pull request.

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!

Installing Dependencies

On Debian/Ubuntu-based systems

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
rbenv shell 2.2.1

On RedHat-based systems

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