Sha256: a2f638962f2c095093d7583fc9f0fb56ffdcf33c11d89c45212e1ef32886e40d
Contents?: true
Size: 642 Bytes
Versions: 1
Compression:
Stored size: 642 Bytes
Contents
module GitWakaTime # Th class Mapper attr_accessor :commits, :git def initialize(path, commits = 100) Log.new 'Mapping commits for dependent commits' time = Benchmark.realtime do @git = Git.open(path) # TODO: Expose since timestamp as a CLI option # TODO: Expose number of commits as a CLI option first_of_month = Date.new(Date.today.year, Date.today.month, 1) logs = @git.log(commits).since(first_of_month) @commits = logs.map do |git_commit| Commit.new(@git, git_commit) end end Log.new "Map Completed took #{time}s" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gitwakatime-0.0.1 | lib/gitwakatime/mapper.rb |