#252 Metrics Metrics Metrics
Metric Fu, Metrical, SimpleCov, Rails Best Practices, and more are covered in this episode on metrics.
- Download:
- mp4Full Size H.264 Video (26.5 MB)
- m4vSmaller H.264 Video (14.7 MB)
- webmFull Size VP8 Video (24.2 MB)
- ogvFull Size Theora Video (35.7 MB)
Great screencast, Ryan. I'm looking forward to improving a project using metrical and your coverage was just what I needed to get started. Thanks!
uh...
I have failed to install this metrical...
git://gist.github.com/815652.git
it it so buggy?
https://gist.github.com/815652
@Alexander Open an Issue on Metrical
https://github.com/iain/metrical/issues
It's not a problem with Metrical, but with flog and Ruby 1.9 specific syntax.
Ryan said "I am running ruby 1.9". at 2:05. So it should be possible
@Alexander I'm having the same problem with virtually every rails app. For me it seems to be an issue with my system. Putting gem 'racc' in the Gemfile makes it work for me.
Great episode. Was so happy to see you mention something I already use, simplecov. But, I need to check out these others tools.
Thanks Ryan!
Oh its great! Best practices really help to refactor code learn something new. Thanx!
Is there a way to integrate cucumber tests into code coverage somehow? All my controllers are totally untested according to them :/
You just have to put the following lines at the top of your features/support/env.rb:
require 'simplecov'
SimpleCov.start 'rails'
Great tool - if only works...
Could you, Ryan, tell us how did you run it with Ruby 1.9.2 (if so)?
I'm talking about ruby_parser issue...
Thanks.
It's excellent.
It will lower project's code review cost.
Thank you Ryan.
By the way, adding
config.rcov[:rcov_opts] << "-Itest"
to MetricFu::Configuration got rcov working
Awesome video! I've been watching Railscasts for a long time now and while everything you do is great, this vid is double great.
Keep up the great work.
I know I'm asking this a long time after the screencast was made, but maybe I'll get lucky:
After struggling a bit with having this run with my ruby install, I have the following problem:
simplecov only check for the coverage of the files I have in lib/, even if rspec is indeed running all the tests (so testing classes and methods for all files in app/*/.rb).
Any idea what I need to configure in order to get this to run properly?
Cheers, and thanks for the video!
As it is now, metrical seems not to work anymore, I get following message when installing:
Are there alternatives to metrical?
There is a solution on how to resolve dependency.
So basically, you have to go to gemspec of metric_fu and change it from 0.3.0 to 0.6.4
Google it there is a better explanation of what I tried it roughly explain.
It is a great gem and hope you will enjoy reports provided by it.
I've revived the MetricFu project if you'd like to try the newest version and submit any issues there. Under active development.
Metrical is not maintained anymore, see this commit. According to Readme, it may still work when installed with Bundler and run with
bundle exec
. Revived MetricFu works like a charm, however I had to add it to Gemfilegem 'metric_fu', group: :metrics, require: false
and run withbundle exec
too.ruby_parser
could not be found otherwise.this is a horrible name for the rails cast. Maybe "code coverage metrics" would make more sense.
Just tried Metrical with a Rails 3.2.12 project and failed miserably. Found out that MetricFu had a new version, installed normally through Bundler and worked perfectly!
Does anyone have a comment about the recent states of MetricFu and SimpleCov?