metrical 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/metrical +19 -36
- 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
|
-
#
|
7
|
-
|
8
|
-
|
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
|
-
|
16
|
-
|
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
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
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
|
-
-
|
9
|
-
version: 0.0.
|
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-
|
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
|
-
-
|
30
|
-
-
|
31
|
-
version: 1.
|
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:
|
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:
|
45
|
+
version: "0"
|
60
46
|
type: :runtime
|
61
|
-
version_requirements: *
|
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.
|
88
|
+
rubygems_version: 1.3.7
|
101
89
|
signing_key:
|
102
90
|
specification_version: 3
|
103
|
-
summary: Run
|
91
|
+
summary: Run metric_fu without making it a project dependency
|
104
92
|
test_files: []
|
105
93
|
|