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.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +1 -0
  3. data/Code-of-Conduct.md +74 -0
  4. data/Contributing.md +119 -0
  5. data/History.md +400 -0
  6. data/{License.rdoc → License.md} +6 -5
  7. data/Manifest.txt +36 -4
  8. data/README.rdoc +35 -23
  9. data/Rakefile +106 -11
  10. data/bin/htmldiff +7 -4
  11. data/bin/ldiff +4 -1
  12. data/docs/COPYING.txt +21 -22
  13. data/docs/artistic.txt +127 -0
  14. data/lib/diff/lcs/array.rb +1 -15
  15. data/lib/diff/lcs/backports.rb +9 -0
  16. data/lib/diff/lcs/block.rb +4 -18
  17. data/lib/diff/lcs/callbacks.rb +233 -230
  18. data/lib/diff/lcs/change.rb +114 -109
  19. data/lib/diff/lcs/htmldiff.rb +17 -18
  20. data/lib/diff/lcs/hunk.rb +232 -116
  21. data/lib/diff/lcs/internals.rb +308 -0
  22. data/lib/diff/lcs/ldiff.rb +138 -177
  23. data/lib/diff/lcs/string.rb +1 -15
  24. data/lib/diff/lcs.rb +597 -963
  25. data/lib/diff-lcs.rb +1 -3
  26. data/spec/change_spec.rb +89 -0
  27. data/spec/diff_spec.rb +32 -16
  28. data/spec/fixtures/aX +1 -0
  29. data/spec/fixtures/bXaX +1 -0
  30. data/spec/fixtures/ds1.csv +50 -0
  31. data/spec/fixtures/ds2.csv +51 -0
  32. data/spec/fixtures/ldiff/output.diff +4 -0
  33. data/spec/fixtures/ldiff/output.diff-c +7 -0
  34. data/spec/fixtures/ldiff/output.diff-e +3 -0
  35. data/spec/fixtures/ldiff/output.diff-f +3 -0
  36. data/spec/fixtures/ldiff/output.diff-u +5 -0
  37. data/spec/fixtures/ldiff/output.diff.chef +4 -0
  38. data/spec/fixtures/ldiff/output.diff.chef-c +15 -0
  39. data/spec/fixtures/ldiff/output.diff.chef-e +3 -0
  40. data/spec/fixtures/ldiff/output.diff.chef-f +3 -0
  41. data/spec/fixtures/ldiff/output.diff.chef-u +9 -0
  42. data/spec/fixtures/ldiff/output.diff.chef2 +7 -0
  43. data/spec/fixtures/ldiff/output.diff.chef2-c +20 -0
  44. data/spec/fixtures/ldiff/output.diff.chef2-d +7 -0
  45. data/spec/fixtures/ldiff/output.diff.chef2-e +7 -0
  46. data/spec/fixtures/ldiff/output.diff.chef2-f +7 -0
  47. data/spec/fixtures/ldiff/output.diff.chef2-u +16 -0
  48. data/spec/fixtures/new-chef +4 -0
  49. data/spec/fixtures/new-chef2 +17 -0
  50. data/spec/fixtures/old-chef +4 -0
  51. data/spec/fixtures/old-chef2 +14 -0
  52. data/spec/hunk_spec.rb +83 -0
  53. data/spec/issues_spec.rb +154 -0
  54. data/spec/lcs_spec.rb +36 -16
  55. data/spec/ldiff_spec.rb +87 -0
  56. data/spec/patch_spec.rb +198 -172
  57. data/spec/sdiff_spec.rb +99 -89
  58. data/spec/spec_helper.rb +149 -59
  59. data/spec/traverse_balanced_spec.rb +191 -167
  60. data/spec/traverse_sequences_spec.rb +105 -51
  61. metadata +218 -99
  62. data/.gemtest +0 -0
  63. data/History.rdoc +0 -54
  64. data/diff-lcs.gemspec +0 -51
  65. data/docs/artistic.html +0 -289
