README.md in rubocop-rspec-1.0.rc2 vs README.md in rubocop-rspec-1.0.rc3

- old
+ new

@@ -1,7 +1,6 @@ -RuboCop RSpec -============= +# RuboCop RSpec [![Gem Version](https://badge.fury.io/rb/rubocop-rspec.png)](https://rubygems.org/gems/rubocop-rspec) [![Dependency Status](https://gemnasium.com/nevir/rubocop-rspec.png)](https://gemnasium.com/nevir/rubocop-rspec) [![Build Status](https://secure.travis-ci.org/nevir/rubocop-rspec.png?branch=master)](http://travis-ci.org/nevir/rubocop-rspec) [![Coverage Status](https://coveralls.io/repos/nevir/rubocop-rspec/badge.png?branch=master)](https://coveralls.io/r/nevir/rubocop-rspec) @@ -9,48 +8,71 @@ RSpec-specific analysis for your projects, as an extension to [RuboCop](https://github.com/bbatsov/rubocop). -Usage ------ +## Installation -Add it to your bundle, or environment, and then you can load it via: +Just install the `rubocop-rspec` gem ```bash +gem install rubocop-rspec +``` + +or if you use bundler put this in your `Gemfile` + +``` +gem 'rubocop-rspec' +``` + + +## Usage + +You need to tell RuboCop to load the RSpec extension. There are three +ways to do this: + +### RuboCop configuration file + +Put this into you `.rubocop.yml`. + +``` +require: rubocop-rspec +``` + +Now you can run `rubocop` and it will autmaticly load the RuboCop RSpec +cops together with the standard cops. + +### Command line + +```bash rubocop --require rubocop-rspec ``` -or as part of your rubocop rake task: +### Rake task ```ruby -Rubocop::RakeTask.new(:style) do |task| +RuboCop::RakeTask.new do |task| task.requires << 'rubocop-rspec' end ``` -The Cops --------- +## The Cops -**WARNING: Cop names are under flux and will likely change in the near future.** -We're hoping to -[introduce namespaces](https://github.com/bbatsov/rubocop/issues/1097) into the mix. - -All cops are located under [`lib/rubocop/cop`](lib/rubocop/cop), and contain +All cops are located under +[`lib/rubocop/cop/spec`](lib/rubocop/cop/rspec), and contain examples/documentation. -In your `.rubocop.yml`, you may treat the RSpec cops just like any other cop. -For example: +In your `.rubocop.yml`, you may treat the RSpec cops just like any other +cop. For example: ```yaml -RSpecFileName: +RSpec/FileName: Exclude: - spec/my_poorly_named_spec_file.rb ``` -License -------- +## License `rubocop-rspec` is MIT licensed. [See the accompanying file](MIT-LICENSE.md) for the full text.