iain-metric_fu 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Manifest CHANGED
@@ -46,6 +46,7 @@ lib/templates/awesome/css/integrity.css
46
46
  lib/templates/awesome/css/reset.css
47
47
  lib/templates/awesome/css/default.css
48
48
  lib/templates/awesome/index.html.erb
49
+ lib/templates/awesome/stats.html.erb
49
50
  lib/templates/awesome/churn.html.erb
50
51
  lib/templates/awesome/flay.html.erb
51
52
  lib/templates/awesome/flog.html.erb
@@ -55,7 +56,6 @@ lib/templates/awesome/rcov.html.erb
55
56
  lib/templates/awesome/reek.html.erb
56
57
  lib/templates/awesome/roodi.html.erb
57
58
  lib/templates/awesome/saikuro.html.erb
58
- lib/templates/awesome/stats.html.erb
59
59
  lib/templates/standard/churn.html.erb
60
60
  lib/templates/standard/default.css
61
61
  lib/templates/standard/flay.html.erb
@@ -98,6 +98,6 @@ tasks/metric_fu.rake
98
98
  vendor/_fonts/monaco.ttf
99
99
  vendor/saikuro/SAIKURO_README
100
100
  vendor/saikuro/saikuro.rb
101
- Rakefile
102
101
  Manifest
103
102
  metric_fu.gemspec
103
+ Rakefile
data/Rakefile CHANGED
@@ -18,8 +18,8 @@ end
18
18
  task :default => [:"metrics:all"]
19
19
 
20
20
  require 'echoe'
21
- Echoe.new('metric_fu', '0.1.0') do |p|
22
- p.description = "A fist of metrics for Ruby"
21
+ Echoe.new('metric_fu', '0.1.1') do |p|
22
+ p.description = "A fist full of code metrics"
23
23
  p.url = "http://metric-fu.rubyforge.org"
24
24
  p.author = "J. Scruggs and more"
25
25
  p.email = "iain@iain.nl"
@@ -8,7 +8,7 @@ module MetricFu
8
8
  AVAILABLE_METRICS = [:churn, :flog, :flay, :reek,
9
9
  :roodi, :saikuro, :rcov]
10
10
 
11
- AVAILABLE_GRAPHS = [:flog, :flay, :reek, :roodi, :rcov, :stats]
11
+ AVAILABLE_GRAPHS = [:flog, :flay, :reek, :roodi, :rcov]
12
12
 
13
13
  # The @@configuration class variable holds a global type configuration
14
14
  # object for any parts of the system to use.
@@ -164,7 +164,11 @@ module MetricFu
164
164
  end
165
165
 
166
166
  def set_graphs
167
- @graphs = MetricFu::AVAILABLE_GRAPHS
167
+ if rails?
168
+ @graphs = MetricFu::AVAILABLE_GRAPHS + [:stats]
169
+ else
170
+ @graphs = MetricFu::AVAILABLE_GRAPHS
171
+ end
168
172
  end
169
173
 
170
174
  # Add the 'app' directory if we're running within rails.
@@ -12,9 +12,11 @@ module MetricFu
12
12
  end
13
13
 
14
14
  def get_metrics(metrics, date)
15
- self.lines_of_test.push(metrics[:stats][:testLOC])
16
- self.lines_of_code.push(metrics[:stats][:codeLOC])
17
- self.labels.update( { self.labels.size => date })
15
+ if metrics.has_key?(:stats)
16
+ self.lines_of_test.push(metrics[:stats][:testLOC])
17
+ self.lines_of_code.push(metrics[:stats][:codeLOC])
18
+ self.labels.update( { self.labels.size => date })
19
+ end
18
20
  end
19
21
 
20
22
  def graph!
data/metric_fu.gemspec CHANGED
@@ -2,21 +2,21 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{metric_fu}
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["J. Scruggs and more"]
9
- s.date = %q{2009-08-22}
10
- s.description = %q{A fist of metrics for Ruby}
9
+ s.date = %q{2009-08-23}
10
+ s.description = %q{A fist full of code metrics}
11
11
  s.email = %q{iain@iain.nl}