@@ -1,46 +1,104 @@
1
- # -*- ruby encoding: utf-8 -*-
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe "Diff::LCS.traverse_sequences" do
6
- describe "callback with no finishers" do
7
- before(:each) do
8
- @callback_s1_s2 = simple_callback_no_finishers
9
- Diff::LCS.traverse_sequences(seq1, seq2, @callback_s1_s2)
10
-
11
- @callback_s2_s1 = simple_callback_no_finishers
12
- Diff::LCS.traverse_sequences(seq2, seq1, @callback_s2_s1)
5
+ describe 'Diff::LCS.traverse_sequences' do
6
+ describe 'callback with no finishers' do
7
+ describe 'over (seq1, seq2)' do
8
+ before(:each) do
9
+ @callback_s1_s2 = simple_callback_no_finishers
10
+ Diff::LCS.traverse_sequences(seq1, seq2, @callback_s1_s2)
11
+
12
+ @callback_s2_s1 = simple_callback_no_finishers
13
+ Diff::LCS.traverse_sequences(seq2, seq1, @callback_s2_s1)
14
+ end
15
+
16
+ it 'has the correct LCS result on left-matches' do
17
+ expect(@callback_s1_s2.matched_a).to eq(correct_lcs)
18
+ expect(@callback_s2_s1.matched_a).to eq(correct_lcs)
19
+ end
20
+
21
+ it 'has the correct LCS result on right-matches' do
22
+ expect(@callback_s1_s2.matched_b).to eq(correct_lcs)
23
+ expect(@callback_s2_s1.matched_b).to eq(correct_lcs)
24
+ end
25
+
26
+ it 'has the correct skipped sequences with the left sequence' do
27
+ expect(@callback_s1_s2.discards_a).to eq(skipped_seq1)
28
+ expect(@callback_s2_s1.discards_a).to eq(skipped_seq2)
29
+ end
30
+
31
+ it 'has the correct skipped sequences with the right sequence' do
32
+ expect(@callback_s1_s2.discards_b).to eq(skipped_seq2)
33
+ expect(@callback_s2_s1.discards_b).to eq(skipped_seq1)
34
+ end
35
+
36
+ it 'does not have anything done markers from the left or right sequences' do
37
+ expect(@callback_s1_s2.done_a).to be_empty
38
+ expect(@callback_s1_s2.done_b).to be_empty
39
+ expect(@callback_s2_s1.done_a).to be_empty
40
+ expect(@callback_s2_s1.done_b).to be_empty
41
+ end
13
42
  end
14
43
 
15
- it "should have the correct LCS result on left-matches" do
16
- @callback_s1_s2.matched_a.should == correct_lcs
17
- @callback_s2_s1.matched_a.should == correct_lcs
18
- end
44
+ describe 'over (hello, hello)' do
45
+ before(:each) do
46
+ @callback = simple_callback_no_finishers
47
+ Diff::LCS.traverse_sequences(hello, hello, @callback)
48
+ end
19
49
 
