metrical 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/metrical +19 -36
  2. metadata +15 -27
data/bin/metrical CHANGED
@@ -3,43 +3,27 @@ require 'rubygems'
3
3
  require 'json'
4
4
  require 'metric_fu'
5
5
 
6
- # Load default configuration
7
- MetricFu::Configuration.run do |config|
8
- config.metrics = [ :churn, :saikuro, :stats, :flog, :flay, :reek, :roodi, :rcov ]
9
- config.graphs = [ :flog, :flay, :reek, :roodi, :rcov ]
10
- config.flay = { :dirs_to_flay => ['app', 'lib'], :minimum_score => 100 }
11
- config.flog = { :dirs_to_flog => ['app', 'lib'] }
12
- config.reek = { :dirs_to_reek => ['app', 'lib'] }
13
- config.roodi = { :dirs_to_roodi => ['app', 'lib'] }
6
+ # Required for RCOV
7
+ require 'active_support'
8
+ require 'active_support/core_ext'
14
9
 
15
- config.saikuro = {
16
- :output_directory => 'scratch_directory/saikuro',
17
- :input_directory => ['app', 'lib'],
18
- :cyclo => "",
19
- :filter_cyclo => "0",
20
- :warn_cyclo => "5",
21
- :error_cyclo => "7",
22
- :formater => "text" #this needs to be set to "text"
23
- }
24
-
25
- config.churn = { :start_date => "1 year ago", :minimum_churn_count => 10}
10
+ # Load default configuration
11
+ MetricFu::Configuration.run {}
26
12
 
27
- config.rcov = {
28
- :environment => 'test',
29
- :test_files => [ 'test/**/*_test.rb',
30
- 'spec/**/*_spec.rb'],
31
- :rcov_opts => [
32
- "--sort coverage",
33
- "--no-html",
34
- "--text-coverage",
35
- "--no-color",
36
- "--profile",
37
- "-Ispec",
38
- "--exclude-only '.*'",
39
- '--include-file "\Aapp,\Alib"'
40
- ]
41
- }
42
- config.graph_engine = :bluff
13
+ # RCov fixes (should be okay for everybody)
14
+ test_files = Dir['{spec,test}/**/*_{spec,test}.rb']
15
+ MetricFu::Configuration.run do |config|
16
+ config.rcov[:test_files] = test_files
17
+ config.rcov[:rcov_opts] = [
18
+ "--sort coverage",
19
+ "--no-html",
20
+ "--text-coverage",
21
+ "--no-color",
22
+ "--profile",
23
+ "--exclude-only '.*'",
24
+ '--include-file "\Aapp,\Alib"'
25
+ ]
26
+ config.rcov[:rcov_opts] << "-Ispec" if File.exist?("spec")
43
27
  end
44
28
 
45
29
  # Load local metrics settings
@@ -47,7 +31,6 @@ file = File.join(Dir.pwd, '.metrics')
47
31
  load file if File.exist?(file)
48
32
 
49
33
  # Run metric fu!
50
- MetricFu::Configuration.run {}
51
34
  MetricFu.metrics.each {|metric| MetricFu.report.add(metric) }
52
35
  MetricFu.report.save_output(MetricFu.report.to_yaml, MetricFu.base_directory, "report.yml")
53
36
  MetricFu.report.save_output(MetricFu.report.to_yaml, MetricFu.data_directory, "#{Time.now.strftime("%Y%m%d")}.yml")
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Iain Hecker
@@ -14,51 +14,37 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-22 00:00:00 +02:00
17
+ date: 2010-10-22 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: metric_fu
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
24
25
  requirements:
25
26
  - - ~>
26
27
  - !ruby/object:Gem::Version
27
28
  segments:
28
29
  - 1
29
- - 3
30
- - 0
31
- version: 1.3.0
30
+ - 5
31
+ - 1
32
+ version: 1.5.1
32
33
  type: :runtime
33
34
  version_requirements: *id001
34
35
  - !ruby/object:Gem::Dependency
35
- name: reek
36
+ name: activesupport
36
37
  prerelease: false
37
38
  requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
38
40
  requirements:
39
41
  - - ">="
40
42
  - !ruby/object:Gem::Version
41
43
  segments:
42
- - 1
43
- - 2
44
- - 7
45
- version: 1.2.7
46
- type: :runtime
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: roodi
50
- prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- segments:
56
- - 2
57
- - 1
58
44
  - 0
59
- version: 2.1.0
45
+ version: "0"
60
46
  type: :runtime
61
- version_requirements: *id003
47
+ version_requirements: *id002
62
48
  description: MetricFu is awesome! The only problem is that it's kinda obtrusive. Metrical provides a executable so you can run metric fu on any project without making changes to the project.
63
49
  email: iain@iain.nl
64
50
  executables:
@@ -81,6 +67,7 @@ rdoc_options:
81
67
  require_paths:
82
68
  - lib
83
69
  required_ruby_version: !ruby/object:Gem::Requirement
70
+ none: false
84
71
  requirements:
85
72
  - - ">="
86
73
  - !ruby/object:Gem::Version
@@ -88,6 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
75
  - 0
89
76
  version: "0"
90
77
  required_rubygems_version: !ruby/object:Gem::Requirement
78
+ none: false
91
79
  requirements:
92
80
  - - ">="
93
81
  - !ruby/object:Gem::Version
@@ -97,9 +85,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
85
  requirements: []
98
86
 
99
87
  rubyforge_project:
100
- rubygems_version: 1.3.6
88
+ rubygems_version: 1.3.7
101
89
  signing_key:
102
90
  specification_version: 3
103
- summary: Run MetricFu on any project easisly
91
+ summary: Run metric_fu without making it a project dependency
104
92
  test_files: []
105
93