« Return to Thread: Sharing: dont_repeat_yourself plugin, will report duplicate lines in your code!

Re: Sharing: dont_repeat_yourself plugin custom RSpec matcher

by Ashley Moran-4 :: Rate this Message:

Reply to Author | View in Thread


On 1 May 2008, at 16:00, 21croissants wrote:

> You're right and one of my next action will be to create a gem so it  
> can be
> use in any ruby project, I will keep the Rails plugin of course.

Cool, be sure to post here when you've gemified it :)


> At the moment, you can write :
>
> require ... specific your location ... +
> '/lib/dont_repeat_yourself/reporter'
>
> dry_reporter = DontRepeatYourself::Reporter.new
> dry_reporter.configure_simian_for_ruby_project("/home/jeanmichel/
> ruby/projects/dry-report/rails_plugin/vendor/plugins/
> dont_repeat_yourself")
> dry_reporter.html_rails_report
>
> It will generate the report (HTML, Textmate) in a file called
> DRY_report.html at the root folder of your rails app.
>
> I reckon this is not very handy - you need to create a Rails project  
> and
> install the plugin - but it will soon improve!


As a spoilt Rails developer I demand that everything written in Ruby  
works magically whatever I am doing :o)

This reminds me a bit of a time when I created a Rails project just to  
use AR migrations.  I think I'll wait for now until there is a gem  
version.

Just out of curiosity, have you run your DRY reporter against the  
Rails code itself?  Might be interesting to see the results...

Ashley


--
http://www.patchspace.co.uk/
http://aviewfromafar.net/



_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users

 « Return to Thread: Sharing: dont_repeat_yourself plugin, will report duplicate lines in your code!