hansel 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/hansel.gemspec +1 -1
- data/lib/hansel.rb +3 -2
- data/lib/octave_formatter.rb +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/hansel.gemspec
CHANGED
data/lib/hansel.rb
CHANGED
@@ -51,7 +51,8 @@ class Hansel
|
|
51
51
|
def output
|
52
52
|
if options.output
|
53
53
|
FileUtils.mkdir_p options.output_dir
|
54
|
-
|
54
|
+
output_file_name = [options.server, options.num_conns.to_s].join('.')
|
55
|
+
output_file = File.join options.output_dir, output_file_name
|
55
56
|
type = { :yaml => 'yml', :csv => 'csv', :octave => 'm' }[options.output_format]
|
56
57
|
File.open([output_file, type].join('.'), "w+") do |f|
|
57
58
|
formatter = case options.output_format
|
@@ -63,7 +64,7 @@ class Hansel
|
|
63
64
|
CsvFormatter.new(@results)
|
64
65
|
when :octave
|
65
66
|
load File.here '/../lib/octave_formatter.rb'
|
66
|
-
OctaveFormatter.new(@results, {:
|
67
|
+
OctaveFormatter.new(@results, {:output_file_name => output_file_name})
|
67
68
|
end
|
68
69
|
f.puts formatter.format
|
69
70
|
end
|
data/lib/octave_formatter.rb
CHANGED