Commit 3332d2e7409fc9ed9c4b0761f078a9ad53303386
Committed by
Paulo Meireles
1 parent
2833c8bd
Exists in
master
and in
28 other branches
[Mezuro] Updated function names from rebase.
Showing
3 changed files
with
4 additions
and
13 deletions
Show diff stats
plugins/mezuro/lib/kalibro/entities/metric_result.rb
... | ... | @@ -5,9 +5,9 @@ class Kalibro::Entities::MetricResult < Kalibro::Entities::Entity |
5 | 5 | def metric=(value) |
6 | 6 | if value.kind_of?(Hash) |
7 | 7 | if value.has_key?(:script) |
8 | - @metric = to_entity(value, Kalibro::Entities::CompoundMetric) | |
8 | + @metric = to_entity(value, Kalibro::CompoundMetric) | |
9 | 9 | else |
10 | - @metric = to_entity(value, Kalibro::Entities::NativeMetric) | |
10 | + @metric = to_entity(value, Kalibro::NativeMetric) | |
11 | 11 | end |
12 | 12 | else |
13 | 13 | @metric = value | ... | ... |
plugins/mezuro/lib/kalibro/module_result.rb
... | ... | @@ -22,7 +22,7 @@ class Kalibro::ModuleResult < Kalibro::Model |
22 | 22 | :project_name => project_name, |
23 | 23 | :module_name => module_name, |
24 | 24 | })[:module_result] |
25 | - to_entity_array(response) | |
25 | + to_objects_array(response) | |
26 | 26 | end |
27 | 27 | |
28 | 28 | #FIXME change Kalibro::Entities::Module |
... | ... | @@ -45,15 +45,6 @@ class Kalibro::ModuleResult < Kalibro::Model |
45 | 45 | end |
46 | 46 | |
47 | 47 | private |
48 | - | |
49 | - def self.to_entity_array(value) | |
50 | - array = value.kind_of?(Array) ? value : [value] | |
51 | - array.each.collect { |element| to_entity(element) } | |
52 | - end | |
53 | - | |
54 | - def self.to_entity(value) | |
55 | - value.kind_of?(Hash) ? new(value) : value | |
56 | - end | |
57 | 48 | |
58 | 49 | def self.date_with_milliseconds(date) |
59 | 50 | milliseconds = "." + (date.sec_fraction * 60 * 60 * 24 * 1000).to_s | ... | ... |
plugins/mezuro/test/fixtures/module_result_fixtures.rb
... | ... | @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/compound_metric_with_error_fixtures' |
5 | 5 | class ModuleResultFixtures |
6 | 6 | |
7 | 7 | def self.module_result |
8 | - fixture = Kalibro::ModuleResult.new( module_result_hash ) | |
8 | + Kalibro::ModuleResult.new( module_result_hash ) | |
9 | 9 | end |
10 | 10 | |
11 | 11 | def self.module_result_hash | ... | ... |