Commit 3fa0223a2babfbf00a52625da8ea88c7cf7c20c4

Authored by Carlos Morais + Eduardo Morais
Committed by Carlos Morais
1 parent bc65fac5

[mezuro] Native metrics with multiple languages

plugins/mezuro/lib/kalibro/entities/native_metric.rb
... ... @@ -2,4 +2,12 @@ class Kalibro::Entities::NativeMetric < Kalibro::Entities::Metric
2 2  
3 3 attr_accessor :origin, :language
4 4  
  5 + def languages
  6 + @language
  7 + end
  8 +
  9 + def languages=(languages)
  10 + @language = languages
  11 + end
  12 +
5 13 end
... ...
plugins/mezuro/test/fixtures/native_metric_fixtures.rb
... ... @@ -5,12 +5,12 @@ class NativeMetricFixtures
5 5 total_cof.name = 'Total Coupling Factor'
6 6 total_cof.scope = 'APPLICATION'
7 7 total_cof.origin = 'Analizo'
8   - total_cof.language = 'JAVA'
  8 + total_cof.languages = ['JAVA']
9 9 total_cof
10 10 end
11 11  
12 12 def self.total_cof_hash
13   - {:name => 'Total Coupling Factor', :scope => 'APPLICATION', :origin => 'Analizo', :language => 'JAVA'}
  13 + {:name => 'Total Coupling Factor', :scope => 'APPLICATION', :origin => 'Analizo', :language => ['JAVA']}
14 14 end
15 15  
16 16 def self.amloc
... ... @@ -18,12 +18,12 @@ class NativeMetricFixtures
18 18 total_cof.name = 'Average Method LOC'
19 19 total_cof.scope = 'CLASS'
20 20 total_cof.origin = 'Analizo'
21   - total_cof.language = 'JAVA'
  21 + total_cof.languages = ['JAVA']
22 22 total_cof
23 23 end
24 24  
25 25 def self.amloc_hash
26   - {:name => 'Average Method LOC', :scope => 'CLASS', :origin => 'Analizo', :language => 'JAVA'}
  26 + {:name => 'Average Method LOC', :scope => 'CLASS', :origin => 'Analizo', :language => ['JAVA']}
27 27 end
28 28  
29 29 end
30 30 \ No newline at end of file
... ...