Skip to content

Commit

Permalink
Update CONTRIBUTING
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
mcmire committed Jan 24, 2018
1 parent 96a6eb2 commit 020c01a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 39 deletions.
69 changes: 30 additions & 39 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@ request.
1. Now that you've cloned the repo, navigate to it and install dependencies by
running:

```
bundle install
```
bundle install

1. All tests should be passing, but it's a good idea to run them anyway
before starting any work:

```
bundle exec rake
```

bundle exec rake

1. If you're adding functionality or fixing a bug, you'll want to add a
failing test for the issue first.
Expand All @@ -33,34 +29,42 @@ request.
run the tests again. Since you're probably working on a single file, you can
run the tests for that file with the following command:

```
appraisal 4.2 rspec <path of test file to run>
```
bundle exec appraisal <Appraisal name> rspec <path of test file to run>

You can find a list of valid Appraisals by running:

bundle exec rake appraisal:list

You can also run unit tests by running `zeus start` in one shell, and then
running the following in another:
(If you're familiar with Zeus, you can also run unit tests by running `zeus
start` in one shell, and then running the following in another:)

```
zeus rspec <path of test file to run>
```
zeus rspec <path of test file to run>

And to run the entire test suite again:

```
bundle exec rake
```
In any case, to run the entire test suite again, say:

bundle exec rake

1. 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!
At this point, you're waiting on us. We may suggest some changes to make to your
code to fit within 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!

## Addendum: Setting up your environment

### Installing dependencies (Linux only)
### Installing Ruby

shoulda-matchers is only compatible with Ruby 2.x. A `.ruby-version` is included
in the repo, so if you're using one of the Ruby version manager tools, then you
should be using (or have been prompted to install) the latest version of Ruby.
If not, you'll want to do that.

[working Ruby environment]: #addendum-setting-up-your-environment
[Code of Conduct]: https://thoughtbot.com/open-source-code-of-conduct
[execjs]: https://github.com/sstephenson/execjs

### Linux-specific instructions

#### Debian/Ubuntu

Expand All @@ -86,16 +90,3 @@ sudo su
curl -sL https://rpm.nodesource.com/setup | bash -
yum install -y nodejs
```

### Installing Ruby (all platforms)

shoulda-matchers is only compatible with Ruby 2.x. A `.ruby-version` is included
in the repo, so if you're using one of the Ruby version manager tools, then you
should be using (or have been prompted to install) the latest version of Ruby.
If not, you'll want to do that.

[working Ruby environment]: #addendum-setting-up-your-environment
[Code of Conduct]: https://thoughtbot.com/open-source-code-of-conduct
[code style]: https://github.com/thoughtbot/guides/tree/master/style
[execjs]: https://github.com/sstephenson/execjs
[install rvm]: https://rvm.io/rvm/install
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ task :default do
end
end

namespace :appraisal do
task :list do
appraisals = Tests::CurrentBundle.instance.available_appraisals
puts "Valid appraisals: #{appraisals.join(', ')}"
end
end

Shoulda::Matchers::DocumentationTasks.create

task release: 'docs:publish_latest'

0 comments on commit 020c01a

Please sign in to comment.