Sha256: 3d30e53bb51b09b9ab7a2ce9081ab9c2ca45a5f7314b3bea09e73807bfde1e22
Contents?: true
Size: 859 Bytes
Versions: 1
Compression:
Stored size: 859 Bytes
Contents
# Author:: Nicolas Pouillard <ertai@lrde.epita.fr>. # Copyright:: Copyright (c) 2004 LRDE. All rights reserved. # License:: GNU General Public License (GPL). # $LastChangedBy: ertai $ # $Id: header 98 2004-09-29 12:07:43Z ertai $ require 'vcs' class Vcs # Use the diffstat command to # display statitics on your patch. def diffstat ( *a ) check_diffstat patch = diff(*a) rd, wr = IO.pipe pid = fork do rd.close STDIN.reopen(patch) STDOUT.reopen(wr) exec 'diffstat' end wr.close def rd.close super Process.waitpid pid end rd end alias_command :ds, :diffstat def check_diffstat unless `diffstat -V` =~ /diffstat version/ raise ArgumentError, 'The `diffstat\' tool is needed by Vcs.diffstat' end end add_conf_checker :check_diffstat end # class Vcs
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vcs-0.2.148 | src/diffstat.rb |