Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 40 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
persist-credentials: false

- uses: ruby/setup-ruby@8a836efbcebe5de0fe86b48a775b7a31b5c70c93 # v1.277.0
- uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
ruby-version: '3.4'
rubygems: latest
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
with:
persist-credentials: false

- uses: ruby/setup-ruby@8a836efbcebe5de0fe86b48a775b7a31b5c70c93 # v1.277.0
- uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
ruby-version: '3.4'
rubygems: latest
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
with:
persist-credentials: false

- uses: ruby/setup-ruby@8a836efbcebe5de0fe86b48a775b7a31b5c70c93 # v1.277.0
- uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
ruby-version: ${{ matrix.ruby }}
rubygems: latest
Expand All @@ -129,6 +129,11 @@ jobs:

- run: bundle exec ruby -S rake test --trace

- name: Verify RSpec compatibility
run: |
gem install rspec
integration/runner rake integration

required-macos:
name: Ruby ${{ matrix.ruby }} - ${{ matrix.os }}

Expand Down Expand Up @@ -167,7 +172,7 @@ jobs:
with:
persist-credentials: false

- uses: ruby/setup-ruby@8a836efbcebe5de0fe86b48a775b7a31b5c70c93 # v1.277.0
- uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
ruby-version: ${{ matrix.ruby }}
rubygems: latest
Expand All @@ -176,6 +181,13 @@ jobs:

- run: bundle exec ruby -S rake test --trace

- name: Verify RSpec compatibility
env:
GEM_PATH: vendor/bundle
run: |
gem install rspec
integration/runner rake integration

optional-windows:
name: Ruby ${{ matrix.ruby }} - ${{ matrix.os }}

Expand Down Expand Up @@ -216,7 +228,7 @@ jobs:
with:
persist-credentials: false

- uses: ruby/setup-ruby@8a836efbcebe5de0fe86b48a775b7a31b5c70c93 # v1.277.0
- uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
ruby-version: ${{ matrix.ruby }}
rubygems: latest
Expand All @@ -225,6 +237,13 @@ jobs:

- run: bundle exec ruby -S rake test --trace

- name: Verify RSpec compatibility
env:
GEM_PATH: vendor/bundle
run: |
gem install rspec
integration/runner rake integration

jruby-optional:
name: JRuby ${{ matrix.ruby }} - ${{ matrix.os }}

Expand Down Expand Up @@ -262,7 +281,7 @@ jobs:
with:
persist-credentials: false

- uses: ruby/setup-ruby@8a836efbcebe5de0fe86b48a775b7a31b5c70c93 # v1.277.0
- uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
ruby-version: ${{ matrix.ruby }}
rubygems: latest
Expand All @@ -271,6 +290,13 @@ jobs:

- run: bundle exec ruby -S rake test --trace

- name: Verify RSpec compatibility
env:
GEM_PATH: vendor/bundle
run: |
gem install rspec
integration/runner rake integration

ruby-head-optional:
name: Ruby ${{ matrix.ruby }} - ${{ matrix.os }} (optional)

Expand Down Expand Up @@ -308,11 +334,18 @@ jobs:
with:
persist-credentials: false

- uses: ruby/setup-ruby@8a836efbcebe5de0fe86b48a775b7a31b5c70c93 # v1.277.0
- uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
ruby-version: ${{ matrix.ruby }}
rubygems: latest
bundler: 2
bundler-cache: true

- run: bundle exec ruby -S rake test --trace

- name: Verify RSpec compatibility
env:
GEM_PATH: vendor/bundle
run: |
gem install rspec
integration/runner rake integration
2 changes: 1 addition & 1 deletion .github/workflows/dco-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
api.github.com:443
github.com:443

- uses: KineticCafe/actions-dco@76b7fc30ff5988e68d01ea07deeaf7e71256598f # v2.1.0
- uses: KineticCafe/actions-dco@6e1652ef3027ce128e65e6edd215ae053350bd16 # v2.1.1
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
'print "version=", Gem::Specification.load(ARGV[0]).rubygems_version, "\n"' \
diff-lcs.gemspec >>"${GITHUB_OUTPUT}"

- uses: ruby/setup-ruby@8a836efbcebe5de0fe86b48a775b7a31b5c70c93 # v1.277.0
- uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
bundler-cache: false
ruby-version: ruby
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
'print "version=", Gem::Specification.load(ARGV[0]).rubygems_version, "\n"' \
diff-lcs.gemspec >>"${GITHUB_OUTPUT}"

- uses: ruby/setup-ruby@8a836efbcebe5de0fe86b48a775b7a31b5c70c93 # v1.277.0
- uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
bundler-cache: false
ruby-version: ruby
Expand Down
2 changes: 1 addition & 1 deletion .github/zizmor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rules:
artipacked:
ignore:
- publish-gem.yml:53 # publish-gem adds and pushes a tag.
- publish-gem.yml:58 # publish-gem adds and pushes a tag.
35 changes: 30 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## 2.0.0.beta.1 / 2025-12-31
## 2.0.0.beta.2 / 2025-01-22

This release has significant **breaking changes**.

Expand Down Expand Up @@ -35,6 +35,27 @@ This release has significant **breaking changes**.
Most callers are using `Diff::LCS.lcs` and modern Ruby did-you-mean support
should assist with this update.

