ruby-watchr 0.1.6.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@ module Watchr
|
|
5
5
|
def initialize(clazz, name, score, location)
|
6
6
|
@clazz = clazz
|
7
7
|
@full_name = name
|
8
|
-
@
|
8
|
+
@method_name = name.split(/#|::/).last
|
9
9
|
@total_score = (10 * score).round / 10.0
|
10
10
|
@location = location
|
11
11
|
end
|
@@ -13,5 +13,11 @@ module Watchr
|
|
13
13
|
def full_name
|
14
14
|
@full_name
|
15
15
|
end
|
16
|
+
|
17
|
+
def method_name
|
18
|
+
@method_name
|
19
|
+
end
|
20
|
+
|
21
|
+
alias :name :full_name
|
16
22
|
end
|
17
23
|
end
|
data/lib/watchr/version.rb
CHANGED
@@ -34,8 +34,8 @@ describe Watchr::FlogMetric::Report do
|
|
34
34
|
describe '.last' do
|
35
35
|
subject { flog_report.classes.first.methods.last }
|
36
36
|
|
37
|
-
its(:
|
38
|
-
its(:
|
37
|
+
its(:method_name) { should == 'bar' }
|
38
|
+
its(:name) { should == 'Baz::Foo#bar' }
|
39
39
|
its(:total_score) { should == 1.7 }
|
40
40
|
its(:clazz) { should == flog_report.classes.first }
|
41
41
|
|
@@ -50,8 +50,8 @@ describe Watchr::FlogMetric::Report do
|
|
50
50
|
describe '.first' do
|
51
51
|
subject { flog_report.classes.first.methods.first }
|
52
52
|
|
53
|
-
its(:
|
54
|
-
its(:
|
53
|
+
its(:method_name) { should == 'bar' }
|
54
|
+
its(:name) { should == 'Baz::Foo::bar' }
|
55
55
|
its(:total_score) { should == 1.7 }
|
56
56
|
its(:clazz) { should == flog_report.classes.first }
|
57
57
|
|
metadata
CHANGED
@@ -5,9 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
|
10
|
-
version: 0.1.6.5
|
8
|
+
- 7
|
9
|
+
version: 0.1.7
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Petr Janda
|
@@ -15,7 +14,7 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2012-07-
|
17
|
+
date: 2012-07-14 00:00:00 +02:00
|
19
18
|
default_executable:
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|