hansel 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/hansel.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{hansel}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Mylchreest"]
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
- output_file = File.join options.output_dir, [options.server, options.num_conns.to_s].join('.')
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, {:output_file => output_file})
67
+ OctaveFormatter.new(@results, {:output_file_name => output_file_name})
67
68
  end
68
69
  f.puts formatter.format
69
70
  end
@@ -2,7 +2,7 @@ class OctaveFormatter
2
2
  def initialize(data, options = {})
3
3
  @data = data
4
4
  @options = options
5
- @png_output = [(options[:output_file] || 'stats'), 'png'].join('.')
5
+ @png_output = [(options[:output_file_name] || 'stats'), 'png'].join('.')
6
6
  end
7
7
 
8
8
  def format
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hansel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Mylchreest