Sha256: 76e31b6bda8eb3ce84231af9ead81e603264cc700c5a5bc048f1a0034ecd7f3e
Contents?: true
Size: 598 Bytes
Versions: 57
Compression:
Stored size: 598 Bytes
Contents
#!/usr/bin/env ruby require 'tins/go' include Tins::GO require 'utils' require 'term/ansicolor' $opts = go 'm:h' if $opts[?h] puts <<USAGE #{File.basename($0)} [OPTIONS] [FILES] USAGE exit end max = ($opts[?m] || 80).to_i files = ARGV for file in files File.open(file) do |f| for line in f size = line.size if size > max lineno = f.lineno + 1 blamer = Utils::LineBlamer.new(file, lineno) or next blame = blamer.perform author = blame[/\((.*?)\d{4}/, 1] puts [ author, size, "#{file}:#{lineno}" ] * ?\t end end end end
Version data entries
57 entries across 57 versions & 1 rubygems