Sha256: d28f08631de491d4e480d3340499ecf98d592d10892f51250a32616db2231394

Contents?: true

Size: 839 Bytes

Versions: 9

Compression:

Stored size: 839 Bytes

Contents

MetricFu.reporting_require { "graphs/grapher" }
module MetricFu
  class RailsBestPracticesGrapher < Grapher
    attr_accessor :rails_best_practices_count, :labels

    def self.metric
      :rails_best_practices
    end

    def initialize
      super
      @rails_best_practices_count = []
      @labels = {}
    end

    def get_metrics(metrics, date)
      if metrics && metrics[:rails_best_practices]
        size = (metrics[:rails_best_practices][:problems] || []).size
        @rails_best_practices_count.push(size)
        @labels.update(@labels.size => date)
      end
    end

    def title
      "Rails Best Practices: design problems"
    end

    def data
      [
        ["rails_best_practices", @rails_best_practices_count.join(",")]
      ]
    end

    def output_filename
      "rails_best_practices.js"
    end
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
metric_fu-4.13.0 lib/metric_fu/metrics/rails_best_practices/grapher.rb
fastruby-metric_fu-5.0.0 lib/metric_fu/metrics/rails_best_practices/grapher.rb
code_metric_fu-4.14.4 lib/metric_fu/metrics/rails_best_practices/grapher.rb
code_metric_fu-4.14.3 lib/metric_fu/metrics/rails_best_practices/grapher.rb
code_metric_fu-4.14.2 lib/metric_fu/metrics/rails_best_practices/grapher.rb
code_metric_fu-4.14.1 lib/metric_fu/metrics/rails_best_practices/grapher.rb
code_metric_fu-4.14.0 lib/metric_fu/metrics/rails_best_practices/grapher.rb
metric_fu-4.12.0 lib/metric_fu/metrics/rails_best_practices/grapher.rb
metric_fu-4.11.4 lib/metric_fu/metrics/rails_best_practices/grapher.rb