« 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 21croissants :: Rate this Message:

Reply to Author | View in Thread

thanks for your feedback Ashley.

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.

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!

JM

Ashley Moran-4 wrote:
Sounds good!  Any reason why you wrote it as a Rails plugin though?  
This could be used for any ruby project... except mine of course, I  
never copy and paste, honest :o)

Ashley

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