diff-lcs 1.5.0 → 1.6.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +518 -0
- data/CODE_OF_CONDUCT.md +128 -0
- data/CONTRIBUTING.md +71 -0
- data/CONTRIBUTORS.md +49 -0
- data/{License.md → LICENCE.md} +21 -20
- data/Manifest.txt +61 -5
- data/README.md +92 -0
- data/Rakefile +76 -82
- data/SECURITY.md +41 -0
- data/bin/htmldiff +4 -4
- data/docs/artistic.txt +1 -1
- data/lib/diff/lcs/array.rb +1 -1
- data/lib/diff/lcs/backports.rb +6 -2
- data/lib/diff/lcs/block.rb +4 -4
- data/lib/diff/lcs/callbacks.rb +9 -7
- data/lib/diff/lcs/change.rb +22 -22
- data/lib/diff/lcs/htmldiff.rb +26 -16
- data/lib/diff/lcs/hunk.rb +66 -45
- data/lib/diff/lcs/internals.rb +17 -17
- data/lib/diff/lcs/ldiff.rb +93 -75
- data/lib/diff/lcs/version.rb +7 -0
- data/lib/diff/lcs.rb +66 -63
- data/lib/diff-lcs.rb +1 -1
- data/mise.toml +5 -0
- data/spec/change_spec.rb +50 -50
- data/spec/diff_spec.rb +14 -14
- data/spec/fixtures/123_x +2 -0
- data/spec/fixtures/456_x +2 -0
- data/spec/fixtures/empty +0 -0
- data/spec/fixtures/file1.bin +0 -0
- data/spec/fixtures/file2.bin +0 -0
- data/spec/fixtures/four_lines +4 -0
- data/spec/fixtures/four_lines_with_missing_new_line +4 -0
- data/spec/fixtures/ldiff/diff.missing_new_line1-e +1 -0
- data/spec/fixtures/ldiff/diff.missing_new_line1-f +1 -0
- data/spec/fixtures/ldiff/diff.missing_new_line2-e +1 -0
- data/spec/fixtures/ldiff/diff.missing_new_line2-f +1 -0
- data/spec/fixtures/ldiff/error.diff.chef-e +2 -0
- data/spec/fixtures/ldiff/error.diff.chef-f +2 -0
- data/spec/fixtures/ldiff/error.diff.missing_new_line1-e +1 -0
- data/spec/fixtures/ldiff/error.diff.missing_new_line1-f +1 -0
- data/spec/fixtures/ldiff/error.diff.missing_new_line2-e +1 -0
- data/spec/fixtures/ldiff/error.diff.missing_new_line2-f +1 -0
- data/spec/fixtures/ldiff/output.diff.bin1 +0 -0
- data/spec/fixtures/ldiff/output.diff.bin1-c +0 -0
- data/spec/fixtures/ldiff/output.diff.bin1-e +0 -0
- data/spec/fixtures/ldiff/output.diff.bin1-f +0 -0
- data/spec/fixtures/ldiff/output.diff.bin1-u +0 -0
- data/spec/fixtures/ldiff/output.diff.bin2 +1 -0
- data/spec/fixtures/ldiff/output.diff.bin2-c +1 -0
- data/spec/fixtures/ldiff/output.diff.bin2-e +1 -0
- data/spec/fixtures/ldiff/output.diff.bin2-f +1 -0
- data/spec/fixtures/ldiff/output.diff.bin2-u +1 -0
- data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines +5 -0
- data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-c +9 -0
- data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-e +6 -0
- data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-f +6 -0
- data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-u +7 -0
- data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty +5 -0
- data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-c +9 -0
- data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-e +1 -0
- data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-f +1 -0
- data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-u +7 -0
- data/spec/fixtures/ldiff/output.diff.issue95_trailing_context +4 -0
- data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-c +9 -0
- data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-e +3 -0
- data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-f +3 -0
- data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-u +6 -0
- data/spec/fixtures/ldiff/output.diff.missing_new_line1 +5 -0
- data/spec/fixtures/ldiff/output.diff.missing_new_line1-c +14 -0
- data/spec/fixtures/ldiff/output.diff.missing_new_line1-e +0 -0
- data/spec/fixtures/ldiff/output.diff.missing_new_line1-f +0 -0
- data/spec/fixtures/ldiff/output.diff.missing_new_line1-u +9 -0
- data/spec/fixtures/ldiff/output.diff.missing_new_line2 +5 -0
- data/spec/fixtures/ldiff/output.diff.missing_new_line2-c +14 -0
- data/spec/fixtures/ldiff/output.diff.missing_new_line2-e +0 -0
- data/spec/fixtures/ldiff/output.diff.missing_new_line2-f +0 -0
- data/spec/fixtures/ldiff/output.diff.missing_new_line2-u +9 -0
- data/spec/hunk_spec.rb +20 -20
- data/spec/issues_spec.rb +76 -70
- data/spec/lcs_spec.rb +11 -11
- data/spec/ldiff_spec.rb +30 -17
- data/spec/patch_spec.rb +84 -84
- data/spec/sdiff_spec.rb +111 -109
- data/spec/spec_helper.rb +162 -160
- data/spec/traverse_balanced_spec.rb +191 -189
- data/spec/traverse_sequences_spec.rb +31 -31
- metadata +90 -61
- data/Code-of-Conduct.md +0 -74
- data/Contributing.md +0 -119
- data/History.md +0 -400
- data/README.rdoc +0 -84
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "spec_helper"
|
4
4
|
|
5
|
-
describe
|
6
|
-
describe
|
7
|
-
describe
|
5
|
+
describe "Diff::LCS.traverse_sequences" do
|
6
|
+
describe "callback with no finishers" do
|
7
|
+
describe "over (seq1, seq2)" do
|
8
8
|
before(:each) do
|
9
9
|
@callback_s1_s2 = simple_callback_no_finishers
|
10
10
|
Diff::LCS.traverse_sequences(seq1, seq2, @callback_s1_s2)
|
@@ -13,27 +13,27 @@ describe 'Diff::LCS.traverse_sequences' do
|
|
13
13
|
Diff::LCS.traverse_sequences(seq2, seq1, @callback_s2_s1)
|
14
14
|
end
|
15
15
|
|
16
|
-
it
|
16
|
+
it "has the correct LCS result on left-matches" do
|
17
17
|
expect(@callback_s1_s2.matched_a).to eq(correct_lcs)
|
18
18
|
expect(@callback_s2_s1.matched_a).to eq(correct_lcs)
|
19
19
|
end
|
20
20
|
|
21
|
-
it
|
21
|
+
it "has the correct LCS result on right-matches" do
|
22
22
|
expect(@callback_s1_s2.matched_b).to eq(correct_lcs)
|
23
23
|
expect(@callback_s2_s1.matched_b).to eq(correct_lcs)
|
24
24
|
end
|
25
25
|
|
26
|
-
it
|
26
|
+
it "has the correct skipped sequences with the left sequence" do
|
27
27
|
expect(@callback_s1_s2.discards_a).to eq(skipped_seq1)
|
28
28
|
expect(@callback_s2_s1.discards_a).to eq(skipped_seq2)
|
29
29
|
end
|
30
30
|
|
31
|
-
it
|
31
|
+
it "has the correct skipped sequences with the right sequence" do
|
32
32
|
expect(@callback_s1_s2.discards_b).to eq(skipped_seq2)
|
33
33
|
expect(@callback_s2_s1.discards_b).to eq(skipped_seq1)
|
34
34
|
end
|
35
35
|
|
36
|
-
it
|
36
|
+
it "does not have anything done markers from the left or right sequences" do
|
37
37
|
expect(@callback_s1_s2.done_a).to be_empty
|
38
38
|
expect(@callback_s1_s2.done_b).to be_empty
|
39
39
|
expect(@callback_s2_s1.done_a).to be_empty
|
@@ -41,64 +41,64 @@ describe 'Diff::LCS.traverse_sequences' do
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
describe
|
44
|
+
describe "over (hello, hello)" do
|
45
45
|
before(:each) do
|
46
46
|
@callback = simple_callback_no_finishers
|
47
47
|
Diff::LCS.traverse_sequences(hello, hello, @callback)
|
48
48
|
end
|
49
49
|
|
50
|
-
it
|
51
|
-
expect(@callback.matched_a).to eq(hello.
|
50
|
+
it "has the correct LCS result on left-matches" do
|
51
|
+
expect(@callback.matched_a).to eq(hello.chars)
|
52
52
|
end
|
53
53
|
|
54
|
-
it
|
55
|
-
expect(@callback.matched_b).to eq(hello.
|
54
|
+
it "has the correct LCS result on right-matches" do
|
55
|
+
expect(@callback.matched_b).to eq(hello.chars)
|
56
56
|
end
|
57
57
|
|
58
|
-
it
|
58
|
+
it "has the correct skipped sequences with the left sequence" do
|
59
59
|
expect(@callback.discards_a).to be_empty
|
60
60
|
end
|
61
61
|
|
62
|
-
it
|
62
|
+
it "has the correct skipped sequences with the right sequence" do
|
63
63
|
expect(@callback.discards_b).to be_empty
|
64
64
|
end
|
65
65
|
|
66
|
-
it
|
66
|
+
it "does not have anything done markers from the left or right sequences" do
|
67
67
|
expect(@callback.done_a).to be_empty
|
68
68
|
expect(@callback.done_b).to be_empty
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
describe
|
72
|
+
describe "over (hello_ary, hello_ary)" do
|
73
73
|
before(:each) do
|
74
74
|
@callback = simple_callback_no_finishers
|
75
75
|
Diff::LCS.traverse_sequences(hello_ary, hello_ary, @callback)
|
76
76
|
end
|
77
77
|
|
78
|
-
it
|
78
|
+
it "has the correct LCS result on left-matches" do
|
79
79
|
expect(@callback.matched_a).to eq(hello_ary)
|
80
80
|
end
|
81
81
|
|
82
|
-
it
|
82
|
+
it "has the correct LCS result on right-matches" do
|
83
83
|
expect(@callback.matched_b).to eq(hello_ary)
|
84
84
|
end
|
85
85
|
|
86
|
-
it
|
86
|
+
it "has the correct skipped sequences with the left sequence" do
|
87
87
|
expect(@callback.discards_a).to be_empty
|
88
88
|
end
|
89
89
|
|
90
|
-
it
|
90
|
+
it "has the correct skipped sequences with the right sequence" do
|
91
91
|
expect(@callback.discards_b).to be_empty
|
92
92
|
end
|
93
93
|
|
94
|
-
it
|
94
|
+
it "does not have anything done markers from the left or right sequences" do
|
95
95
|
expect(@callback.done_a).to be_empty
|
96
96
|
expect(@callback.done_b).to be_empty
|
97
97
|
end
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
-
describe
|
101
|
+
describe "callback with finisher" do
|
102
102
|
before(:each) do
|
103
103
|
@callback_s1_s2 = simple_callback
|
104
104
|
Diff::LCS.traverse_sequences(seq1, seq2, @callback_s1_s2)
|
@@ -106,32 +106,32 @@ describe 'Diff::LCS.traverse_sequences' do
|
|
106
106
|
Diff::LCS.traverse_sequences(seq2, seq1, @callback_s2_s1)
|
107
107
|
end
|
108
108
|
|
109
|
-
it
|
109
|
+
it "has the correct LCS result on left-matches" do
|
110
110
|
expect(@callback_s1_s2.matched_a).to eq(correct_lcs)
|
111
111
|
expect(@callback_s2_s1.matched_a).to eq(correct_lcs)
|
112
112
|
end
|
113
113
|
|
114
|
-
it
|
114
|
+
it "has the correct LCS result on right-matches" do
|
115
115
|
expect(@callback_s1_s2.matched_b).to eq(correct_lcs)
|
116
116
|
expect(@callback_s2_s1.matched_b).to eq(correct_lcs)
|
117
117
|
end
|
118
118
|
|
119
|
-
it
|
119
|
+
it "has the correct skipped sequences for the left sequence" do
|
120
120
|
expect(@callback_s1_s2.discards_a).to eq(skipped_seq1)
|
121
121
|
expect(@callback_s2_s1.discards_a).to eq(skipped_seq2)
|
122
122
|
end
|
123
123
|
|
124
|
-
it
|
124
|
+
it "has the correct skipped sequences for the right sequence" do
|
125
125
|
expect(@callback_s1_s2.discards_b).to eq(skipped_seq2)
|
126
126
|
expect(@callback_s2_s1.discards_b).to eq(skipped_seq1)
|
127
127
|
end
|
128
128
|
|
129
|
-
it
|
130
|
-
expect(@callback_s1_s2.done_a).to eq([[
|
129
|
+
it "has done markers differently-sized sequences" do
|
130
|
+
expect(@callback_s1_s2.done_a).to eq([["p", 9, "t", 11]])
|
131
131
|
expect(@callback_s1_s2.done_b).to be_empty
|
132
132
|
|
133
133
|
expect(@callback_s2_s1.done_a).to be_empty
|
134
|
-
expect(@callback_s2_s1.done_b).to eq([[
|
134
|
+
expect(@callback_s2_s1.done_b).to eq([["t", 11, "p", 9]])
|
135
135
|
end
|
136
136
|
end
|
137
137
|
end
|
metadata
CHANGED
@@ -1,57 +1,42 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diff-lcs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austin Ziegler
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-05-12 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: hoe
|
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
|
13
|
+
name: hoe
|
29
14
|
requirement: !ruby/object:Gem::Requirement
|
30
15
|
requirements:
|
31
16
|
- - "~>"
|
32
17
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
18
|
+
version: '4.0'
|
34
19
|
type: :development
|
35
20
|
prerelease: false
|
36
21
|
version_requirements: !ruby/object:Gem::Requirement
|
37
22
|
requirements:
|
38
23
|
- - "~>"
|
39
24
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
25
|
+
version: '4.0'
|
41
26
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: hoe-
|
27
|
+
name: hoe-halostatue
|
43
28
|
requirement: !ruby/object:Gem::Requirement
|
44
29
|
requirements:
|
45
30
|
- - "~>"
|
46
31
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
32
|
+
version: '2.0'
|
48
33
|
type: :development
|
49
34
|
prerelease: false
|
50
35
|
version_requirements: !ruby/object:Gem::Requirement
|
51
36
|
requirements:
|
52
37
|
- - "~>"
|
53
38
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
39
|
+
version: '2.0'
|
55
40
|
- !ruby/object:Gem::Dependency
|
56
41
|
name: hoe-rubygems
|
57
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,34 +111,20 @@ dependencies:
|
|
126
111
|
- - "<"
|
127
112
|
- !ruby/object:Gem::Version
|
128
113
|
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'
|
143
114
|
description: |-
|
144
115
|
Diff::LCS computes the difference between two Enumerable sequences using the
|
145
116
|
McIlroy-Hunt longest common subsequence (LCS) algorithm. It includes utilities
|
146
117
|
to create a simple HTML diff output format and a standard diff-like tool.
|
147
118
|
|
148
|
-
This is release 1.
|
149
|
-
Diff::LCS::Change objects to be treated implicitly as arrays and fixes a
|
150
|
-
|
119
|
+
This is release 1.6.1, providing a simple extension that allows for
|
120
|
+
Diff::LCS::Change objects to be treated implicitly as arrays and fixes a number
|
121
|
+
of formatting issues.
|
151
122
|
|
152
|
-
Ruby versions below 2.5 are soft-deprecated, which means that older versions
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
123
|
+
Ruby versions below 2.5 are soft-deprecated, which means that older versions are
|
124
|
+
no longer part of the CI test suite. If any changes have been introduced that
|
125
|
+
break those versions, bug reports and patches will be accepted, but it will be
|
126
|
+
up to the reporter to verify any fixes prior to release. The next major release
|
127
|
+
will completely break compatibility.
|
157
128
|
email:
|
158
129
|
- halostatue@gmail.com
|
159
130
|
executables:
|
@@ -161,23 +132,27 @@ executables:
|
|
161
132
|
- ldiff
|
162
133
|
extensions: []
|
163
134
|
extra_rdoc_files:
|
164
|
-
-
|
165
|
-
-
|
166
|
-
-
|
167
|
-
-
|
135
|
+
- CHANGELOG.md
|
136
|
+
- CODE_OF_CONDUCT.md
|
137
|
+
- CONTRIBUTING.md
|
138
|
+
- CONTRIBUTORS.md
|
139
|
+
- LICENCE.md
|
168
140
|
- Manifest.txt
|
169
|
-
- README.
|
141
|
+
- README.md
|
142
|
+
- SECURITY.md
|
170
143
|
- docs/COPYING.txt
|
171
144
|
- docs/artistic.txt
|
172
145
|
files:
|
173
146
|
- ".rspec"
|
174
|
-
-
|
175
|
-
-
|
176
|
-
-
|
177
|
-
-
|
147
|
+
- CHANGELOG.md
|
148
|
+
- CODE_OF_CONDUCT.md
|
149
|
+
- CONTRIBUTING.md
|
150
|
+
- CONTRIBUTORS.md
|
151
|
+
- LICENCE.md
|
178
152
|
- Manifest.txt
|
179
|
-
- README.
|
153
|
+
- README.md
|
180
154
|
- Rakefile
|
155
|
+
- SECURITY.md
|
181
156
|
- bin/htmldiff
|
182
157
|
- bin/ldiff
|
183
158
|
- docs/COPYING.txt
|
@@ -194,17 +169,46 @@ files:
|
|
194
169
|
- lib/diff/lcs/internals.rb
|
195
170
|
- lib/diff/lcs/ldiff.rb
|
196
171
|
- lib/diff/lcs/string.rb
|
172
|
+
- lib/diff/lcs/version.rb
|
173
|
+
- mise.toml
|
197
174
|
- spec/change_spec.rb
|
198
175
|
- spec/diff_spec.rb
|
176
|
+
- spec/fixtures/123_x
|
177
|
+
- spec/fixtures/456_x
|
199
178
|
- spec/fixtures/aX
|
200
179
|
- spec/fixtures/bXaX
|
201
180
|
- spec/fixtures/ds1.csv
|
202
181
|
- spec/fixtures/ds2.csv
|
182
|
+
- spec/fixtures/empty
|
183
|
+
- spec/fixtures/file1.bin
|
184
|
+
- spec/fixtures/file2.bin
|
185
|
+
- spec/fixtures/four_lines
|
186
|
+
- spec/fixtures/four_lines_with_missing_new_line
|
187
|
+
- spec/fixtures/ldiff/diff.missing_new_line1-e
|
188
|
+
- spec/fixtures/ldiff/diff.missing_new_line1-f
|
189
|
+
- spec/fixtures/ldiff/diff.missing_new_line2-e
|
190
|
+
- spec/fixtures/ldiff/diff.missing_new_line2-f
|
191
|
+
- spec/fixtures/ldiff/error.diff.chef-e
|
192
|
+
- spec/fixtures/ldiff/error.diff.chef-f
|
193
|
+
- spec/fixtures/ldiff/error.diff.missing_new_line1-e
|
194
|
+
- spec/fixtures/ldiff/error.diff.missing_new_line1-f
|
195
|
+
- spec/fixtures/ldiff/error.diff.missing_new_line2-e
|
196
|
+
- spec/fixtures/ldiff/error.diff.missing_new_line2-f
|
203
197
|
- spec/fixtures/ldiff/output.diff
|
204
198
|
- spec/fixtures/ldiff/output.diff-c
|
205
199
|
- spec/fixtures/ldiff/output.diff-e
|
206
200
|
- spec/fixtures/ldiff/output.diff-f
|
207
201
|
- spec/fixtures/ldiff/output.diff-u
|
202
|
+
- spec/fixtures/ldiff/output.diff.bin1
|
203
|
+
- spec/fixtures/ldiff/output.diff.bin1-c
|
204
|
+
- spec/fixtures/ldiff/output.diff.bin1-e
|
205
|
+
- spec/fixtures/ldiff/output.diff.bin1-f
|
206
|
+
- spec/fixtures/ldiff/output.diff.bin1-u
|
207
|
+
- spec/fixtures/ldiff/output.diff.bin2
|
208
|
+
- spec/fixtures/ldiff/output.diff.bin2-c
|
209
|
+
- spec/fixtures/ldiff/output.diff.bin2-e
|
210
|
+
- spec/fixtures/ldiff/output.diff.bin2-f
|
211
|
+
- spec/fixtures/ldiff/output.diff.bin2-u
|
208
212
|
- spec/fixtures/ldiff/output.diff.chef
|
209
213
|
- spec/fixtures/ldiff/output.diff.chef-c
|
210
214
|
- spec/fixtures/ldiff/output.diff.chef-e
|
@@ -216,6 +220,31 @@ files:
|
|
216
220
|
- spec/fixtures/ldiff/output.diff.chef2-e
|
217
221
|
- spec/fixtures/ldiff/output.diff.chef2-f
|
218
222
|
- spec/fixtures/ldiff/output.diff.chef2-u
|
223
|
+
- spec/fixtures/ldiff/output.diff.empty.vs.four_lines
|
224
|
+
- spec/fixtures/ldiff/output.diff.empty.vs.four_lines-c
|
225
|
+
- spec/fixtures/ldiff/output.diff.empty.vs.four_lines-e
|
226
|
+
- spec/fixtures/ldiff/output.diff.empty.vs.four_lines-f
|
227
|
+
- spec/fixtures/ldiff/output.diff.empty.vs.four_lines-u
|
228
|
+
- spec/fixtures/ldiff/output.diff.four_lines.vs.empty
|
229
|
+
- spec/fixtures/ldiff/output.diff.four_lines.vs.empty-c
|
230
|
+
- spec/fixtures/ldiff/output.diff.four_lines.vs.empty-e
|
231
|
+
- spec/fixtures/ldiff/output.diff.four_lines.vs.empty-f
|
232
|
+
- spec/fixtures/ldiff/output.diff.four_lines.vs.empty-u
|
233
|
+
- spec/fixtures/ldiff/output.diff.issue95_trailing_context
|
234
|
+
- spec/fixtures/ldiff/output.diff.issue95_trailing_context-c
|
235
|
+
- spec/fixtures/ldiff/output.diff.issue95_trailing_context-e
|
236
|
+
- spec/fixtures/ldiff/output.diff.issue95_trailing_context-f
|
237
|
+
- spec/fixtures/ldiff/output.diff.issue95_trailing_context-u
|
238
|
+
- spec/fixtures/ldiff/output.diff.missing_new_line1
|
239
|
+
- spec/fixtures/ldiff/output.diff.missing_new_line1-c
|
240
|
+
- spec/fixtures/ldiff/output.diff.missing_new_line1-e
|
241
|
+
- spec/fixtures/ldiff/output.diff.missing_new_line1-f
|
242
|
+
- spec/fixtures/ldiff/output.diff.missing_new_line1-u
|
243
|
+
- spec/fixtures/ldiff/output.diff.missing_new_line2
|
244
|
+
- spec/fixtures/ldiff/output.diff.missing_new_line2-c
|
245
|
+
- spec/fixtures/ldiff/output.diff.missing_new_line2-e
|
246
|
+
- spec/fixtures/ldiff/output.diff.missing_new_line2-f
|
247
|
+
- spec/fixtures/ldiff/output.diff.missing_new_line2-u
|
219
248
|
- spec/fixtures/new-chef
|
220
249
|
- spec/fixtures/new-chef2
|
221
250
|
- spec/fixtures/old-chef
|
@@ -232,16 +261,17 @@ files:
|
|
232
261
|
homepage: https://github.com/halostatue/diff-lcs
|
233
262
|
licenses:
|
234
263
|
- MIT
|
235
|
-
- Artistic-
|
236
|
-
- GPL-2.0
|
264
|
+
- Artistic-1.0-Perl
|
265
|
+
- GPL-2.0-or-later
|
237
266
|
metadata:
|
238
267
|
homepage_uri: https://github.com/halostatue/diff-lcs
|
268
|
+
changelog_uri: https://github.com/halostatue/diff-lcs/blob/main/CHANGELOG.md
|
239
269
|
source_code_uri: https://github.com/halostatue/diff-lcs
|
240
270
|
bug_tracker_uri: https://github.com/halostatue/diff-lcs/issues
|
241
|
-
|
271
|
+
rubygems_mfa_required: 'true'
|
242
272
|
rdoc_options:
|
243
273
|
- "--main"
|
244
|
-
- README.
|
274
|
+
- README.md
|
245
275
|
require_paths:
|
246
276
|
- lib
|
247
277
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -255,8 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
285
|
- !ruby/object:Gem::Version
|
256
286
|
version: '0'
|
257
287
|
requirements: []
|
258
|
-
rubygems_version: 3.
|
259
|
-
signing_key:
|
288
|
+
rubygems_version: 3.6.6
|
260
289
|
specification_version: 4
|
261
290
|
summary: Diff::LCS computes the difference between two Enumerable sequences using
|
262
291
|
the McIlroy-Hunt longest common subsequence (LCS) algorithm
|
data/Code-of-Conduct.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/Contributing.md
DELETED
@@ -1,119 +0,0 @@
|
|
1
|
-
## Contributing
|
2
|
-
|
3
|
-
I value any contribution to Diff::LCS you can provide: a bug report, a
|
4
|
-
feature request, or code contributions. Code contributions to Diff::LCS are
|
5
|
-
especially <del>welcome</del>encouraged. Because Diff::LCS is a complex
|
6
|
-
codebase, there are a few guidelines:
|
7
|
-
|
8
|
-
- Code changes _will not_ be accepted without tests. The test suite is
|
9
|
-
written with [RSpec][].
|
10
|
-
- Match my coding style.
|
11
|
-
- Use a thoughtfully-named topic branch that contains your change. Rebase
|
12
|
-
your commits into logical chunks as necessary.
|
13
|
-
- Use [quality commit messages][].
|
14
|
-
- Do not change the version number; when your patch is accepted and a release
|
15
|
-
is made, the version will be updated at that point.
|
16
|
-
- Submit a GitHub pull request with your changes.
|
17
|
-
- New or changed behaviours require appropriate documentation.
|
18
|
-
|
19
|
-
### Test Dependencies
|
20
|
-
|
21
|
-
Diff::LCS uses Ryan Davis’s [Hoe][] to manage the release process, and it
|
22
|
-
adds a number of rake tasks. You will mostly be interested in:
|
23
|
-
|
24
|
-
```sh
|
25
|
-
$ rake
|
26
|
-
```
|
27
|
-
|
28
|
-
which runs the tests the same way that:
|
29
|
-
|
30
|
-
```sh
|
31
|
-
$ rake spec
|
32
|
-
```
|
33
|
-
|
34
|
-
will do.
|
35
|
-
|
36
|
-
To assist with the installation of the development dependencies, I have
|
37
|
-
provided a Gemfile pointing to the (generated) `diff-lcs.gemspec` file. This
|
38
|
-
will permit you to do:
|
39
|
-
|
40
|
-
```sh
|
41
|
-
$ bundle install
|
42
|
-
```
|
43
|
-
|
44
|
-
to get the development dependencies. If you aleady have `hoe` installed, you
|
45
|
-
can accomplish the same thing with:
|
46
|
-
|
47
|
-
```sh
|
48
|
-
$ rake newb
|
49
|
-
```
|
50
|
-
|
51
|
-
This task will install any missing dependencies, run the tests/specs, and
|
52
|
-
generate the RDoc.
|
53
|
-
|
54
|
-
You can run tests with code coverage analysis by running:
|
55
|
-
|
56
|
-
```sh
|
57
|
-
$ rake spec:coverage
|
58
|
-
```
|
59
|
-
|
60
|
-
### Workflow
|
61
|
-
|
62
|
-
Here's the most direct way to get your work merged into the project:
|
63
|
-
|
64
|
-
- Fork the project.
|
65
|
-
- Clone down your fork (`git clone git://github.com/<username>/diff-lcs.git`).
|
66
|
-
- Create a topic branch to contain your change (`git checkout -b my_awesome_feature`).
|
67
|
-
- Hack away, add tests. Not necessarily in that order.
|
68
|
-
- Make sure everything still passes by running `rake`.
|
69
|
-
- If necessary, rebase your commits into logical chunks, without errors.
|
70
|
-
- Push the branch up (`git push origin my_awesome_feature`).
|
71
|
-
- Create a pull request against halostatue/diff-lcs and describe what your
|
72
|
-
change does and the why you think it should be merged.
|
73
|
-
|
74
|
-
### Contributors
|
75
|
-
|
76
|
-
- Austin Ziegler created Diff::LCS.
|
77
|
-
|
78
|
-
Thanks to everyone else who has contributed code or bug reports to Diff::LCS:
|
79
|
-
|
80
|
-
- @ginriki
|
81
|
-
- @joshbronson
|
82
|
-
- @kevinmook
|
83
|
-
- @mckaz
|
84
|
-
- Akinori Musha
|
85
|
-
- Artem Ignatyev
|
86
|
-
- Brandon Fish
|
87
|
-
- Camille Drapier
|
88
|
-
- Cédric Boutillier
|
89
|
-
- Gregg Kellogg
|
90
|
-
- Jagdeep Singh
|
91
|
-
- Jason Gladish
|
92
|
-
- Jon Rowe
|
93
|
-
- Josef Strzibny
|
94
|
-
- Josep (@apuratepp)
|
95
|
-
- Josh Bronson
|
96
|
-
- Jun Aruga
|
97
|
-
- Kenichi Kamiya
|
98
|
-
- Kensuke Nagae
|
99
|
-
- Kevin Ansfield
|
100
|
-
- Koichi Ito
|
101
|
-
- Mark Friedgan
|
102
|
-
- Michael Granger
|
103
|
-
- Myron Marston
|
104
|
-
- Nicolas Leger
|
105
|
-
- Oleg Orlov
|
106
|
-
- Paul Kunysch
|
107
|
-
- Pete Higgins
|
108
|
-
- Peter Wagenet
|
109
|
-
- Philippe Lafoucrière
|
110
|
-
- Ryan Lovelett
|
111
|
-
- Scott Steele
|
112
|
-
- Simon Courtois
|
113
|
-
- Tien (@tiendo1011)
|
114
|
-
- Tomas Jura
|
115
|
-
- Vít Ondruch
|
116
|
-
|
117
|
-
[rspec]: http://rspec.info/documentation/
|
118
|
-
[quality commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
119
|
-
[hoe]: https://github.com/seattlerb/hoe
|