Ruby metrics plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID rubyMetrics Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
1.5.0
Mar 10, 2011
1.397
maven-plugin (version:1.397)
rake (version:1.7.3)
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
David Calavera (id: david_calavera)
Usage Installations 2013-Apr 1371
2013-May 1344
2013-Jun 1363
2013-Jul 1389
2013-Aug 1429
2013-Sep 1392
2013-Oct 1459
2013-Nov 1430
2013-Dec 1418
2014-Jan 1466
2014-Feb 1462
2014-Mar 1490

Ruby metric reports for Jenkins. Rcov, Rails stats, Rails notes and Flog.

Rcov support


Rcov plugin parses rcov html report files and shows it in Jenkins with a trend graph.

Once we've installed the rubyMetrics plugin, we have to introduce the output report directory into the job configuration:

 
 
If the build was successfuly, Jenkins generates the trend report and the graph:

 

 

 

Rails stats support

Once the plugin is installed we can publish rails stats reports checking the right option:

 Jenkins generates a report by each successful build and keeps an historic version while the project goes forward:

 

Rails notes support

Flog support

Flog measures code complexity. It shows you the most torturous code you wrote.

Check the right option in your job's configuration and add the directories that you want to monitorize, i.e app/models




AN ALTERNATIVE TO THIS PLUGIN: If you can't get this to work, see the guide I wrote at: Configuring a Rails build

Changelog

Version 1.5.0 (Mar 10, 2011)

  • Do not abort when the build is unstable.
  • Graphs for ratios, classes, loc; no upper bounds

Version 1.4.6 (Nov 27, 2010)

  • Fix notes chart
  • Use an expandable textbox to set the flog directories

Version 1.4.5 (Nov 18, 2010)

  • fix: Flog graph doesn't track over time

Version 1.4.4 (Oct 28, 2010)

  • Add rake version range

1.4.3
1.4.2
1.4.1

1.4 (05-01-2010)

  • Flog support added
  • Fixes rcov parser support issues

1.3 (30-10-2009)

  • Rails notes support added
  • Rails stats publisher allows to choose base directory.

1.2.3 (04-05-2009)

  • fixes some bugs.

1.2.2 (24-09-2008)

  • choose different rake version when we configure Rails stats publisher.
  • added rcov metrics configuration and health report.

1.2 (18-09-2008)

  • Rails stats support added
  • Refactored to use common classes

1.1 (12-09-2008)

  • Solves a bug with the rcov report percentages.

 Todo

  • Clean css and make the reports more user friendly 
  • Choose different rake version. Currently it chooses the default version, the Rake plugin should be modified in order to extract the versions select list to a template.

Labels

plugin-report plugin-report Delete
plugin-ruby plugin-ruby Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. May 05, 2009

    Karl Baum says:

    Getting the following exception when I try to install: java.io.IOException: Dep...

    Getting the following exception when I try to install:

    java.io.IOException: Dependency rake (1.5) doesn't exist
        at hudson.ClassicPluginStrategy.loadPluginDependencies(ClassicPluginStrategy.java:318)
        at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:183)
        at hudson.PluginManager.<init>(PluginManager.java:154)
        at hudson.model.Hudson.<init>(Hudson.java:541)
        at hudson.WebAppMain$2.run(WebAppMain.java:191)

    Hudson: 1.303
    Ruby: 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.6.0]
    Java: 1.5.0_16
    RubyMetrics: 1.2.3

    Anyone run into this one before?

    thx.

    1. Jan 18, 2010

      ebricey - says:

      I believe you need to install the Hudson Rake plugin .  I experienced a sim...

      I believe you need to install the Hudson Rake plugin .  I experienced a similar error on Windows after installing v1.4 of RubyMetrics; and installing v1.6.2 of the Rake plugin resolved the issue.  Hope this helps.

  2. Aug 27, 2010

    chris moscardini says:

    These are great. Thanks for the hard work. And of course I have a feature reques...

    These are great. Thanks for the hard work. And of course I have a feature request. It would be great if the flog plugin was configurable so that you could display/graph just the method complexities. Its hard to weed though the numbers since a single class with 100 methods could have the same score as a single class with one really complicated method.

  3. Oct 06, 2010

    Kevin Wolf says:

    Ruby metrics doesn't appear to be displaying rcov, rails stats or annotations ch...

    Ruby metrics doesn't appear to be displaying rcov, rails stats or annotations charted on 'unstable' builds.  For example if our defined coverage requirements aren't met, none of the charts are updated.  It also doesn't appear to update the actual coverage report (coverage/index.html).  Is this a known issue?  I didn't see anything open in JIRA.

    Thanks,

    Kevin.

  4. May 03, 2011

    Christian Höltje says:

    Does this support RVM? Or is that a non-issue?

    Does this support RVM? Or is that a non-issue?

  5. May 17, 2011

    Chris K. says:

    I want to report an issue, or actually an inconvenience, and I hope for a soluti...

    I want to report an issue, or actually an inconvenience, and I hope for a solution :)

    When  I run rake spec through Jenkins and some tests fail, then rubyMetrics gives outpu: Build faild, skipping rcov coverage report. I edited rubyMetrics source code and made it to not to skip coverage report on fail and compiled it and it works, but: the coverage trend chart created by rubyMetrics and rcov is not up to date.

    What I mean is that when I go to job/my_job/rcov it redirects me to for example /job/my_job/100/rcov/? where 100 is my latestSuccessfull build and my last buid is for example 120 but it fails.

    Even though my last build fails (because some rspec tests fail) I want the chart in main job page to display lastBuild chart and not lastSuccessfulBuild chart and the link to rcov report to redirect to LastBuild data and NOT lastSuccessfulBuild data.

    I've been searching through  rubyMetrics source code the whole day and found nothing.

    Please anyone help me? How can I override Jenkins or rubyMetrics to show me the chart of lasteBuild when I am on a job page (ie. /job/my_job/)

    Thanks in advance for any help!!

  6. Aug 27, 2011

    Brian Shaver says:

    I'm using RVM, Rails 3.0.3, Ruby 1.9.2p180. I'd tried to get this plugin working...

    I'm using RVM, Rails 3.0.3, Ruby 1.9.2p180. I'd tried to get this plugin working initially for Rails stats output, and had no luck. It would run and act like it was running the stats after build step, but never captured any output. Eventually I turned it on for flog and rcov and they did generate some results. I kept trying different tweaks of the configuration, thinking it was RVM that was getting in the way somehow.

    When I was just about to throw in the towel for this plugin, I installed metric_fu ( version 1.5.1 ) to try a different plugin for gathering Ruby metrics. This gem installs a bunch of other dependencies. When I checked after the next build, it had actually collected the stats and annotations as requested.

    So my suspicion is there is a hidden, or at least not documented dependency on something metric_fu installed.

    But its working great now. Thanks!