Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Extra checks for cane
Ruby
branch: master
Failed to load latest commit information.
lib
spec fix some line lengths
.gitignore adda .gitignore file
.travis.yml add a travis config file
CHANGELOG prepare for release
Gemfile initial commit
README.rdoc rename NoMatchCheck to make intention clearer
Rakefile add specs
morecane.gemspec

README.rdoc

Morecane

What?

The cane gem provides a great framework for running quality checks over your ruby project as part of continuous integration build. It comes with a few checks out of the box, but also provides an API for loading custom checks.

This gem provides a set of additional checks that I use across my projects. Maybe you'll find the useful as well.

How?

Install this project like any rubygem:

gem install morecane

Or add it to your Gemfile:

gem 'morecane'

Then create a new rake task and load in the checks you require

require 'cane/rake_task'
require 'morecane'

desc "Run cane to check quality metrics"
Cane::RakeTask.new(:quality) do |cane|
  cane.use Morecane::EncodingCheck, encoding_glob: "{app,lib,spec}/**/*.rb"
end

Checks

Here is a list of the checks available in this gem and the options they take.

Morecane::EncodingCheck

Ensure files have a ruby encoding marker in the first two lines.

  • encoding_glob - a string to specify the files to check. You probably want something list “{app,lib,spec}/*/.rb”

Morecane::MustMatchCheck

Ensure files match a given regular expression.

  • must_match_glob - a string to specify the files to check. You probably want something list “{app,lib}/*/.rb”

  • must_match_regexp - a regular expression to check each file against

Morecane::MustNotMatchCheck

Ensure files do not match a given regular expression.

  • must_not_match_glob - a string to specify the files to check. You probably want something list “{app,lib}/*/.rb”

  • must_not_match_regexp - a regular expression to check each file against

Who?

This gem is written and maintained by James Healy <james@yob.id.au>

More?

For more information on cane, check out it's comprehensive README

https://github.com/square/cane
Something went wrong with that request. Please try again.