Sha256: 4d71cd9b72f7bfb6d1abdcbc505bb3f0d253056904717ec363f7e56fa66c87de

Contents?: true

Size: 632 Bytes

Versions: 5

Compression:

Stored size: 632 Bytes

Contents

if defined?(RakeFileUtils) # self.respond_to?(:desc)
  def report_churn()
    require File.join(File.dirname(__FILE__), '..', 'churn', 'churn_calculator')
    params = {}
    { :minimum_churn_count => ENV['CHURN_MINIMUM_CHURN_COUNT'],
      :start_date          => ENV['CHURN_START_DATE'],
      :ignore_files        => ENV['CHURN_IGNORE_FILES'],
      :data_directory        => ENV['CHURN_DATA_DIRECTORY'],
    }.each {|k,v| params[k] = v unless v.nil? }
    Churn::ChurnCalculator.new(params).report
  end
  
  desc "Report the current churn for the project"
  task :churn do
    report = report_churn()
    puts report
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
churn-0.0.34 lib/tasks/churn_tasks.rb
churn-0.0.33 lib/tasks/churn_tasks.rb
churn-0.0.32 lib/tasks/churn_tasks.rb
churn-0.0.31 lib/tasks/churn_tasks.rb
churn-0.0.30 lib/tasks/churn_tasks.rb