12
- s.extra_rdoc_files = ["README", "TODO", "lib/base/base_template.rb", "lib/base/generator.rb", "lib/base/graph.rb", "lib/base/md5_tracker.rb", "lib/base/report.rb", "lib/base/configuration.rb", "lib/generators/churn.rb", "lib/generators/flay.rb", "lib/generators/flog.rb", "lib/generators/rcov.rb", "lib/generators/reek.rb", "lib/generators/roodi.rb", "lib/generators/saikuro.rb", "lib/generators/stats.rb", "lib/graphs/flay_grapher.rb", "lib/graphs/flog_grapher.rb", "lib/graphs/grapher.rb", "lib/graphs/rcov_grapher.rb", "lib/graphs/reek_grapher.rb", "lib/graphs/roodi_grapher.rb", "lib/graphs/stats_grapher.rb", "lib/metric_fu.rb", "lib/templates/awesome/awesome_template.rb", "lib/templates/awesome/css/buttons.css", "lib/templates/awesome/css/integrity.css", "lib/templates/awesome/css/reset.css", "lib/templates/awesome/css/default.css", "lib/templates/awesome/index.html.erb", "lib/templates/awesome/churn.html.erb", "lib/templates/awesome/flay.html.erb", "lib/templates/awesome/flog.html.erb", "lib/templates/awesome/js/sorttable.js", "lib/templates/awesome/layout.html.erb", "lib/templates/awesome/rcov.html.erb", "lib/templates/awesome/reek.html.erb", "lib/templates/awesome/roodi.html.erb", "lib/templates/awesome/saikuro.html.erb", "lib/templates/awesome/stats.html.erb", "lib/templates/standard/churn.html.erb", "lib/templates/standard/default.css", "lib/templates/standard/flay.html.erb", "lib/templates/standard/flog.html.erb", "lib/templates/standard/index.html.erb", "lib/templates/standard/rcov.html.erb", "lib/templates/standard/reek.html.erb", "lib/templates/standard/roodi.html.erb", "lib/templates/standard/saikuro.html.erb", "lib/templates/standard/standard_template.rb", "lib/templates/standard/stats.html.erb", "tasks/metric_fu.rake"]
13
- s.files = ["HISTORY", "MIT-LICENSE", "README", "TODO", "home_page/back_all.jpg", "home_page/churn.gif", "home_page/flay.gif", "home_page/flog.gif", "home_page/footer.gif", "home_page/header.jpg", "home_page/img09.gif", "home_page/index.html", "home_page/rcov.gif", "home_page/reek.gif", "home_page/roodi.gif", "home_page/saikuro.gif", "home_page/stats.gif", "home_page/styles.css", "home_page/title.gif", "home_page/title_back.gif", "lib/base/base_template.rb", "lib/base/generator.rb", "lib/base/graph.rb", "lib/base/md5_tracker.rb", "lib/base/report.rb", "lib/base/configuration.rb", "lib/generators/churn.rb", "lib/generators/flay.rb", "lib/generators/flog.rb", "lib/generators/rcov.rb", "lib/generators/reek.rb", "lib/generators/roodi.rb", "lib/generators/saikuro.rb", "lib/generators/stats.rb", "lib/graphs/flay_grapher.rb", "lib/graphs/flog_grapher.rb", "lib/graphs/grapher.rb", "lib/graphs/rcov_grapher.rb", "lib/graphs/reek_grapher.rb", "lib/graphs/roodi_grapher.rb", "lib/graphs/stats_grapher.rb", "lib/metric_fu.rb", "lib/templates/awesome/awesome_template.rb", "lib/templates/awesome/css/buttons.css", "lib/templates/awesome/css/integrity.css", "lib/templates/awesome/css/reset.css", "lib/templates/awesome/css/default.css", "lib/templates/awesome/index.html.erb", "lib/templates/awesome/churn.html.erb", "lib/templates/awesome/flay.html.erb", "lib/templates/awesome/flog.html.erb", "lib/templates/awesome/js/sorttable.js", "lib/templates/awesome/layout.html.erb", "lib/templates/awesome/rcov.html.erb", "lib/templates/awesome/reek.html.erb", "lib/templates/awesome/roodi.html.erb", "lib/templates/awesome/saikuro.html.erb", "lib/templates/awesome/stats.html.erb", "lib/templates/standard/churn.html.erb", "lib/templates/standard/default.css", "lib/templates/standard/flay.html.erb", "lib/templates/standard/flog.html.erb", "lib/templates/standard/index.html.erb", "lib/templates/standard/rcov.html.erb", "lib/templates/standard/reek.html.erb", "lib/templates/standard/roodi.html.erb", "lib/templates/standard/saikuro.html.erb", "lib/templates/standard/standard_template.rb", "lib/templates/standard/stats.html.erb", "spec/base/base_template_spec.rb", "spec/base/generator_spec.rb", "spec/base/graph_spec.rb", "spec/base/md5_tracker_spec.rb", "spec/base/report_spec.rb", "spec/base/configuration_spec.rb", "spec/generators/churn_spec.rb", "spec/generators/flay_spec.rb", "spec/generators/flog_spec.rb", "spec/generators/reek_spec.rb", "spec/generators/saikuro_spec.rb", "spec/generators/stats_spec.rb", "spec/graphs/flay_grapher_spec.rb", "spec/graphs/flog_grapher_spec.rb", "spec/graphs/grapher_spec.rb", "spec/graphs/rcov_grapher_spec.rb", "spec/graphs/reek_grapher_spec.rb", "spec/graphs/roodi_grapher_spec.rb", "spec/graphs/stats_grapher_spec.rb", "spec/resources/saikuro/app/controllers/sessions_controller.rb_cyclo.html", "spec/resources/saikuro/app/controllers/users_controller.rb_cyclo.html", "spec/resources/saikuro/index_cyclo.html", "spec/resources/saikuro_sfiles/thing.rb_cyclo.html", "spec/resources/yml/20090630.yml", "spec/resources/yml/20090822.yml", "spec/spec.opts", "spec/spec_helper.rb", "tasks/metric_fu.rake", "vendor/_fonts/monaco.ttf", "vendor/saikuro/SAIKURO_README", "vendor/saikuro/saikuro.rb", "Rakefile", "Manifest", "metric_fu.gemspec"]
12
+ s.extra_rdoc_files = ["README", "TODO", "lib/base/base_template.rb", "lib/base/generator.rb", "lib/base/graph.rb", "lib/base/md5_tracker.rb", "lib/base/report.rb", "lib/base/configuration.rb", "lib/generators/churn.rb", "lib/generators/flay.rb", "lib/generators/flog.rb", "lib/generators/rcov.rb", "lib/generators/reek.rb", "lib/generators/roodi.rb", "lib/generators/saikuro.rb", "lib/generators/stats.rb", "lib/graphs/flay_grapher.rb", "lib/graphs/flog_grapher.rb", "lib/graphs/grapher.rb", "lib/graphs/rcov_grapher.rb", "lib/graphs/reek_grapher.rb", "lib/graphs/roodi_grapher.rb", "lib/graphs/stats_grapher.rb", "lib/metric_fu.rb", "lib/templates/awesome/awesome_template.rb", "lib/templates/awesome/css/buttons.css", "lib/templates/awesome/css/integrity.css", "lib/templates/awesome/css/reset.css", "lib/templates/awesome/css/default.css", "lib/templates/awesome/index.html.erb", "lib/templates/awesome/stats.html.erb", "lib/templates/awesome/churn.html.erb", "lib/templates/awesome/flay.html.erb", "lib/templates/awesome/flog.html.erb", "lib/templates/awesome/js/sorttable.js", "lib/templates/awesome/layout.html.erb", "lib/templates/awesome/rcov.html.erb", "lib/templates/awesome/reek.html.erb", "lib/templates/awesome/roodi.html.erb", "lib/templates/awesome/saikuro.html.erb", "lib/templates/standard/churn.html.erb", "lib/templates/standard/default.css", "lib/templates/standard/flay.html.erb", "lib/templates/standard/flog.html.erb", "lib/templates/standard/index.html.erb", "lib/templates/standard/rcov.html.erb", "lib/templates/standard/reek.html.erb", "lib/templates/standard/roodi.html.erb", "lib/templates/standard/saikuro.html.erb", "lib/templates/standard/standard_template.rb", "lib/templates/standard/stats.html.erb", "tasks/metric_fu.rake"]
13
+ s.files = ["HISTORY", "MIT-LICENSE", "README", "TODO", "home_page/back_all.jpg", "home_page/churn.gif", "home_page/flay.gif", "home_page/flog.gif", "home_page/footer.gif", "home_page/header.jpg", "home_page/img09.gif", "home_page/index.html", "home_page/rcov.gif", "home_page/reek.gif", "home_page/roodi.gif", "home_page/saikuro.gif", "home_page/stats.gif", "home_page/styles.css", "home_page/title.gif", "home_page/title_back.gif", "lib/base/base_template.rb", "lib/base/generator.rb", "lib/base/graph.rb", "lib/base/md5_tracker.rb", "lib/base/report.rb", "lib/base/configuration.rb", "lib/generators/churn.rb", "lib/generators/flay.rb", "lib/generators/flog.rb", "lib/generators/rcov.rb", "lib/generators/reek.rb", "lib/generators/roodi.rb", "lib/generators/saikuro.rb", "lib/generators/stats.rb", "lib/graphs/flay_grapher.rb", "lib/graphs/flog_grapher.rb", "lib/graphs/grapher.rb", "lib/graphs/rcov_grapher.rb", "lib/graphs/reek_grapher.rb", "lib/graphs/roodi_grapher.rb", "lib/graphs/stats_grapher.rb", "lib/metric_fu.rb", "lib/templates/awesome/awesome_template.rb", "lib/templates/awesome/css/buttons.css", "lib/templates/awesome/css/integrity.css", "lib/templates/awesome/css/reset.css", "lib/templates/awesome/css/default.css", "lib/templates/awesome/index.html.erb", "lib/templates/awesome/stats.html.erb", "lib/templates/awesome/churn.html.erb", "lib/templates/awesome/flay.html.erb", "lib/templates/awesome/flog.html.erb", "lib/templates/awesome/js/sorttable.js", "lib/templates/awesome/layout.html.erb", "lib/templates/awesome/rcov.html.erb", "lib/templates/awesome/reek.html.erb", "lib/templates/awesome/roodi.html.erb", "lib/templates/awesome/saikuro.html.erb", "lib/templates/standard/churn.html.erb", "lib/templates/standard/default.css", "lib/templates/standard/flay.html.erb", "lib/templates/standard/flog.html.erb", "lib/templates/standard/index.html.erb", "lib/templates/standard/rcov.html.erb", "lib/templates/standard/reek.html.erb", "lib/templates/standard/roodi.html.erb", "lib/templates/standard/saikuro.html.erb", "lib/templates/standard/standard_template.rb", "lib/templates/standard/stats.html.erb", "spec/base/base_template_spec.rb", "spec/base/generator_spec.rb", "spec/base/graph_spec.rb", "spec/base/md5_tracker_spec.rb", "spec/base/report_spec.rb", "spec/base/configuration_spec.rb", "spec/generators/churn_spec.rb", "spec/generators/flay_spec.rb", "spec/generators/flog_spec.rb", "spec/generators/reek_spec.rb", "spec/generators/saikuro_spec.rb", "spec/generators/stats_spec.rb", "spec/graphs/flay_grapher_spec.rb", "spec/graphs/flog_grapher_spec.rb", "spec/graphs/grapher_spec.rb", "spec/graphs/rcov_grapher_spec.rb", "spec/graphs/reek_grapher_spec.rb", "spec/graphs/roodi_grapher_spec.rb", "spec/graphs/stats_grapher_spec.rb", "spec/resources/saikuro/app/controllers/sessions_controller.rb_cyclo.html", "spec/resources/saikuro/app/controllers/users_controller.rb_cyclo.html", "spec/resources/saikuro/index_cyclo.html", "spec/resources/saikuro_sfiles/thing.rb_cyclo.html", "spec/resources/yml/20090630.yml", "spec/resources/yml/20090822.yml", "spec/spec.opts", "spec/spec_helper.rb", "tasks/metric_fu.rake", "vendor/_fonts/monaco.ttf", "vendor/saikuro/SAIKURO_README", "vendor/saikuro/saikuro.rb", "Manifest", "metric_fu.gemspec", "Rakefile"]
14
14
  s.homepage = %q{http://metric-fu.rubyforge.org}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Metric_fu", "--main", "README"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = %q{metric_fu}
18
18
  s.rubygems_version = %q{1.3.5}
19
- s.summary = %q{A fist of metrics for Ruby}
19
+ s.summary = %q{A fist full of code metrics}
20
20
 
21
21
  if s.respond_to? :specification_version then
22
22
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -52,7 +52,7 @@ describe MetricFu::StatsGrapher do
52
52
  gruff_line = Gruff::Line.new(MetricFu.graph_size)
53
53
  gruff_line.stub!(:write)
54
54
  Gruff::Line.stub!(:new).and_return(gruff_line)
55
- metrics_hash = { :stats => {} }
55
+ metrics_hash = { }
56
56
  @stats_grapher.get_metrics(metrics_hash ,"20090629")
57
57
  @stats_grapher.graph!
58
58
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iain-metric_fu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - J. Scruggs and more
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-22 00:00:00 -07:00
12
+ date: 2009-08-23 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -52,7 +52,7 @@ dependencies:
52
52
  - !ruby/object:Gem::Version
53
53
  version: "0"
54
54
  version:
55
- description: A fist of metrics for Ruby
55
+ description: A fist full of code metrics
56
56
  email: iain@iain.nl
57
57
  executables: []
58
58
 
@@ -89,6 +89,7 @@ extra_rdoc_files:
89
89
  - lib/templates/awesome/css/reset.css
90
90
  - lib/templates/awesome/css/default.css
91
91
  - lib/templates/awesome/index.html.erb
92
+ - lib/templates/awesome/stats.html.erb
92
93
  - lib/templates/awesome/churn.html.erb
93
94
  - lib/templates/awesome/flay.html.erb
94
95
  - lib/templates/awesome/flog.html.erb
@@ -98,7 +99,6 @@ extra_rdoc_files:
98
99
  - lib/templates/awesome/reek.html.erb
99
100
  - lib/templates/awesome/roodi.html.erb
100
101
  - lib/templates/awesome/saikuro.html.erb
101
- - lib/templates/awesome/stats.html.erb
102
102
  - lib/templates/standard/churn.html.erb
103
103
  - lib/templates/standard/default.css
104
104
  - lib/templates/standard/flay.html.erb
@@ -160,6 +160,7 @@ files:
160
160
  - lib/templates/awesome/css/reset.css
161
161
  - lib/templates/awesome/css/default.css
162
162
  - lib/templates/awesome/index.html.erb
163
+ - lib/templates/awesome/stats.html.erb
163
164
  - lib/templates/awesome/churn.html.erb
164
165
  - lib/templates/awesome/flay.html.erb
165
166
  - lib/templates/awesome/flog.html.erb
@@ -169,7 +170,6 @@ files:
169
170
  - lib/templates/awesome/reek.html.erb
170
171
  - lib/templates/awesome/roodi.html.erb
171
172
  - lib/templates/awesome/saikuro.html.erb
172
- - lib/templates/awesome/stats.html.erb
173
173
  - lib/templates/standard/churn.html.erb
174
174
  - lib/templates/standard/default.css
175
175
  - lib/templates/standard/flay.html.erb
@@ -212,9 +212,9 @@ files:
212
212
  - vendor/_fonts/monaco.ttf
213
213
  - vendor/saikuro/SAIKURO_README
214
214
  - vendor/saikuro/saikuro.rb
215
- - Rakefile
216
215
  - Manifest
217
216
  - metric_fu.gemspec
217
+ - Rakefile
218
218
  has_rdoc: false
219
219
  homepage: http://metric-fu.rubyforge.org
220
220
  licenses:
@@ -246,6 +246,6 @@ rubyforge_project: metric_fu
246
246
  rubygems_version: 1.3.5
247
247
  signing_key:
248
248
  specification_version: 3
249
- summary: A fist of metrics for Ruby
249
+ summary: A fist full of code metrics
250
250
  test_files: []
251
251