Sha256: 2420512ef59379ddb7461a352cca3f40eae5847db020a597a6111379888f5d30

Contents?: true

Size: 726 Bytes

Versions: 7

Compression:

Stored size: 726 Bytes

Contents

# frozen_string_literal: true
require 'rubycritic/colorize'

module RubyCritic
  module Analyser
    class Churn
      include Colorize
      attr_writer :source_control_system

      def initialize(analysed_modules)
        @analysed_modules = analysed_modules
        @source_control_system = Config.source_control_system
      end

      def run
        @analysed_modules.each do |analysed_module|
          analysed_module.churn = @source_control_system.revisions_count(analysed_module.path)
          analysed_module.committed_at = @source_control_system.date_of_last_commit(analysed_module.path)
          print green '.'
        end
        puts ''
      end

      def to_s
        'churn'
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rubycritic-3.2.0 lib/rubycritic/analysers/churn.rb
rubycritic-3.1.3 lib/rubycritic/analysers/churn.rb
rubycritic-3.1.2 lib/rubycritic/analysers/churn.rb
rubycritic-3.1.1 lib/rubycritic/analysers/churn.rb
rubycritic-3.1.0 lib/rubycritic/analysers/churn.rb
rubycritic-3.0.0 lib/rubycritic/analysers/churn.rb
rubycritic-2.9.4 lib/rubycritic/analysers/churn.rb