Sha256: 1f7a31224c5ed641a24d74258fc9326fd70a43fb0b2d313cf50398a8f1409756

Contents?: true

Size: 564 Bytes

Versions: 1

Compression:

Stored size: 564 Bytes

Contents

module Ghit
  class RepoStatistics
    def initialize
      @globals = Ghit::Globals.new
    end

    def code_frequency
      code_frequency = Github::Client::Repos::Statistics.new.code_frequency(user: @globals.author, repo: @globals.repository).body
      puts "From:\t\tAdditions\tDeletions"
      puts "-" * 41
      code_frequency.each do |date, additions, deletions|
        date = DateTime.strptime(date.to_s, "%s")
        puts "#{date.to_date.to_s}\t#{Rainbow(additions).green}\t\t#{Rainbow(deletions).red}"
      end
      puts "-" * 41
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ghit-0.2.0 lib/ghit/repo_statistics.rb