Permalink
Browse files

merge jscruggs master branch

  • Loading branch information...
1 parent 94b32f1 commit 7ccc20442ddeb9d0c2e103232f5b3039ac63ba91 @flyerhzm flyerhzm committed Jan 1, 2011
Showing with 3,972 additions and 3,028 deletions.
  1. +2 −0 .gitignore
  2. +64 −3 HISTORY
  3. +1 −1 MIT-LICENSE
  4. +29 −0 README
  5. +0 −3 README.textile
  6. +5 −5 Rakefile
  7. +3 −6 TODO
  8. +12 −0 config/roodi_config.yml
  9. BIN home_page/hotspot.gif
  10. +101 −61 home_page/index.html
  11. BIN home_page/reek.gif
  12. BIN home_page/roodi.gif
  13. BIN home_page/stats.gif
  14. +36 −14 lib/base/base_template.rb
  15. +52 −0 lib/base/churn_analyzer.rb
  16. +97 −0 lib/base/code_issue.rb
  17. +41 −27 lib/base/configuration.rb
  18. +50 −0 lib/base/flay_analyzer.rb
  19. +43 −0 lib/base/flog_analyzer.rb
  20. +22 −27 lib/base/generator.rb
  21. +15 −10 lib/base/graph.rb
  22. +66 −0 lib/base/line_numbers.rb
  23. +85 −0 lib/base/location.rb
  24. +404 −0 lib/base/metric_analyzer.rb
  25. +34 −0 lib/base/ranking.rb
  26. +43 −0 lib/base/rcov_analyzer.rb
  27. +116 −0 lib/base/reek_analyzer.rb
  28. +9 −9 lib/base/report.rb
  29. +37 −0 lib/base/roodi_analyzer.rb
  30. +48 −0 lib/base/saikuro_analyzer.rb
  31. +29 −0 lib/base/scoring_strategies.rb
  32. +37 −0 lib/base/stats_analyzer.rb
  33. +102 −0 lib/base/table.rb
  34. +11 −73 lib/generators/churn.rb
  35. +6 −9 lib/generators/flay.rb
  36. +59 −128 lib/generators/flog.rb
  37. +52 −0 lib/generators/hotspots.rb
  38. +0 −6 lib/generators/rails_best_practices.rb
  39. +70 −31 lib/generators/rcov.rb
  40. +3 −7 lib/generators/reek.rb
  41. +2 −7 lib/generators/roodi.rb
  42. +78 −62 lib/generators/saikuro.rb
  43. +30 −14 lib/generators/stats.rb
  44. +17 −2 lib/graphs/engines/bluff.rb
  45. +49 −11 lib/graphs/engines/gchart.rb
  46. +6 −8 lib/graphs/flay_grapher.rb
  47. +28 −11 lib/graphs/flog_grapher.rb
  48. +1 −1 lib/graphs/grapher.rb
  49. +7 −8 lib/graphs/rails_best_practices_grapher.rb
  50. +6 −8 lib/graphs/rcov_grapher.rb
  51. +15 −17 lib/graphs/reek_grapher.rb
  52. +6 −8 lib/graphs/roodi_grapher.rb
  53. +20 −0 lib/graphs/stats_grapher.rb
  54. +11 −3 lib/metric_fu.rb
  55. +2 −2 lib/templates/awesome/awesome_template.rb
  56. +40 −1 lib/templates/awesome/churn.html.erb
  57. +16 −0 lib/templates/awesome/css/default.css
  58. +0 −1 lib/templates/awesome/css/integrity.css
  59. +3 −2 lib/templates/awesome/flay.html.erb
  60. +19 −17 lib/templates/awesome/flog.html.erb
  61. +54 −0 lib/templates/awesome/hotspots.html.erb
  62. +5 −2 lib/templates/awesome/index.html.erb
  63. +1 −1 lib/templates/awesome/rails_best_practices.html.erb
  64. +1 −1 lib/templates/awesome/rcov.html.erb
  65. +1 −1 lib/templates/awesome/roodi.html.erb
  66. +3 −3 lib/templates/awesome/saikuro.html.erb
  67. +11 −1 lib/templates/awesome/stats.html.erb
  68. +1 −1 lib/templates/javascripts/bluff-min.js
  69. +35 −19 lib/templates/javascripts/excanvas.js
  70. +1 −1 lib/templates/javascripts/js-class.js
  71. +2 −2 lib/templates/standard/churn.html.erb
  72. +4 −4 lib/templates/standard/default.css
  73. +4 −4 lib/templates/standard/flay.html.erb
  74. +28 −24 lib/templates/standard/flog.html.erb
  75. +54 −0 lib/templates/standard/hotspots.html.erb
  76. +2 −2 lib/templates/standard/index.html.erb
  77. +2 −2 lib/templates/standard/rails_best_practices.html.erb
  78. +2 −2 lib/templates/standard/rcov.html.erb
  79. +1 −1 lib/templates/standard/reek.html.erb
  80. +2 −2 lib/templates/standard/roodi.html.erb
  81. +4 −4 lib/templates/standard/saikuro.html.erb
  82. +2 −2 lib/templates/standard/stats.html.erb
  83. +21 −25 metric_fu.gemspec
  84. +1 −1 spec/base/base_template_spec.rb
  85. +47 −40 spec/base/configuration_spec.rb
  86. +10 −31 spec/base/generator_spec.rb
  87. +41 −4 spec/base/graph_spec.rb
  88. +62 −0 spec/base/line_numbers_spec.rb
  89. +9 −9 spec/base/report_spec.rb
  90. +16 −127 spec/generators/churn_spec.rb
  91. +41 −40 spec/generators/flay_spec.rb
  92. +58 −226 spec/generators/flog_spec.rb
  93. +52 −0 spec/generators/rails_best_practices_spec.rb
  94. +180 −0 spec/generators/rcov_spec.rb
  95. +21 −13 spec/generators/reek_spec.rb
  96. +24 −0 spec/generators/roodi_spec.rb
  97. +7 −7 spec/generators/saikuro_spec.rb
  98. +6 −6 spec/generators/stats_spec.rb
  99. +8 −4 spec/graphs/engines/bluff_spec.rb
  100. +151 −10 spec/graphs/engines/gchart_spec.rb
  101. +35 −16 spec/graphs/flay_grapher_spec.rb
  102. +76 −13 spec/graphs/flog_grapher_spec.rb
  103. +61 −0 spec/graphs/rails_best_practices_grapher_spec.rb
  104. +35 −16 spec/graphs/rcov_grapher_spec.rb
  105. +44 −25 spec/graphs/reek_grapher_spec.rb
  106. +35 −16 spec/graphs/roodi_grapher_spec.rb
  107. +68 −0 spec/graphs/stats_grapher_spec.rb
  108. +33 −0 spec/resources/line_numbers/foo.rb
  109. +11 −0 spec/resources/line_numbers/module.rb
  110. +15 −0 spec/resources/line_numbers/module_surrounds_class.rb
  111. +11 −0 spec/resources/line_numbers/two_classes.rb
  112. +2 −2 spec/resources/saikuro/index_cyclo.html
  113. +424 −346 spec/resources/yml/20090630.yml
  114. +1 −0 spec/resources/yml/metric_missing.yml
  115. +2 −4 spec/spec.opts
  116. +4 −4 tasks/metric_fu.rake
  117. BIN vendor/_fonts/monaco.ttf
  118. +0 −142 vendor/saikuro/SAIKURO_README
  119. +0 −1,219 vendor/saikuro/saikuro.rb
