Sha256: d218bf9cc0f2f977069a1a1e59d3e8f0926bb8524453e22cb04390f219a46811
Contents?: true
Size: 1.1 KB
Versions: 2
Compression:
Stored size: 1.1 KB
Contents
#!/usr/bin/env ruby -w require "git_fame" require "trollop" sort = ["name", "commits", "loc", "files"] opts = Trollop::options do version "git-fame #{GitFame::VERSION} (c) 2012 Linus Oleander" opt :repository, "What git repository should be used?", default: "." opt :sort, "What should the printed table be sorted by? #{sort.join(", ")}", default: "loc", type: String opt :progressbar, "Show progressbar during calculation", default: 1, type: Integer opt :whitespace, "Ignore whitespace changes", default: false opt :bytype, "Group line counts by file extension (i.e. .rb, .erb, .yml)", default: false opt :exclude, "Paths to exclude (comma separated)", default: "", type: String end Trollop::die :repository, "is not a git repository" unless GitFame::Base.git_repository?(opts[:repository]) Trollop::die :sort, "must be one of the following; #{sort.join(", ")}" unless sort.include?(opts[:sort]) GitFame::Base.new({ repository: opts[:repository], progressbar: opts[:progressbar] == 1, sort: opts[:sort], whitespace: opts[:whitespace], bytype: opts[:bytype], exclude: opts[:exclude] }).pretty_puts
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
git_fame-1.3.0 | bin/git-fame |
git_fame-1.2.1 | bin/git-fame |