Project

preek

0.01
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Preek prints Ruby code smells in color, using Reek.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.3.0
~> 4.2.10
~> 3.1.0
~> 3.6.0

Runtime

~> 1.6.3
~> 0.18
 Project Readme

Gem Version Code Climate Build Status Dependency Status Coverage Status

Preek

For a pretty colorful output of Reek, which is an awesome gem! This is just something I came up with while learning Thor.
To make your refactoring life easier you can also use Guard::Preek!

Installation

$ gem install preek

From source

$ git clone git@github.com:joenas/preek.git
$ cd preek
$ rake install

Usage

CLI

Usage:
  preek FILE(S)|DIR

Options:
  -i, [--irresponsible]  # Include IrresponsibleModule smell in output.
  -c, [--compact]        # Compact output.
  -v, [--verbose]        # Report files with no smells

Commands:
  preek git                # Run Preek on git changes
  preek help [COMMAND]     # Describe available commands or one specific command
  preek smell FILE(S)|DIR  # Pretty format Reek output
  preek version            # Shows version

At the moment it only supports files, not stuff like this:

$ echo "def x() true end" | reek

Ruby

# Convenience method, prints all smells in files

filenames = Dir['**/*.rb']
Preek::Smell(filenames)

# To exclude certain smell classes

excludes = %w(IrresponsibleModule)
Preek::Smell(filenames, excludes)

Git

To run preek on your code before commit, place this in .git/hooks/pre-commit

#!/bin/sh
exec bundle exec preek git
0

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request