GemLint¶ ↑
Sanity check your rubygems for common issues. Missing readmes, bundled pkg directories, encoding issues in the gemspec, etc.
Each test is classified as an error or warning. Errors are issues that (by my reading) violate the documented gem specs. Warnings are either best practices recommended by members of the community or arbitrary things that annoy me personally.
Usage¶ ↑
gem install gem-lint gem lint somefile-0.0.1.gem gem lint somefile-0.0.1.gem --detailed
API¶ ↑
To check a gem programmatically:
require "gem_lint" runner = GemLint::Runner.new("widgets-1.0.gem") puts runner.name puts runner.version puts runner.email puts runner.tags
Status¶ ↑
This a spike. It has few tests and is a proof of concept. Most of it was written at a Railscamp and therefore is probably of suspect quality.
Compatability¶ ↑
Rubygems 1.3.2 or greater is required, otherwise it’s pure ruby should run on most ruby VMs.
Developing¶ ↑
To add new checks, create a new strategy in lib/gem_lint/strategies with a matching spec in spec/strategies.
View other strategies for an idea of the required contract. There are existing specs to ensure all strategies confirm to the contract, so keep the full spec suit (using “rake”) green.
Full source is on github at github.com/yob/gem-lint
Ideas for new checks¶ ↑
-
improved handling of compiled extensions
-
files entry in spec not matching actual files in data
-
contains compiled .o files for wrong arch (check glib2 0.90.6 for example)