Refactoring Methods and Tools for Rails Code?

14 views
Skip to first unread message

Michael Gerstenblatt

unread,
Nov 7, 2009, 2:30:25 PM11/7/09
to boston-r...@googlegroups.com
Hi All,
I'm just curiuos to know what popular methods and/or tools everyone use to analyze and refactor Rails code.

Any recommendations would be helpful.

Thanks,
Mike

Brian Cardarella

unread,
Nov 7, 2009, 4:48:14 PM11/7/09
to boston-r...@googlegroups.com
RubyMine from JetBrains claims to have a refactor suite built into
their IDE. I've tried RubyMine on two separate occasions (version 1
and the beta for version 2) Each time it has reminded me why I loathe
IDEs.

Personally, I've been relying upon Metric_Fu to point out things like
repeated code and cyclomatic complexity.

- Brian

Keenan Brock

unread,
Nov 7, 2009, 5:21:17 PM11/7/09
to boston-r...@googlegroups.com
+1 metric fu

Install as a gem. it was very tricky to vendor it.
Also install the reek and roodi gems.

It only has the following dependencies in the gem spec:flay, flog,
relevence-rcov, and mojombo-chronic.


My Rakefile has:

#add metric fu if it is available (rake metrics:all)
begin
require 'metric_fu'
MetricFu::Configuration.run do |config|
# config.metrics =
[:churn, :saikuro, :stats, :flog, :flay, :reek, :roodi, :rcov]
# config.graphs = [:flog, :flay, :reek, :roodi, :rcov]
config.rcov[:rcov_opts] << "-Itest"
end
rescue LoadError
end
Reply all
Reply to author
Forward
0 new messages