diff-lcs 1.5.1 → 1.6.1
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 +506 -0
- data/CODE_OF_CONDUCT.md +128 -0
- data/CONTRIBUTING.md +71 -0
- data/CONTRIBUTORS.md +48 -0
- data/{License.md → LICENCE.md} +15 -16
- data/Manifest.txt +61 -5
- data/README.md +92 -0
- data/Rakefile +19 -50
- data/SECURITY.md +41 -0
- data/docs/artistic.txt +1 -1
- data/lib/diff/lcs/change.rb +1 -1
- data/lib/diff/lcs/htmldiff.rb +2 -0
- data/lib/diff/lcs/hunk.rb +38 -22
- data/lib/diff/lcs/ldiff.rb +65 -49
- data/lib/diff/lcs/version.rb +7 -0
- data/lib/diff/lcs.rb +10 -9
- data/mise.toml +5 -0
- 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 +1 -1
- data/spec/issues_spec.rb +32 -32
- data/spec/ldiff_spec.rb +21 -10
- data/spec/patch_spec.rb +1 -1
- data/spec/spec_helper.rb +93 -93
- metadata +86 -64
- data/Code-of-Conduct.md +0 -74
- data/Contributing.md +0 -121
- data/History.md +0 -431
- data/README.rdoc +0 -84
@@ -0,0 +1,14 @@
|
|
1
|
+
*** spec/fixtures/four_lines_with_missing_new_line 2025-01-31 12:17:43.926013315 +0100
|
2
|
+
--- spec/fixtures/four_lines 2025-01-31 12:17:43.926013315 +0100
|
3
|
+
***************
|
4
|
+
*** 1,4 ****
|
5
|
+
one
|
6
|
+
two
|
7
|
+
three
|
8
|
+
! four
|
9
|
+
|
10
|
+
--- 1,4 ----
|
11
|
+
one
|
12
|
+
two
|
13
|
+
three
|
14
|
+
! four
|
File without changes
|
File without changes
|
data/spec/hunk_spec.rb
CHANGED
data/spec/issues_spec.rb
CHANGED
@@ -68,38 +68,6 @@ describe "Diff::LCS Issues" do
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
describe "issue #60" do
|
72
|
-
it "should produce unified output with correct context" do
|
73
|
-
# standard:disable Layout/HeredocIndentation
|
74
|
-
old_data = <<-DATA_OLD.strip.split("\n").map(&:chomp)
|
75
|
-
{
|
76
|
-
"name": "x",
|
77
|
-
"description": "hi"
|
78
|
-
}
|
79
|
-
DATA_OLD
|
80
|
-
|
81
|
-
new_data = <<-DATA_NEW.strip.split("\n").map(&:chomp)
|
82
|
-
{
|
83
|
-
"name": "x",
|
84
|
-
"description": "lo"
|
85
|
-
}
|
86
|
-
DATA_NEW
|
87
|
-
|
88
|
-
diff = ::Diff::LCS.diff(old_data, new_data)
|
89
|
-
hunk = ::Diff::LCS::Hunk.new(old_data, new_data, diff.first, 3, 0)
|
90
|
-
|
91
|
-
expect(hunk.diff(:unified)).to eq(<<-EXPECTED.chomp)
|
92
|
-
@@ -1,5 +1,5 @@
|
93
|
-
{
|
94
|
-
"name": "x",
|
95
|
-
- "description": "hi"
|
96
|
-
+ "description": "lo"
|
97
|
-
}
|
98
|
-
EXPECTED
|
99
|
-
# standard:enable Layout/HeredocIndentation
|
100
|
-
end
|
101
|
-
end
|
102
|
-
|
103
71
|
describe "issue #65" do
|
104
72
|
def diff_lines(old_lines, new_lines)
|
105
73
|
file_length_difference = 0
|
@@ -157,4 +125,36 @@ describe "Diff::LCS Issues" do
|
|
157
125
|
# standard:enable Layout/HeredocIndentation
|
158
126
|
end
|
159
127
|
end
|
128
|
+
|
129
|
+
describe "issue #107 (replaces issue #60)" do
|
130
|
+
it "should produce unified output with correct context" do
|
131
|
+
# standard:disable Layout/HeredocIndentation
|
132
|
+
old_data = <<-DATA_OLD.strip.split("\n").map(&:chomp)
|
133
|
+
{
|
134
|
+
"name": "x",
|
135
|
+
"description": "hi"
|
136
|
+
}
|
137
|
+
DATA_OLD
|
138
|
+
|
139
|
+
new_data = <<-DATA_NEW.strip.split("\n").map(&:chomp)
|
140
|
+
{
|
141
|
+
"name": "x",
|
142
|
+
"description": "lo"
|
143
|
+
}
|
144
|
+
DATA_NEW
|
145
|
+
|
146
|
+
diff = ::Diff::LCS.diff(old_data, new_data)
|
147
|
+
hunk = ::Diff::LCS::Hunk.new(old_data, new_data, diff.first, 3, 0)
|
148
|
+
|
149
|
+
expect(hunk.diff(:unified)).to eq(<<-EXPECTED.chomp)
|
150
|
+
@@ -1,4 +1,4 @@
|
151
|
+
{
|
152
|
+
"name": "x",
|
153
|
+
- "description": "hi"
|
154
|
+
+ "description": "lo"
|
155
|
+
}
|
156
|
+
EXPECTED
|
157
|
+
# standard:enable Layout/HeredocIndentation
|
158
|
+
end
|
159
|
+
end
|
160
160
|
end
|
data/spec/ldiff_spec.rb
CHANGED
@@ -7,9 +7,16 @@ RSpec.describe "bin/ldiff" do
|
|
7
7
|
|
8
8
|
# standard:disable Style/HashSyntax
|
9
9
|
fixtures = [
|
10
|
-
{:name => "
|
11
|
-
{:name => "
|
12
|
-
{:name => "
|
10
|
+
{:name => "diff", :left => "aX", :right => "bXaX", :diff => 1},
|
11
|
+
{:name => "diff.missing_new_line1", :left => "four_lines", :right => "four_lines_with_missing_new_line", :diff => 1},
|
12
|
+
{:name => "diff.missing_new_line2", :left => "four_lines_with_missing_new_line", :right => "four_lines", :diff => 1},
|
13
|
+
{:name => "diff.issue95_trailing_context", :left => "123_x", :right => "456_x", :diff => 1},
|
14
|
+
{:name => "diff.four_lines.vs.empty", :left => "four_lines", :right => "empty", :diff => 1},
|
15
|
+
{:name => "diff.empty.vs.four_lines", :left => "empty", :right => "four_lines", :diff => 1},
|
16
|
+
{:name => "diff.bin1", :left => "file1.bin", :right => "file1.bin", :diff => 0},
|
17
|
+
{:name => "diff.bin2", :left => "file1.bin", :right => "file2.bin", :diff => 1},
|
18
|
+
{:name => "diff.chef", :left => "old-chef", :right => "new-chef", :diff => 1},
|
19
|
+
{:name => "diff.chef2", :left => "old-chef2", :right => "new-chef2", :diff => 1}
|
13
20
|
].product([nil, "-e", "-f", "-c", "-u"]).map { |(fixture, flag)|
|
14
21
|
fixture = fixture.dup
|
15
22
|
fixture[:flag] = flag
|
@@ -24,11 +31,14 @@ RSpec.describe "bin/ldiff" do
|
|
24
31
|
"spec/fixtures/#{fixture[:right]}",
|
25
32
|
"#",
|
26
33
|
"=>",
|
27
|
-
"spec/fixtures/ldiff
|
34
|
+
"spec/fixtures/ldiff/output.#{fixture[:name]}#{fixture[:flag]}"
|
28
35
|
].join(" ")
|
29
36
|
|
30
37
|
it desc do
|
31
|
-
|
38
|
+
stdout, stderr, status = run_ldiff(fixture)
|
39
|
+
expect(status).to eq(fixture[:diff])
|
40
|
+
expect(stderr).to eq(read_fixture(fixture, mode: "error", allow_missing: true))
|
41
|
+
expect(stdout).to eq(read_fixture(fixture, mode: "output", allow_missing: false))
|
32
42
|
end
|
33
43
|
end
|
34
44
|
|
@@ -36,10 +46,13 @@ RSpec.describe "bin/ldiff" do
|
|
36
46
|
test_ldiff(fixture)
|
37
47
|
end
|
38
48
|
|
39
|
-
def read_fixture(options)
|
49
|
+
def read_fixture(options, mode: "output", allow_missing: false)
|
40
50
|
fixture = options.fetch(:name)
|
41
51
|
flag = options.fetch(:flag)
|
42
|
-
name = "spec/fixtures/ldiff/#{fixture}#{flag}"
|
52
|
+
name = "spec/fixtures/ldiff/#{mode}.#{fixture}#{flag}"
|
53
|
+
|
54
|
+
return "" if !::File.exist?(name) && allow_missing
|
55
|
+
|
43
56
|
data = IO.__send__(IO.respond_to?(:binread) ? :binread : :read, name)
|
44
57
|
clean_data(data, flag)
|
45
58
|
end
|
@@ -82,8 +95,6 @@ RSpec.describe "bin/ldiff" do
|
|
82
95
|
system("ruby -Ilib bin/ldiff #{flag} spec/fixtures/#{left} spec/fixtures/#{right}")
|
83
96
|
end
|
84
97
|
|
85
|
-
|
86
|
-
expect(stdout).not_to be_empty
|
87
|
-
clean_data(stdout, flag)
|
98
|
+
[clean_data(stdout, flag), stderr, $?.exitstatus]
|
88
99
|
end
|
89
100
|
end
|
data/spec/patch_spec.rb
CHANGED
@@ -181,7 +181,7 @@ describe "Diff::LCS.patch" do
|
|
181
181
|
# above.
|
182
182
|
describe "fix bug 891: patchsets do not contain the last equal part" do
|
183
183
|
before :each do
|
184
|
-
@s1 = %w[a b c d e f g h i j k] #
|
184
|
+
@s1 = %w[a b c d e f g h i j k] # standard:disable Layout/SpaceInsideArrayPercentLiteral
|
185
185
|
@s2 = %w[a b c d D e f g h i j k]
|
186
186
|
end
|
187
187
|
|
data/spec/spec_helper.rb
CHANGED
@@ -7,28 +7,21 @@ require "psych" if RUBY_VERSION >= "1.9"
|
|
7
7
|
|
8
8
|
if ENV["COVERAGE"]
|
9
9
|
require "simplecov"
|
10
|
+
require "simplecov-lcov"
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
rescue LoadError
|
15
|
-
nil
|
12
|
+
SimpleCov::Formatter::LcovFormatter.config do |config|
|
13
|
+
config.report_with_single_file = true
|
14
|
+
config.lcov_file_name = "lcov.info"
|
16
15
|
end
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
require_do("simplecov-sublime-ruby-coverage") {
|
27
|
-
formatters << SimpleCov::Formatter::SublimeRubyCoverageFormatter
|
28
|
-
}
|
29
|
-
|
30
|
-
SimpleCov.start do
|
31
|
-
formatter SimpleCov::Formatter::MultiFormatter.new(formatters)
|
17
|
+
SimpleCov.start "test_frameworks" do
|
18
|
+
enable_coverage :branch
|
19
|
+
primary_coverage :branch
|
20
|
+
formatter SimpleCov::Formatter::MultiFormatter.new([
|
21
|
+
SimpleCov::Formatter::HTMLFormatter,
|
22
|
+
SimpleCov::Formatter::LcovFormatter,
|
23
|
+
SimpleCov::Formatter::SimpleFormatter
|
24
|
+
])
|
32
25
|
end
|
33
26
|
end
|
34
27
|
|
@@ -250,100 +243,107 @@ module Diff::LCS::SpecHelper
|
|
250
243
|
new_result
|
251
244
|
end
|
252
245
|
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
attr_reader :matched_b
|
258
|
-
attr_reader :discards_a
|
259
|
-
attr_reader :discards_b
|
260
|
-
attr_reader :done_a
|
261
|
-
attr_reader :done_b
|
262
|
-
|
263
|
-
def reset
|
264
|
-
@matched_a = []
|
265
|
-
@matched_b = []
|
266
|
-
@discards_a = []
|
267
|
-
@discards_b = []
|
268
|
-
@done_a = []
|
269
|
-
@done_b = []
|
270
|
-
end
|
246
|
+
class SimpleCallback
|
247
|
+
def initialize
|
248
|
+
reset
|
249
|
+
end
|
271
250
|
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
251
|
+
attr_reader :matched_a
|
252
|
+
attr_reader :matched_b
|
253
|
+
attr_reader :discards_a
|
254
|
+
attr_reader :discards_b
|
255
|
+
attr_reader :done_a
|
256
|
+
attr_reader :done_b
|
257
|
+
|
258
|
+
def reset
|
259
|
+
@matched_a = []
|
260
|
+
@matched_b = []
|
261
|
+
@discards_a = []
|
262
|
+
@discards_b = []
|
263
|
+
@done_a = []
|
264
|
+
@done_b = []
|
265
|
+
self
|
266
|
+
end
|
276
267
|
|
277
|
-
|
278
|
-
|
279
|
-
|
268
|
+
def match(event)
|
269
|
+
@matched_a << event.old_element
|
270
|
+
@matched_b << event.new_element
|
271
|
+
end
|
280
272
|
|
281
|
-
|
282
|
-
|
283
|
-
|
273
|
+
def discard_b(event)
|
274
|
+
@discards_b << event.new_element
|
275
|
+
end
|
284
276
|
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
event.new_element, event.new_position
|
289
|
-
]
|
290
|
-
end
|
277
|
+
def discard_a(event)
|
278
|
+
@discards_a << event.old_element
|
279
|
+
end
|
291
280
|
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
281
|
+
def finished_a(event)
|
282
|
+
@done_a << [
|
283
|
+
event.old_element, event.old_position,
|
284
|
+
event.new_element, event.new_position
|
285
|
+
]
|
286
|
+
end
|
287
|
+
|
288
|
+
def finished_b(event)
|
289
|
+
@done_b << [
|
290
|
+
event.old_element, event.old_position,
|
291
|
+
event.new_element, event.new_position
|
292
|
+
]
|
298
293
|
end
|
299
|
-
|
300
|
-
|
294
|
+
end
|
295
|
+
|
296
|
+
def simple_callback
|
297
|
+
SimpleCallback.new
|
298
|
+
end
|
299
|
+
|
300
|
+
class SimpleCallbackNoFinishers < SimpleCallback
|
301
|
+
undef :finished_a
|
302
|
+
undef :finished_b
|
301
303
|
end
|
302
304
|
|
303
305
|
def simple_callback_no_finishers
|
304
|
-
|
305
|
-
class << simple
|
306
|
-
undef :finished_a
|
307
|
-
undef :finished_b
|
308
|
-
end
|
309
|
-
simple
|
306
|
+
SimpleCallbackNoFinishers.new
|
310
307
|
end
|
311
308
|
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
309
|
+
class BalancedCallback
|
310
|
+
def initialize
|
311
|
+
reset
|
312
|
+
end
|
316
313
|
|
317
|
-
|
318
|
-
@result = []
|
319
|
-
end
|
314
|
+
attr_reader :result
|
320
315
|
|
321
|
-
|
322
|
-
|
323
|
-
|
316
|
+
def reset
|
317
|
+
@result = []
|
318
|
+
end
|
324
319
|
|
325
|
-
|
326
|
-
|
327
|
-
|
320
|
+
def match(event)
|
321
|
+
@result << ["=", event.old_position, event.new_position]
|
322
|
+
end
|
328
323
|
|
329
|
-
|
330
|
-
|
331
|
-
|
324
|
+
def discard_a(event)
|
325
|
+
@result << ["<", event.old_position, event.new_position]
|
326
|
+
end
|
332
327
|
|
333
|
-
|
334
|
-
|
335
|
-
end
|
328
|
+
def discard_b(event)
|
329
|
+
@result << [">", event.old_position, event.new_position]
|
336
330
|
end
|
337
|
-
|
338
|
-
|
331
|
+
|
332
|
+
def change(event)
|
333
|
+
@result << ["!", event.old_position, event.new_position]
|
334
|
+
end
|
335
|
+
end
|
336
|
+
|
337
|
+
def balanced_callback
|
338
|
+
BalancedCallback.new
|
339
|
+
end
|
340
|
+
|
341
|
+
class BalancedCallbackNoChange < BalancedCallback
|
342
|
+
undef :change
|
339
343
|
end
|
340
344
|
|
341
345
|
def balanced_callback_no_change
|
342
|
-
|
343
|
-
class << balanced
|
344
|
-
undef :change
|
345
|
-
end
|
346
|
-
balanced
|
346
|
+
BalancedCallbackNoChange.new
|
347
347
|
end
|
348
348
|
|
349
349
|
module Matchers
|
metadata
CHANGED
@@ -1,77 +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.1
|
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-03-25 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: hoe
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '3.0'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '5'
|
23
|
-
type: :development
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '3.0'
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '5'
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: hoe-doofus
|
35
14
|
requirement: !ruby/object:Gem::Requirement
|
36
15
|
requirements:
|
37
16
|
- - "~>"
|
38
17
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
18
|
+
version: '4.0'
|
40
19
|
type: :development
|
41
20
|
prerelease: false
|
42
21
|
version_requirements: !ruby/object:Gem::Requirement
|
43
22
|
requirements:
|
44
23
|
- - "~>"
|
45
24
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
25
|
+
version: '4.0'
|
47
26
|
- !ruby/object:Gem::Dependency
|
48
|
-
name: hoe-
|
27
|
+
name: hoe-halostatue
|
49
28
|
requirement: !ruby/object:Gem::Requirement
|
50
29
|
requirements:
|
51
30
|
- - "~>"
|
52
31
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '1.1'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: hoe-git2
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '1.7'
|
32
|
+
version: '2.0'
|
68
33
|
type: :development
|
69
34
|
prerelease: false
|
70
35
|
version_requirements: !ruby/object:Gem::Requirement
|
71
36
|
requirements:
|
72
37
|
- - "~>"
|
73
38
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
39
|
+
version: '2.0'
|
75
40
|
- !ruby/object:Gem::Dependency
|
76
41
|
name: hoe-rubygems
|
77
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,14 +117,14 @@ description: |-
|
|
152
117
|
to create a simple HTML diff output format and a standard diff-like tool.
|
153
118
|
|
154
119
|
This is release 1.4.3, providing a simple extension that allows for
|
155
|
-
Diff::LCS::Change objects to be treated implicitly as arrays and fixes a
|
156
|
-
|
120
|
+
Diff::LCS::Change objects to be treated implicitly as arrays and fixes a number
|
121
|
+
of formatting issues.
|
157
122
|
|
158
|
-
Ruby versions below 2.5 are soft-deprecated, which means that older versions
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
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.
|
163
128
|
email:
|
164
129
|
- halostatue@gmail.com
|
165
130
|
executables:
|
@@ -167,23 +132,27 @@ executables:
|
|
167
132
|
- ldiff
|
168
133
|
extensions: []
|
169
134
|
extra_rdoc_files:
|
170
|
-
-
|
171
|
-
-
|
172
|
-
-
|
173
|
-
-
|
135
|
+
- CHANGELOG.md
|
136
|
+
- CODE_OF_CONDUCT.md
|
137
|
+
- CONTRIBUTING.md
|
138
|
+
- CONTRIBUTORS.md
|
139
|
+
- LICENCE.md
|
174
140
|
- Manifest.txt
|
175
|
-
- README.
|
141
|
+
- README.md
|
142
|
+
- SECURITY.md
|
176
143
|
- docs/COPYING.txt
|
177
144
|
- docs/artistic.txt
|
178
145
|
files:
|
179
146
|
- ".rspec"
|
180
|
-
-
|
181
|
-
-
|
182
|
-
-
|
183
|
-
-
|
147
|
+
- CHANGELOG.md
|
148
|
+
- CODE_OF_CONDUCT.md
|
149
|
+
- CONTRIBUTING.md
|
150
|
+
- CONTRIBUTORS.md
|
151
|
+
- LICENCE.md
|
184
152
|
- Manifest.txt
|
185
|
-
- README.
|
153
|
+
- README.md
|
186
154
|
- Rakefile
|
155
|
+
- SECURITY.md
|
187
156
|
- bin/htmldiff
|
188
157
|
- bin/ldiff
|
189
158
|
- docs/COPYING.txt
|
@@ -200,17 +169,46 @@ files:
|
|
200
169
|
- lib/diff/lcs/internals.rb
|
201
170
|
- lib/diff/lcs/ldiff.rb
|
202
171
|
- lib/diff/lcs/string.rb
|
172
|
+
- lib/diff/lcs/version.rb
|
173
|
+
- mise.toml
|
203
174
|
- spec/change_spec.rb
|
204
175
|
- spec/diff_spec.rb
|
176
|
+
- spec/fixtures/123_x
|
177
|
+
- spec/fixtures/456_x
|
205
178
|
- spec/fixtures/aX
|
206
179
|
- spec/fixtures/bXaX
|
207
180
|
- spec/fixtures/ds1.csv
|
208
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
|
209
197
|
- spec/fixtures/ldiff/output.diff
|
210
198
|
- spec/fixtures/ldiff/output.diff-c
|
211
199
|
- spec/fixtures/ldiff/output.diff-e
|
212
200
|
- spec/fixtures/ldiff/output.diff-f
|
213
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
|
214
212
|
- spec/fixtures/ldiff/output.diff.chef
|
215
213
|
- spec/fixtures/ldiff/output.diff.chef-c
|
216
214
|
- spec/fixtures/ldiff/output.diff.chef-e
|
@@ -222,6 +220,31 @@ files:
|
|
222
220
|
- spec/fixtures/ldiff/output.diff.chef2-e
|
223
221
|
- spec/fixtures/ldiff/output.diff.chef2-f
|
224
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
|
225
248
|
- spec/fixtures/new-chef
|
226
249
|
- spec/fixtures/new-chef2
|
227
250
|
- spec/fixtures/old-chef
|
@@ -238,17 +261,17 @@ files:
|
|
238
261
|
homepage: https://github.com/halostatue/diff-lcs
|
239
262
|
licenses:
|
240
263
|
- MIT
|
241
|
-
- Artistic-
|
264
|
+
- Artistic-1.0-Perl
|
242
265
|
- GPL-2.0-or-later
|
243
266
|
metadata:
|
244
267
|
homepage_uri: https://github.com/halostatue/diff-lcs
|
268
|
+
changelog_uri: https://github.com/halostatue/diff-lcs/blob/main/CHANGELOG.md
|
245
269
|
source_code_uri: https://github.com/halostatue/diff-lcs
|
246
270
|
bug_tracker_uri: https://github.com/halostatue/diff-lcs/issues
|
247
271
|
rubygems_mfa_required: 'true'
|
248
|
-
post_install_message:
|
249
272
|
rdoc_options:
|
250
273
|
- "--main"
|
251
|
-
- README.
|
274
|
+
- README.md
|
252
275
|
require_paths:
|
253
276
|
- lib
|
254
277
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -262,8 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
285
|
- !ruby/object:Gem::Version
|
263
286
|
version: '0'
|
264
287
|
requirements: []
|
265
|
-
rubygems_version: 3.
|
266
|
-
signing_key:
|
288
|
+
rubygems_version: 3.6.6
|
267
289
|
specification_version: 4
|
268
290
|
summary: Diff::LCS computes the difference between two Enumerable sequences using
|
269
291
|
the McIlroy-Hunt longest common subsequence (LCS) algorithm
|