- `Diff::LCS::Change` objects implemented the comparison operator (`<=>`)
incorrectly. Comparisons are now done so that the `position` is compared
first, then the `action` (by index of `VALID_ACTIONS`), and finally the
element. `Diff::LCS::ContextChange` works similarly, comparing the old and new
positions prior to comparing the actions by index.

The order of `VALID_ACTIONS` was changed for the index order to make sense.

- `ldiff` now implements `-` as a filename option for standard input. This is
used for integration testing with RSpec like this:

```console
rspec -Ilib -rdiff/lcs integration/failure/array_diff_spec.rb 2>&1 |
ruby -Ilib bin/ldiff -U integration/golden/array_diff.txt -
```

- diff-lcs no longer uses RSpec as its test suite, but instead uses Minitest.
The conversion to Minitest and the new RSpec integration tests
(`rake integration`) were written with the assistance of [Kiro][kiro] and
verified manually, with portions changed as required.

## 1.6.2 / 2025-05-12

- Handle upcoming changes to the `cgi` gem in Ruby 3.5 ([#147][pull-147])
Expand All @@ -60,8 +81,9 @@ This release has significant **breaking changes**.

## 1.6.0 / 2025-02-13

- Baptiste Courtois (@annih) has done significant work on making `bin/ldiff`
work better, contributing a number of issues and pull requests. These include:
- Baptiste Courtois ([@annih][gh-user-annih]) has done significant work on
making `bin/ldiff` work better, contributing a number of issues and pull
requests. These include:

- Separation of command parsing from diff-generation in `Diff::LCS::Ldiff`
code extraction making it easier to use separately from the `bin/ldiff`
Expand Down Expand Up @@ -420,8 +442,8 @@ This release has significant **breaking changes**.

## 1.1.1 / 2004-09-25

- Fixed bug #891 (Set returned from patch command does not contain last equal
part).
- Fixed bug [#891][gh-issue-891] (Set returned from patch command does not
contain last equal part).

- Fixed a problem with callback initialisation code (it assumed that all
callbacks passed as classes can be initialised; now, it rescues NoMethodError
Expand Down Expand Up @@ -552,3 +574,6 @@ This release has significant **breaking changes**.
[standard ruby]: https://github.com/standardrb/standard
[tidelift]: https://tidelift.com/security
[tp]: https://guides.rubygems.org/trusted-publishing/
[kiro]: https://kiro.dev
[gh-user-annih]: https://github.com/annih
[gh-issue-891]: https://github.com/halostatue/diff-lcs/issues/891
7 changes: 6 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ diff-lcs is governed under the [Contributor Covenant Code of Conduct][cccoc].
I have several guidelines to contributing code through pull requests:

- All code changes require tests. In most cases, this will be added or updated
unit tests. I use [RSpec][rspec].
unit tests. I use [Minitest][minitest].

- There are integration tests with RSpec which must not be broken, accessible
through `rake integration`. This requires a non-bundled RSpec,
`gem install rspec`.

- I use code formatters, static analysis tools, and linting to ensure consistent
styles and formatting. There should be no warning output from test run
Expand Down Expand Up @@ -115,6 +119,7 @@ required metadata trailers are:
[dco]: licences/dco.txt
[hoe]: https://github.com/seattlerb/hoe
[issues]: https://github.com/halostatue/diff-lcs/issues
[minitest]: https://github.com/seattlerb/minitest
[rspec]: https://rspec.info/documentation/
[standardrb]: https://github.com/standardrb/standard
[tpope-qcm]: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
Expand Down
28 changes: 19 additions & 9 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Contributors

- Austin Ziegler (@halostatue) created diff-lcs.
- Austin Ziegler ([@halostatue][gh-user-halostatue]) created diff-lcs.

Thanks to everyone else who has contributed to diff-lcs over the years:

- @ginriki
- @joshbronson
- @kevinmook
- @mckaz
- [@ginriki][gh-user-ginriki]
- [@joshbronson][gh-user-joshbronson]
- [@kevinmook][gh-user-kevinmook]
- [@mckaz][gh-user-mckaz]
- Akinori Musha
- Artem Ignatyev
- Brandon Fish
- Baptiste Courtois (@annih)
- Baptiste Courtois ([@annih][gh-user-annih])
- Camille Drapier
- Cédric Boutillier
- @earlopain
- [@earlopain][gh-user-earlopain]
- Gregg Kellogg
- Jagdeep Singh
- Jason Gladish
- Jon Rowe
- Josef Strzibny
- Josep (@apuratepp)
- Josep ([@apuratepp][gh-user-apuratepp])
- Josh Bronson
- Jun Aruga
- Justin Steele
Expand All @@ -44,6 +44,16 @@ Thanks to everyone else who has contributed to diff-lcs over the years:
- Ryan Lovelett
- Scott Steele
- Simon Courtois
- Tien (@tiendo1011)
- Tien ([@tiendo1011][gh-user-tiendo1011])
- Tomas Jura
- Vít Ondruch

[gh-user-halostatue]: https://github.com/halostatue
[gh-user-ginriki]: https://github.com/ginriki
[gh-user-joshbronson]: https://github.com/joshbronson
[gh-user-kevinmook]: https://github.com/kevinmook
[gh-user-mckaz]: https://github.com/mckaz
[gh-user-annih]: https://github.com/annih
[gh-user-earlopain]: https://github.com/earlopain
[gh-user-apuratepp]: https://github.com/apuratepp
[gh-user-tiendo1011]: https://github.com/tiendo1011
Loading
Loading