parent
96a6eb2cfe
commit
020c01a696
|
@ -13,16 +13,12 @@ request.
|
||||||
1. Now that you've cloned the repo, navigate to it and install dependencies by
|
1. Now that you've cloned the repo, navigate to it and install dependencies by
|
||||||
running:
|
running:
|
||||||
|
|
||||||
```
|
|
||||||
bundle install
|
bundle install
|
||||||
```
|
|
||||||
|
|
||||||
1. All tests should be passing, but it's a good idea to run them anyway
|
1. All tests should be passing, but it's a good idea to run them anyway
|
||||||
before starting any work:
|
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
|
1. If you're adding functionality or fixing a bug, you'll want to add a
|
||||||
failing test for the issue first.
|
failing test for the issue first.
|
||||||
|
@ -33,34 +29,42 @@ request.
|
||||||
run the tests again. Since you're probably working on a single file, you can
|
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:
|
run the tests for that file with the following command:
|
||||||
|
|
||||||
```
|
bundle exec appraisal <Appraisal name> rspec <path of test file to run>
|
||||||
appraisal 4.2 rspec <path of test file to run>
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also run unit tests by running `zeus start` in one shell, and then
|
You can find a list of valid Appraisals by running:
|
||||||
running the following in another:
|
|
||||||
|
bundle exec rake appraisal:list
|
||||||
|
|
||||||
|
(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:
|
In any case, to run the entire test suite again, say:
|
||||||
|
|
||||||
```
|
|
||||||
bundle exec rake
|
bundle exec rake
|
||||||
```
|
|
||||||
|
|
||||||
1. Finally, push to your fork and submit a pull request.
|
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
|
At this point, you're waiting on us. We may suggest some changes to make to your
|
||||||
requests within a few business days. We may suggest some changes to make to your
|
code to fit within the project style, or discuss alternate ways of addressing
|
||||||
code to fit with our [code style] or the project style, or discuss alternate
|
the issue in question. When we're happy with everything, we'll bring your
|
||||||
ways of addressing the issue in question. When we're happy with everything,
|
changes into master. Now you're a contributor!
|
||||||
we'll bring your changes into master. Now you're a contributor!
|
|
||||||
|
|
||||||
## Addendum: Setting up your environment
|
## 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
|
#### Debian/Ubuntu
|
||||||
|
|
||||||
|
@ -86,16 +90,3 @@ sudo su
|
||||||
curl -sL https://rpm.nodesource.com/setup | bash -
|
curl -sL https://rpm.nodesource.com/setup | bash -
|
||||||
yum install -y nodejs
|
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
Rakefile
7
Rakefile
|
@ -34,6 +34,13 @@ task :default do
|
||||||
end
|
end
|
||||||
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
|
Shoulda::Matchers::DocumentationTasks.create
|
||||||
|
|
||||||
task release: 'docs:publish_latest'
|
task release: 'docs:publish_latest'
|
||||||
|
|
Loading…
Reference in New Issue