diff-lcs 1.1.3 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +1 -0
- data/Code-of-Conduct.md +74 -0
- data/Contributing.md +119 -0
- data/History.md +400 -0
- data/{License.rdoc → License.md} +6 -5
- data/Manifest.txt +36 -4
- data/README.rdoc +35 -23
- data/Rakefile +106 -11
- data/bin/htmldiff +7 -4
- data/bin/ldiff +4 -1
- data/docs/COPYING.txt +21 -22
- data/docs/artistic.txt +127 -0
- data/lib/diff/lcs/array.rb +1 -15
- data/lib/diff/lcs/backports.rb +9 -0
- data/lib/diff/lcs/block.rb +4 -18
- data/lib/diff/lcs/callbacks.rb +233 -230
- data/lib/diff/lcs/change.rb +114 -109
- data/lib/diff/lcs/htmldiff.rb +17 -18
- data/lib/diff/lcs/hunk.rb +232 -116
- data/lib/diff/lcs/internals.rb +308 -0
- data/lib/diff/lcs/ldiff.rb +138 -177
- data/lib/diff/lcs/string.rb +1 -15
- data/lib/diff/lcs.rb +597 -963
- data/lib/diff-lcs.rb +1 -3
- data/spec/change_spec.rb +89 -0
- data/spec/diff_spec.rb +32 -16
- data/spec/fixtures/aX +1 -0
- data/spec/fixtures/bXaX +1 -0
- data/spec/fixtures/ds1.csv +50 -0
- data/spec/fixtures/ds2.csv +51 -0
- data/spec/fixtures/ldiff/output.diff +4 -0
- data/spec/fixtures/ldiff/output.diff-c +7 -0
- data/spec/fixtures/ldiff/output.diff-e +3 -0
- data/spec/fixtures/ldiff/output.diff-f +3 -0
- data/spec/fixtures/ldiff/output.diff-u +5 -0
- data/spec/fixtures/ldiff/output.diff.chef +4 -0
- data/spec/fixtures/ldiff/output.diff.chef-c +15 -0
- data/spec/fixtures/ldiff/output.diff.chef-e +3 -0
- data/spec/fixtures/ldiff/output.diff.chef-f +3 -0
- data/spec/fixtures/ldiff/output.diff.chef-u +9 -0
- data/spec/fixtures/ldiff/output.diff.chef2 +7 -0
- data/spec/fixtures/ldiff/output.diff.chef2-c +20 -0
- data/spec/fixtures/ldiff/output.diff.chef2-d +7 -0
- data/spec/fixtures/ldiff/output.diff.chef2-e +7 -0
- data/spec/fixtures/ldiff/output.diff.chef2-f +7 -0
- data/spec/fixtures/ldiff/output.diff.chef2-u +16 -0
- data/spec/fixtures/new-chef +4 -0
- data/spec/fixtures/new-chef2 +17 -0
- data/spec/fixtures/old-chef +4 -0
- data/spec/fixtures/old-chef2 +14 -0
- data/spec/hunk_spec.rb +83 -0
- data/spec/issues_spec.rb +154 -0
- data/spec/lcs_spec.rb +36 -16
- data/spec/ldiff_spec.rb +87 -0
- data/spec/patch_spec.rb +198 -172
- data/spec/sdiff_spec.rb +99 -89
- data/spec/spec_helper.rb +149 -59
- data/spec/traverse_balanced_spec.rb +191 -167
- data/spec/traverse_sequences_spec.rb +105 -51
- metadata +218 -99
- data/.gemtest +0 -0
- data/History.rdoc +0 -54
- data/diff-lcs.gemspec +0 -51
- data/docs/artistic.html +0 -289
data/docs/artistic.html
DELETED
@@ -1,289 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<title>The "Artistic License" - dev.perl.org</title>
|
6
|
-
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
7
|
-
|
8
|
-
|
9
|
-
<link rel="stylesheet" type="text/css" href="http://cdn.pimg.net/css/leostyle.vffcd481.css">
|
10
|
-
<link rel="stylesheet" type="text/css" href="http://cdn.pimg.net/css/dev.v5f7fab3.css">
|
11
|
-
|
12
|
-
|
13
|
-
<link rel="shortcut icon" href="http://cdn.pimg.net/favicon.v249dfa7.ico">
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
|
18
|
-
<script src="http://cdn.pimg.net/js/jquery.corner.v84b7681.js" type="text/javascript" charset="utf-8"></script>
|
19
|
-
<script src="http://cdn.pimg.net/js/leo.v9872b9c.js" type="text/javascript" charset="utf-8"></script>
|
20
|
-
|
21
|
-
</head>
|
22
|
-
<body>
|
23
|
-
|
24
|
-
<div id="header_holder">
|
25
|
-
<div class="sub_holder">
|
26
|
-
<div id="page_image"></div>
|
27
|
-
<h1>
|
28
|
-
The "Artistic License"
|
29
|
-
</h1>
|
30
|
-
<div id="logo_holder">
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<a href="/"><img src="http://cdn.pimg.net/images/camel_head.v25e738a.png" id="logo" alt="Perl programming" height="65" align="right" /></a>
|
35
|
-
|
36
|
-
|
37
|
-
<span>dev.perl.org</span>
|
38
|
-
|
39
|
-
</div>
|
40
|
-
</div>
|
41
|
-
</div>
|
42
|
-
|
43
|
-
<div id="nav">
|
44
|
-
<div class="sub_holder">
|
45
|
-
<ul>
|
46
|
-
<li>
|
47
|
-
<a href="/">Home</a>
|
48
|
-
</li>
|
49
|
-
<li class="">
|
50
|
-
<a href="/perl5/">Perl 5</a>
|
51
|
-
</li>
|
52
|
-
<li class="">
|
53
|
-
<a href="/perl6/">Perl 6</a>
|
54
|
-
</li>
|
55
|
-
|
56
|
-
</ul>
|
57
|
-
|
58
|
-
</div>
|
59
|
-
</div>
|
60
|
-
|
61
|
-
<div id="crum_holder">
|
62
|
-
<div id="crum" class="sub_holder">
|
63
|
-
|
64
|
-
</div>
|
65
|
-
</div>
|
66
|
-
|
67
|
-
<div id="content_holder">
|
68
|
-
<div id="content" class="sub_holder">
|
69
|
-
<div id="main">
|
70
|
-
|
71
|
-
<PRE>
|
72
|
-
|
73
|
-
<A style="float:right"
|
74
|
-
HREF="http://www.opensource.org/licenses/artistic-license.php"
|
75
|
-
><IMG BORDER=0 SRC="osi-certified-90x75.gif"
|
76
|
-
></A>
|
77
|
-
|
78
|
-
The "Artistic License"
|
79
|
-
|
80
|
-
Preamble
|
81
|
-
|
82
|
-
The intent of this document is to state the conditions under which a
|
83
|
-
Package may be copied, such that the Copyright Holder maintains some
|
84
|
-
semblance of artistic control over the development of the package,
|
85
|
-
while giving the users of the package the right to use and distribute
|
86
|
-
the Package in a more-or-less customary fashion, plus the right to make
|
87
|
-
reasonable modifications.
|
88
|
-
|
89
|
-
Definitions:
|
90
|
-
|
91
|
-
"Package" refers to the collection of files distributed by the
|
92
|
-
Copyright Holder, and derivatives of that collection of files
|
93
|
-
created through textual modification.
|
94
|
-
|
95
|
-
"Standard Version" refers to such a Package if it has not been
|
96
|
-
modified, or has been modified in accordance with the wishes
|
97
|
-
of the Copyright Holder as specified below.
|
98
|
-
|
99
|
-
"Copyright Holder" is whoever is named in the copyright or
|
100
|
-
copyrights for the package.
|
101
|
-
|
102
|
-
"You" is you, if you're thinking about copying or distributing
|
103
|
-
this Package.
|
104
|
-
|
105
|
-
"Reasonable copying fee" is whatever you can justify on the
|
106
|
-
basis of media cost, duplication charges, time of people involved,
|
107
|
-
and so on. (You will not be required to justify it to the
|
108
|
-
Copyright Holder, but only to the computing community at large
|
109
|
-
as a market that must bear the fee.)
|
110
|
-
|
111
|
-
"Freely Available" means that no fee is charged for the item
|
112
|
-
itself, though there may be fees involved in handling the item.
|
113
|
-
It also means that recipients of the item may redistribute it
|
114
|
-
under the same conditions they received it.
|
115
|
-
|
116
|
-
1. You may make and give away verbatim copies of the source form of the
|
117
|
-
Standard Version of this Package without restriction, provided that you
|
118
|
-
duplicate all of the original copyright notices and associated disclaimers.
|
119
|
-
|
120
|
-
2. You may apply bug fixes, portability fixes and other modifications
|
121
|
-
derived from the Public Domain or from the Copyright Holder. A Package
|
122
|
-
modified in such a way shall still be considered the Standard Version.
|
123
|
-
|
124
|
-
3. You may otherwise modify your copy of this Package in any way, provided
|
125
|
-
that you insert a prominent notice in each changed file stating how and
|
126
|
-
when you changed that file, and provided that you do at least ONE of the
|
127
|
-
following:
|
128
|
-
|
129
|
-
a) place your modifications in the Public Domain or otherwise make them
|
130
|
-
Freely Available, such as by posting said modifications to Usenet or
|
131
|
-
an equivalent medium, or placing the modifications on a major archive
|
132
|
-
site such as uunet.uu.net, or by allowing the Copyright Holder to include
|
133
|
-
your modifications in the Standard Version of the Package.
|
134
|
-
|
135
|
-
b) use the modified Package only within your corporation or organization.
|
136
|
-
|
137
|
-
c) rename any non-standard executables so the names do not conflict
|
138
|
-
with standard executables, which must also be provided, and provide
|
139
|
-
a separate manual page for each non-standard executable that clearly
|
140
|
-
documents how it differs from the Standard Version.
|
141
|
-
|
142
|
-
d) make other distribution arrangements with the Copyright Holder.
|
143
|
-
|
144
|
-
4. You may distribute the programs of this Package in object code or
|
145
|
-
executable form, provided that you do at least ONE of the following:
|
146
|
-
|
147
|
-
a) distribute a Standard Version of the executables and library files,
|
148
|
-
together with instructions (in the manual page or equivalent) on where
|
149
|
-
to get the Standard Version.
|
150
|
-
|
151
|
-
b) accompany the distribution with the machine-readable source of
|
152
|
-
the Package with your modifications.
|
153
|
-
|
154
|
-
c) give non-standard executables non-standard names, and clearly
|
155
|
-
document the differences in manual pages (or equivalent), together
|
156
|
-
with instructions on where to get the Standard Version.
|
157
|
-
|
158
|
-
d) make other distribution arrangements with the Copyright Holder.
|
159
|
-
|
160
|
-
5. You may charge a reasonable copying fee for any distribution of this
|
161
|
-
Package. You may charge any fee you choose for support of this
|
162
|
-
Package. You may not charge a fee for this Package itself. However,
|
163
|
-
you may distribute this Package in aggregate with other (possibly
|
164
|
-
commercial) programs as part of a larger (possibly commercial) software
|
165
|
-
distribution provided that you do not advertise this Package as a
|
166
|
-
product of your own. You may embed this Package's interpreter within
|
167
|
-
an executable of yours (by linking); this shall be construed as a mere
|
168
|
-
form of aggregation, provided that the complete Standard Version of the
|
169
|
-
interpreter is so embedded.
|
170
|
-
|
171
|
-
6. The scripts and library files supplied as input to or produced as
|
172
|
-
output from the programs of this Package do not automatically fall
|
173
|
-
under the copyright of this Package, but belong to whoever generated
|
174
|
-
them, and may be sold commercially, and may be aggregated with this
|
175
|
-
Package. If such scripts or library files are aggregated with this
|
176
|
-
Package via the so-called "undump" or "unexec" methods of producing a
|
177
|
-
binary executable image, then distribution of such an image shall
|
178
|
-
neither be construed as a distribution of this Package nor shall it
|
179
|
-
fall under the restrictions of Paragraphs 3 and 4, provided that you do
|
180
|
-
not represent such an executable image as a Standard Version of this
|
181
|
-
Package.
|
182
|
-
|
183
|
-
7. C subroutines (or comparably compiled subroutines in other
|
184
|
-
languages) supplied by you and linked into this Package in order to
|
185
|
-
emulate subroutines and variables of the language defined by this
|
186
|
-
Package shall not be considered part of this Package, but are the
|
187
|
-
equivalent of input as in Paragraph 6, provided these subroutines do
|
188
|
-
not change the language in any way that would cause it to fail the
|
189
|
-
regression tests for the language.
|
190
|
-
|
191
|
-
8. Aggregation of this Package with a commercial distribution is always
|
192
|
-
permitted provided that the use of this Package is embedded; that is,
|
193
|
-
when no overt attempt is made to make this Package's interfaces visible
|
194
|
-
to the end user of the commercial distribution. Such use shall not be
|
195
|
-
construed as a distribution of this Package.
|
196
|
-
|
197
|
-
9. The name of the Copyright Holder may not be used to endorse or promote
|
198
|
-
products derived from this software without specific prior written permission.
|
199
|
-
|
200
|
-
10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
201
|
-
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
202
|
-
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
203
|
-
|
204
|
-
The End
|
205
|
-
</PRE>
|
206
|
-
|
207
|
-
</div>
|
208
|
-
<div id="short_lists" class="short_lists">
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
<div id="spacer_for_google"></div>
|
219
|
-
|
220
|
-
</div>
|
221
|
-
</div>
|
222
|
-
</div>
|
223
|
-
<div style="clear:both"></div>
|
224
|
-
|
225
|
-
<div id="footer">
|
226
|
-
<div class="sub_holder">
|
227
|
-
|
228
|
-
|
229
|
-
<p class="sites">
|
230
|
-
When you need <em>Perl</em> think <strong>Perl.org</strong>: <a href="http://www.perl.org/">www</a> | <a href="http://blogs.perl.org/">blogs</a> | <a href="http://jobs.perl.org/">jobs</a> | <a href="http://learn.perl.org/">learn</a> <!-- | <a href="http://lists.perl.org/">lists</a> --> | <a href="http://dev.perl.org/">dev</a>
|
231
|
-
</p>
|
232
|
-
<p class="copyright">
|
233
|
-
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/us/80x15.png"></a> © 2002-2011 Perl.org | <a href="/siteinfo.html">Site Info</a>
|
234
|
-
</p>
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
<div style="clear:both"></div>
|
240
|
-
<div id="google_translate_element"></div><script type="text/javascript">
|
241
|
-
function googleTranslateElementInit() {
|
242
|
-
new google.translate.TranslateElement({
|
243
|
-
pageLanguage: 'en',
|
244
|
-
autoDisplay: false
|
245
|
-
,
|
246
|
-
gaTrack: true,
|
247
|
-
gaId: 'UA-50555-6'
|
248
|
-
}, 'google_translate_element');
|
249
|
-
}
|
250
|
-
</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit" type="text/javascript">
|
251
|
-
</script>
|
252
|
-
</div>
|
253
|
-
</div>
|
254
|
-
|
255
|
-
|
256
|
-
<!--[if lt IE 7]>
|
257
|
-
<div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative; margin-top: 2em;'>
|
258
|
-
<div style='position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'><a href='#' onclick='javascript:this.parentNode.parentNode.style.display="none"; return false;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a></div>
|
259
|
-
<div style='width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>
|
260
|
-
<div style='width: 75px; float: left;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/></div>
|
261
|
-
<div style='width: 275px; float: left; font-family: Arial, sans-serif;'>
|
262
|
-
<div style='font-size: 14px; font-weight: bold; margin-top: 12px;'>You are using an outdated browser</div>
|
263
|
-
<div style='font-size: 12px; margin-top: 6px; line-height: 12px;'>For a better experience using this site, please upgrade to a modern web browser.</div>
|
264
|
-
</div>
|
265
|
-
<div style='width: 75px; float: left;'><a href='http://www.firefox.com' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-firefox.jpg' style='border: none;' alt='Get Firefox 3.5'/></a></div>
|
266
|
-
<div style='width: 75px; float: left;'><a href='http://www.browserforthebetter.com/download.html' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-ie8.jpg' style='border: none;' alt='Get Internet Explorer 8'/></a></div>
|
267
|
-
<div style='width: 73px; float: left;'><a href='http://www.apple.com/safari/download/' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-safari.jpg' style='border: none;' alt='Get Safari 4'/></a></div>
|
268
|
-
<div style='float: left;'><a href='http://www.google.com/chrome' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-chrome.jpg' style='border: none;' alt='Get Google Chrome'/></a></div>
|
269
|
-
</div>
|
270
|
-
</div>
|
271
|
-
<![endif]-->
|
272
|
-
|
273
|
-
|
274
|
-
<script type="text/javascript">
|
275
|
-
var _gaq = _gaq || [];
|
276
|
-
_gaq.push(['_setAccount', 'UA-50555-6']);
|
277
|
-
_gaq.push(['_trackPageview']);
|
278
|
-
(function() {
|
279
|
-
var ga = document.createElement('script');
|
280
|
-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
|
281
|
-
'http://www') + '.google-analytics.com/ga.js';
|
282
|
-
ga.setAttribute('async', 'true');
|
283
|
-
document.documentElement.firstChild.appendChild(ga);
|
284
|
-
})();
|
285
|
-
</script>
|
286
|
-
</body>
|
287
|
-
</html>
|
288
|
-
|
289
|
-
|