lib/metric_fu.rb in metric_fu-4.1.2 vs lib/metric_fu.rb in metric_fu-4.1.3
- old
+ new
@@ -39,10 +39,11 @@
# not to the metric_fu library
def self.artifact_dir
(ENV['CC_BUILD_ARTIFACTS'] || 'tmp/metric_fu')
end
def self.configure
+ MetricFu.lib_require { 'core_ext' }
MetricFu.lib_require { 'configuration' }
init_files = Dir.glob(File.join(MetricFu.metrics_dir, '**/init.rb')).reject do |file|
if file =~ /rcov/o
MetricFu.configuration.mf_debug("rcov is not available. See README")
true
@@ -63,9 +64,16 @@
end
init_files.each do |file|
load file
end
MetricFu.configuration
+ end
+ def self.mri_only_metrics
+ if MetricFu.configuration.mri?
+ []
+ else
+ [:cane, :flog, :rails_best_practices]
+ end
end
def self.run_rcov
load File.join(MetricFu.metrics_dir, 'rcov/init.rb')
end
def self.skip_rcov