20
- it "should have the correct LCS result on right-matches" do
21
- @callback_s1_s2.matched_b.should == correct_lcs
22
- @callback_s2_s1.matched_b.should == correct_lcs
23
- end
50
+ it 'has the correct LCS result on left-matches' do
51
+ expect(@callback.matched_a).to eq(hello.split(//))
52
+ end
24
53
 
25
- it "should have the correct skipped sequences for the left sequence" do
26
- @callback_s1_s2.discards_a.should == skipped_seq1
27
- @callback_s2_s1.discards_a.should == skipped_seq2
28
- end
54
+ it 'has the correct LCS result on right-matches' do
55
+ expect(@callback.matched_b).to eq(hello.split(//))
56
+ end
57
+
58
+ it 'has the correct skipped sequences with the left sequence', :only => true do
59
+ expect(@callback.discards_a).to be_empty
60
+ end
29
61
 
30
- it "should have the correct skipped sequences for the right sequence" do
31
- @callback_s1_s2.discards_b.should == skipped_seq2
32
- @callback_s2_s1.discards_b.should == skipped_seq1
62
+ it 'has the correct skipped sequences with the right sequence' do
63
+ expect(@callback.discards_b).to be_empty
64
+ end
65
+
66
+ it 'does not have anything done markers from the left or right sequences' do
67
+ expect(@callback.done_a).to be_empty
68
+ expect(@callback.done_b).to be_empty
69
+ end
33
70
  end
34
71
 
35
- it "should not have anything done markers from the left or right sequences" do
36
- @callback_s1_s2.done_a.should be_empty
37
- @callback_s1_s2.done_b.should be_empty
38
- @callback_s2_s1.done_a.should be_empty
39
- @callback_s2_s1.done_b.should be_empty
72
+ describe 'over (hello_ary, hello_ary)' do
73
+ before(:each) do
74
+ @callback = simple_callback_no_finishers
75
+ Diff::LCS.traverse_sequences(hello_ary, hello_ary, @callback)
76
+ end
77
+
78
+ it 'has the correct LCS result on left-matches' do
79
+ expect(@callback.matched_a).to eq(hello_ary)
80
+ end
81
+
82
+ it 'has the correct LCS result on right-matches' do
83
+ expect(@callback.matched_b).to eq(hello_ary)
84
+ end
85
+
86
+ it 'has the correct skipped sequences with the left sequence' do
87
+ expect(@callback.discards_a).to be_empty
88
+ end
89
+
90
+ it 'has the correct skipped sequences with the right sequence' do
91
+ expect(@callback.discards_b).to be_empty
92
+ end
93
+
94
+ it 'does not have anything done markers from the left or right sequences' do
95
+ expect(@callback.done_a).to be_empty
96
+ expect(@callback.done_b).to be_empty
97
+ end
40
98
  end
41
99
  end
42
100
 
43
- describe "callback with finisher" do
101
+ describe 'callback with finisher' do
44
102
  before(:each) do
45
103
  @callback_s1_s2 = simple_callback
46
104
  Diff::LCS.traverse_sequences(seq1, seq2, @callback_s1_s2)
@@ -48,36 +106,32 @@ describe "Diff::LCS.traverse_sequences" do
48
106
  Diff::LCS.traverse_sequences(seq2, seq1, @callback_s2_s1)
49
107
  end
50
108
 
51
- it "should have the correct LCS result on left-matches" do
52
- @callback_s1_s2.matched_a.should == correct_lcs
53
- @callback_s2_s1.matched_a.should == correct_lcs
109
+ it 'has the correct LCS result on left-matches' do
110
+ expect(@callback_s1_s2.matched_a).to eq(correct_lcs)
111
+ expect(@callback_s2_s1.matched_a).to eq(correct_lcs)
54
112
  end
55
113
 
56
- it "should have the correct LCS result on right-matches" do
57
- @callback_s1_s2.matched_b.should == correct_lcs
58
- @callback_s2_s1.matched_b.should == correct_lcs
114
+ it 'has the correct LCS result on right-matches' do
115
+ expect(@callback_s1_s2.matched_b).to eq(correct_lcs)
116
+ expect(@callback_s2_s1.matched_b).to eq(correct_lcs)
59
117
  end
60
118
 
61
- it "should have the correct skipped sequences for the left sequence" do
62
- @callback_s1_s2.discards_a.should == skipped_seq1
63
- @callback_s2_s1.discards_a.should == skipped_seq2
119
+ it 'has the correct skipped sequences for the left sequence' do
120
+ expect(@callback_s1_s2.discards_a).to eq(skipped_seq1)
121
+ expect(@callback_s2_s1.discards_a).to eq(skipped_seq2)
64
122
  end
65
123
 
66
- it "should have the correct skipped sequences for the right sequence" do
67
- @callback_s1_s2.discards_b.should == skipped_seq2
68
- @callback_s2_s1.discards_b.should == skipped_seq1
124
+ it 'has the correct skipped sequences for the right sequence' do
125
+ expect(@callback_s1_s2.discards_b).to eq(skipped_seq2)
126
+ expect(@callback_s2_s1.discards_b).to eq(skipped_seq1)
69
127
  end
70
128
 
71
- it "should have done markers differently-sized sequences" do
72
- @callback_s1_s2.done_a.should == [[ "p", 9, "s", 10 ]]
73
- @callback_s1_s2.done_b.should be_empty
129
+ it 'has done markers differently-sized sequences' do
130
+ expect(@callback_s1_s2.done_a).to eq([['p', 9, 't', 11]])
131
+ expect(@callback_s1_s2.done_b).to be_empty
74
132
 
75
- # 20110731 I don't yet understand why this particular behaviour
76
- # isn't transitive.
77
- @callback_s2_s1.done_a.should be_empty
78
- @callback_s2_s1.done_b.should be_empty
133
+ expect(@callback_s2_s1.done_a).to be_empty
134
+ expect(@callback_s2_s1.done_b).to eq([['t', 11, 'p', 9]])
79
135
  end
80
136
  end
81
137
  end
82
-
83
- # vim: ft=ruby
metadata CHANGED
@@ -1,144 +1,263 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: diff-lcs
3
- version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease:
6
- segments:
7
- - 1
8
- - 1
9
- - 3
10
- version: 1.1.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.5.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Austin Ziegler
14
- autorequire:
8
+ autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2011-08-28 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2021-12-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: hoe-doofus
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: hoe-gemspec2
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.1'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: hoe-git
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.6'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.6'
55
+ - !ruby/object:Gem::Dependency
56
+ name: hoe-rubygems
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.0'
69
+ - !ruby/object:Gem::Dependency
21
70
  name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '2.0'
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '4'
79
+ type: :development
22
80
  prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 2
31
- - 0
32
- version: "2.0"
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '2.0'
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '4'
89
+ - !ruby/object:Gem::Dependency
90
+ name: rake
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '10.0'
96
+ - - "<"
97
+ - !ruby/object:Gem::Version
98
+ version: '14'
33
99
  type: :development
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: hoe
37
100
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ~>
42
- - !ruby/object:Gem::Version
43
- hash: 27
44
- segments:
45
- - 2
46
- - 12
47
- version: "2.12"
101
+ version_requirements: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '10.0'
106
+ - - "<"
107
+ - !ruby/object:Gem::Version
108
+ version: '14'
109
+ - !ruby/object:Gem::Dependency
110
+ name: rdoc
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: 6.3.1
116
+ - - "<"
117
+ - !ruby/object:Gem::Version
118
+ version: '7'
48
119
  type: :development
49
- version_requirements: *id002
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: 6.3.1
126
+ - - "<"
127
+ - !ruby/object:Gem::Version
128
+ version: '7'
129
+ - !ruby/object:Gem::Dependency
130
+ name: hoe
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: '3.23'
136
+ type: :development
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - "~>"
141
+ - !ruby/object:Gem::Version
142
+ version: '3.23'
50
143
  description: |-
51
- Diff::LCS is a port of Perl's Algorithm::Diff that uses the McIlroy-Hunt
52
- longest common subsequence (LCS) algorithm to compute intelligent differences
53
- between two sequenced enumerable containers. The implementation is based on
54
- Mario I. Wolczko's {Smalltalk version 1.2}[ftp://st.cs.uiuc.edu/pub/Smalltalk/MANCHESTER/manchester/4.0/diff.st]
55
- (1993) and Ned Konz's Perl version
56
- {Algorithm::Diff 1.15}[http://search.cpan.org/~nedkonz/Algorithm-Diff-1.15/].
57
-
58
- This is release 1.1.3, fixing several small bugs found over the years. Version
59
- 1.1.0 added new features, including the ability to #patch and #unpatch changes
60
- as well as a new contextual diff callback, Diff::LCS::ContextDiffCallbacks,
61
- that should improve the context sensitivity of patching.
62
-
63
- This library is called Diff::LCS because of an early version of Algorithm::Diff
64
- which was restrictively licensed. This version has seen a minor license change:
65
- instead of being under Ruby's license as an option, the third optional license
66
- is the MIT license.
67
- email:
68
- - austin@rubyforge.org
69
- executables:
144
+ Diff::LCS computes the difference between two Enumerable sequences using the
145
+ McIlroy-Hunt longest common subsequence (LCS) algorithm. It includes utilities
146
+ to create a simple HTML diff output format and a standard diff-like tool.
147
+
148
+ This is release 1.4.3, providing a simple extension that allows for
149
+ Diff::LCS::Change objects to be treated implicitly as arrays and fixes a
150
+ number of formatting issues.
151
+
152
+ Ruby versions below 2.5 are soft-deprecated, which means that older versions
153
+ are no longer part of the CI test suite. If any changes have been introduced
154
+ that break those versions, bug reports and patches will be accepted, but it
155
+ will be up to the reporter to verify any fixes prior to release. The next
156
+ major release will completely break compatibility.
157
+ email:
158
+ - halostatue@gmail.com
159
+ executables:
70
160
  - htmldiff
71
161
  - ldiff
72
162
  extensions: []
73
-
74
- extra_rdoc_files:
163
+ extra_rdoc_files:
164
+ - Code-of-Conduct.md
165
+ - Contributing.md
166
+ - History.md
167
+ - License.md
75
168
  - Manifest.txt
76
- - docs/COPYING.txt
77
- - History.rdoc
78
- - License.rdoc
79
169
  - README.rdoc
80
- files:
81
- - History.rdoc
82
- - License.rdoc
170
+ - docs/COPYING.txt
171
+ - docs/artistic.txt
172
+ files:
173
+ - ".rspec"
174
+ - Code-of-Conduct.md
175
+ - Contributing.md
176
+ - History.md
177
+ - License.md
83
178
  - Manifest.txt
84
179
  - README.rdoc
85
180
  - Rakefile
86
181
  - bin/htmldiff
87
182
  - bin/ldiff
88
- - diff-lcs.gemspec
89
183
  - docs/COPYING.txt
90
- - docs/artistic.html
184
+ - docs/artistic.txt
91
185
  - lib/diff-lcs.rb
92
186
  - lib/diff/lcs.rb
93
187
  - lib/diff/lcs/array.rb
188
+ - lib/diff/lcs/backports.rb
94
189
  - lib/diff/lcs/block.rb
95
190
  - lib/diff/lcs/callbacks.rb
96
191
  - lib/diff/lcs/change.rb
97
192
  - lib/diff/lcs/htmldiff.rb
98
193
  - lib/diff/lcs/hunk.rb
194
+ - lib/diff/lcs/internals.rb
99
195
  - lib/diff/lcs/ldiff.rb
100
196
  - lib/diff/lcs/string.rb
197
+ - spec/change_spec.rb
101
198
  - spec/diff_spec.rb
199
+ - spec/fixtures/aX
200
+ - spec/fixtures/bXaX
201
+ - spec/fixtures/ds1.csv
202
+ - spec/fixtures/ds2.csv
203
+ - spec/fixtures/ldiff/output.diff
204
+ - spec/fixtures/ldiff/output.diff-c
205
+ - spec/fixtures/ldiff/output.diff-e
206
+ - spec/fixtures/ldiff/output.diff-f
207
+ - spec/fixtures/ldiff/output.diff-u
208
+ - spec/fixtures/ldiff/output.diff.chef
209
+ - spec/fixtures/ldiff/output.diff.chef-c
210
+ - spec/fixtures/ldiff/output.diff.chef-e
211
+ - spec/fixtures/ldiff/output.diff.chef-f
212
+ - spec/fixtures/ldiff/output.diff.chef-u
213
+ - spec/fixtures/ldiff/output.diff.chef2
214
+ - spec/fixtures/ldiff/output.diff.chef2-c
215
+ - spec/fixtures/ldiff/output.diff.chef2-d
216
+ - spec/fixtures/ldiff/output.diff.chef2-e
217
+ - spec/fixtures/ldiff/output.diff.chef2-f
218
+ - spec/fixtures/ldiff/output.diff.chef2-u
219
+ - spec/fixtures/new-chef
220
+ - spec/fixtures/new-chef2
221
+ - spec/fixtures/old-chef
222
+ - spec/fixtures/old-chef2
223
+ - spec/hunk_spec.rb
224
+ - spec/issues_spec.rb
102
225
  - spec/lcs_spec.rb
226
+ - spec/ldiff_spec.rb
103
227
  - spec/patch_spec.rb
104
228
  - spec/sdiff_spec.rb
105
229
  - spec/spec_helper.rb
106
230
  - spec/traverse_balanced_spec.rb
107
231
  - spec/traverse_sequences_spec.rb
108
- - .gemtest
109
- homepage:
110
- licenses: []
111
-
112
- post_install_message:
113
- rdoc_options:
114
- - --main
232
+ homepage: https://github.com/halostatue/diff-lcs
233
+ licenses:
234
+ - MIT
235
+ - Artistic-2.0
236
+ - GPL-2.0+
237
+ metadata:
238
+ homepage_uri: https://github.com/halostatue/diff-lcs
239
+ source_code_uri: https://github.com/halostatue/diff-lcs
240
+ bug_tracker_uri: https://github.com/halostatue/diff-lcs/issues
241
+ post_install_message:
242
+ rdoc_options:
243
+ - "--main"
115
244
  - README.rdoc
116
- require_paths:
245
+ require_paths:
117
246
  - lib
118
- required_ruby_version: !ruby/object:Gem::Requirement
119
- none: false
120
- requirements:
247
+ required_ruby_version: !ruby/object:Gem::Requirement
248
+ requirements:
121
249
  - - ">="
122
- - !ruby/object:Gem::Version
123
- hash: 3
124
- segments:
125
- - 0
126
- version: "0"
127
- required_rubygems_version: !ruby/object:Gem::Requirement
128
- none: false
129
- requirements:
250
+ - !ruby/object:Gem::Version
251
+ version: '1.8'
252
+ required_rubygems_version: !ruby/object:Gem::Requirement
253
+ requirements:
130
254
  - - ">="
131
- - !ruby/object:Gem::Version
132
- hash: 3
133
- segments:
134
- - 0
135
- version: "0"
255
+ - !ruby/object:Gem::Version
256
+ version: '0'
136
257
  requirements: []
137
-
138
- rubyforge_project: ruwiki
139
- rubygems_version: 1.8.10
140
- signing_key:
141
- specification_version: 3
142
- summary: Diff::LCS is a port of Perl's Algorithm::Diff that uses the McIlroy-Hunt longest common subsequence (LCS) algorithm to compute intelligent differences between two sequenced enumerable containers
258
+ rubygems_version: 3.1.6
259
+ signing_key:
260
+ specification_version: 4
261
+ summary: Diff::LCS computes the difference between two Enumerable sequences using
262
+ the McIlroy-Hunt longest common subsequence (LCS) algorithm
143
263
  test_files: []
144
-
data/.gemtest DELETED
File without changes
data/History.rdoc DELETED
@@ -1,54 +0,0 @@
1
- == 1.1.3 / 2011-08-27
2
- * Converted to 'hoe' for release.
3
- * Converted tests to RSpec 2.
4
- * Extracted the body of htmldiff into a class available from
5
- diff/lcs/htmldiff.
6
- * Migrated development and issue tracking to GitHub.
7
- * Bugs fixed:
8
- - Eliminated the explicit use of RubyGems in both bin/htmldiff and bin/ldiff.
9
- Resolves issue 4 (https://github.com/halostatue/diff-lcs/issues/4).
10
- - Eliminated Ruby warnings. Resolves issue 3
11
- (https://github.com/halostatue/diff-lcs/issues/3).
12
-
13
- == 1.1.2 / 2004-10-20
14
- * Fixed a problem reported by Mauricio Fernandez in htmldiff.
15
-
16
- == 1.1.1 / 2004-09-25
17
- * Fixed bug #891:
18
- http://rubyforge.org/tracker/?func=detail&atid=407&aid=891&group_id=84
19
- * Fixed a problem with callback initialisation code (it assumed that all
20
- callbacks passed as classes can be initialised; now, it rescues
21
- NoMethodError in the event of private :new being called).
22
- * Modified the non-initialisable callbacks to have a private #new method.
23
- * Moved ldiff core code to Diff::LCS::Ldiff (diff/lcs/ldiff.rb).
24
-
25
- == 1.1.0 / -
26
- * Eliminated the need for Diff::LCS::Event and removed it.
27
- * Added a contextual diff callback, Diff::LCS::ContextDiffCallback.
28
- * Implemented patching/unpatching for standard Diff callback output formats
29
- with both #diff and #sdiff.
30
- * Extensive documentation changes.
31
-
32
- == 1.0.4 / -
33
- * Fixed a problem with bin/ldiff output, especially for unified format.
34
- Newlines that should have been present weren't.
35
- * Changed the .tar.gz installer to generate Windows batch files if ones do not
36
- exist already. Removed the existing batch files as they didn't work.
37
-
38
- == 1.0.3 / -
39
- * Fixed a problem with #traverse_sequences where the first difference from the
40
- left sequence might not be appropriately captured.
41
-
42
- == 1.0.2 / -
43
- * Fixed an issue with ldiff not working because actions were changed from
44
- symbols to strings.
45
-
46
- == 1.0.1 / -
47
- * Minor modifications to the gemspec, the README.
48
- * Renamed the diff program to ldiff (as well as the companion batch file) so as
49
- to not collide with the standard diff program.
50
- * Fixed issues with RubyGems. Requires RubyGems > 0.6.1 or >= 0.6.1 with the
51
- latest CVS version.
52
-
53
- == 1.0 / -
54
- * Initial release based mostly on Perl's Algorithm::Diff.
data/diff-lcs.gemspec DELETED
@@ -1,51 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- Gem::Specification.new do |s|
4
- s.name = %q{diff-lcs}
5
- s.version = "1.1.3"
6
-
7
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Austin Ziegler"]
9
- s.date = %q{2011-08-27}
10
- s.description = %q{Diff::LCS is a port of Perl's Algorithm::Diff that uses the McIlroy-Hunt
11
- longest common subsequence (LCS) algorithm to compute intelligent differences
12
- between two sequenced enumerable containers. The implementation is based on
13
- Mario I. Wolczko's {Smalltalk version 1.2}[ftp://st.cs.uiuc.edu/pub/Smalltalk/MANCHESTER/manchester/4.0/diff.st]
14
- (1993) and Ned Konz's Perl version
15
- {Algorithm::Diff 1.15}[http://search.cpan.org/~nedkonz/Algorithm-Diff-1.15/].
16
-
17
- This is release 1.1.3, fixing several small bugs found over the years. Version
18
- 1.1.0 added new features, including the ability to #patch and #unpatch changes
19
- as well as a new contextual diff callback, Diff::LCS::ContextDiffCallbacks,
20
- that should improve the context sensitivity of patching.
21
-
22
- This library is called Diff::LCS because of an early version of Algorithm::Diff
23
- which was restrictively licensed. This version has seen a minor license change:
24
- instead of being under Ruby's license as an option, the third optional license
25
- is the MIT license.}
26
- s.email = ["austin@rubyforge.org"]
27
- s.executables = ["htmldiff", "ldiff"]
28
- s.extra_rdoc_files = ["Manifest.txt", "docs/COPYING.txt", "History.rdoc", "License.rdoc", "README.rdoc"]
29
- s.files = ["History.rdoc", "License.rdoc", "Manifest.txt", "README.rdoc", "Rakefile", "bin/htmldiff", "bin/ldiff", "diff-lcs.gemspec", "docs/COPYING.txt", "docs/artistic.html", "lib/diff-lcs.rb", "lib/diff/lcs.rb", "lib/diff/lcs/array.rb", "lib/diff/lcs/block.rb", "lib/diff/lcs/callbacks.rb", "lib/diff/lcs/change.rb", "lib/diff/lcs/htmldiff.rb", "lib/diff/lcs/hunk.rb", "lib/diff/lcs/ldiff.rb", "lib/diff/lcs/string.rb", "spec/diff_spec.rb", "spec/lcs_spec.rb", "spec/patch_spec.rb", "spec/sdiff_spec.rb", "spec/spec_helper.rb", "spec/traverse_balanced_spec.rb", "spec/traverse_sequences_spec.rb", ".gemtest"]
30
- s.rdoc_options = ["--main", "README.rdoc"]
31
- s.require_paths = ["lib"]
32
- s.rubyforge_project = %q{ruwiki}
33
- s.rubygems_version = %q{1.3.6}
34
- s.summary = %q{Diff::LCS is a port of Perl's Algorithm::Diff that uses the McIlroy-Hunt longest common subsequence (LCS) algorithm to compute intelligent differences between two sequenced enumerable containers}
35
-
36
- if s.respond_to? :specification_version then
37
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
38
- s.specification_version = 3
39
-
40
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
41
- s.add_development_dependency(%q<rspec>, ["~> 2.0"])
42
- s.add_development_dependency(%q<hoe>, ["~> 2.10"])
43
- else
44
- s.add_dependency(%q<rspec>, ["~> 2.0"])
45
- s.add_dependency(%q<hoe>, ["~> 2.10"])
46
- end
47
- else
48
- s.add_dependency(%q<rspec>, ["~> 2.0"])
49
- s.add_dependency(%q<hoe>, ["~> 2.10"])
50
- end
51
- end