ruby-watchr 0.1.6.1 → 0.1.6.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/watchr/rating.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'watchr/smell_types'
2
+
1
3
  module Watchr
2
4
  module Rating
3
5
  include SmellTypes
@@ -25,6 +27,8 @@ module Watchr
25
27
  when IDENTICAL_CODE,
26
28
  SIMILAR_CODE
27
29
  smell.options[:mass]
30
+ else
31
+ 0
28
32
  end
29
33
  end
30
34
  end
@@ -1,3 +1,3 @@
1
1
  module Watchr
2
- VERSION = "0.1.6.1"
2
+ VERSION = "0.1.6.2"
3
3
  end
@@ -6,7 +6,14 @@ describe Watchr::Rating do
6
6
  let(:complexity_smell) {
7
7
  stub('smell',
8
8
  :type => Watchr::SmellTypes::COMPLEX_METHOD,
9
- :options => {:score => 29.3})
9
+ :options => {:score => 29.3}
10
+ )
11
+ }
12
+
13
+ let(:other_smell) {
14
+ stub('smell',
15
+ :type => 'other'
16
+ )
10
17
  }
11
18
 
12
19
  let(:duplication_smell) {
@@ -15,7 +22,7 @@ describe Watchr::Rating do
15
22
  :options => {:mass => 72})
16
23
  }
17
24
 
18
- let(:smells) { [complexity_smell, duplication_smell] }
25
+ let(:smells) { [complexity_smell, other_smell, duplication_smell] }
19
26
 
20
27
  let(:analyse) {
21
28
  analyse = stub('analyse', :smells => smells)
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 1
8
8
  - 6
9
- - 1
10
- version: 0.1.6.1
9
+ - 2
10
+ version: 0.1.6.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Petr Janda