Sha256: 0658f42cf6241fd3957edb99febc94fbbcea42f7f9cda8eb859004d0890d2d0b

Contents?: true

Size: 580 Bytes

Versions: 7

Compression:

Stored size: 580 Bytes

Contents

module MetricFu
  class MetricRailsBestPractices < Metric
    def name
      :rails_best_practices
    end

    def default_run_options
      {
        silent: true,
        exclude: []
      }
    end

    def has_graph?
      true
    end

    def enable
      if MetricFu.configuration.supports_ripper?
        super if MetricFu.configuration.rails?
      else
        MetricFu.logger.debug("Rails Best Practices is only available in MRI 1.9. It requires ripper")
      end
    end

    def activate
      activate_library("rails_best_practices")
      super
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

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