Sha256: 10373bf14dd3f0e4543deac6075b3261b473c15825e624062a4919d0314d13de

Contents?: true

Size: 845 Bytes

Versions: 15

Compression:

Stored size: 845 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

15 entries across 15 versions & 1 rubygems

Version Path
metric_fu-4.11.3 lib/metric_fu/metrics/rails_best_practices/grapher.rb
metric_fu-4.11.2 lib/metric_fu/metrics/rails_best_practices/grapher.rb
metric_fu-4.11.1 lib/metric_fu/metrics/rails_best_practices/grapher.rb
metric_fu-4.11.0 lib/metric_fu/metrics/rails_best_practices/grapher.rb
metric_fu-4.10.0 lib/metric_fu/metrics/rails_best_practices/rails_best_practices_grapher.rb
metric_fu-4.9.0 lib/metric_fu/metrics/rails_best_practices/rails_best_practices_grapher.rb
metric_fu-4.8.0 lib/metric_fu/metrics/rails_best_practices/rails_best_practices_grapher.rb
metric_fu-4.7.4 lib/metric_fu/metrics/rails_best_practices/rails_best_practices_grapher.rb
metric_fu-4.7.3 lib/metric_fu/metrics/rails_best_practices/rails_best_practices_grapher.rb
metric_fu-4.7.2 lib/metric_fu/metrics/rails_best_practices/rails_best_practices_grapher.rb
metric_fu-4.7.1 lib/metric_fu/metrics/rails_best_practices/rails_best_practices_grapher.rb
metric_fu-4.7.0 lib/metric_fu/metrics/rails_best_practices/rails_best_practices_grapher.rb
metric_fu-4.6.0 lib/metric_fu/metrics/rails_best_practices/rails_best_practices_grapher.rb
metric_fu-4.5.2 lib/metric_fu/metrics/rails_best_practices/rails_best_practices_grapher.rb
metric_fu-4.5.1 lib/metric_fu/metrics/rails_best_practices/rails_best_practices_grapher.rb