Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-diff-lcs for
openSUSE:Factory checked in at 2021-12-26 13:30:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-diff-lcs (Old)
and /work/SRC/openSUSE:Factory/.rubygem-diff-lcs.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-diff-lcs"
Sun Dec 26 13:30:20 2021 rev:9 rq:942483 version:1.5.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-diff-lcs/rubygem-diff-lcs.changes
2020-07-16 12:11:36.922549941 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-diff-lcs.new.2520/rubygem-diff-lcs.changes
2021-12-26 13:30:26.926956981 +0100
@@ -1,0 +2,33 @@
+Sat Dec 25 22:32:52 UTC 2021 - Manuel Schnitzer <[email protected]>
+
+- updated to version 1.5.0
+
+ * Updated the CI configuration and monkey-patch Hoe.
+
+ * Kenichi Kamiya fixed a test configuration deprecation in SimpleCov. [#69]
+
+ * Tien introduced several corrections and code improvements:
+
+ - Removed an off-by-one error when calculating an index value by embracing
+ Ruby iteration properly. This had a side-effect of fixing a long-standing
+ bug in `#traverse_sequences` where the traversal would not be transitive.
+ That is, `LCS(s2, s1)` should produce a sequence that is transitive with
+ `LCS(s1, s2)` on traversal, and applying the diff computed from those
+ results would result in equivalent changes that could be played forward
or
+ backward as appropriate. [#71], [#75]
+
+ - The above fix resulted in a changed order of the longest common
subsequence
+ when callbacks were applied. After analysis, it was determined that the
+ computed subsequence was _equivalent_ to the prior version, so the test
was
+ updated. This also resulted in the clarification of documentation when
+ traversing the subsequences. [#79]
+
+ - An infinite loop case in the case where Diff::LCS would be included into
an
+ enumerable class has been fixed. [#73]
+
+ - Clarified the purpose of a threshold test in calculation of LCS. [#72],
+ [#80]
+
+ * Removed autotest directory
+
+-------------------------------------------------------------------
Old:
----
diff-lcs-1.4.4.gem
New:
----
diff-lcs-1.5.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-diff-lcs.spec ++++++
--- /var/tmp/diff_new_pack.VHzf7z/_old 2021-12-26 13:30:27.494957377 +0100
+++ /var/tmp/diff_new_pack.VHzf7z/_new 2021-12-26 13:30:27.498957379 +0100
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-diff-lcs
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-diff-lcs
-Version: 1.4.4
+Version: 1.5.0
Release: 0
%define mod_name diff-lcs
%define mod_full_name %{mod_name}-%{version}
++++++ diff-lcs-1.4.4.gem -> diff-lcs-1.5.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Contributing.md new/Contributing.md
--- old/Contributing.md 2020-07-01 20:29:57.000000000 +0200
+++ new/Contributing.md 2021-12-23 07:01:50.000000000 +0100
@@ -110,6 +110,7 @@
- Ryan Lovelett
- Scott Steele
- Simon Courtois
+- Tien (@tiendo1011)
- Tomas Jura
- V??t Ondruch
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/History.md new/History.md
--- old/History.md 2020-07-01 20:29:57.000000000 +0200
+++ new/History.md 2021-12-23 07:01:50.000000000 +0100
@@ -1,107 +1,161 @@
# History
+## 1.5.0 / 2021-12-23
+
+- Updated the CI configuration and monkey-patch Hoe.
+
+- Kenichi Kamiya fixed a test configuration deprecation in SimpleCov. [#69]
+
+- Tien introduced several corrections and code improvements:
+
+ - Removed an off-by-one error when calculating an index value by embracing
+ Ruby iteration properly. This had a side-effect of fixing a long-standing
+ bug in `#traverse_sequences` where the traversal would not be transitive.
+ That is, `LCS(s2, s1)` should produce a sequence that is transitive with
+ `LCS(s1, s2)` on traversal, and applying the diff computed from those
+ results would result in equivalent changes that could be played forward or
+ backward as appropriate. [#71], [#75]
+
+ - The above fix resulted in a changed order of the longest common subsequence
+ when callbacks were applied. After analysis, it was determined that the
+ computed subsequence was _equivalent_ to the prior version, so the test was
+ updated. This also resulted in the clarification of documentation when
+ traversing the subsequences. [#79]
+
+ - An infinite loop case in the case where Diff::LCS would be included into an
+ enumerable class has been fixed. [#73]
+
+ - Clarified the purpose of a threshold test in calculation of LCS. [#72],
+ [#80]
+
+- Removed autotest directory
+
## 1.4.4 / 2020-07-01
- Fixed an issue reported by Jun Aruga in the Diff::LCS::Ldiff binary text
- detection. [#44][]
+ detection. [#44]
+
- Fixed a theoretical issue reported by Jun Aruga in Diff::LCS::Hunk to raise
- a more useful exception. [#43][]
+ a more useful exception. [#43]
+
- Added documentation that should address custom object issues as reported in
- [#35][].
+ [#35].
+
+- Fixed more diff errors, in part reported in [#65].
-- Fixed more diff errors, in part reported in [#65][].
+ - The use of `Numeric#abs` is incorrect in `Diff::LCS::Block#diff_size`. The
+ diff size _must_ be accurate for correct change placement.
- - The use of `Numeric#abs` is incorrect in `Diff::LCS::Block#diff_size`.
- The diff size _must_ be accurate for correct change placement.
- When selecting @max_diff_size in Diff::LCS::Hunk, choose it based on
`block.diff_size.abs`.
- - Made a number of changes that will, unfortunately, increase allocations
- at the cost of being safe with frozen strings.
- - Add some knowledge that when `Diff::LCS::Hunk#diff` is called, that we
- are processing the _last_ hunk, so some changes will be made to how the
- output is generated.
+
+ - Made a number of changes that will, unfortunately, increase allocations at
+ the cost of being safe with frozen strings.
+
+ - Add some knowledge that when `Diff::LCS::Hunk#diff` is called, that we are
+ processing the _last_ hunk, so some changes will be made to how the output
+ is generated.
- `old`, `ed`, and `reverse_ed` formats have no differences.
+
- `unified` format will report `\ No newline at end of file` given the
- correct conditions, at most once. Unified range reporting also
- differs for the last hunk such that the `length` of the range is
- reduced by one.
+ correct conditions, at most once. Unified range reporting also differs
for
+ the last hunk such that the `length` of the range is reduced by one.
+
- `context` format will report `\No newline at end of file` given the
correct conditions, up to once per "file". Context range reporting also
- differs for the last hunk such that the `end` part of the range is
- reduced by one to a minimum of one.
+ differs for the last hunk such that the `end` part of the range is
reduced
+ by one to a minimum of one.
-- Added a bunch more tests for the cases above, and fixed `hunk_spec.rb` so
- that the phrase being compared isn't nonsense French.
+- Added a bunch more tests for the cases above, and fixed `hunk_spec.rb` so
that
+ the phrase being compared isn't nonsense French.
- Updated formatting.
+
- Added a Rake task to assist with manual testing on Ruby 1.8.
## 1.4.3 / 2020-06-29
- Fixed several issues with the 1.4 on Rubies older than 2.0. Some of this was
- providing useful shim functions to Hoe 3.x (which dropped these older
- Rubies a while ago). Specifically:
+ providing useful shim functions to Hoe 3.x (which dropped these older Rubies
+ a while ago). Specifically:
- Removed Array#lazy from a method in Diff::LCS::Hunk.
+
- Changed some unit tests to use old-style Symbol-keyed hashes.
- - Changed some unit test helper functions to no longer use keyword
- parameters, but only a trailing options hash.
+
+ - Changed some unit test helper functions to no longer use keyword
parameters,
+ but only a trailing options hash.
+
- Made the use of `psych` dependent on `RUBY_VERSION >= 1.9`.
- Resolves [#63][].
+ Resolves [#63].
## 1.4.2 / 2020-06-23
-- Camille Drapier fixed a small issue with RuboCop configuration. [#59][]
+- Camille Drapier fixed a small issue with RuboCop configuration. [#59]
+
- Applied another fix (and unit test) to fix an issue for the Chef team.
- [#60][], [#61][]
+ [#60], [#61]
## 1.4.1 / 2020-06-23
-- Fix an issue where diff sizes could be negative, and they should be. [#57][],
- [#58][]
+- Fix an issue where diff sizes could be negative, and they should be. [#57],
+ [#58]
## 1.4 / 2020-06-23
-- Ruby versions lower than 2.4 are soft-deprecated and will not be run as
- part of the CI process any longer.
+- Ruby versions lower than 2.4 are soft-deprecated and will not be run as part
+ of the CI process any longer.
+
- Akinora MUSHA (knu) added the ability for Diff::LCS::Change objects to be
- implicitly treated arrays. Originally provided as pull request [#47][],
- but it introduced a number of test failures as documented in [#48][], and
- remediation of Diff::LCS itself was introduced in [#49][].
-- Resolved [#5][] with some tests comparing output from `system` calls to
- `bin/ldiff` with some pre-generated output. Resolved [#6][] with these
- tests.
-- Resolved a previously undetected `bin/ldiff` issue with `--context` output
- not matching `diff --context` output.
+ implicitly treated arrays. Originally provided as pull request [#47], but it
+ introduced a number of test failures as documented in [#48], and remediation
+ of Diff::LCS itself was introduced in [#49].
+
+- Resolved [#5] with some tests comparing output from `system` calls to
+ `bin/ldiff` with some pre-generated output. Resolved [#6] with these tests.
+
+- Resolved a previously undetected `bin/ldiff` issue with `--context` output
not
+ matching `diff --context` output.
+
- Resolved an issue with later versions of Ruby not working with an `OptParse`
specification of `Numeric`; this has been changed to `Integer`.
-- Brandon Fish added truffleruby in [#52][].
-- Fixed two missing classes as reported in [#53][].
+
+- Brandon Fish added truffleruby in [#52].
+
+- Fixed two missing classes as reported in [#53].
## 1.3 / 2017-01-18
- Bugs fixed:
- - Fixed an error for bin/ldiff --version. Fixes issue [#21][].
+ - Fixed an error for bin/ldiff --version. Fixes issue [#21].
+
- Force Diff::LCS::Change and Diff::LCS::ContextChange to only perform
- equality comparisons against themselves. Provided by Kevin Mook in
- pull request [#29][].
- - Fix tab expansion in htmldiff, provided by Mark Friedgan in
- pull request [#25][].
- - Silence Ruby 2.4 Fixnum deprecation warnings. Fixxues issue [#38][] and
- [pull request#36][].
- - Ensure that test dependencies are loaded properly. Fixes issue [#33][]
- and pull request [#34][].
- - Fix issue [#1][] with incorrect intuition of patch direction. Tentative
- fix, but the previous failure cases pass now.
+ equality comparisons against themselves. Provided by Kevin Mook in pull
+ request [#29].
+
+ - Fix tab expansion in htmldiff, provided by Mark Friedgan in pull request
+ [#25].
+
+ - Silence Ruby 2.4 Fixnum deprecation warnings. Fixes issue [#38] and pull
+ request [#36].
+
+ - Ensure that test dependencies are loaded properly. Fixes issue [#33] and
+ pull request [#34].
+
+ - Fix issue [#1] with incorrect intuition of patch direction. Tentative fix,
+ but the previous failure cases pass now.
- Tooling changes:
- Added SimpleCov and Coveralls support.
+
- Change the homepage (temporarily) to the GitHub repo.
+
- Updated testing and gem infrastructure.
+
- Modernized the specs.
- Cleaned up documentation.
@@ -112,20 +166,19 @@
- Bugs fixed:
- - Comparing arrays flattened them too far, especially with
- Diff::LCS.sdiff. Fixed by Josh Bronson in pull request [#23][].
+ - Comparing arrays flattened them too far, especially with Diff::LCS.sdiff.
+ Fixed by Josh Bronson in pull request [#23].
## 1.2.4 / 2013-04-20
- Bugs fixed:
- - A bug was introduced after 1.1.3 when pruning common sequences at the
- start of comparison. Paul Kunysch (@pck) fixed this in
- pull request [#18][]. Thanks!
-
- - The Rubinius (1.9 mode) bug in [rubinius/rubinius#2268][] has been
- fixed by the Rubinius team two days after it was filed. Thanks for
- fixing this so quickly!
+ - A bug was introduced after 1.1.3 when pruning common sequences at the start
+ of comparison. Paul Kunysch (@pck) fixed this in pull request [#18].
Thanks!
+
+ - The Rubinius (1.9 mode) bug in [rubinius/rubinius#2268] has been fixed by
+ the Rubinius team two days after it was filed. Thanks for fixing this so
+ quickly!
- Switching to Raggi's hoe-gemspec2 for gemspec generation.
@@ -135,94 +188,106 @@
- The new encoding detection for diff output generation (added in 1.2.2)
introduced a bug if the left side of the comparison was the empty set.
- Originally found in [rspec/rspec-expectations#238][] and
- [rspec/rspec-expectations#239][]. Jon Rowe developed a reasonable
- heuristic (left side, right side, empty string literal) to avoid this
- bug.
+ Originally found in [rspec/rspec-expectations#238] and
+ [rspec/rspec-expectations#239]. Jon Rowe developed a reasonable heuristic
+ (left side, right side, empty string literal) to avoid this bug.
+
- There is a known issue with Rubinius in 1.9 mode reported in
- [rubinius/rubinius#2268][] and demonstrated in the Travis CI builds.
- For all other tested platforms, diff-lcs is considered stable. As soon
- as a suitably small test-case can be created for the Rubinius team to
- examine, this will be added to the Rubinius issue around this.
+ [rubinius/rubinius#2268] and demonstrated in the Travis CI builds. For all
+ other tested platforms, diff-lcs is considered stable. As soon as a
suitably
+ small test-case can be created for the Rubinius team to examine, this will
+ be added to the Rubinius issue around this.
## 1.2.2 / 2013-03-30
- Bugs Fixed:
- - Diff::LCS::Hunk could not properly generate a difference for comparison
- sets that are not US-ASCII-compatible because of the use of literal
- regular expressions and strings. Jon Rowe found this in
- [rspec/rspec-expectations#219][] and provided a first pass
- implementation in pull request [#15][]. I've reworked it because of
- test failures in Rubinius when running in Ruby 1.9 mode. This coerces
- the added values to the encoding of the old dataset (as determined by
- the first piece of the old dataset).
+ - Diff::LCS::Hunk could not properly generate a difference for comparison
sets
+ that are not US-ASCII-compatible because of the use of literal regular
+ expressions and strings. Jon Rowe found this in
+ [rspec/rspec-expectations#219] and provided a first pass implementation in
+ pull request [#15]. I've reworked it because of test failures in Rubinius
+ when running in Ruby 1.9 mode. This coerces the added values to the
encoding
+ of the old dataset (as determined by the first piece of the old dataset).
+
- Adding Travis CI testing for Ruby 2.0.
## 1.2.1 / 2013-02-09
- Bugs Fixed:
- - As seen in [rspec/rspec-expectations#200][], the release of
- Diff::LCS 1.2 introduced an unnecessary public API change to
- Diff::LCS::Hunk (see the change at
- [rspec/rspec-expectations@3d6fc82c][] for details). The new method name
- (and behaviour) is more correct, but I should not have renamed the
- function or should have at least provided an alias. This release
- restores Diff::LCS::Hunk#unshift as an alias to #merge. Note that the
- old #unshift behaviour was incorrect and will not be restored.
+ - As seen in [rspec/rspec-expectations#200], the release of Diff::LCS 1.2
+ introduced an unnecessary public API change to Diff::LCS::Hunk (see the
+ change at [rspec/rspec-expectations@3d6fc82c] for details). The new method
+ name (and behaviour) is more correct, but I should not have renamed the
+ function or should have at least provided an alias. This release restores
+ Diff::LCS::Hunk#unshift as an alias to #merge. Note that the old #unshift
+ behaviour was incorrect and will not be restored.
## 1.2.0 / 2013-01-21
- Minor Enhancements:
- - Added special case handling for Diff::LCS.patch so that it handles
- patches that are empty or contain no changes.
- - Added two new methods (#patch_me and #unpatch_me) to the includable
- module.
+ - Added special case handling for Diff::LCS.patch so that it handles patches
+ that are empty or contain no changes.
+
+ - Added two new methods (#patch_me and #unpatch_me) to the includable module.
- Bugs Fixed:
- - Fixed issue [#1][] patch direction detection.
- - Resolved issue [#2][] by handling `string[string.size, 1]` properly (it
+ - Fixed issue [#1] patch direction detection.
+
+ - Resolved issue [#2] by handling `string[string.size, 1]` properly (it
returns `""` not `nil`).
- - Michael Granger (ged) fixed an implementation error in
- Diff::LCS::Change and added specs in pull request [#8][]. Thanks!
+
+ - Michael Granger (ged) fixed an implementation error in Diff::LCS::Change
and
+ added specs in pull request [#8]. Thanks!
+
- Made the code auto-testable.
- - V??t Ondruch (voxik) provided the latest version of the GPL2 license
- file in pull request [#10][]. Thanks!
+
+ - V??t Ondruch (voxik) provided the latest version of the GPL2 license file
in
+ pull request [#10]. Thanks!
+
- Fixed a documentation issue with the includable versions of #patch! and
- #unpatch! where they implied that they would replace the original
- value. Given that Diff::LCS.patch always returns a copy, the
- documentation was incorrect and has been corrected. To provide the
- behaviour that was originally documented, two new methods were added to
- provide this behaviour. Found by scooter-dangle in issue [#12][].
- Thanks!
+ #unpatch! where they implied that they would replace the original value.
+ Given that Diff::LCS.patch always returns a copy, the documentation was
+ incorrect and has been corrected. To provide the behaviour that was
+ originally documented, two new methods were added to provide this
behaviour.
+ Found by scooter-dangle in issue [#12]. Thanks!
- Code Style Changes:
- Removed trailing spaces.
+
- Calling class methods using `.` instead of `::`.
- - V??t Ondruch (voxik) removed unnecessary shebangs in pull request [#9][].
+
+ - V??t Ondruch (voxik) removed unnecessary shebangs in pull request [#9].
Thanks!
+
- Kenichi Kamiya (kachick) removed some warnings of an unused variable in
- lucky pull request [#13][]. Thanks!
- - Embarked on a major refactoring to make the files a little more
- manageable and understand the code on a deeper level.
+ lucky pull request [#13]. Thanks!
+
+ - Embarked on a major refactoring to make the files a little more manageable
+ and understand the code on a deeper level.
+
- Adding to http://travis-ci.org.
## 1.1.3 / 2011-08-27
- Converted to 'hoe' for release.
+
- Converted tests to RSpec 2.
-- Extracted the body of htmldiff into a class available from
- diff/lcs/htmldiff.
+
+- Extracted the body of htmldiff into a class available from diff/lcs/htmldiff.
+
- Migrated development and issue tracking to GitHub.
+
- Bugs fixed:
- - Eliminated the explicit use of RubyGems in both bin/htmldiff and
- bin/ldiff. Resolves issue [#4][].
- - Eliminated Ruby warnings. Resolves issue [#3][].
+ - Eliminated the explicit use of RubyGems in both bin/htmldiff and bin/ldiff.
+ Resolves issue [#4].
+
+ - Eliminated Ruby warnings. Resolves issue [#3].
## 1.1.2 / 2004-10-20
@@ -232,31 +297,38 @@
- Fixed bug #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 in the event of private :new being called).
+ callbacks passed as classes can be initialised; now, it rescues NoMethodError
+ in the event of private :new being called).
+
- Modified the non-initialisable callbacks to have a private #new method.
+
- Moved ldiff core code to Diff::LCS::Ldiff (diff/lcs/ldiff.rb).
-## 1.1.0 / -
+## 1.1.0
- Eliminated the need for Diff::LCS::Event and removed it.
+
- Added a contextual diff callback, Diff::LCS::ContextDiffCallback.
-- Implemented patching/unpatching for standard Diff callback output formats
- with both #diff and #sdiff.
+
+- Implemented patching/unpatching for standard Diff callback output formats
with
+ both #diff and #sdiff.
+
- Extensive documentation changes.
## 1.0.4
-- Fixed a problem with bin/ldiff output, especially for unified format.
- Newlines that should have been present weren't.
-- Changed the .tar.gz installer to generate Windows batch files if ones do
- not exist already. Removed the existing batch files as they didn't work.
+- Fixed a problem with bin/ldiff output, especially for unified format.
Newlines
+ that should have been present weren't.
+
+- Changed the .tar.gz installer to generate Windows batch files if ones do not
+ exist already. Removed the existing batch files as they didn't work.
## 1.0.3
-- Fixed a problem with #traverse_sequences where the first difference from
- the left sequence might not be appropriately captured.
+- Fixed a problem with #traverse_sequences where the first difference from the
+ left sequence might not be appropriately captured.
## 1.0.2
@@ -266,8 +338,10 @@
## 1.0.1
- Minor modifications to the gemspec, the README.
-- Renamed the diff program to ldiff (as well as the companion batch file) so
- as to not collide with the standard diff program.
+
+- Renamed the diff program to ldiff (as well as the companion batch file) so as
+ to not collide with the standard diff program.
+
- Fixed issues with RubyGems. Requires RubyGems > 0.6.1 or >= 0.6.1 with the
latest CVS version.
@@ -317,3 +391,10 @@
[#61]: https://github.com/halostatue/diff-lcs/pull/61
[#63]: https://github.com/halostatue/diff-lcs/issues/63
[#65]: https://github.com/halostatue/diff-lcs/issues/65
+[#69]: https://github.com/halostatue/diff-lcs/issues/69
+[#71]: https://github.com/halostatue/diff-lcs/issues/71
+[#72]: https://github.com/halostatue/diff-lcs/issues/72
+[#73]: https://github.com/halostatue/diff-lcs/issues/73
+[#75]: https://github.com/halostatue/diff-lcs/issues/75
+[#79]: https://github.com/halostatue/diff-lcs/issues/79
+[#80]: https://github.com/halostatue/diff-lcs/issues/80
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Manifest.txt new/Manifest.txt
--- old/Manifest.txt 2020-07-01 20:29:57.000000000 +0200
+++ new/Manifest.txt 2021-12-23 07:01:50.000000000 +0100
@@ -6,7 +6,6 @@
Manifest.txt
README.rdoc
Rakefile
-autotest/discover.rb
bin/htmldiff
bin/ldiff
docs/COPYING.txt
@@ -34,6 +33,21 @@
spec/fixtures/ldiff/output.diff-e
spec/fixtures/ldiff/output.diff-f
spec/fixtures/ldiff/output.diff-u
+spec/fixtures/ldiff/output.diff.chef
+spec/fixtures/ldiff/output.diff.chef-c
+spec/fixtures/ldiff/output.diff.chef-e
+spec/fixtures/ldiff/output.diff.chef-f
+spec/fixtures/ldiff/output.diff.chef-u
+spec/fixtures/ldiff/output.diff.chef2
+spec/fixtures/ldiff/output.diff.chef2-c
+spec/fixtures/ldiff/output.diff.chef2-d
+spec/fixtures/ldiff/output.diff.chef2-e
+spec/fixtures/ldiff/output.diff.chef2-f
+spec/fixtures/ldiff/output.diff.chef2-u
+spec/fixtures/new-chef
+spec/fixtures/new-chef2
+spec/fixtures/old-chef
+spec/fixtures/old-chef2
spec/hunk_spec.rb
spec/issues_spec.rb
spec/lcs_spec.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile 2020-07-01 20:29:57.000000000 +0200
+++ new/Rakefile 2021-12-23 07:01:50.000000000 +0100
@@ -2,8 +2,44 @@
require 'rubygems'
require 'rspec'
+require 'rspec/core/rake_task'
require 'hoe'
+# This is required until https://github.com/seattlerb/hoe/issues/112 is fixed
+class Hoe
+ def with_config
+ config = Hoe::DEFAULT_CONFIG
+
+ rc = File.expand_path("~/.hoerc")
+ homeconfig = load_config(rc)
+ config = config.merge(homeconfig)
+
+ localconfig = load_config(File.expand_path(File.join(Dir.pwd, ".hoerc")))
+ config = config.merge(localconfig)
+
+ yield config, rc
+ end
+
+ def load_config(name)
+ File.exist?(name) ? safe_load_yaml(name) : {}
+ end
+
+ def safe_load_yaml(name)
+ return safe_load_yaml_file(name) if YAML.respond_to?(:safe_load_file)
+
+ data = IO.binread(name)
+ YAML.safe_load(data, permitted_classes: [Regexp])
+ rescue
+ YAML.safe_load(data, [Regexp])
+ end
+
+ def safe_load_yaml_file(name)
+ YAML.safe_load_file(name, permitted_classes: [Regexp])
+ rescue
+ YAML.safe_load_file(name, [Regexp])
+ end
+end
+
Hoe.plugin :bundler
Hoe.plugin :doofus
Hoe.plugin :gemspec2
@@ -44,9 +80,20 @@
extra_dev_deps << ['hoe-rubygems', '~> 1.0']
extra_dev_deps << ['rspec', '>= 2.0', '< 4']
extra_dev_deps << ['rake', '>= 10.0', '< 14']
- extra_dev_deps << ['rdoc', '>= 0']
+ extra_dev_deps << ['rdoc', '>= 6.3.1', '< 7']
end
+desc "Run all specifications"
+RSpec::Core::RakeTask.new(:spec) do |t|
+ rspec_dirs = %w(spec lib).join(":")
+ t.rspec_opts = ["-I#{rspec_dirs}"]
+end
+
+Rake::Task["spec"].actions.uniq! { |a| a.source_location }
+
+task :default => :spec unless Rake::Task["default"].prereqs.include?("spec")
+task :test => :spec unless Rake::Task["test"].prereqs.include?("spec")
+
if RUBY_VERSION >= '2.0' && RUBY_ENGINE == 'ruby'
namespace :spec do
desc "Runs test coverage. Only works Ruby 2.0+ and assumes 'simplecov' is
installed."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/autotest/discover.rb new/autotest/discover.rb
--- old/autotest/discover.rb 2020-07-01 20:29:57.000000000 +0200
+++ new/autotest/discover.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-# frozen_string_literal: true
-
-Autotest.add_discovery { 'rspec2' }
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/diff/lcs/internals.rb
new/lib/diff/lcs/internals.rb
--- old/lib/diff/lcs/internals.rb 2020-07-01 20:29:57.000000000 +0200
+++ new/lib/diff/lcs/internals.rb 2021-12-23 07:01:50.000000000 +0100
@@ -44,13 +44,12 @@
b_finish = b.size - 1
vector = []
- # Prune off any common elements at the beginning...
+ # Collect any common elements at the beginning...
while (a_start <= a_finish) and (b_start <= b_finish) and (a[a_start] ==
b[b_start])
vector[a_start] = b_start
a_start += 1
b_start += 1
end
- b_start = a_start
# Now the end...
while (a_start <= a_finish) and (b_start <= b_finish) and (a[a_finish] ==
b[b_finish])
@@ -60,6 +59,7 @@
end
# Now, compute the equivalence classes of positions of elements.
+ # An explanation for how this works: https://codeforces.com/topic/92191
b_matches = position_hash(b, b_start..b_finish)
thresh = []
@@ -71,6 +71,10 @@
bm = b_matches[ai]
k = nil
bm.reverse_each do |j|
+ # Although the threshold check is not mandatory for this to work,
+ # it may have an optimization purpose
+ # An attempt to remove it:
https://github.com/halostatue/diff-lcs/pull/72
+ # Why it is reintroduced:
https://github.com/halostatue/diff-lcs/issues/78
if k and (thresh[k] > j) and (thresh[k - 1] < j)
thresh[k] = j
else
@@ -253,7 +257,7 @@
end
# Binary search for the insertion point
- last_index ||= enum.size
+ last_index ||= enum.size - 1
first_index = 0
while first_index <= last_index
i = (first_index + last_index) >> 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/diff/lcs.rb new/lib/diff/lcs.rb
--- old/lib/diff/lcs.rb 2020-07-01 20:29:57.000000000 +0200
+++ new/lib/diff/lcs.rb 2021-12-23 07:01:50.000000000 +0100
@@ -49,7 +49,7 @@
# a x b y c z p d q
# a b c a x b y c z
module Diff::LCS
- VERSION = '1.4.4'
+ VERSION = '1.5.0'
end
require 'diff/lcs/callbacks'
@@ -85,14 +85,14 @@
# Traverses the discovered longest common subsequences between +self+ and
# +other+. See Diff::LCS#traverse_sequences.
def traverse_sequences(other, callbacks = nil, &block)
- traverse_sequences(self, other, callbacks || Diff::LCS::SequenceCallbacks,
&block)
+ Diff::LCS.traverse_sequences(self, other, callbacks ||
Diff::LCS::SequenceCallbacks, &block)
end
# Traverses the discovered longest common subsequences between +self+ and
# +other+ using the alternate, balanced algorithm. See
# Diff::LCS#traverse_balanced.
def traverse_balanced(other, callbacks = nil, &block)
- traverse_balanced(self, other, callbacks || Diff::LCS::BalancedCallbacks,
&block)
+ Diff::LCS.traverse_balanced(self, other, callbacks ||
Diff::LCS::BalancedCallbacks, &block)
end
# Attempts to patch +self+ with the provided +patchset+. A new sequence based
@@ -250,8 +250,9 @@
# advance that arrow and will call <tt>callbacks#discard_a</tt> or
# <tt>callbacks#discard_b</tt>, depending on which arrow it advanced. If both
# arrows point to elements that are not part of the longest common
- # subsequence, then #traverse_sequences will advance one of them and call the
- # appropriate callback, but it is not specified which it will call.
+ # subsequence, then #traverse_sequences will advance arrow +a+ and call the
+ # appropriate callback, then it will advance arrow +b+ and call the
appropriate
+ # callback.
#
# The methods for <tt>callbacks#match</tt>, <tt>callbacks#discard_a</tt>, and
# <tt>callbacks#discard_b</tt> are invoked with an event comprising the
@@ -292,37 +293,36 @@
b_size = seq2.size
ai = bj = 0
- (0..matches.size).each do |i|
- b_line = matches[i]
-
- ax = string ? seq1[i, 1] : seq1[i]
- bx = string ? seq2[bj, 1] : seq2[bj]
-
+ matches.each do |b_line|
if b_line.nil?
- unless ax.nil? or (string and ax.empty?)
- event = Diff::LCS::ContextChange.new('-', i, ax, bj, bx)
+ unless seq1[ai].nil?
+ ax = string ? seq1[ai, 1] : seq1[ai]
+ bx = string ? seq2[bj, 1] : seq2[bj]
+
+ event = Diff::LCS::ContextChange.new('-', ai, ax, bj, bx)
event = yield event if block_given?
callbacks.discard_a(event)
end
else
+ ax = string ? seq1[ai, 1] : seq1[ai]
+
loop do
break unless bj < b_line
bx = string ? seq2[bj, 1] : seq2[bj]
- event = Diff::LCS::ContextChange.new('+', i, ax, bj, bx)
+ event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
event = yield event if block_given?
callbacks.discard_b(event)
bj += 1
end
bx = string ? seq2[bj, 1] : seq2[bj]
- event = Diff::LCS::ContextChange.new('=', i, ax, bj, bx)
+ event = Diff::LCS::ContextChange.new('=', ai, ax, bj, bx)
event = yield event if block_given?
callbacks.match(event)
bj += 1
end
- ai = i
+ ai += 1
end
- ai += 1
# The last entry (if any) processed was a match. +ai+ and +bj+ point just
# past the last matching lines in their sequences.
@@ -380,14 +380,14 @@
ai += 1
end
- next unless bj < b_size
-
- ax = string ? seq1[ai, 1] : seq1[ai]
- bx = string ? seq2[bj, 1] : seq2[bj]
- event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
- event = yield event if block_given?
- callbacks.discard_b(event)
- bj += 1
+ if bj < b_size
+ ax = string ? seq1[ai, 1] : seq1[ai]
+ bx = string ? seq2[bj, 1] : seq2[bj]
+ event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
+ event = yield event if block_given?
+ callbacks.discard_b(event)
+ bj += 1
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2020-07-01 20:29:57.000000000 +0200
+++ new/metadata 2021-12-23 07:01:50.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: diff-lcs
version: !ruby/object:Gem::Version
- version: 1.4.4
+ version: 1.5.0
platform: ruby
authors:
- Austin Ziegler
autorequire:
bindir: bin
cert_chain: []
-date: 2020-07-01 00:00:00.000000000 Z
+date: 2021-12-23 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: hoe-doofus
@@ -112,28 +112,34 @@
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: '0'
+ version: 6.3.1
+ - - "<"
+ - !ruby/object:Gem::Version
+ version: '7'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: '0'
+ version: 6.3.1
+ - - "<"
+ - !ruby/object:Gem::Version
+ version: '7'
- !ruby/object:Gem::Dependency
name: hoe
requirement: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: '3.22'
+ version: '3.23'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: '3.22'
+ version: '3.23'
description: |-
Diff::LCS computes the difference between two Enumerable sequences using the
McIlroy-Hunt longest common subsequence (LCS) algorithm. It includes
utilities
@@ -172,7 +178,6 @@
- Manifest.txt
- README.rdoc
- Rakefile
-- autotest/discover.rb
- bin/htmldiff
- bin/ldiff
- docs/COPYING.txt
@@ -200,6 +205,21 @@
- spec/fixtures/ldiff/output.diff-e
- spec/fixtures/ldiff/output.diff-f
- spec/fixtures/ldiff/output.diff-u
+- spec/fixtures/ldiff/output.diff.chef
+- spec/fixtures/ldiff/output.diff.chef-c
+- spec/fixtures/ldiff/output.diff.chef-e
+- spec/fixtures/ldiff/output.diff.chef-f
+- spec/fixtures/ldiff/output.diff.chef-u
+- spec/fixtures/ldiff/output.diff.chef2
+- spec/fixtures/ldiff/output.diff.chef2-c
+- spec/fixtures/ldiff/output.diff.chef2-d
+- spec/fixtures/ldiff/output.diff.chef2-e
+- spec/fixtures/ldiff/output.diff.chef2-f
+- spec/fixtures/ldiff/output.diff.chef2-u
+- spec/fixtures/new-chef
+- spec/fixtures/new-chef2
+- spec/fixtures/old-chef
+- spec/fixtures/old-chef2
- spec/hunk_spec.rb
- spec/issues_spec.rb
- spec/lcs_spec.rb
@@ -235,7 +255,7 @@
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubygems_version: 3.0.3
+rubygems_version: 3.1.6
signing_key:
specification_version: 4
summary: Diff::LCS computes the difference between two Enumerable sequences
using
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/ldiff/output.diff.chef
new/spec/fixtures/ldiff/output.diff.chef
--- old/spec/fixtures/ldiff/output.diff.chef 1970-01-01 01:00:00.000000000
+0100
+++ new/spec/fixtures/ldiff/output.diff.chef 2021-12-23 07:01:50.000000000
+0100
@@ -0,0 +1,4 @@
+3c3
+< "description": "hi"
+---
+> "description": "lo"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/ldiff/output.diff.chef-c
new/spec/fixtures/ldiff/output.diff.chef-c
--- old/spec/fixtures/ldiff/output.diff.chef-c 1970-01-01 01:00:00.000000000
+0100
+++ new/spec/fixtures/ldiff/output.diff.chef-c 2021-12-23 07:01:50.000000000
+0100
@@ -0,0 +1,15 @@
+*** spec/fixtures/old-chef 2020-06-23 23:18:20.000000000 -0400
+--- spec/fixtures/new-chef 2020-06-23 23:18:20.000000000 -0400
+***************
+*** 1,4 ****
+ {
+ "name": "x",
+! "description": "hi"
+ }
+\ No newline at end of file
+--- 1,4 ----
+ {
+ "name": "x",
+! "description": "lo"
+ }
+\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/ldiff/output.diff.chef-e
new/spec/fixtures/ldiff/output.diff.chef-e
--- old/spec/fixtures/ldiff/output.diff.chef-e 1970-01-01 01:00:00.000000000
+0100
+++ new/spec/fixtures/ldiff/output.diff.chef-e 2021-12-23 07:01:50.000000000
+0100
@@ -0,0 +1,3 @@
+3c
+ "description": "lo"
+.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/ldiff/output.diff.chef-f
new/spec/fixtures/ldiff/output.diff.chef-f
--- old/spec/fixtures/ldiff/output.diff.chef-f 1970-01-01 01:00:00.000000000
+0100
+++ new/spec/fixtures/ldiff/output.diff.chef-f 2021-12-23 07:01:50.000000000
+0100
@@ -0,0 +1,3 @@
+c3
+ "description": "lo"
+.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/ldiff/output.diff.chef-u
new/spec/fixtures/ldiff/output.diff.chef-u
--- old/spec/fixtures/ldiff/output.diff.chef-u 1970-01-01 01:00:00.000000000
+0100
+++ new/spec/fixtures/ldiff/output.diff.chef-u 2021-12-23 07:01:50.000000000
+0100
@@ -0,0 +1,9 @@
+--- spec/fixtures/old-chef 2020-06-23 23:18:20.000000000 -0400
++++ spec/fixtures/new-chef 2020-06-23 23:18:20.000000000 -0400
+@@ -1,4 +1,4 @@
+ {
+ "name": "x",
+- "description": "hi"
++ "description": "lo"
+ }
+\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/ldiff/output.diff.chef2
new/spec/fixtures/ldiff/output.diff.chef2
--- old/spec/fixtures/ldiff/output.diff.chef2 1970-01-01 01:00:00.000000000
+0100
+++ new/spec/fixtures/ldiff/output.diff.chef2 2021-12-23 07:01:50.000000000
+0100
@@ -0,0 +1,7 @@
+2d1
+< recipe[b::default]
+14a14,17
+> recipe[o::new]
+> recipe[p::new]
+> recipe[q::new]
+> recipe[r::new]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/ldiff/output.diff.chef2-c
new/spec/fixtures/ldiff/output.diff.chef2-c
--- old/spec/fixtures/ldiff/output.diff.chef2-c 1970-01-01 01:00:00.000000000
+0100
+++ new/spec/fixtures/ldiff/output.diff.chef2-c 2021-12-23 07:01:50.000000000
+0100
@@ -0,0 +1,20 @@
+*** spec/fixtures/old-chef2 2020-06-30 09:43:35.000000000 -0400
+--- spec/fixtures/new-chef2 2020-06-30 09:44:32.000000000 -0400
+***************
+*** 1,5 ****
+ recipe[a::default]
+- recipe[b::default]
+ recipe[c::default]
+ recipe[d::default]
+ recipe[e::default]
+--- 1,4 ----
+***************
+*** 12,14 ****
+--- 11,17 ----
+ recipe[l::default]
+ recipe[m::default]
+ recipe[n::default]
++ recipe[o::new]
++ recipe[p::new]
++ recipe[q::new]
++ recipe[r::new]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/ldiff/output.diff.chef2-d
new/spec/fixtures/ldiff/output.diff.chef2-d
--- old/spec/fixtures/ldiff/output.diff.chef2-d 1970-01-01 01:00:00.000000000
+0100
+++ new/spec/fixtures/ldiff/output.diff.chef2-d 2021-12-23 07:01:50.000000000
+0100
@@ -0,0 +1,7 @@
+d2
+a14
+recipe[o::new]
+recipe[p::new]
+recipe[q::new]
+recipe[r::new]
+.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/ldiff/output.diff.chef2-e
new/spec/fixtures/ldiff/output.diff.chef2-e
--- old/spec/fixtures/ldiff/output.diff.chef2-e 1970-01-01 01:00:00.000000000
+0100
+++ new/spec/fixtures/ldiff/output.diff.chef2-e 2021-12-23 07:01:50.000000000
+0100
@@ -0,0 +1,7 @@
+14a
+recipe[o::new]
+recipe[p::new]
+recipe[q::new]
+recipe[r::new]
+.
+2d
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/ldiff/output.diff.chef2-f
new/spec/fixtures/ldiff/output.diff.chef2-f
--- old/spec/fixtures/ldiff/output.diff.chef2-f 1970-01-01 01:00:00.000000000
+0100
+++ new/spec/fixtures/ldiff/output.diff.chef2-f 2021-12-23 07:01:50.000000000
+0100
@@ -0,0 +1,7 @@
+d2
+a14
+recipe[o::new]
+recipe[p::new]
+recipe[q::new]
+recipe[r::new]
+.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/ldiff/output.diff.chef2-u
new/spec/fixtures/ldiff/output.diff.chef2-u
--- old/spec/fixtures/ldiff/output.diff.chef2-u 1970-01-01 01:00:00.000000000
+0100
+++ new/spec/fixtures/ldiff/output.diff.chef2-u 2021-12-23 07:01:50.000000000
+0100
@@ -0,0 +1,16 @@
+--- spec/fixtures/old-chef2 2020-06-30 09:43:35.000000000 -0400
++++ spec/fixtures/new-chef2 2020-06-30 09:44:32.000000000 -0400
+@@ -1,5 +1,4 @@
+ recipe[a::default]
+-recipe[b::default]
+ recipe[c::default]
+ recipe[d::default]
+ recipe[e::default]
+@@ -12,3 +11,7 @@
+ recipe[l::default]
+ recipe[m::default]
+ recipe[n::default]
++recipe[o::new]
++recipe[p::new]
++recipe[q::new]
++recipe[r::new]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/new-chef new/spec/fixtures/new-chef
--- old/spec/fixtures/new-chef 1970-01-01 01:00:00.000000000 +0100
+++ new/spec/fixtures/new-chef 2021-12-23 07:01:50.000000000 +0100
@@ -0,0 +1,4 @@
+{
+ "name": "x",
+ "description": "lo"
+}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/new-chef2 new/spec/fixtures/new-chef2
--- old/spec/fixtures/new-chef2 1970-01-01 01:00:00.000000000 +0100
+++ new/spec/fixtures/new-chef2 2021-12-23 07:01:50.000000000 +0100
@@ -0,0 +1,17 @@
+recipe[a::default]
+recipe[c::default]
+recipe[d::default]
+recipe[e::default]
+recipe[f::default]
+recipe[g::default]
+recipe[h::default]
+recipe[i::default]
+recipe[j::default]
+recipe[k::default]
+recipe[l::default]
+recipe[m::default]
+recipe[n::default]
+recipe[o::new]
+recipe[p::new]
+recipe[q::new]
+recipe[r::new]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/old-chef new/spec/fixtures/old-chef
--- old/spec/fixtures/old-chef 1970-01-01 01:00:00.000000000 +0100
+++ new/spec/fixtures/old-chef 2021-12-23 07:01:50.000000000 +0100
@@ -0,0 +1,4 @@
+{
+ "name": "x",
+ "description": "hi"
+}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/fixtures/old-chef2 new/spec/fixtures/old-chef2
--- old/spec/fixtures/old-chef2 1970-01-01 01:00:00.000000000 +0100
+++ new/spec/fixtures/old-chef2 2021-12-23 07:01:50.000000000 +0100
@@ -0,0 +1,14 @@
+recipe[a::default]
+recipe[b::default]
+recipe[c::default]
+recipe[d::default]
+recipe[e::default]
+recipe[f::default]
+recipe[g::default]
+recipe[h::default]
+recipe[i::default]
+recipe[j::default]
+recipe[k::default]
+recipe[l::default]
+recipe[m::default]
+recipe[n::default]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/spec_helper.rb new/spec/spec_helper.rb
--- old/spec/spec_helper.rb 2020-07-01 20:29:57.000000000 +0200
+++ new/spec/spec_helper.rb 2021-12-23 07:01:50.000000000 +0100
@@ -28,7 +28,7 @@
}
SimpleCov.start do
- formatter SimpleCov::Formatter::MultiFormatter[*formatters]
+ formatter SimpleCov::Formatter::MultiFormatter.new(formatters)
end
end
@@ -123,8 +123,8 @@
],
[
['-', 8, 'n'],
- ['-', 9, 'p'],
['+', 9, 'r'],
+ ['-', 9, 'p'],
['+', 10, 's'],
['+', 11, 't']
]
@@ -148,10 +148,10 @@
],
[
['-', 9, 'r'],
- ['-', 10, 's'],
['+', 8, 'n'],
- ['-', 11, 't'],
- ['+', 9, 'p']
+ ['-', 10, 's'],
+ ['+', 9, 'p'],
+ ['-', 11, 't']
]
]
end
@@ -288,7 +288,6 @@
end
def finished_b(event)
- p 'called #finished_b'
@done_b << [
event.old_element, event.old_position,
event.new_element, event.new_position
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/traverse_sequences_spec.rb
new/spec/traverse_sequences_spec.rb
--- old/spec/traverse_sequences_spec.rb 2020-07-01 20:29:57.000000000 +0200
+++ new/spec/traverse_sequences_spec.rb 2021-12-23 07:01:50.000000000 +0100
@@ -127,13 +127,11 @@
end
it 'has done markers differently-sized sequences' do
- expect(@callback_s1_s2.done_a).to eq([['p', 9, 's', 10]])
+ expect(@callback_s1_s2.done_a).to eq([['p', 9, 't', 11]])
expect(@callback_s1_s2.done_b).to be_empty
- # 20110731 I don't yet understand why this particular behaviour
- # isn't transitive.
expect(@callback_s2_s1.done_a).to be_empty
- expect(@callback_s2_s1.done_b).to be_empty
+ expect(@callback_s2_s1.done_b).to eq([['t', 11, 'p', 9]])
end
end
end