debian/0000775000000000000000000000000011723356127007177 5ustar debian/dirs0000664000000000000000000000002111573534163010055 0ustar usr/bin usr/sbin debian/source/0000775000000000000000000000000011573534163010500 5ustar debian/source/format0000664000000000000000000000001411573534163011706 0ustar 3.0 (quilt) debian/compat0000664000000000000000000000000211573534163010376 0ustar 7 debian/patches/0000775000000000000000000000000011573534163010627 5ustar debian/patches/series0000664000000000000000000000002411573534163012040 0ustar 01_fix_syntax_error debian/patches/01_fix_syntax_error0000775000000000000000000000337411573534163014471 0ustar #! /bin/sh /usr/share/dpatch/dpatch-run ## 01_debian-patch.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: New patch generated from libalgorithm-diff-ruby 0.4-8 diff.gz @DPATCH@ --- libalgorithm-diff-ruby-0.4.orig/lib/algorithm/diff.rb +++ libalgorithm-diff-ruby-0.4/lib/algorithm/diff.rb @@ -195,7 +195,7 @@ if kindofstring newary << elements else - newary.push *elements + newary.push(*elements) end bi += elements.length else --- libalgorithm-diff-ruby-0.4.orig/samples/unixdiff.rb +++ libalgorithm-diff-ruby-0.4/samples/unixdiff.rb @@ -20,10 +20,15 @@ end end -class Diff +class Diff2 + def initialize(a,b) + @diffs = Diff::diff(a,b) + end + def to_diff(io = $defout) offset = 0 return if @diffs.empty? + p @diffs #@diffs.each { |b| first = @diffs[0][1] length = @diffs.length @@ -31,9 +36,9 @@ addcount = 0 remcount = 0 @diffs.each { |l| - if l[0] == "+" + if l[0] == :+ addcount += 1 - elsif l[0] == "-" + elsif l[0] == :- remcount += 1 end } @@ -44,12 +49,12 @@ else puts "#{diffrange(first+1, first+remcount)}c#{diffrange(first+offset+1, first+offset+addcount)}" end - lastdel = (@diffs[0][0] == "-") + lastdel = (@diffs[0][0] == :-) @diffs.each { |l| - if l[0] == "-" + if l[0] == :- offset -= 1 print "< " - elsif l[0] == "+" + elsif l[0] == :+ offset += 1 if lastdel lastdel = false @@ -71,7 +76,7 @@ ary1 = loadfile file1 ary2 = loadfile file2 - diff = Diff.new(ary1, ary2) + diff = Diff2.new(ary1, ary2) diff.to_diff end debian/rules0000775000000000000000000000007511573534163010262 0ustar #!/usr/bin/make -f %: dh $@ --buildsystem ruby --with ruby debian/docs0000664000000000000000000000001411573534163010046 0ustar README TODO debian/control0000664000000000000000000000275311573534163010612 0ustar Source: ruby-algorithm-diff Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: TANIGUCHI Takaki Build-Depends: debhelper (>> 7), gem2deb, Standards-Version: 3.9.2 XS-Ruby-Versions: all Package: ruby-algorithm-diff Architecture: all Depends: ruby-interpreter | ruby, ${misc:Depends} Replaces: libalgorithm-diff-ruby (<< 0.4-12~), libalgorithm-diff-ruby1.8 (<< 0.4-12~) Conflicts: libalgorithm-diff-ruby (<< 0.4-12~), libalgorithm-diff-ruby1.8 (<< 0.4-12~) Provides: libalgorithm-diff-ruby, libalgorithm-diff-ruby1.8 Description: Ruby conversion of the Perl's Algorithm::Diff Diff is an algorithm which computes the differences between two lists a and b. The resulting set of differences can be applied to a (also called "patching") to get b. This is also what the Unix command line tools "diff" and "patch" are able to do. Package: libalgorithm-diff-ruby Section: oldlibs Architecture: all Depends: ${misc:Depends}, ruby-algorithm-diff Description: Transitional package for ruby-algorithm-diff This is a transitional package to ease upgrades to the ruby-algorithm-diff package. It can safely be removed. Package: libalgorithm-diff-ruby1.8 Section: oldlibs Architecture: all Depends: ${misc:Depends}, ruby-algorithm-diff Description: Transitional package for ruby-algorithm-diff This is a transitional package to ease upgrades to the ruby-algorithm-diff package. It can safely be removed. debian/changelog0000644000000000000000000000660111723356127011052 0ustar ruby-algorithm-diff (0.4-14build1) precise; urgency=low * No-change rebuild against current pkgbinarymangler to fix broken md5sums. (see LP #875466) -- Martin Pitt Wed, 29 Feb 2012 09:05:43 +0100 ruby-algorithm-diff (0.4-14) unstable; urgency=low * control: Fix incorrect package name, again. (Closes: #629576) -- TANIGUCHI Takaki Wed, 08 Jun 2011 08:46:50 +0900 ruby-algorithm-diff (0.4-13) unstable; urgency=low * control: Fix incorrect package name. (Closes: #628850) -- TANIGUCHI Takaki Thu, 02 Jun 2011 08:49:28 +0900 ruby-algorithm-diff (0.4-12) unstable; urgency=low * Bump Standards-Version to 3.9.2 (with no changes). * Switch to gem2deb. + Use quilt instead of dpatch. + Rename source and binary packages name. + Change source format to 3.0 (quilt). -- TANIGUCHI Takaki Tue, 17 May 2011 14:12:30 +0900 libalgorithm-diff-ruby (0.4-11) unstable; urgency=low * debian/control: - debhelper = 7 - Standard-Version: 3.8.3 - update maintainer email address. -- TANIGUCHI Takaki Sun, 18 Oct 2009 16:30:18 +0900 libalgorithm-diff-ruby (0.4-10) unstable; urgency=low * debian/control; Added dpatch to Build-Depends, debian/rules; use ruby1.8 insted of ruby (Closes: #551213) -- TANIGUCHI Takaki Sat, 17 Oct 2009 12:20:43 +0900 libalgorithm-diff-ruby (0.4-9) unstable; urgency=low * fixed vanish `diff.rb'. (Closes: #550865) * changed section interpreter to ruby * modified debian/rules to use dpatch. -- TANIGUCHI Takaki Wed, 14 Oct 2009 00:55:14 +0900 libalgorithm-diff-ruby (0.4-8) unstable; urgency=low * fixed example/unixdiff.rb bug. (Closes: #517143) -- TANIGUCHI Takaki Sun, 27 Sep 2009 17:14:33 +0900 libalgorithm-diff-ruby (0.4-7) unstable; urgency=low * debian/copying: add more license information * remove debian/debhelper.log * add debtags. -- TANIGUCHI Takaki Sat, 31 Jan 2009 14:46:48 +0900 libalgorithm-diff-ruby (0.4-6) unstable; urgency=low * changed maintainer's mail address * Standards-Version: 3.8.0 * update copyright file. * remove DH_COMPAT from debian/rules and use debian/compat. -- TANIGUCHI Takaki Thu, 28 Aug 2008 23:39:11 +0900 libalgorithm-diff-ruby (0.4-5) unstable; urgency=low * fixed warning. (ref #260661) -- TANIGUCHI Takaki Fri, 2 Mar 2007 22:41:43 +0900 libalgorithm-diff-ruby (0.4-4) unstable; urgency=low * ruby1.6 support has been finished. (Closes: #366565) * fixed warning. (Closes: #260661) * Standards-Version: 3.7.2 -- TANIGUCHI Takaki Sat, 5 Aug 2006 19:27:12 +0900 libalgorithm-diff-ruby (0.4-3) unstable; urgency=low * Uploaders: field added. -- TANIGUCHI Takaki Fri, 26 Mar 2004 08:55:02 +0900 libalgorithm-diff-ruby (0.4-2) unstable; urgency=low * Standards-Version: 3.6.1. * make package for ruby1.6 and ruby1.8. -- TANIGUCHI Takaki Thu, 25 Sep 2003 15:08:47 +0900 libalgorithm-diff-ruby (0.4-1) unstable; urgency=low * Initial Release. (Closes: #176097) -- TANIGUCHI Takaki Wed, 8 Jan 2003 01:04:23 +0900 debian/copyright0000664000000000000000000000211511573534163011132 0ustar This package was debianized by TANIGUCHI Takaki on Wed, 8 Jan 2003 01:04:23 +0900. It was downloaded from http://www.rubynet.org/mirrors/diff/ Upstream Author: Diff Algorithm Implementation, Copyright (C) 2001-2002 Lars Christensen, larsch@cs.auc.dk. Copyright: GPL This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. See the file /usr/share/common-licenses/GPL for more information.