Sha256: e18e2c724fbe9b0a786aa55e2053e6b70811261fc6f0f69e98b3d7e65151ca52

Contents?: true

Size: 929 Bytes

Versions: 25

Compression:

Stored size: 929 Bytes

Contents

module MetricFu
  
  class RcovGrapher < Grapher
    
    attr_accessor :rcov_percent, :labels
    
    def initialize
      super
      self.rcov_percent = []
      self.labels = {}
    end
    
    def get_metrics(metrics, date)
      self.rcov_percent.push(metrics[:rcov][:global_percent_run])
      self.labels.update( { self.labels.size => date })
    end
    
    def graph!
      g = Gruff::Line.new(MetricFu.graph_size)
      g.title = "Rcov: code coverage"
      g.theme = MetricFu.graph_theme
      g.font = MetricFu.graph_font
      g.data('rcov', self.rcov_percent)
      g.labels = self.labels
      g.title_font_size = MetricFu.graph_title_font_size
      g.legend_box_size = MetricFu.graph_legend_box_size
      g.legend_font_size = MetricFu.graph_legend_font_size
      g.marker_font_size = MetricFu.graph_marker_font_size
      g.write(File.join(MetricFu.output_directory, 'rcov.png'))
    end
    
  end
  
end

Version data entries

25 entries across 25 versions & 11 rubygems

Version Path
IPGlider-metric_fu-1.1.5.1.1 lib/graphs/rcov_grapher.rb
IPGlider-metric_fu-1.1.5.1 lib/graphs/rcov_grapher.rb
gforces-metric_fu-1.1.4 lib/graphs/rcov_grapher.rb
iain-metric_fu-0.1.0 lib/graphs/rcov_grapher.rb
iain-metric_fu-0.1.1 lib/graphs/rcov_grapher.rb
jscruggs-metric_fu-1.1.2 lib/graphs/rcov_grapher.rb
jscruggs-metric_fu-1.1.3 lib/graphs/rcov_grapher.rb
jscruggs-metric_fu-1.1.4 lib/graphs/rcov_grapher.rb
jscruggs-metric_fu-1.1.5 lib/graphs/rcov_grapher.rb
kjeldahl-metric_fu-1.1.5.1 lib/graphs/rcov_grapher.rb
kjeldahl-metric_fu-1.1.5.2 lib/graphs/rcov_grapher.rb
kjeldahl-metric_fu-1.1.5.3 lib/graphs/rcov_grapher.rb
kjeldahl-metric_fu-1.1.5.4 lib/graphs/rcov_grapher.rb
kjeldahl-metric_fu-1.1.5 lib/graphs/rcov_grapher.rb
mattvanhorn-metric_fu-1.1.5.1 lib/graphs/rcov_grapher.rb
mattvanhorn-metric_fu-1.1.5.2 lib/graphs/rcov_grapher.rb
mtdewboy-metric_fu-1.1.5.1 lib/graphs/rcov_grapher.rb
mwilden-metric_fu-1.1.3 lib/graphs/rcov_grapher.rb
mwilden-metric_fu-1.1.5 lib/graphs/rcov_grapher.rb
pjstadig-metric_fu-1.1.4.2 lib/graphs/rcov_grapher.rb