Commit a7d753dc31906bba47c79e8d79da057e9b86ad2d
Committed by
Paulo Meireles
1 parent
6f2a0b37
Exists in
master
and in
29 other branches
Fixing request date with milliseconds
Showing
1 changed file
with
9 additions
and
1 deletions
Show diff stats
plugins/mezuro/lib/kalibro/client/module_result_client.rb
@@ -6,7 +6,8 @@ class Kalibro::Client::ModuleResultClient | @@ -6,7 +6,8 @@ class Kalibro::Client::ModuleResultClient | ||
6 | 6 | ||
7 | def module_result(project_name, module_name, date) | 7 | def module_result(project_name, module_name, date) |
8 | hash = @port.request(:get_module_result, | 8 | hash = @port.request(:get_module_result, |
9 | - {:project_name => project_name, :module_name => module_name, :date => date})[:module_result] | 9 | + {:project_name => project_name, :module_name => module_name, |
10 | + :date => date_with_milliseconds(date)})[:module_result] | ||
10 | Kalibro::Entities::ModuleResult.from_hash(hash) | 11 | Kalibro::Entities::ModuleResult.from_hash(hash) |
11 | end | 12 | end |
12 | 13 | ||
@@ -16,4 +17,11 @@ class Kalibro::Client::ModuleResultClient | @@ -16,4 +17,11 @@ class Kalibro::Client::ModuleResultClient | ||
16 | Kalibro::Entities::Entity.new.to_entity_array(value, Kalibro::Entities::ModuleResult) | 17 | Kalibro::Entities::Entity.new.to_entity_array(value, Kalibro::Entities::ModuleResult) |
17 | end | 18 | end |
18 | 19 | ||
20 | + private | ||
21 | + | ||
22 | + def date_with_milliseconds(date) | ||
23 | + milliseconds = "." + (date.sec_fraction * 60 * 60 * 24 * 1000).to_s | ||
24 | + date.to_s[0..18] + milliseconds + date.to_s[19..-1] | ||
25 | + end | ||
26 | + | ||
19 | end | 27 | end |
20 | \ No newline at end of file | 28 | \ No newline at end of file |