Flog is a tool used to check how awful your Ruby code is. Awful Ruby code should not make it through continuous integration. Add Flog as a step to your build process and make sure tortuous code doesn't make it in to production!
to your Gemfile (or Gemspec)
Install the Jenkins text-finder plugin.
Add the following step to your execute shell commands to be run on build:
find lib -name \*.rb | xargs bundle exec flog --score
Then add a post-build step on 'Jenkins Text Finder' which searches for this regex:
And tick 'succeed if found'
This will fail anything with a flog score of > 100.
(Hat tip to @samknight)