Showing posts with label plugin. Show all posts
Showing posts with label plugin. Show all posts

28 March 2008

DRY

At last, my first Rails plugin!

  • generates a report of duplicate lines in your code to help you to follow the DRY principle


  • integrates nicely withand


  • integrates with :

# With RSpec
it { rails_application.
with_threshold_of_duplicate_lines(4).
should be_DRY }

# With Test::Unit
assert_DRY(ruby_code_in_rails_plugin("dont_repeat_yourself"))

To start playing:

ruby script/plugin install http://dryplugin.rubyforge.org/svn/vendor/plugins/dont_repeat_yourself/
rake dry:report:html
or rake dry:report:textmate if you're an happy mac user

If you want to contribute, please use the git repository:
http://github.com/garnierjm/dry-report/tree/master/rails_plugin/vendor/plugins/dont_repeat_yourself/

The doc:

Your FeedBACK is more than welcome! Post a comment in this blog or contact me

Cool DRY logo by CodeSmack (Please send me the t-shirt guys!)


Based on Simian (Similarity Analyser) by Simon Harris from RedHill Consulting, see http://www.redhillconsulting.com.au/products/simian/
Copyright (c) 2003-08 RedHill Consulting Pty. Ltd. All rights reserved.