View
@@ -2,3 +2,5 @@
previous_failures.txt
tmp/*
*metric_fu-*.gem
+*.html_complexity.*
+scratch_directory/
View
@@ -1,3 +1,64 @@
+=== MetricFu 2.0.2 / ???
+
+* Flog gemspec version was >= 2.2.0, which was too early and didn't work. Changed too >= 2.3.0 - Chris Griego
+
+=== MetricFu 2.0.1 / 2010-11-13
+
+* Delete trailing whitespaces - Delwyn de Villiers
+* Stop Ubuntu choking on invalid multibyte char (US-ASCII) - Delwyn de Villiers
+* Fix invalid next in lib/base/metric_analyzer.rb - Delwyn de Villiers
+* Don't load Saikuro for Ruby 1.9.2 - Delwyn de Villiers
+* Fixed a bug reported by Andrew Davis on the mailing list where configuring the data directory causes dates to be 0/0 - Joshua Cronemeyer
+
+=== MetricFu 2.0.0 / 2010-11-10
+
+* Hotspots - Dan Mayer, Ben Brinckerhoff, Jake Scruggs
+* Rcov integration with Hotspots - Jake Scruggs, Tony Castiglione, Rob Meyer
+
+=== MetricFu 1.5.1 / 2010-7-28
+
+* Patch that allows graphers to skip dates that didn't generate metrics for that graph (GitHub Issue #20). - Chris Griego
+* Fixed bug where if you try and use the gchart grapher with the rails_best_practices metric, it blows up (GitHub Issue #23). - Chris Griego
+* Fixed 'If coverage is 0% metric_fu will explode' bug (GitHub Issue #6). - Stew Welbourne
+
+=== MetricFu 1.5.0 / 2010-7-27
+
+* Fixed bug where Flay results were not being reported. Had to remove the ability to remove selected files from flay processing (undocumented feature that may go away soon if it keeps causing problems).
+* Rewrote Flog parsing/processing to use Flog programmatically. Note: the yaml output for Flog has changed significantly - Pages have now become MethodContainers. This probably doesn't matter to you if you are not consuming the metric_fu yaml output.
+* Added support for using config files in Reek and Roodi (roodi support was already there but undocumented).
+* Removed verify_dependencies! as it caused too much confusion to justify the limited set of problems it solved. In the post Bundler world it just didn't seem necessary to limit metric_fu dependencies.
+* Deal with Rails 3 activesupport vs active_support problems. - jinzhu
+
+=== MetricFu 1.4.0 / 2010-06-19
+
+* Added support for rails_best_practices gem - Richard Huang
+* Added rails stats graphing -- Josh Cronemeyer
+* Parameterize the filetypes for flay. By default flay supports haml as well as rb and has a plugin ability for other filetypes. - bfabry
+* Support for Flog 2.4.0 line numbers - Dan Mayer
+* Saikuro multi input directory patch - Spencer Dillard and Dan Mayer
+* Can now parse rcov analysis file coming from multiple sources with an rcov :external option in the config. - Tarsoly András
+* Fixed open file handles problem in the Saikuro analyzer - aselder, erebor
+* Fix some problems with the google charts - Chris Griego
+* Stop showing the googlecharts warning if you are not using google charts.
+
+=== MetricFu 1.3.0 / 2010-01-26
+
+* Flay can be configured to ignore scores below a threshold (by default it ignores scores less than 100)
+* When running Rcov you can configure the RAILS_ENV (defaults to 'test') so running metric_fu doesn't interfere with other environments
+* Changed devver-construct (a gem hosted by GitHub) development dependency to test-construct dependency (on Gemcutter) - Dan Mayer
+* Upgrade Bluff to 0.3.6 and added tooltips to graphs - Édouard Brière
+* Removed Saikuro from vendor and added it as a gem dependency - Édouard Brière
+* Churn has moved outside metric_fu and is now a gem and a dependency - Dan Mayer
+* Fix 'activesupport' deprecation (it should be 'active_support') - Bryan Helmkamp
+* Declared development dependencies
+* Cleaned and sped up specs
+
+=== MetricFu 1.2.0 / 2010-01-09
+
+* ftools isn't supported by 1.9 so moved to fileutils.
+* Overhauled the graphing to use Gruff or Google Charts so we no longer depend on ImageMagick/rmagick -- thanks to Carl Youngblood.
+* Stopped relying on Github gems as they will be going away.
+
=== MetricFu 1.1.6 / 2009-12-14
* Now compatible with Reek 1.2x thanks to Kevin Rutherford
@@ -110,7 +171,7 @@
=== MetricFu 0.7.0 / 2008-09-11
-* Merged in Sean Soper's changes to metric_fu.
+* Merged in Sean Soper's changes to metric_fu.
* Metric_fu is now a gem.
* Flogging now uses a MD5 hash to figure out if it should re-flog a file (if it's changed)
* Flogging also has a cool new output screen(s)
@@ -145,15 +206,15 @@
=== Metricks 0.1.0 / 2008-06-10
* Initial integration of metric_fu and my enhancements to flog
- * Metrics are generated but are all over the place
+ * Metrics are generated but are all over the place
=== MetricFu 0.6.0 / 2008-05-11
* Add source control churn report
=== MetricFu 0.5.1 / 2008-04-25
-* Fixed bug with Saikuro report generation
+* Fixed bug with Saikuro report generation - thanks Toby Tripp
=== MetricFu 0.5.0 / 2008-04-25
View
@@ -1,4 +1,4 @@
-Copyright (c) 2008,2009 Jake Scruggs
+Copyright (c) 2008,2009,2010 Jake Scruggs
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
View
@@ -0,0 +1,29 @@
+See http://metric-fu.rubyforge.org/ for documentation, or the HISTORY file for a change log.
+
+How to contribute:
+
+1. Fork metric_fu on github.
+2. 'gem install metric_fu' #to get gem dependencies
+3. Install the gems RSpec 1.3.0, test-construct, and googlecharts
+4. Run the tests ('rake')
+5. Run metric_fu on itself ('rake metrics:all')
+6. Make the changes you want and back them up with tests.
+7. Make sure two important rake tests still run ('rake' and 'rake metrics:all')
+8. Commit and send me a pull request with details as to what has been changed.
+
+Extra Credit:
+1. Make sure your changes work in 1.8.7, Ruby Enterprise Edition, and 1.9.1 (Hint use 'rvm' to help install multiple rubies)
+2. Post to the Google group explaining what you did and why you did it (I don't merge things in immediately so others might want to use what you've done).
+3. Update the documentation (web page inside the 'home_page' folder)
+4. Update the History and give yourself credit.
+
+
+The more of the above steps you do the easier it will be for me to merge in which will greatly increase you chances of getting your changes accepted.
+If you want to do something really radical (which will touch over %30 of all the files) you might what to ask the Google group first to see if anyone is interested in your change before you spend a lot of time on it.
+
+Resources:
+Homepage: http://metric-fu.rubyforge.org/
+Github: http://github.com/jscruggs/metric_fu
+Google Group: http://groups.google.com/group/metric_fu
+Issue Tracker: http://github.com/jscruggs/metric_fu/issues
+My Blog: http://jakescruggs.blogspot.com/
View
@@ -1,3 +0,0 @@
-h1. flyerhzm-metric_fu
-
-rails_best_practices gem has been merged into official metric_fu gem, please upgrade to metric_fu 1.4.0 to enjoy the rails_best_practices. "http://github.com/jscruggs/metric_fu":http://github.com/jscruggs/metric_fu
View
@@ -1,3 +1,4 @@
+$LOAD_PATH << '.'
require 'rake'
require 'rake/rdoctask'
require 'spec/rake/spectask'
@@ -6,13 +7,12 @@ require 'lib/metric_fu'
desc "Run all specs in spec directory"
Spec::Rake::SpecTask.new(:spec) do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
- t.rcov = true
- t.rcov_opts = ['--exclude', 'spec,config,Library,usr/lib/ruby']
- t.rcov_dir = File.join(File.dirname(__FILE__), "tmp")
end
MetricFu::Configuration.run do |config|
- config.template_class = AwesomeTemplate
+ config.roodi = config.roodi.merge(:roodi_config => 'config/roodi_config.yml')
+ config.churn = { :start_date => "1 year ago", :minimum_churn_count => 10}
+ config.hotspots = { :start_date => "1 year ago", :minimum_churn_count => 10}
end
-task :default => [:"metrics:all"]
+task :default => :spec
View
@@ -1,9 +1,6 @@
== TODO list
* Color code flog results with scale from: http://jakescruggs.blogspot.com/2008/08/whats-good-flog-score.html
-* Integrate Flog, Saikuro, and Coverage into one report so you can see methods that have high complexity and low coverage (this is a big one)
-* Update flog specs so that they actually run flog
-* Add flay specs that run flay
-* Convert readme to markdown and rename to README.mkdn so github will render it
-* Saikuro.rb falls over if tries to parse an empty file. Fair enough. We shouldn't feed it empty files
-* Make running metric_fu on metric_fu less embarrassing
+* Make running metric_fu on metric_fu less embarrassing
+* Load all gems at config time so you fail fast if one is missing
+
@@ -0,0 +1,12 @@
+CaseMissingElseCheck: { }
+ClassLineCountCheck: { line_count: 300 }
+ClassNameCheck: { pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/ }
+CyclomaticComplexityBlockCheck: { complexity: 4 }
+CyclomaticComplexityMethodCheck: { complexity: 8 }
+EmptyRescueBodyCheck: { }
+ForLoopCheck: { }
+MethodLineCountCheck: { line_count: 20 }
+MethodNameCheck: { pattern: !ruby/regexp /^[_a-z<>=\[\]|+-\/\*`]+[_a-z0-9_<>=~@\[\]]*[=!\?]?$/ }
+ModuleLineCountCheck: { line_count: 300 }
+ModuleNameCheck: { pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/ }
+ParameterNumberCheck: { parameter_count: 5 }
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit 7ccc204

Please sign in to comment.