summaryrefslogtreecommitdiff
path: root/lib/diff/lcs
Commit message (Collapse)AuthorAgeFilesLines
* standardrb --only Style/BarePercentLiterals --fixAustin Ziegler2022-07-041-1/+1
|
* standardrb --only Style/StringLiteralsInInterpolationAustin Ziegler2022-07-041-0/+6
|
* standardrb --only Style/StringLiteralsInInterpolation --fix and moreAustin Ziegler2022-07-041-9/+8
|
* standardrb --only Style/RedundantBegin --fixAustin Ziegler2022-07-041-5/+3
|
* standardrb --only Standard/BlockSingleLineBraces --fixAustin Ziegler2022-07-041-4/+4
|
* standardrb --only Style/RescueModifier --fixAustin Ziegler2022-07-041-1/+5
|
* standardrb --only Style/Alias --fixAustin Ziegler2022-07-042-3/+3
|
* Clean up lint directivesAustin Ziegler2022-07-043-5/+5
|
* standardrb --only Layout/SpaceInsideHashLiteralBraces --fixAustin Ziegler2022-07-041-2/+2
|
* standardrb --only Style/ClassCheck --fixAustin Ziegler2022-07-042-7/+7
|
* Ignore Style/HashSyntaxAustin Ziegler2022-07-041-0/+2
|
* standardrb --only Layout/LeadingCommentSpace --fixAustin Ziegler2022-07-044-11/+11
|
* Fix :yields: directive for rdocAustin Ziegler2022-07-041-2/+2
|
* Fix Style/AndOrAustin Ziegler2022-07-044-9/+9
|
* ignore Layout/heredocIndentation due to old RubyAustin Ziegler2022-07-042-0/+8
|
* standardrb --only Layout/ExtraSpacing --fix and ignoreAustin Ziegler2022-07-044-11/+11
|
* standardrb --only Style/PercentLiteralDelimiters --fixAustin Ziegler2022-07-041-1/+1
|
* standardrb --only Style/StringLiterals --fixAustin Ziegler2022-07-048-71/+71
|
* Fix issues reported by fastererAustin Ziegler2022-07-041-1/+1
|
* Reintroduce the threshold test optimizationreintroduce-the-threshold-test-optimizationtiendo10112021-12-221-4/+9
|
* Use comment to aid reverting in case the change is problematictiendo10112021-12-201-0/+3
|
* Ax unnecessary callstiendo10112021-12-191-7/+3
|
* Correct last index positiontiendo10112021-12-161-1/+1
|
* # This is a combination of 9 commits.Austin Ziegler2020-07-013-61/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # This is the 1st commit message: Fix improperly placed chunks Resolve #65 - Also add even more tests for checking `ldiff` results against `diff` results. - Fix issues with diff/ldiff output highlighted by the above tests. - Add a parameter to indicate that the hunk being processed is the _last_ hunk; this results in correct counting of the hunk size. - The misplaced chunks were happening because of an improper `.abs` on `#diff_size`, when the `.abs` needed to be on the finding of the maximum diff size. # This is the commit message #2: Ooops. Debugger # This is the commit message #3: Restore missing test - Fix some more format issues raised by the missing test. - Start fixing Rubocop formatting. # This is the commit message #4: Last RuboCop fixes # This is the commit message #5: Finalize diff-lcs 1.4 # This is the commit message #6: Fix #44 The problem here was the precedence of `or` vs `||`. Switching to `||` resulted in the expected behaviour. # This is the commit message #7: Resolve #43 # This is the commit message #8: Typo # This is the commit message #9: Resolve #35 with a comment
* Fix some issues with 1.4 on older Rubiesfix-ruby-1.8-supportAustin Ziegler2020-06-281-1/+1
| | | | | - Required to fully support rspec. - Resolves #63.
* Merge pull request #61 from halostatue/fix-issue-60v1.4.2Austin Ziegler2020-06-231-8/+11
|\ | | | | Change when max_diff_size is applied
| * Change when max_diff_size is appliedAustin Ziegler2020-06-231-8/+11
| | | | | | | | | | | | | | - This appears to satisfy the issues found in #60 as well as providing the additional fixes required to properly test ldiff. Resolves #60
* | Fix typo for rubocop cop namspacecamille2020-06-241-1/+1
|/
* Fix an issue with negative hunk max_sizeAustin Ziegler2020-06-231-1/+1
| | | | | | | Resolves #57. - The `diff_size` should be an absolute value. - Added a test to ensure that the issue does not introduce a regression.
* Resolve multiple issues for 1.4Austin Ziegler2019-02-042-8/+14
| | | | | | | | | | | | | - Resolve ldiff output issues: Resolves #5 and #6 by adding system-output comparison calls to `bin/ldiff` compared against some pre-generated output. There is some timestamp manipulation involved with the output comparison, as the timestamps are unstable because of the way that git clone works. - Resolved a problem with bin/ldiff --context output. - Resolved a Numeric/Integer OptParse issue: later versions of Ruby had problems working with an `OptParse` option specification of `Numeric`; this has been changed to `Integer`.
* Update documentationAustin Ziegler2019-02-011-2/+2
|
* Reintroduce Diff::LCS::Change#to_aryAustin Ziegler2019-02-012-12/+16
| | | | | | | | | | | - This required some level of code remediation in the main library, but all tests now pass: - Patchsets are now internally flattened one level explicitly, rather than using Array#flatten. This ensures that only the outer patchset array is flattened. Fixes #48.
* Applied Rubocop rules that I likeAustin Ziegler2019-01-2710-165/+178
| | | | | - Other linting configuration also applied. - Soft-deprecating versions older than 2.3.
* Revert PR#47 "Add #to_ary to Diff::LCS::Change…"Austin Ziegler2019-01-271-4/+0
| | | | | | | | | | This reverts commits 01e0cae and 3b4d2be because they introduce fatally breaking changes in the tests that were hidden by broken CI. * 01e0cae: Add #to_ary to Diff::LCS::Change and Diff::LCS::ContextChange [Akinori MUSHA] * 3b4d2be: Mention in rdoc that Diff::LCS::ContextChange can be converted to an array [Akinori MUSHA]
* Add #to_ary to Diff::LCS::Change and Diff::LCS::ContextChangeAkinori MUSHA2019-01-261-0/+4
| | | | | | | | | | | | | | | | | It would be quite handy if you could write as follows: ```ruby Diff::LCS.sdiff(a, b).each do |action, (old_position, old_element), (new_position, new_element)| case action when '!' # replace when '-' # delete when '+' # insert end end ```
* diff-lcs 1.3Austin Ziegler2017-01-183-51/+31
| | | | | | | | | | | - Updated testing and gem infrastructure. - Cleaning up documentation. - Modernizing specs. - Silence Ruby 2.4 Fixnum deprecation warnings. Fixes #36, #38. - Ensure test dependencies are loaded. Fixes #33, #34 so that specs can be run independently. - Fix issue #1 with incorrect intuition of patch direction. Tentative fix, but the failure cases pass now.
* Merge pull request #29 from GoBoundless/fix_compareAustin Ziegler2014-04-261-0/+2
|\ | | | | update Change and ContextChange's '==' methods to compare against the other object's class
| * update Diff::LCS::Change and Diff::LCS::ContextChange's '==' methods to ↵Kevin Mook2014-04-231-0/+2
| | | | | | | | compare against the other object's class
* | Fixing a banner bug with bin/ldiffAustin Ziegler2014-04-261-1/+1
|/ | | | Fixes #21.
* Update htmldiff.rbMark Friedgan2013-12-221-2/+2
| | | expand tabs is broken otherwise and the code is inconsistent anyway
* fixing for Diff::LCS::Change.from_ajoshbronson2013-11-051-1/+1
| | | | | | | | | | | | | flatten should only go one level deep to avoid problems when diffing arrays of arrays, e.g.: Diff::LCS.sdiff([[1,2]], []) RuntimeError: Invalid change array format provided. from /Users/joshbronson/homebase/jbro-homebase/bundle/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/change.rb:50:in `from_a' from /Users/joshbronson/homebase/jbro-homebase/bundle/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/change.rb:137:in `from_a' from /Users/joshbronson/homebase/jbro-homebase/bundle/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/change.rb:158:in `simplify' from /Users/joshbronson/homebase/jbro-homebase/bundle/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/callbacks.rb:312:in `discard_a' from /Users/joshbronson/homebase/jbro-homebase/bundle/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs.rb:633:in `traverse_balanced' from /Users/joshbronson/homebase/jbro-homebase/bundle/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/internals.rb:10:in `diff_traversal' from /Users/joshbronson/homebase/jbro-homebase/bundle/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs.rb:266:in `sdiff'
* Fix redundancy of value checkginriki2013-04-291-1/+1
|
* Fix pruning of common sequences at start.Paul Kunysch2013-04-201-0/+1
|
* protect against no dataJon Rowe2013-04-111-1/+1
|
* Finalizing encoding-aware diff fixes.Austin Ziegler2013-03-301-29/+21
| | | | | | | | | | | | | | * 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 (JonRowe) found this in rspec/rspec-expectations#219 and provided a first pass implementation in diff-lcs#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). https://github.com/rspec/rspec-expectations/issues/219 https://github.com/halostatue/diff-lcs/pull/15 * Adding Travis CI testing for Ruby 2.0.
* refactor out encoding methodJon Rowe2013-03-151-1/+2
|
* ruby 187... support...Jon Rowe2013-03-151-6/+16
|
* matching preferred stylingJon Rowe2013-03-151-6/+8
|
* fix issues with encoding caused by using literalsJon Rowe2013-03-151-20/+39
|
* Restoring an older public API method.Austin Ziegler2013-02-091-0/+1
| | | | | | | | | - I changed what I thought was a private API, but it turns out that people used Hunk#unshift. Because the Hunk#merge functionality is safer and more correct, I have provided Hunk#unshift as an alias to Hunk#merge. - Note that Hunk#unshift should be considered deprecated and the alias will be removed in a future major version of Diff::LCS.