diff-lcs 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +4 -0
- data/Install +1 -1
- data/README +5 -6
- data/Rakefile +15 -2
- data/bin/htmldiff +5 -4
- data/lib/diff/lcs.rb +3 -3
- metadata +2 -2
data/ChangeLog
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
Revision history for Ruby library Diff::LCS. Unless explicitly noted otherwise,
|
2
2
|
all changes are produced by Austin Ziegler <diff-lcs@halostatue.ca>.
|
3
3
|
|
4
|
+
== Diff::LCS 1.1.2
|
5
|
+
* Fixed a problem reported by Mauricio Fernandez in htmldiff. Future versions
|
6
|
+
of Diff::LCS will be removing this program.
|
7
|
+
|
4
8
|
== Diff::LCS 1.1.1
|
5
9
|
* Fixed bug #891:
|
6
10
|
http://rubyforge.org/tracker/?func=detail&atid=407&aid=891&group_id=84
|
data/Install
CHANGED
data/README
CHANGED
@@ -6,11 +6,10 @@ differences between two sequenced enumerable containers[2]. The
|
|
6
6
|
implementation is based on Mario I. Wolczko's[3] Smalltalk version (1.2,
|
7
7
|
1993)[4] and Ned Konz's[5] Perl version (Algorithm::Diff)[6].
|
8
8
|
|
9
|
-
This release is version 1.1.
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
sensitivity of patching.
|
9
|
+
This release is version 1.1.2, fixing an htmldiff bug in 1.1.1. Version 1.1.0
|
10
|
+
added new features, including the ability to #patch and #unpatch changes as
|
11
|
+
well as a new contextual diff callback, Diff::LCS::ContextDiffCallbacks, that
|
12
|
+
should improve the context sensitivity of patching.
|
14
13
|
|
15
14
|
Using this module is quite simple. By default, Diff::LCS does not extend
|
16
15
|
objects with the Diff::LCS interface, but will be called as if it were a
|
@@ -59,7 +58,7 @@ Copyright
|
|
59
58
|
# under the terms of the GPL version 2 (or later), the Perl Artistic
|
60
59
|
# licence, or the Ruby licence.
|
61
60
|
#
|
62
|
-
# $Id: README,v 1.
|
61
|
+
# $Id: README,v 1.7 2004/10/17 20:31:10 austin Exp $
|
63
62
|
|
64
63
|
Footnotes
|
65
64
|
=========
|
data/Rakefile
CHANGED
@@ -68,7 +68,7 @@ file TARDIST => [ :test ] do |t|
|
|
68
68
|
ddnew = dd.gsub(/^#{current}/, DISTDIR)
|
69
69
|
mtime = ReleaseDate || File.stat(dd).mtime
|
70
70
|
if File.directory?(dd)
|
71
|
-
{ :name => ddnew, :mode =>
|
71
|
+
{ :name => ddnew, :mode => 0755, :dir => true, :mtime => mtime }
|
72
72
|
else
|
73
73
|
if dd =~ %r{bin/}
|
74
74
|
mode = 0755
|
@@ -98,6 +98,19 @@ file TARDIST => [ :test ] do |t|
|
|
98
98
|
end
|
99
99
|
end
|
100
100
|
end
|
101
|
+
task TARDIST => [ :test ]
|
102
|
+
|
103
|
+
def sign(file)
|
104
|
+
sh %("C:\\Program Files\\Windows Privacy Tools\\GnuPG\\Gpg.exe" -ba #{file}) rescue nil
|
105
|
+
end
|
106
|
+
|
107
|
+
task :signtar => [ :tar ] do
|
108
|
+
sign TARDIST
|
109
|
+
end
|
110
|
+
task :signgem => [ :gem ] do
|
111
|
+
sign "../#{DISTDIR}.gem"
|
112
|
+
end
|
101
113
|
|
102
114
|
desc "Build everything."
|
103
|
-
task :default => [ :
|
115
|
+
task :default => [ :signtar, :signgem ] do
|
116
|
+
end
|
data/bin/htmldiff
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
# the terms of the GPL version 2 (or later), the Perl Artistic licence, or the
|
11
11
|
# Ruby licence.
|
12
12
|
#
|
13
|
-
# $Id: htmldiff,v 1.
|
13
|
+
# $Id: htmldiff,v 1.6 2004/10/17 19:33:21 austin Exp $
|
14
14
|
#++
|
15
15
|
|
16
16
|
begin
|
@@ -18,6 +18,7 @@ begin
|
|
18
18
|
require_gem 'diff-lcs', "1.1.1"
|
19
19
|
require 'diff/lcs/string'
|
20
20
|
rescue LoadError
|
21
|
+
require 'diff/lcs'
|
21
22
|
require 'diff/lcs/string'
|
22
23
|
end
|
23
24
|
|
@@ -32,17 +33,17 @@ class HTMLDiff #:nodoc:
|
|
32
33
|
|
33
34
|
# This will be called with both lines are the same
|
34
35
|
def match(event)
|
35
|
-
@output << %Q|<pre class="match">#{event.
|
36
|
+
@output << %Q|<pre class="match">#{event.old_element}</pre>\n|
|
36
37
|
end
|
37
38
|
|
38
39
|
# This will be called when there is a line in A that isn't in B
|
39
40
|
def discard_a(event)
|
40
|
-
@output << %Q|<pre class="only_a">#{event.
|
41
|
+
@output << %Q|<pre class="only_a">#{event.old_element}</pre>\n|
|
41
42
|
end
|
42
43
|
|
43
44
|
# This will be called when there is a line in B that isn't in A
|
44
45
|
def discard_b(event)
|
45
|
-
@output << %Q|<pre class="only_b">#{event.
|
46
|
+
@output << %Q|<pre class="only_b">#{event.new_element}</pre>\n|
|
46
47
|
end
|
47
48
|
end
|
48
49
|
|
data/lib/diff/lcs.rb
CHANGED
@@ -10,11 +10,11 @@
|
|
10
10
|
# under the terms of the GPL version 2 (or later), the Perl Artistic
|
11
11
|
# licence, or the Ruby licence.
|
12
12
|
#
|
13
|
-
# $Id: lcs.rb,v 1.
|
13
|
+
# $Id: lcs.rb,v 1.9 2004/10/17 20:31:10 austin Exp $
|
14
14
|
#++
|
15
15
|
|
16
16
|
module Diff
|
17
|
-
# = Diff::LCS 1.1.
|
17
|
+
# = Diff::LCS 1.1.2
|
18
18
|
# Computes "intelligent" differences between two sequenced Enumerables.
|
19
19
|
# This is an implementation of the McIlroy-Hunt "diff" algorithm for
|
20
20
|
# Enumerable objects that include Diffable.
|
@@ -144,7 +144,7 @@ module Diff
|
|
144
144
|
# Common Subsequences</em>, CACM, vol.20, no.5, pp.350-353, May 1977, with
|
145
145
|
# a few minor improvements to improve the speed."
|
146
146
|
module LCS
|
147
|
-
VERSION = '1.1.
|
147
|
+
VERSION = '1.1.2'
|
148
148
|
end
|
149
149
|
end
|
150
150
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.1
|
|
3
3
|
specification_version: 1
|
4
4
|
name: diff-lcs
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.1.
|
7
|
-
date: 2004-
|
6
|
+
version: 1.1.2
|
7
|
+
date: 2004-10-20
|
8
8
|
summary: Provides a list of changes that represent the difference between two sequenced collections.
|
9
9
|
require_paths:
|
10
10
|
- lib
|