diff-lcs 1.6.0 → 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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/CONTRIBUTING.md +9 -12
  4. data/LICENCE.md +15 -16
  5. data/Manifest.txt +54 -1
  6. data/Rakefile +14 -13
  7. data/lib/diff/lcs/ldiff.rb +14 -8
  8. data/lib/diff/lcs/version.rb +7 -0
  9. data/lib/diff/lcs.rb +1 -1
  10. data/mise.toml +5 -0
  11. data/spec/fixtures/123_x +2 -0
  12. data/spec/fixtures/456_x +2 -0
  13. data/spec/fixtures/empty +0 -0
  14. data/spec/fixtures/file1.bin +0 -0
  15. data/spec/fixtures/file2.bin +0 -0
  16. data/spec/fixtures/four_lines +4 -0
  17. data/spec/fixtures/four_lines_with_missing_new_line +4 -0
  18. data/spec/fixtures/ldiff/diff.missing_new_line1-e +1 -0
  19. data/spec/fixtures/ldiff/diff.missing_new_line1-f +1 -0
  20. data/spec/fixtures/ldiff/diff.missing_new_line2-e +1 -0
  21. data/spec/fixtures/ldiff/diff.missing_new_line2-f +1 -0
  22. data/spec/fixtures/ldiff/error.diff.chef-e +2 -0
  23. data/spec/fixtures/ldiff/error.diff.chef-f +2 -0
  24. data/spec/fixtures/ldiff/error.diff.missing_new_line1-e +1 -0
  25. data/spec/fixtures/ldiff/error.diff.missing_new_line1-f +1 -0
  26. data/spec/fixtures/ldiff/error.diff.missing_new_line2-e +1 -0
  27. data/spec/fixtures/ldiff/error.diff.missing_new_line2-f +1 -0
  28. data/spec/fixtures/ldiff/output.diff.bin1 +0 -0
  29. data/spec/fixtures/ldiff/output.diff.bin1-c +0 -0
  30. data/spec/fixtures/ldiff/output.diff.bin1-e +0 -0
  31. data/spec/fixtures/ldiff/output.diff.bin1-f +0 -0
  32. data/spec/fixtures/ldiff/output.diff.bin1-u +0 -0
  33. data/spec/fixtures/ldiff/output.diff.bin2 +1 -0
  34. data/spec/fixtures/ldiff/output.diff.bin2-c +1 -0
  35. data/spec/fixtures/ldiff/output.diff.bin2-e +1 -0
  36. data/spec/fixtures/ldiff/output.diff.bin2-f +1 -0
  37. data/spec/fixtures/ldiff/output.diff.bin2-u +1 -0
  38. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines +5 -0
  39. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-c +9 -0
  40. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-e +6 -0
  41. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-f +6 -0
  42. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-u +7 -0
  43. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty +5 -0
  44. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-c +9 -0
  45. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-e +1 -0
  46. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-f +1 -0
  47. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-u +7 -0
  48. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context +4 -0
  49. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-c +9 -0
  50. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-e +3 -0
  51. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-f +3 -0
  52. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-u +6 -0
  53. data/spec/fixtures/ldiff/output.diff.missing_new_line1 +5 -0
  54. data/spec/fixtures/ldiff/output.diff.missing_new_line1-c +14 -0
  55. data/spec/fixtures/ldiff/output.diff.missing_new_line1-e +0 -0
  56. data/spec/fixtures/ldiff/output.diff.missing_new_line1-f +0 -0
  57. data/spec/fixtures/ldiff/output.diff.missing_new_line1-u +9 -0
  58. data/spec/fixtures/ldiff/output.diff.missing_new_line2 +5 -0
  59. data/spec/fixtures/ldiff/output.diff.missing_new_line2-c +14 -0
  60. data/spec/fixtures/ldiff/output.diff.missing_new_line2-e +0 -0
  61. data/spec/fixtures/ldiff/output.diff.missing_new_line2-f +0 -0
  62. data/spec/fixtures/ldiff/output.diff.missing_new_line2-u +9 -0
  63. data/spec/spec_helper.rb +93 -93
  64. metadata +66 -62
  65. data/Contributing.md +0 -74
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5809a8a19bbbf227168d81fa0dcfe681aff17a494b16cd6af723f7dd665ed0d0
4
- data.tar.gz: 844c07fe8cdc69183f0c0bb8f16cdfadae58d099eb3ab5927ac2aa9b50133948
3
+ metadata.gz: bb036eaab7330d135a91816336705b672bcc3d3fc55b235392f0b0d2faaf2e76
4
+ data.tar.gz: d55364ad8b6a75e697ad90aaffac2d14168c8ef5710b4999d264775de0a220af
5
5
  SHA512:
6
- metadata.gz: 219465ac1abcd2636a39e4425a0a84d64759b6818fa7b885ebfdd941af52344658568b52485c343e74b6dab7a300cf2109a38094ff94aca3f51bef31a3e13987
7
- data.tar.gz: '082bd353ec1fb53cb848a435162ed9dd152f526cab697353de8fd8b9b319fdd319d90a7b1ec45f1259f2cf525fe81aba88f892c43712ff92d09da411391ace76'
6
+ metadata.gz: ca32f0e74df9eaab1530842477fca4cbcd730fde728dfeefd8d6e6f212e8ed0086e7cd288a1fb8e2a79ebed18591cda677ddce75ed2bd0863620993ba34aa553
7
+ data.tar.gz: 2ce80458cd347340b44d8d5cf56c7e11ee145f93559641233ce928bb7ac54e9966a07904e52e1f46f975714b13f28d70832d762185e3d7e867d8caff5fc14ad3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.6.1 / 2025-03-25
4
+
5
+ - Performed further work on `Diff::LCS::Ldiff` improvements ([#46][issue-46])
6
+ and resolve several thread safety issues cleanly by making it a class.
7
+ [#129][pull-129]
8
+
9
+ - Restructure the project to be more consistent with the rest of the projects
10
+ that I manage.
11
+
12
+ - Increased GitHub action security.
13
+
14
+ - Added [trusted publishing][tp] for fully automated releases.
15
+
3
16
  ## 1.6.0 / 2025-02-13
4
17
 
5
18
  - Baptiste Courtois (@annih) has done significant work on making `bin/ldiff`
@@ -481,6 +494,7 @@
481
494
  [pull-103]: https://github.com/halostatue/diff-lcs/pull/103
482
495
  [pull-104]: https://github.com/halostatue/diff-lcs/pull/104
483
496
  [pull-105]: https://github.com/halostatue/diff-lcs/pull/105
497
+ [pull-129]: https://github.com/halostatue/diff-lcs/pull/129
484
498
  [rspec-expectations#200]: https://github.com/rspec/rspec-expectations/pull/200
485
499
  [rspec-expectations#219]: https://github.com/rspec/rspec-expectations/issues/219
486
500
  [rspec-expectations#238]: https://github.com/rspec/rspec-expectations/issues/238
@@ -489,3 +503,4 @@
489
503
  [rubinius#2268]: https://github.com/rubinius/rubinius/issues/2268
490
504
  [standard ruby]: https://github.com/standardrb/standard
491
505
  [tidelift]: https://tidelift.com/security
506
+ [tp]: https://guides.rubygems.org/trusted-publishing/
data/CONTRIBUTING.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  Contribution to diff-lcs is encouraged in any form: a bug report, a feature
4
4
  request, or code contributions. There are a few DOs and DON'Ts for
5
+ contributions.
5
6
 
6
7
  - DO:
7
8
 
@@ -17,16 +18,19 @@ request, or code contributions. There are a few DOs and DON'Ts for
17
18
  `CHANGELOG.md` as a separate commit from your main change. (Follow the style
18
19
  in the `CHANGELOG.md` and provide a link to your PR.)
19
20
 
20
- - Add or update tests, written in [RSpec][rspec], as appropriate.
21
+ - Add or update tests as appropriate for your change. The test suite is
22
+ written in [RSpec][rspec].
21
23
 
22
- - Add or update documentation, as appropriate.
24
+ - Add or update documentation as appropriate for your change. The
25
+ documentation is RDoc; diff-lcs does not use extensions that may be present
26
+ in alternative documentation generators.
23
27
 
24
28
  - DO NOT:
25
29
 
26
- - Modify `VERSION` in `lib/diff/lcs.rb`. When your patch is accepted and a
27
- release is made, the version will be updated at that point.
30
+ - Modify `VERSION` in `lib/diff/lcs/version.rb`. When your patch is accepted
31
+ and a release is made, the version will be updated at that point.
28
32
 
29
- - Modify `diff-lcs.gemspect`; it is a generated file. (You _may_ use
33
+ - Modify `diff-lcs.gemspec`; it is a generated file. (You _may_ use
30
34
  `rake gemspec` to regenerate it if your change involves metadata related to
31
35
  gem itself).
32
36
 
@@ -60,13 +64,6 @@ Here's the most direct way to get your work merged into the project:
60
64
  - Create a pull request against halostatue/diff-lcs and describe what your
61
65
  change does and the why you think it should be merged.
62
66
 
63
- ### Help Wanted
64
-
65
- I want to automated the releases. I am **not** switching from Hoe for release
66
- management, so the use of [rubygems/release-gem][release-gem] requires some care
67
- (perhaps by exporting `VERSION=$(rake version)` to the job), but assistance in
68
- getting this action going for an automated release would be greatly appreciated.
69
-
70
67
  [hoe]: https://github.com/seattlerb/hoe
71
68
  [qcm]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
72
69
  [release-gem]: https://github.com/rubygems/release-gem
data/LICENCE.md CHANGED
@@ -1,15 +1,15 @@
1
- # License
1
+ # Licence
2
2
 
3
3
  This software is available under three licenses: the GNU GPL version 2 (or at
4
4
  your option, a later version), the Perl Artistic license, or the MIT license.
5
5
  Note that my preference for licensing is the MIT license, but Algorithm::Diff
6
- was dually originally licensed with the Perl Artistic and the GNU GPL ("the
7
- same terms as Perl itself") and given that the Ruby implementation originally
8
- hewed pretty closely to the Perl version, I must maintain the additional
9
- licensing terms.
6
+ was dually originally licensed with the Perl Artistic and the GNU GPL ("the same
7
+ terms as Perl itself") and given that the Ruby implementation originally hewed
8
+ pretty closely to the Perl version, I must maintain the additional licensing
9
+ terms.
10
10
 
11
- * Copyright 2004–2013 Austin Ziegler.
12
- * Adapted from Algorithm::Diff (Perl) by Ned Konz and a Smalltalk version by
11
+ - Copyright 2004–2025 Austin Ziegler and contributors.
12
+ - Adapted from Algorithm::Diff (Perl) by Ned Konz and a Smalltalk version by
13
13
  Mario I. Wolczko.
14
14
 
15
15
  ## MIT License
@@ -17,20 +17,19 @@ licensing terms.
17
17
  Permission is hereby granted, free of charge, to any person obtaining a copy of
18
18
  this software and associated documentation files (the "Software"), to deal in
19
19
  the Software without restriction, including without limitation the rights to
20
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
21
- of the Software, and to permit persons to whom the Software is furnished to do
22
- so, subject to the following conditions:
20
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
21
+ the Software, and to permit persons to whom the Software is furnished to do so,
22
+ subject to the following conditions:
23
23
 
24
24
  The above copyright notice and this permission notice shall be included in all
25
25
  copies or substantial portions of the Software.
26
26
 
27
27
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
- SOFTWARE.
28
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
29
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
30
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
31
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
32
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34
33
 
35
34
  ## Perl Artistic License
36
35
 
data/Manifest.txt CHANGED
@@ -3,7 +3,6 @@ CHANGELOG.md
3
3
  CODE_OF_CONDUCT.md
4
4
  CONTRIBUTING.md
5
5
  CONTRIBUTORS.md
6
- Contributing.md
7
6
  LICENCE.md
8
7
  Manifest.txt
9
8
  README.md
@@ -25,17 +24,46 @@ lib/diff/lcs/hunk.rb
25
24
  lib/diff/lcs/internals.rb
26
25
  lib/diff/lcs/ldiff.rb
27
26
  lib/diff/lcs/string.rb
27
+ lib/diff/lcs/version.rb
28
+ mise.toml
28
29
  spec/change_spec.rb
29
30
  spec/diff_spec.rb
31
+ spec/fixtures/123_x
32
+ spec/fixtures/456_x
30
33
  spec/fixtures/aX
31
34
  spec/fixtures/bXaX
32
35
  spec/fixtures/ds1.csv
33
36
  spec/fixtures/ds2.csv
37
+ spec/fixtures/empty
38
+ spec/fixtures/file1.bin
39
+ spec/fixtures/file2.bin
40
+ spec/fixtures/four_lines
41
+ spec/fixtures/four_lines_with_missing_new_line
42
+ spec/fixtures/ldiff/diff.missing_new_line1-e
43
+ spec/fixtures/ldiff/diff.missing_new_line1-f
44
+ spec/fixtures/ldiff/diff.missing_new_line2-e
45
+ spec/fixtures/ldiff/diff.missing_new_line2-f
46
+ spec/fixtures/ldiff/error.diff.chef-e
47
+ spec/fixtures/ldiff/error.diff.chef-f
48
+ spec/fixtures/ldiff/error.diff.missing_new_line1-e
49
+ spec/fixtures/ldiff/error.diff.missing_new_line1-f
50
+ spec/fixtures/ldiff/error.diff.missing_new_line2-e
51
+ spec/fixtures/ldiff/error.diff.missing_new_line2-f
34
52
  spec/fixtures/ldiff/output.diff
35
53
  spec/fixtures/ldiff/output.diff-c
36
54
  spec/fixtures/ldiff/output.diff-e
37
55
  spec/fixtures/ldiff/output.diff-f
38
56
  spec/fixtures/ldiff/output.diff-u
57
+ spec/fixtures/ldiff/output.diff.bin1
58
+ spec/fixtures/ldiff/output.diff.bin1-c
59
+ spec/fixtures/ldiff/output.diff.bin1-e
60
+ spec/fixtures/ldiff/output.diff.bin1-f
61
+ spec/fixtures/ldiff/output.diff.bin1-u
62
+ spec/fixtures/ldiff/output.diff.bin2
63
+ spec/fixtures/ldiff/output.diff.bin2-c
64
+ spec/fixtures/ldiff/output.diff.bin2-e
65
+ spec/fixtures/ldiff/output.diff.bin2-f
66
+ spec/fixtures/ldiff/output.diff.bin2-u
39
67
  spec/fixtures/ldiff/output.diff.chef
40
68
  spec/fixtures/ldiff/output.diff.chef-c
41
69
  spec/fixtures/ldiff/output.diff.chef-e
@@ -47,6 +75,31 @@ spec/fixtures/ldiff/output.diff.chef2-d
47
75
  spec/fixtures/ldiff/output.diff.chef2-e
48
76
  spec/fixtures/ldiff/output.diff.chef2-f
49
77
  spec/fixtures/ldiff/output.diff.chef2-u
78
+ spec/fixtures/ldiff/output.diff.empty.vs.four_lines
79
+ spec/fixtures/ldiff/output.diff.empty.vs.four_lines-c
80
+ spec/fixtures/ldiff/output.diff.empty.vs.four_lines-e
81
+ spec/fixtures/ldiff/output.diff.empty.vs.four_lines-f
82
+ spec/fixtures/ldiff/output.diff.empty.vs.four_lines-u
83
+ spec/fixtures/ldiff/output.diff.four_lines.vs.empty
84
+ spec/fixtures/ldiff/output.diff.four_lines.vs.empty-c
85
+ spec/fixtures/ldiff/output.diff.four_lines.vs.empty-e
86
+ spec/fixtures/ldiff/output.diff.four_lines.vs.empty-f
87
+ spec/fixtures/ldiff/output.diff.four_lines.vs.empty-u
88
+ spec/fixtures/ldiff/output.diff.issue95_trailing_context
89
+ spec/fixtures/ldiff/output.diff.issue95_trailing_context-c
90
+ spec/fixtures/ldiff/output.diff.issue95_trailing_context-e
91
+ spec/fixtures/ldiff/output.diff.issue95_trailing_context-f
92
+ spec/fixtures/ldiff/output.diff.issue95_trailing_context-u
93
+ spec/fixtures/ldiff/output.diff.missing_new_line1
94
+ spec/fixtures/ldiff/output.diff.missing_new_line1-c
95
+ spec/fixtures/ldiff/output.diff.missing_new_line1-e
96
+ spec/fixtures/ldiff/output.diff.missing_new_line1-f
97
+ spec/fixtures/ldiff/output.diff.missing_new_line1-u
98
+ spec/fixtures/ldiff/output.diff.missing_new_line2
99
+ spec/fixtures/ldiff/output.diff.missing_new_line2-c
100
+ spec/fixtures/ldiff/output.diff.missing_new_line2-e
101
+ spec/fixtures/ldiff/output.diff.missing_new_line2-f
102
+ spec/fixtures/ldiff/output.diff.missing_new_line2-u
50
103
  spec/fixtures/new-chef
51
104
  spec/fixtures/new-chef2
52
105
  spec/fixtures/old-chef
data/Rakefile CHANGED
@@ -4,12 +4,14 @@ require "rspec/core/rake_task"
4
4
  require "hoe"
5
5
  require "rake/clean"
6
6
 
7
- Hoe.plugin :cov
8
- Hoe.plugin :doofus
9
- Hoe.plugin :gemspec2
10
- Hoe.plugin :git2
7
+ Hoe.plugin :halostatue
11
8
  Hoe.plugin :rubygems
12
9
 
10
+ Hoe.plugins.delete :debug
11
+ Hoe.plugins.delete :newb
12
+ Hoe.plugins.delete :publish
13
+ Hoe.plugins.delete :signing
14
+
13
15
  if RUBY_VERSION < "1.9"
14
16
  class Array # :nodoc:
15
17
  def to_h
@@ -35,21 +37,20 @@ end
35
37
  _spec = Hoe.spec "diff-lcs" do
36
38
  developer("Austin Ziegler", "halostatue@gmail.com")
37
39
 
40
+ self.trusted_release = ENV["rubygems_release_gem"] == "true"
41
+
42
+ require_ruby_version ">= 1.8"
43
+
38
44
  self.history_file = "CHANGELOG.md"
39
45
  self.readme_file = "README.md"
40
46
  self.licenses = ["MIT", "Artistic-1.0-Perl", "GPL-2.0-or-later"]
41
47
 
42
- require_ruby_version ">= 1.8"
43
-
44
48
  spec_extras[:metadata] = ->(val) {
45
49
  val["rubygems_mfa_required"] = "true"
46
- val["changelog_uri"] = "https://github.com/halostatue/diff-lcs/blob/main/CHANGELOG.md"
47
50
  }
48
51
 
49
- extra_dev_deps << ["hoe", ">= 3.0", "< 5"]
50
- extra_dev_deps << ["hoe-doofus", "~> 1.0"]
51
- extra_dev_deps << ["hoe-gemspec2", "~> 1.1"]
52
- extra_dev_deps << ["hoe-git2", "~> 1.7"]
52
+ extra_dev_deps << ["hoe", "~> 4.0"]
53
+ extra_dev_deps << ["hoe-halostatue", "~> 2.0"]
53
54
  extra_dev_deps << ["hoe-rubygems", "~> 1.0"]
54
55
  extra_dev_deps << ["rspec", ">= 2.0", "< 4"]
55
56
  extra_dev_deps << ["rake", ">= 10.0", "< 14"]
@@ -69,11 +70,11 @@ task :default => :spec unless Rake::Task["default"].prereqs.include?("spec")
69
70
  task :test => :spec unless Rake::Task["test"].prereqs.include?("spec")
70
71
  # standard:enable Style/HashSyntax
71
72
 
72
- if RUBY_VERSION >= "2.0" && RUBY_ENGINE == "ruby"
73
+ if RUBY_VERSION >= "3.0" && RUBY_ENGINE == "ruby"
73
74
  namespace :spec do
74
75
  desc "Runs test coverage. Only works Ruby 2.0+ and assumes 'simplecov' is installed."
75
76
  task :coverage do
76
- ENV["COVERAGE"] = "yes"
77
+ ENV["COVERAGE"] = "true"
77
78
  Rake::Task["spec"].execute
78
79
  end
79
80
  end
@@ -3,11 +3,11 @@
3
3
  require "optparse"
4
4
  require "diff/lcs/hunk"
5
5
 
6
- module Diff::LCS::Ldiff # :nodoc:
6
+ class Diff::LCS::Ldiff # :nodoc:
7
7
  # standard:disable Layout/HeredocIndentation
8
8
  BANNER = <<-COPYRIGHT
9
9
  ldiff #{Diff::LCS::VERSION}
10
- Copyright 2004-2019 Austin Ziegler
10
+ Copyright 2004-2025 Austin Ziegler
11
11
 
12
12
  Part of Diff::LCS.
13
13
  https://github.com/halostatue/diff-lcs
@@ -24,15 +24,21 @@ ldiff #{Diff::LCS::VERSION}
24
24
  end
25
25
  end
26
26
 
27
- class << self
28
- attr_reader :format, :lines # :nodoc:
29
- attr_reader :file_old, :file_new # :nodoc:
30
- attr_reader :data_old, :data_new # :nodoc:
27
+ attr_reader :format, :lines # :nodoc:
28
+ attr_reader :file_old, :file_new # :nodoc:
29
+ attr_reader :data_old, :data_new # :nodoc:
30
+
31
+ def self.run(args, input = $stdin, output = $stdout, error = $stderr) # :nodoc:
32
+ new.run(args, input, output, error)
31
33
  end
32
34
 
33
- def self.run(args, _input = $stdin, output = $stdout, error = $stderr) # :nodoc:
35
+ def initialize
34
36
  @binary = nil
37
+ @format = :old
38
+ @lines = 0
39
+ end
35
40
 
41
+ def run(args, _input = $stdin, output = $stdout, error = $stderr) # :nodoc:
36
42
  args.options do |o|
37
43
  o.banner = "Usage: #{File.basename($0)} [options] oldfile newfile"
38
44
  o.separator ""
@@ -101,7 +107,7 @@ ldiff #{Diff::LCS::VERSION}
101
107
  ) ? 1 : 0
102
108
  end
103
109
 
104
- def self.diff?(info_old, info_new, format, output, binary: nil, lines: 0)
110
+ def diff?(info_old, info_new, format, output, binary: nil, lines: 0)
105
111
  case format
106
112
  when :context
107
113
  char_old = "*" * 3
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Diff
4
+ module LCS
5
+ VERSION = "1.6.1"
6
+ end
7
+ end
data/lib/diff/lcs.rb CHANGED
@@ -49,9 +49,9 @@ module Diff; end unless defined? Diff
49
49
  # a x b y c z p d q
50
50
  # a b c a x b y c z
51
51
  module Diff::LCS
52
- VERSION = "1.6.0"
53
52
  end
54
53
 
54
+ require "diff/lcs/version"
55
55
  require "diff/lcs/callbacks"
56
56
  require "diff/lcs/internals"
57
57
 
data/mise.toml ADDED
@@ -0,0 +1,5 @@
1
+ [tools]
2
+ ruby = "3.4"
3
+
4
+ [env]
5
+ MAINTENANCE = "true"
@@ -0,0 +1,2 @@
1
+ 123
2
+ x
@@ -0,0 +1,2 @@
1
+ 456
2
+ x
File without changes
Binary file
Binary file
@@ -0,0 +1,4 @@
1
+ one
2
+ two
3
+ three
4
+ four
@@ -0,0 +1,4 @@
1
+ one
2
+ two
3
+ three
4
+ four
@@ -0,0 +1 @@
1
+ No newline at end of file
@@ -0,0 +1 @@
1
+ No newline at end of file
@@ -0,0 +1 @@
1
+ No newline at end of file
@@ -0,0 +1 @@
1
+ No newline at end of file
@@ -0,0 +1,2 @@
1
+ <old_file>: No newline at end of file
2
+ <new_file>: No newline at end of file
@@ -0,0 +1,2 @@
1
+ <old_file>: No newline at end of file
2
+ <new_file>: No newline at end of file
@@ -0,0 +1 @@
1
+ <new_file>: No newline at end of file
@@ -0,0 +1 @@
1
+ <new_file>: No newline at end of file
@@ -0,0 +1 @@
1
+ <old_file>: No newline at end of file
@@ -0,0 +1 @@
1
+ <old_file>: No newline at end of file
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1 @@
1
+ Binary files spec/fixtures/file1.bin and spec/fixtures/file2.bin differ
@@ -0,0 +1 @@
1
+ Binary files spec/fixtures/file1.bin and spec/fixtures/file2.bin differ
@@ -0,0 +1 @@
1
+ Binary files spec/fixtures/file1.bin and spec/fixtures/file2.bin differ
@@ -0,0 +1 @@
1
+ Binary files spec/fixtures/file1.bin and spec/fixtures/file2.bin differ
@@ -0,0 +1 @@
1
+ Binary files spec/fixtures/file1.bin and spec/fixtures/file2.bin differ
@@ -0,0 +1,5 @@
1
+ 0a1,4
2
+ > one
3
+ > two
4
+ > three
5
+ > four
@@ -0,0 +1,9 @@
1
+ *** spec/fixtures/empty 2025-01-31 12:14:52.856031635 +0100
2
+ --- spec/fixtures/four_lines 2025-01-31 12:13:45.476036544 +0100
3
+ ***************
4
+ *** 0 ****
5
+ --- 1,4 ----
6
+ + one
7
+ + two
8
+ + three
9
+ + four
@@ -0,0 +1,6 @@
1
+ 0a
2
+ one
3
+ two
4
+ three
5
+ four
6
+ .
@@ -0,0 +1,6 @@
1
+ a0
2
+ one
3
+ two
4
+ three
5
+ four
6
+ .
@@ -0,0 +1,7 @@
1
+ --- spec/fixtures/empty 2025-01-31 12:14:52.856031635 +0100
2
+ +++ spec/fixtures/four_lines 2025-01-31 12:13:45.476036544 +0100
3
+ @@ -0,0 +1,4 @@
4
+ +one
5
+ +two
6
+ +three
7
+ +four
@@ -0,0 +1,5 @@
1
+ 1,4d0
2
+ < one
3
+ < two
4
+ < three
5
+ < four
@@ -0,0 +1,9 @@
1
+ *** spec/fixtures/four_lines 2025-01-31 12:13:45.476036544 +0100
2
+ --- spec/fixtures/empty 2025-01-31 12:14:52.856031635 +0100
3
+ ***************
4
+ *** 1,4 ****
5
+ - one
6
+ - two
7
+ - three
8
+ - four
9
+ --- 0 ----
@@ -0,0 +1,7 @@
1
+ --- spec/fixtures/four_lines 2025-01-31 12:13:45.476036544 +0100
2
+ +++ spec/fixtures/empty 2025-01-31 12:14:52.856031635 +0100
3
+ @@ -1,4 +0,0 @@
4
+ -one
5
+ -two
6
+ -three
7
+ -four
@@ -0,0 +1,4 @@
1
+ 1c1
2
+ < 123
3
+ ---
4
+ > 456
@@ -0,0 +1,9 @@
1
+ *** spec/fixtures/123_x 2025-01-31 17:00:17.070615716 +0100
2
+ --- spec/fixtures/456_x 2025-01-31 16:58:26.380624827 +0100
3
+ ***************
4
+ *** 1,2 ****
5
+ ! 123
6
+ x
7
+ --- 1,2 ----
8
+ ! 456
9
+ x
@@ -0,0 +1,6 @@
1
+ --- spec/fixtures/123_x 2025-01-31 17:00:17.070615716 +0100
2
+ +++ spec/fixtures/456_x 2025-01-31 16:58:26.380624827 +0100
3
+ @@ -1,2 +1,2 @@
4
+ -123
5
+ +456
6
+ x
@@ -0,0 +1,5 @@
1
+ 4c4
2
+ < four
3
+ ---
4
+ > four
5
+
@@ -0,0 +1,14 @@
1
+ *** spec/fixtures/four_lines 2025-01-31 12:17:43.926013315 +0100
2
+ --- spec/fixtures/four_lines_with_missing_new_line 2025-01-31 12:17:43.926013315 +0100
3
+ ***************
4
+ *** 1,4 ****
5
+ one
6
+ two
7
+ three
8
+ ! four
9
+ --- 1,4 ----
10
+ one
11
+ two
12
+ three
13
+ ! four
14
+
@@ -0,0 +1,9 @@
1
+ --- spec/fixtures/four_lines 2025-01-31 12:17:43.926013315 +0100
2
+ +++ spec/fixtures/four_lines_with_missing_new_line 2025-01-31 12:17:43.926013315 +0100
3
+ @@ -1,4 +1,4 @@
4
+ one
5
+ two
6
+ three
7
+ -four
8
+ +four
9
+
@@ -0,0 +1,5 @@
1
+ 4c4
2
+ < four
3
+
4
+ ---
5
+ > four
@@ -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
@@ -0,0 +1,9 @@
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
+ @@ -1,4 +1,4 @@
4
+ one
5
+ two
6
+ three
7
+ -four
8
+
9
+ +four
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
- def require_do(resource)
12
- require resource
13
- yield if block_given?
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
- formatters = [SimpleCov::Formatter::HTMLFormatter]
19
-
20
- require_do("simplecov-rcov") {
21
- formatters << SimpleCov::Formatter::RcovFormatter
22
- }
23
- require_do("simplecov-vim/formatter") {
24
- formatters << SimpleCov::Formatter::VimFormatter
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
- def simple_callback
254
- callbacks = Object.new
255
- class << callbacks
256
- attr_reader :matched_a
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
- def match(event)
273
- @matched_a << event.old_element
274
- @matched_b << event.new_element
275
- end
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
- def discard_b(event)
278
- @discards_b << event.new_element
279
- end
268
+ def match(event)
269
+ @matched_a << event.old_element
270
+ @matched_b << event.new_element
271
+ end
280
272
 
281
- def discard_a(event)
282
- @discards_a << event.old_element
283
- end
273
+ def discard_b(event)
274
+ @discards_b << event.new_element
275
+ end
284
276
 
285
- def finished_a(event)
286
- @done_a << [
287
- event.old_element, event.old_position,
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
- def finished_b(event)
293
- @done_b << [
294
- event.old_element, event.old_position,
295
- event.new_element, event.new_position
296
- ]
297
- end
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
- callbacks.reset
300
- callbacks
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
- simple = simple_callback
305
- class << simple
306
- undef :finished_a
307
- undef :finished_b
308
- end
309
- simple
306
+ SimpleCallbackNoFinishers.new
310
307
  end
311
308
 
312
- def balanced_callback
313
- cb = Object.new
314
- class << cb
315
- attr_reader :result
309
+ class BalancedCallback
310
+ def initialize
311
+ reset
312
+ end
316
313
 
317
- def reset
318
- @result = []
319
- end
314
+ attr_reader :result
320
315
 
321
- def match(event)
322
- @result << ["=", event.old_position, event.new_position]
323
- end
316
+ def reset
317
+ @result = []
318
+ end
324
319
 
325
- def discard_a(event)
326
- @result << ["<", event.old_position, event.new_position]
327
- end
320
+ def match(event)
321
+ @result << ["=", event.old_position, event.new_position]
322
+ end
328
323
 
329
- def discard_b(event)
330
- @result << [">", event.old_position, event.new_position]
331
- end
324
+ def discard_a(event)
325
+ @result << ["<", event.old_position, event.new_position]
326
+ end
332
327
 
333
- def change(event)
334
- @result << ["!", event.old_position, event.new_position]
335
- end
328
+ def discard_b(event)
329
+ @result << [">", event.old_position, event.new_position]
336
330
  end
337
- cb.reset
338
- cb
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
- balanced = balanced_callback
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.6.0
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: 2025-02-13 00:00:00.000000000 Z
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: '1.0'
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: '1.0'
25
+ version: '4.0'
47
26
  - !ruby/object:Gem::Dependency
48
- name: hoe-gemspec2
27
+ name: hoe-halostatue
49
28
  requirement: !ruby/object:Gem::Requirement
50
29
  requirements:
51
30
  - - "~>"
52
31
  - !ruby/object:Gem::Version
53
- version: '1.1'
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: '1.7'
39
+ version: '2.0'
75
40
  - !ruby/object:Gem::Dependency
76
41
  name: hoe-rubygems
77
42
  requirement: !ruby/object:Gem::Requirement
@@ -146,20 +111,6 @@ dependencies:
146
111
  - - "<"
147
112
  - !ruby/object:Gem::Version
148
113
  version: '7'
149
- - !ruby/object:Gem::Dependency
150
- name: simplecov
151
- requirement: !ruby/object:Gem::Requirement
152
- requirements:
153
- - - "~>"
154
- - !ruby/object:Gem::Version
155
- version: '0.21'
156
- type: :development
157
- prerelease: false
158
- version_requirements: !ruby/object:Gem::Requirement
159
- requirements:
160
- - - "~>"
161
- - !ruby/object:Gem::Version
162
- version: '0.21'
163
114
  description: |-
164
115
  Diff::LCS computes the difference between two Enumerable sequences using the
165
116
  McIlroy-Hunt longest common subsequence (LCS) algorithm. It includes utilities
@@ -185,7 +136,6 @@ extra_rdoc_files:
185
136
  - CODE_OF_CONDUCT.md
186
137
  - CONTRIBUTING.md
187
138
  - CONTRIBUTORS.md
188
- - Contributing.md
189
139
  - LICENCE.md
190
140
  - Manifest.txt
191
141
  - README.md
@@ -198,7 +148,6 @@ files:
198
148
  - CODE_OF_CONDUCT.md
199
149
  - CONTRIBUTING.md
200
150
  - CONTRIBUTORS.md
201
- - Contributing.md
202
151
  - LICENCE.md
203
152
  - Manifest.txt
204
153
  - README.md
@@ -220,17 +169,46 @@ files:
220
169
  - lib/diff/lcs/internals.rb
221
170
  - lib/diff/lcs/ldiff.rb
222
171
  - lib/diff/lcs/string.rb
172
+ - lib/diff/lcs/version.rb
173
+ - mise.toml
223
174
  - spec/change_spec.rb
224
175
  - spec/diff_spec.rb
176
+ - spec/fixtures/123_x
177
+ - spec/fixtures/456_x
225
178
  - spec/fixtures/aX
226
179
  - spec/fixtures/bXaX
227
180
  - spec/fixtures/ds1.csv
228
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
229
197
  - spec/fixtures/ldiff/output.diff
230
198
  - spec/fixtures/ldiff/output.diff-c
231
199
  - spec/fixtures/ldiff/output.diff-e
232
200
  - spec/fixtures/ldiff/output.diff-f
233
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
234
212
  - spec/fixtures/ldiff/output.diff.chef
235
213
  - spec/fixtures/ldiff/output.diff.chef-c
236
214
  - spec/fixtures/ldiff/output.diff.chef-e
@@ -242,6 +220,31 @@ files:
242
220
  - spec/fixtures/ldiff/output.diff.chef2-e
243
221
  - spec/fixtures/ldiff/output.diff.chef2-f
244
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
245
248
  - spec/fixtures/new-chef
246
249
  - spec/fixtures/new-chef2
247
250
  - spec/fixtures/old-chef
@@ -261,9 +264,11 @@ licenses:
261
264
  - Artistic-1.0-Perl
262
265
  - GPL-2.0-or-later
263
266
  metadata:
264
- rubygems_mfa_required: 'true'
267
+ homepage_uri: https://github.com/halostatue/diff-lcs
265
268
  changelog_uri: https://github.com/halostatue/diff-lcs/blob/main/CHANGELOG.md
266
- post_install_message:
269
+ source_code_uri: https://github.com/halostatue/diff-lcs
270
+ bug_tracker_uri: https://github.com/halostatue/diff-lcs/issues
271
+ rubygems_mfa_required: 'true'
267
272
  rdoc_options:
268
273
  - "--main"
269
274
  - README.md
@@ -280,8 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
280
285
  - !ruby/object:Gem::Version
281
286
  version: '0'
282
287
  requirements: []
283
- rubygems_version: 3.5.22
284
- signing_key:
288
+ rubygems_version: 3.6.6
285
289
  specification_version: 4
286
290
  summary: Diff::LCS computes the difference between two Enumerable sequences using
287
291
  the McIlroy-Hunt longest common subsequence (LCS) algorithm
data/Contributing.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributing
2
-
3
- Contribution to diff-lcs is encouraged in any form: a bug report, a feature
4
- request, or code contributions. There are a few DOs and DON'Ts for
5
-
6
- - DO:
7
-
8
- - Keep the coding style that already exists for any updated Ruby code (support
9
- or otherwise). I use [Standard Ruby][standardrb] for linting and formatting.
10
-
11
- - Use thoughtfully-named topic branches for contributions. Rebase your commits
12
- into logical chunks as necessary.
13
-
14
- - Use [quality commit messages][qcm].
15
-
16
- - Add your name or GitHub handle to `CONTRIBUTORS.md` and a record in the
17
- `CHANGELOG.md` as a separate commit from your main change. (Follow the style
18
- in the `CHANGELOG.md` and provide a link to your PR.)
19
-
20
- - Add or update tests, written in [RSpec][rspec], as appropriate.
21
-
22
- - Add or update documentation, as appropriate.
23
-
24
- - DO NOT:
25
-
26
- - Modify `VERSION` in `lib/diff/lcs.rb`. When your patch is accepted and a
27
- release is made, the version will be updated at that point.
28
-
29
- - Modify `diff-lcs.gemspect`; it is a generated file. (You _may_ use
30
- `rake gemspec` to regenerate it if your change involves metadata related to
31
- gem itself).
32
-
33
- - Modify the `Gemfile`.
34
-
35
- ## Test Dependencies
36
-
37
- diff-lcs uses Ryan Davis's [Hoe][Hoe] to manage the release process, and it adds
38
- a number of rake tasks. You will mostly be interested in `rake`, which runs
39
- tests in the same way that `rake spec` does.
40
-
41
- To assist with the installation of the development dependencies for diff-lcs, I
42
- have provided a Gemfile pointing to the (generated) `diff-lcs.gemspec` file.
43
- `minitar.gemspec` file. This will permit you to use `bundle install` to install
44
- the dependencies.
45
-
46
- You can run tests with code coverage analysis by running `rake spec:coverage`.
47
-
48
- ## Workflow
49
-
50
- Here's the most direct way to get your work merged into the project:
51
-
52
- - Fork the project.
53
- - Clone your fork (`git clone git://github.com/<username>/diff-lcs.git`).
54
- - Create a topic branch to contain your change
55
- (`git checkout -b my_awesome_feature`).
56
- - Hack away, add tests. Not necessarily in that order.
57
- - Make sure everything still passes by running `rake`.
58
- - If necessary, rebase your commits into logical chunks, without errors.
59
- - Push the branch up (`git push origin my_awesome_feature`).
60
- - Create a pull request against halostatue/diff-lcs and describe what your
61
- change does and the why you think it should be merged.
62
-
63
- ### Help Wanted
64
-
65
- I want to automated the releases. I am **not** switching from Hoe for release
66
- management, so the use of [rubygems/release-gem][release-gem] requires some care
67
- (perhaps by exporting `VERSION=$(rake version)` to the job), but assistance in
68
- getting this action going for an automated release would be greatly appreciated.
69
-
70
- [hoe]: https://github.com/seattlerb/hoe
71
- [qcm]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
72
- [release-gem]: https://github.com/rubygems/release-gem
73
- [rspec]: http://rspec.info/documentation/
74
- [standardrb]: https://github.com/standardrb/standard