mirror of
				https://github.com/thoughtbot/shoulda-matchers.git
				synced 2022-11-09 12:01:38 -05:00 
			
		
		
		
	Update CONTRIBUTING
[ci skip]
This commit is contained in:
		
							parent
							
								
									96a6eb2cfe
								
							
						
					
					
						commit
						020c01a696
					
				
					 2 changed files with 37 additions and 39 deletions
				
			
		| 
						 | 
				
			
			@ -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.
 | 
			
		||||
| 
						 | 
				
			
			@ -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 also run unit tests by running `zeus start` in one shell, and then
 | 
			
		||||
   running the following in another:
 | 
			
		||||
   You can find a list of valid Appraisals by running:
 | 
			
		||||
 | 
			
		||||
   ```
 | 
			
		||||
   zeus rspec <path of test file to run>
 | 
			
		||||
   ```
 | 
			
		||||
      bundle exec rake appraisal:list
 | 
			
		||||
 | 
			
		||||
   And to run the entire test suite again:
 | 
			
		||||
   
 | 
			
		||||
   ```
 | 
			
		||||
   bundle exec rake
 | 
			
		||||
   ```
 | 
			
		||||
   (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>
 | 
			
		||||
 | 
			
		||||
   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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -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
									
								
								Rakefile
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								Rakefile
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -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'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue