Sha256: 057ff3befa8d0c77a17466df4307183bc139cb252c069124dca2315123af2574
Contents?: true
Size: 658 Bytes
Versions: 7
Compression:
Stored size: 658 Bytes
Contents
module MetricFu def self.generate_reek_report Reek.generate_report system("open #{Reek.metric_dir}/index.html") if open_in_browser? end class Reek < Base::Generator def analyze files_to_reek = MetricFu.reek[:dirs_to_reek].map{|dir| Dir[File.join(dir, "**/*.rb")] } output = `reek #{files_to_reek.join(" ")}` @matches = output.chomp.split("\n\n").map{|m| m.split("\n") } @filenames = extract_filenames(@matches.map {|m| m.first}) end private def extract_filenames(names) names.map do |name| m = name.match(/^"(.*)"/) m.size == 2 ? m[1] : nil end end end end
Version data entries
7 entries across 7 versions & 1 rubygems