File: README

package info (click to toggle)
libalgorithm-diff-ruby 0.4-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 96 kB
  • ctags: 195
  • sloc: ruby: 1,168; makefile: 60
file content (82 lines) | stat: -rw-r--r-- 2,662 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82

diff.rb README

    Diff Algorithm Implementation, Copyright (C) 2001-2002 Lars
    Christensen, larsch@cs.auc.dk.

LEGAL NOTICE

    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., 59 Temple Place - Suite 330, Boston, MA
    02111-1307, USA.

ABOUT

    This implementation is basically a Ruby conversion of the Perl
    Algorithm::Diff module in CPAN.

    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.

    diff.rb generates a "minimal diff". This means that the set of
    changes that should be applied to a to get b can not be fewer than
    those generated by diff.rb. diff.rb does not generate contextual
    diffs. Therefor, the diff can only be succesfully applied to a
    list exactly equal to to original a.

    Documentation is in RD format in doc/diff.rd. HTML format of this
    is also provided in doc/diff.html.

INSTALLATION

    To install the Diff ruby file in your local site_ruby directory,
    execute these three commands:

        ruby install.rb config
        ruby install.rb setup
        ruby install.rb install

REVISION HISTORY 

    Version 0.4
 
      o New API
        o "Diff" is no longer a class, but a module.
	o Diffable#diff(b) now simply returns an array with the diff.
        o Diffs are now compacted by default.
        o :+ and :- are now used instead of "+" and "-"
      o You can now inject a block to receive diff elements.
      o Speed improvements

    Version 0.3

        Added unixdiff.rb, an implementation of Unix Diff (simple
	format only)

    Version 0.2

        Speed improvements and code clean up

    Version 0.1

        Initial release. Diff algorithm works.

CREDITS

    Thanks to authors of Perl's Algorithm::Diff (originally written by
    Mark-Jason Dominus, currently maintained by Ned Konz). This code
    is basically a rewrite of Algorithm::Diff in Ruby.