diff-lcs 1.5.1 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +506 -0
  3. data/CODE_OF_CONDUCT.md +128 -0
  4. data/CONTRIBUTING.md +71 -0
  5. data/CONTRIBUTORS.md +48 -0
  6. data/{License.md → LICENCE.md} +15 -16
  7. data/Manifest.txt +61 -5
  8. data/README.md +92 -0
  9. data/Rakefile +19 -50
  10. data/SECURITY.md +41 -0
  11. data/docs/artistic.txt +1 -1
  12. data/lib/diff/lcs/change.rb +1 -1
  13. data/lib/diff/lcs/htmldiff.rb +2 -0
  14. data/lib/diff/lcs/hunk.rb +38 -22
  15. data/lib/diff/lcs/ldiff.rb +65 -49
  16. data/lib/diff/lcs/version.rb +7 -0
  17. data/lib/diff/lcs.rb +10 -9
  18. data/mise.toml +5 -0
  19. data/spec/fixtures/123_x +2 -0
  20. data/spec/fixtures/456_x +2 -0
  21. data/spec/fixtures/empty +0 -0
  22. data/spec/fixtures/file1.bin +0 -0
  23. data/spec/fixtures/file2.bin +0 -0
  24. data/spec/fixtures/four_lines +4 -0
  25. data/spec/fixtures/four_lines_with_missing_new_line +4 -0
  26. data/spec/fixtures/ldiff/diff.missing_new_line1-e +1 -0
  27. data/spec/fixtures/ldiff/diff.missing_new_line1-f +1 -0
  28. data/spec/fixtures/ldiff/diff.missing_new_line2-e +1 -0
  29. data/spec/fixtures/ldiff/diff.missing_new_line2-f +1 -0
  30. data/spec/fixtures/ldiff/error.diff.chef-e +2 -0
  31. data/spec/fixtures/ldiff/error.diff.chef-f +2 -0
  32. data/spec/fixtures/ldiff/error.diff.missing_new_line1-e +1 -0
  33. data/spec/fixtures/ldiff/error.diff.missing_new_line1-f +1 -0
  34. data/spec/fixtures/ldiff/error.diff.missing_new_line2-e +1 -0
  35. data/spec/fixtures/ldiff/error.diff.missing_new_line2-f +1 -0
  36. data/spec/fixtures/ldiff/output.diff.bin1 +0 -0
  37. data/spec/fixtures/ldiff/output.diff.bin1-c +0 -0
  38. data/spec/fixtures/ldiff/output.diff.bin1-e +0 -0
  39. data/spec/fixtures/ldiff/output.diff.bin1-f +0 -0
  40. data/spec/fixtures/ldiff/output.diff.bin1-u +0 -0
  41. data/spec/fixtures/ldiff/output.diff.bin2 +1 -0
  42. data/spec/fixtures/ldiff/output.diff.bin2-c +1 -0
  43. data/spec/fixtures/ldiff/output.diff.bin2-e +1 -0
  44. data/spec/fixtures/ldiff/output.diff.bin2-f +1 -0
  45. data/spec/fixtures/ldiff/output.diff.bin2-u +1 -0
  46. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines +5 -0
  47. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-c +9 -0
  48. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-e +6 -0
  49. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-f +6 -0
  50. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-u +7 -0
  51. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty +5 -0
  52. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-c +9 -0
  53. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-e +1 -0
  54. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-f +1 -0
  55. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-u +7 -0
  56. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context +4 -0
  57. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-c +9 -0
  58. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-e +3 -0
  59. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-f +3 -0
  60. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-u +6 -0
  61. data/spec/fixtures/ldiff/output.diff.missing_new_line1 +5 -0
  62. data/spec/fixtures/ldiff/output.diff.missing_new_line1-c +14 -0
  63. data/spec/fixtures/ldiff/output.diff.missing_new_line1-e +0 -0
  64. data/spec/fixtures/ldiff/output.diff.missing_new_line1-f +0 -0
  65. data/spec/fixtures/ldiff/output.diff.missing_new_line1-u +9 -0
  66. data/spec/fixtures/ldiff/output.diff.missing_new_line2 +5 -0
  67. data/spec/fixtures/ldiff/output.diff.missing_new_line2-c +14 -0
  68. data/spec/fixtures/ldiff/output.diff.missing_new_line2-e +0 -0
  69. data/spec/fixtures/ldiff/output.diff.missing_new_line2-f +0 -0
  70. data/spec/fixtures/ldiff/output.diff.missing_new_line2-u +9 -0
  71. data/spec/hunk_spec.rb +1 -1
  72. data/spec/issues_spec.rb +32 -32
  73. data/spec/ldiff_spec.rb +21 -10
  74. data/spec/patch_spec.rb +1 -1
  75. data/spec/spec_helper.rb +93 -93
  76. metadata +86 -64
  77. data/Code-of-Conduct.md +0 -74
  78. data/Contributing.md +0 -121
  79. data/History.md +0 -431
  80. data/README.rdoc +0 -84
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3538bd306feb87c5a2d957b3956a9b8ede2a2782db387f9f253115053c2066a1
4
- data.tar.gz: af8dd06512d39de79534212726c6ed9beba9560e110a1026666181a21dbb5dcb
3
+ metadata.gz: bb036eaab7330d135a91816336705b672bcc3d3fc55b235392f0b0d2faaf2e76
4
+ data.tar.gz: d55364ad8b6a75e697ad90aaffac2d14168c8ef5710b4999d264775de0a220af
5
5
  SHA512:
6
- metadata.gz: 3598cd0dc37b22112495d82949a3d846751ca2dc3717dffe313acf6740761df98ed6d9f158ebc1fc7be6739bb3ac774ee3d8a0c4ccb4f2f651aaa5c45b49e9d9
7
- data.tar.gz: 77f4c9705752143e88953395b991d4105de3e744f524421ff9a3933aa18febf82854462835ede955b72c62884143f27b9278f968f4629f40bbce2192ca44aa5b
6
+ metadata.gz: ca32f0e74df9eaab1530842477fca4cbcd730fde728dfeefd8d6e6f212e8ed0086e7cd288a1fb8e2a79ebed18591cda677ddce75ed2bd0863620993ba34aa553
7
+ data.tar.gz: 2ce80458cd347340b44d8d5cf56c7e11ee145f93559641233ce928bb7ac54e9966a07904e52e1f46f975714b13f28d70832d762185e3d7e867d8caff5fc14ad3
data/CHANGELOG.md ADDED
@@ -0,0 +1,506 @@
1
+ # Changelog
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
+
16
+ ## 1.6.0 / 2025-02-13
17
+
18
+ - Baptiste Courtois (@annih) has done significant work on making `bin/ldiff`
19
+ work better, contributing a number of issues and pull requests. These include:
20
+
21
+ - Separation of command parsing from diff-generation in `Diff::LCS::Ldiff`
22
+ code extraction making it easier to use separately from the `bin/ldiff`
23
+ command in [#103][pull-103]. This partially resolves [#46][issue-46].
24
+
25
+ - Improvement of binary and empty file detection and tests in [#104][pull-104]
26
+ and [#105][pull-105]. This resolves issues [#100][issue-100],
27
+ [#102][issue-102].
28
+
29
+ - Various ldiff fixes for output [#101][pull-101] resolves issues
30
+ [#106][issue-106] (ldiff ed scripts are inverted), [#107][issue-107] (ldiff
31
+ hunk ranges are incorrect; regression or incorrect fix for [#60][issue-60]),
32
+ and [#95][issue-95].
33
+
34
+ - Patrick Linnane fixed various minor typos. [#93][pull-93]
35
+
36
+ - Mark Young added a Changelog link to the RubyGems metadata. [#92][pull-92]
37
+ This has been modified to incorporate it into the README.
38
+
39
+ - Updated the documentation on `Diff::LCS#lcs` to be clearer about the
40
+ requirements for object equality comparison. This resolves [#70][issue-70].
41
+
42
+ - Governance:
43
+
44
+ Changes described here are effective 2024-12-31.
45
+
46
+ - Update gem management details to use markdown files for everything, enabled
47
+ in part by [flavorjones/hoe-markdown][hoe-markdown]. Several files were
48
+ renamed to be more consistent with standard practices.
49
+
50
+ - Updated security notes with an [age][age] public key rather than pointing to
51
+ Keybase.io and a PGP public key which I no longer use. The use of the
52
+ [Tidelift security contact][tidelift] is recommended over direct disclosure.
53
+
54
+ ## 1.5.1 / 2024-01-31
55
+
56
+ - Peter Goldstein updated CI configuration to add Ruby 3.1 and Masato Nakamura
57
+ added Ruby 3.2 and 3.3. [#82][pull-82], [#89][pull-89]
58
+
59
+ - Switched to [standard ruby][standard ruby] formatting.
60
+
61
+ - Justin Steele converted the licence file to Markdown. [#84][pull-84]
62
+
63
+ - Updated the gem SPDX identifier for GPL 2.0 or later, resolving [#86][pull-86]
64
+ by Vit Ondruch.
65
+
66
+ - Resolve a potential security issue with `ldiff` in its use of `IO.read`
67
+ instead of `File.read`. [#91][issue-91]
68
+
69
+ - Added MFA authentication requirement for release to RubyGems. [#90][pull-90]
70
+
71
+ - Added Dependabot management for actions and gems. [#90][pull-90]
72
+
73
+ - Updated CodeQL configuration. [#90][pull-90]
74
+
75
+ ## 1.5.0 / 2021-12-23
76
+
77
+ - Updated the CI configuration and monkey-patch Hoe.
78
+
79
+ - Kenichi Kamiya fixed a test configuration deprecation in SimpleCov.
80
+ [#69][pull-69]
81
+
82
+ - Tien introduced several corrections and code improvements:
83
+
84
+ - Removed an off-by-one error when calculating an index value by embracing
85
+ Ruby iteration properly. This had a side-effect of fixing a long-standing
86
+ bug in `#traverse_sequences` where the traversal would not be transitive.
87
+ That is, `LCS(s2, s1)` should produce a sequence that is transitive with
88
+ `LCS(s1, s2)` on traversal, and applying the diff computed from those
89
+ results would result in equivalent changes that could be played forward or
90
+ backward as appropriate. [#71][pull-71], [#75][pull-75]
91
+
92
+ - The above fix resulted in a changed order of the longest common subsequence
93
+ when callbacks were applied. After analysis, it was determined that the
94
+ computed subsequence was _equivalent_ to the prior version, so the test was
95
+ updated. This also resulted in the clarification of documentation when
96
+ traversing the sub-sequences. [#79][pull-79]
97
+
98
+ - An infinite loop case in the case where `Diff::LCS` would be included into
99
+ an enumerable class has been fixed. [#73][pull-73]
100
+
101
+ - Clarified the purpose of a threshold test in calculation of LCS.
102
+ [#72][pull-72], [#80][pull-80]
103
+
104
+ - Removed autotest directory
105
+
106
+ ## 1.4.4 / 2020-07-01
107
+
108
+ - Fixed an issue reported by Jun Aruga in the `Diff::LCS::Ldiff` binary text
109
+ detection. [#44][issue-44]
110
+
111
+ - Fixed a theoretical issue reported by Jun Aruga in `Diff::LCS::Hunk` to raise
112
+ a more useful exception. [#43][issue-43]
113
+
114
+ - Added documentation that should address custom object issues as reported in
115
+ [#35][issue-35].
116
+
117
+ - Fixed more diff errors, in part reported in [#65][issue-65].
118
+
119
+ - The use of `Numeric#abs` is incorrect in `Diff::LCS::Block#diff_size`. The
120
+ diff size _must_ be accurate for correct change placement.
121
+
122
+ - When selecting `@max_diff_size` in `Diff::LCS::Hunk`, choose it based on
123
+ `block.diff_size.abs`.
124
+
125
+ - Made a number of changes that will, unfortunately, increase allocations at
126
+ the cost of being safe with frozen strings.
127
+
128
+ - Add some knowledge that when `Diff::LCS::Hunk#diff` is called, that we are
129
+ processing the _last_ hunk, so some changes will be made to how the output
130
+ is generated.
131
+
132
+ - `old`, `ed`, and `reverse_ed` formats have no differences.
133
+
134
+ - `unified` format will report `` given the
135
+ correct conditions, at most once. Unified range reporting also differs for
136
+ the last hunk such that the `length` of the range is reduced by one.
137
+
138
+ - `context` format will report `\No newline at end of file` given the
139
+ correct conditions, up to once per "file". Context range reporting also
140
+ differs for the last hunk such that the `end` part of the range is reduced
141
+ by one to a minimum of one.
142
+
143
+ - Added a bunch more tests for the cases above, and fixed `hunk_spec.rb` so that
144
+ the phrase being compared isn't nonsense French.
145
+
146
+ - Updated formatting.
147
+
148
+ - Added a Rake task to assist with manual testing on Ruby 1.8.
149
+
150
+ ## 1.4.3 / 2020-06-29
151
+
152
+ - Fixed several issues with 1.4 on Rubies older than 2.0. Some of this was
153
+ providing useful shim functions to Hoe 3.x (which dropped these older Rubies a
154
+ while ago). Specifically:
155
+
156
+ - Removed Array#lazy from a method in `Diff::LCS::Hunk`.
157
+
158
+ - Changed some unit tests to use old-style Symbol-keyed hashes.
159
+
160
+ - Changed some unit test helper functions to no longer use keyword parameters,
161
+ but only a trailing options hash.
162
+
163
+ - Made the use of `psych` dependent on `RUBY_VERSION >= 1.9`.
164
+
165
+ Resolves [#63][issue-63].
166
+
167
+ ## 1.4.2 / 2020-06-23
168
+
169
+ - Camille Drapier fixed a small issue with RuboCop configuration. [#59][pull-59]
170
+
171
+ - Applied another fix (and unit test) to fix an issue for the Chef team.
172
+ [#60][issue-60], [#61][pull-61]
173
+
174
+ ## 1.4.1 / 2020-06-23
175
+
176
+ - Fix an issue where diff sizes could be negative, and they should be.
177
+ [#57][issue-57], [#58][pull-58]
178
+
179
+ ## 1.4 / 2020-06-23
180
+
181
+ - Ruby versions lower than 2.4 are soft-deprecated and will not be run as part
182
+ of the CI process any longer.
183
+
184
+ - Akinora MUSHA (knu) added the ability for `Diff::LCS::Change` objects to be
185
+ implicitly treated arrays. Originally provided as pull request [#47][pull-47],
186
+ but it introduced a number of test failures as documented in [#48][issue-48],
187
+ and remediation of `Diff::LCS` itself was introduced in [#49][pull-49].
188
+
189
+ - Resolved [#5][issue-05] with some tests comparing output from `system` calls
190
+ to `bin/ldiff` with some pre-generated output. Resolved [#6][issue-06] with
191
+ these tests.
192
+
193
+ - Resolved a previously undetected `bin/ldiff` issue with `--context` output not
194
+ matching `diff --context` output.
195
+
196
+ - Resolved an issue with later versions of Ruby not working with an `OptParse`
197
+ specification of `Numeric`; this has been changed to `Integer`.
198
+
199
+ - Brandon Fish added TruffleRuby in [#52][pull-52].
200
+
201
+ - Fixed two missing classes as reported in [#53][issue-53].
202
+
203
+ ## 1.3 / 2017-01-18
204
+
205
+ - Bugs fixed:
206
+
207
+ - Fixed an error for `bin/ldiff --version`. Fixes issue [#21][issue-21].
208
+
209
+ - Force `Diff::LCS::Change` and `Diff::LCS::ContextChange` to only perform
210
+ equality comparisons against themselves. Provided by Kevin Mook in pull
211
+ request [#29][pull-29].
212
+
213
+ - Fix tab expansion in `htmldiff`, provided by Mark Friedgan in pull request
214
+ [#25][pull-25].
215
+
216
+ - Silence Ruby 2.4 `Fixnum` deprecation warnings. Fixes issue [#38][issue-38]
217
+ and pull request [#36][pull-36].
218
+
219
+ - Ensure that test dependencies are loaded properly. Fixes issue
220
+ [#33][issue-33] and pull request [#34][pull-34].
221
+
222
+ - Fix issue [#1][issue-01] with incorrect intuition of patch direction.
223
+ Tentative fix, but the previous failure cases pass now.
224
+
225
+ - Tooling changes:
226
+
227
+ - Added SimpleCov and Coveralls support.
228
+
229
+ - Change the homepage (temporarily) to the GitHub repo.
230
+
231
+ - Updated testing and gem infrastructure.
232
+
233
+ - Modernized the specs.
234
+
235
+ - Cleaned up documentation.
236
+
237
+ - Added a Code of Conduct.
238
+
239
+ ## 1.2.5 / 2013-11-08
240
+
241
+ - Bugs fixed:
242
+
243
+ - Comparing arrays flattened them too far, especially with `Diff::LCS.sdiff`.
244
+ Fixed by Josh Bronson in pull request [#23][pull-23].
245
+
246
+ ## 1.2.4 / 2013-04-20
247
+
248
+ - Bugs fixed:
249
+
250
+ - A bug was introduced after 1.1.3 when pruning common sequences at the start
251
+ of comparison. Paul Kunysch (@pck) fixed this in pull request
252
+ [#18][pull-18]. Thanks!
253
+
254
+ - The Rubinius (1.9 mode) bug in [rubinius/rubinius#2268][rubinius#2268] has
255
+ been fixed by the Rubinius team two days after it was filed. Thanks for
256
+ fixing this so quickly!
257
+
258
+ - Switching to Raggi's hoe-gemspec2 for gemspec generation.
259
+
260
+ ## 1.2.3 / 2013-04-11
261
+
262
+ - Bugs Fixed:
263
+
264
+ - The new encoding detection for diff output generation (added in 1.2.2)
265
+ introduced a bug if the left side of the comparison was the empty set.
266
+ Originally found in [rspec/rspec-expectations#238][rspec-expectations#238]
267
+ and [rspec/rspec-expectations#239][rspec-expectations#239]. Jon Rowe
268
+ developed a reasonable heuristic (left side, right side, empty string
269
+ literal) to avoid this bug.
270
+
271
+ - There is a known issue with Rubinius in 1.9 mode reported in
272
+ [rubinius/rubinius#2268][rubinius#2268] and demonstrated in the Travis CI
273
+ builds. For all other tested platforms, diff-lcs is considered stable. As
274
+ soon as a suitably small test-case can be created for the Rubinius team to
275
+ examine, this will be added to the Rubinius issue around this.
276
+
277
+ ## 1.2.2 / 2013-03-30
278
+
279
+ - Bugs Fixed:
280
+
281
+ - `Diff::LCS::Hunk` could not properly generate a difference for comparison
282
+ sets that are not US-ASCII-compatible because of the use of literal regular
283
+ expressions and strings. Jon Rowe found this in
284
+ [rspec/rspec-expectations#219][rspec-expectations#219] and provided a first
285
+ pass implementation in pull request [#15][pull-15]. I've reworked it because
286
+ of test failures in Rubinius when running in Ruby 1.9 mode. This coerces the
287
+ added values to the encoding of the old dataset (as determined by the first
288
+ piece of the old dataset).
289
+
290
+ - Adding Travis CI testing for Ruby 2.0.
291
+
292
+ ## 1.2.1 / 2013-02-09
293
+
294
+ - Bugs Fixed:
295
+
296
+ - As seen in [rspec/rspec-expectations#200][rspec-expectations#200], the
297
+ release of `Diff::LCS` 1.2 introduced an unnecessary public API change to
298
+ `Diff::LCS::Hunk` (see the change at
299
+ [rspec/rspec-expectations@3d6fc82c][rspec-expectations@3d6fc82c] for
300
+ details). The new method name (and behaviour) is more correct, but I should
301
+ not have renamed the function or should have at least provided an alias.
302
+ This release restores `Diff::LCS::Hunk#unshift` as an alias to #merge. Note
303
+ that the old `#unshift` behaviour was incorrect and will not be restored.
304
+
305
+ ## 1.2.0 / 2013-01-21
306
+
307
+ - Minor Enhancements:
308
+
309
+ - Added special case handling for `Diff::LCS.patch` so that it handles patches
310
+ that are empty or contain no changes.
311
+
312
+ - Added two new methods (`#patch_me` and `#unpatch_me`) to the include-able
313
+ module.
314
+
315
+ - Bugs Fixed:
316
+
317
+ - Fixed issue [#1][issue-01] patch direction detection.
318
+
319
+ - Resolved issue [#2][issue-02] by handling `string[string.size, 1]` properly
320
+ (it returns `""` not `nil`).
321
+
322
+ - Michael Granger (ged) fixed an implementation error in `Diff::LCS::Change`
323
+ and added specs in pull request [#8][pull-08]. Thanks!
324
+
325
+ - Made the code auto-testable.
326
+
327
+ - Vít Ondruch (voxik) provided the latest version of the GPL2 license file in
328
+ pull request [#10][pull-10]. Thanks!
329
+
330
+ - Fixed a documentation issue with the include-able versions of `#patch!` and
331
+ `#unpatch!` where they implied that they would replace the original value.
332
+ Given that `Diff::LCS.patch` always returns a copy, the documentation was
333
+ incorrect and has been corrected. To provide the behaviour that was
334
+ originally documented, two new methods were added to provide this behaviour.
335
+ Found by scooter-dangle in issue [#12][issue-12]. Thanks!
336
+
337
+ - Code Style Changes:
338
+
339
+ - Removed trailing spaces.
340
+
341
+ - Calling class methods using `.` instead of `::`.
342
+
343
+ - Vít Ondruch (voxik) removed unnecessary shebangs in pull request
344
+ [#9][pull-09]. Thanks!
345
+
346
+ - Kenichi Kamiya (kachick) removed some warnings of an unused variable in
347
+ lucky pull request [#13][pull-13]. Thanks!
348
+
349
+ - Embarked on a major refactoring to make the files a little more manageable
350
+ and understand the code on a deeper level.
351
+
352
+ - Adding CI via Travis CI.
353
+
354
+ ## 1.1.3 / 2011-08-27
355
+
356
+ - Converted to 'hoe' for release.
357
+
358
+ - Converted tests to RSpec 2.
359
+
360
+ - Extracted the body of `htmldiff` into a class available from
361
+ `diff/lcs/htmldiff`.
362
+
363
+ - Migrated development and issue tracking to GitHub.
364
+
365
+ - Bugs fixed:
366
+
367
+ - Eliminated the explicit use of RubyGems in both `bin/htmldiff` and
368
+ `bin/ldiff`. Resolves issue [#4][issue-04].
369
+
370
+ - Eliminated Ruby warnings. Resolves issue [#3][issue-03].
371
+
372
+ ## 1.1.2 / 2004-10-20
373
+
374
+ - Fixed a problem reported by Mauricio Fernandez in `htmldiff`.
375
+
376
+ ## 1.1.1 / 2004-09-25
377
+
378
+ - Fixed bug #891 (Set returned from patch command does not contain last equal
379
+ part).
380
+
381
+ - Fixed a problem with callback initialisation code (it assumed that all
382
+ callbacks passed as classes can be initialised; now, it rescues NoMethodError
383
+ in the event of private :new being called).
384
+
385
+ - Modified the non-initialisable callbacks to have a private `#new` method.
386
+
387
+ - Moved `ldiff` core code to `Diff::LCS::Ldiff` (`diff/lcs/ldiff.rb`).
388
+
389
+ ## 1.1.0
390
+
391
+ - Eliminated the need for `Diff::LCS::Event` and removed it.
392
+
393
+ - Added a contextual diff callback, `Diff::LCS::ContextDiffCallback`.
394
+
395
+ - Implemented (un-)patching for standard diff callback output formats with both
396
+ `#diff` and `#sdiff`.
397
+
398
+ - Extensive documentation changes.
399
+
400
+ ## 1.0.4
401
+
402
+ - Fixed a problem with `bin/ldiff` output, especially for unified format.
403
+ Newlines that should have been present weren't.
404
+
405
+ - Changed the `.tar.gz` installer to generate Windows batch files if ones do not
406
+ exist already. Removed the existing batch files as they didn't work.
407
+
408
+ ## 1.0.3
409
+
410
+ - Fixed a problem with `#traverse_sequences` where the first difference from the
411
+ left sequence might not be appropriately captured.
412
+
413
+ ## 1.0.2
414
+
415
+ - Fixed an issue with `ldiff` not working because actions were changed from
416
+ symbols to strings.
417
+
418
+ ## 1.0.1
419
+
420
+ - Minor modifications to the `gemspec`, the `README`.
421
+
422
+ - Renamed the diff program to `ldiff` (as well as the companion batch file) so
423
+ as to not collide with the standard diff program.
424
+
425
+ - Fixed issues with RubyGems. Requires RubyGems > 0.6.1 or >= 0.6.1 with the
426
+ latest CVS version.
427
+
428
+ ## 1.0
429
+
430
+ - Initial release based mostly on Perl's Algorithm::Diff.
431
+
432
+ [age]: https://github.com/FiloSottile/age
433
+ [hoe-halostatue]: https://github.com/halostatue/hoe-halostatue
434
+ [hoe-markdown]: https://github.com/flavorjones/hoe-markdown
435
+ [issue-01]: https://github.com/halostatue/diff-lcs/issues/1
436
+ [issue-02]: https://github.com/halostatue/diff-lcs/issues/2
437
+ [issue-03]: https://github.com/halostatue/diff-lcs/issues/3
438
+ [issue-04]: https://github.com/halostatue/diff-lcs/issues/4
439
+ [issue-05]: https://github.com/halostatue/diff-lcs/issues/5
440
+ [issue-06]: https://github.com/halostatue/diff-lcs/issues/6
441
+ [issue-12]: https://github.com/halostatue/diff-lcs/issues/12
442
+ [issue-21]: https://github.com/halostatue/diff-lcs/issues/21
443
+ [issue-33]: https://github.com/halostatue/diff-lcs/issues/33
444
+ [issue-35]: https://github.com/halostatue/diff-lcs/issues/35
445
+ [issue-38]: https://github.com/halostatue/diff-lcs/issues/38
446
+ [issue-43]: https://github.com/halostatue/diff-lcs/issues/43
447
+ [issue-44]: https://github.com/halostatue/diff-lcs/issues/44
448
+ [issue-46]: https://github.com/halostatue/diff-lcs/issues/46
449
+ [issue-48]: https://github.com/halostatue/diff-lcs/issues/48
450
+ [issue-53]: https://github.com/halostatue/diff-lcs/issues/53
451
+ [issue-57]: https://github.com/halostatue/diff-lcs/issues/57
452
+ [issue-60]: https://github.com/halostatue/diff-lcs/issues/60
453
+ [issue-63]: https://github.com/halostatue/diff-lcs/issues/63
454
+ [issue-65]: https://github.com/halostatue/diff-lcs/issues/65
455
+ [issue-70]: https://github.com/halostatue/diff-lcs/issues/70
456
+ [issue-91]: https://github.com/halostatue/diff-lcs/issues/91
457
+ [issue-95]: https://github.com/halostatue/diff-lcs/issues/95
458
+ [issue-100]: https://github.com/halostatue/diff-lcs/issues/100
459
+ [issue-102]: https://github.com/halostatue/diff-lcs/issues/102
460
+ [issue-106]: https://github.com/halostatue/diff-lcs/issues/106
461
+ [issue-107]: https://github.com/halostatue/diff-lcs/issues/107
462
+ [pull-08]: https://github.com/halostatue/diff-lcs/pull/8
463
+ [pull-09]: https://github.com/halostatue/diff-lcs/pull/9
464
+ [pull-10]: https://github.com/halostatue/diff-lcs/pull/10
465
+ [pull-13]: https://github.com/halostatue/diff-lcs/pull/13
466
+ [pull-15]: https://github.com/halostatue/diff-lcs/pull/15
467
+ [pull-18]: https://github.com/halostatue/diff-lcs/pull/18
468
+ [pull-23]: https://github.com/halostatue/diff-lcs/pull/23
469
+ [pull-25]: https://github.com/halostatue/diff-lcs/pull/25
470
+ [pull-29]: https://github.com/halostatue/diff-lcs/pull/29
471
+ [pull-34]: https://github.com/halostatue/diff-lcs/pull/34
472
+ [pull-36]: https://github.com/halostatue/diff-lcs/pull/36
473
+ [pull-47]: https://github.com/halostatue/diff-lcs/pull/47
474
+ [pull-49]: https://github.com/halostatue/diff-lcs/pull/49
475
+ [pull-52]: https://github.com/halostatue/diff-lcs/pull/52
476
+ [pull-58]: https://github.com/halostatue/diff-lcs/pull/58
477
+ [pull-59]: https://github.com/halostatue/diff-lcs/pull/59
478
+ [pull-61]: https://github.com/halostatue/diff-lcs/pull/61
479
+ [pull-69]: https://github.com/halostatue/diff-lcs/pull/69
480
+ [pull-71]: https://github.com/halostatue/diff-lcs/pull/71
481
+ [pull-72]: https://github.com/halostatue/diff-lcs/pull/72
482
+ [pull-73]: https://github.com/halostatue/diff-lcs/pull/73
483
+ [pull-75]: https://github.com/halostatue/diff-lcs/pull/75
484
+ [pull-79]: https://github.com/halostatue/diff-lcs/pull/79
485
+ [pull-80]: https://github.com/halostatue/diff-lcs/pull/80
486
+ [pull-82]: https://github.com/halostatue/diff-lcs/pull/82
487
+ [pull-84]: https://github.com/halostatue/diff-lcs/pull/84
488
+ [pull-86]: https://github.com/halostatue/diff-lcs/pull/86
489
+ [pull-89]: https://github.com/halostatue/diff-lcs/pull/89
490
+ [pull-90]: https://github.com/halostatue/diff-lcs/pull/90
491
+ [pull-92]: https://github.com/halostatue/diff-lcs/pull/92
492
+ [pull-93]: https://github.com/halostatue/diff-lcs/pull/93
493
+ [pull-101]: https://github.com/halostatue/diff-lcs/pull/101
494
+ [pull-103]: https://github.com/halostatue/diff-lcs/pull/103
495
+ [pull-104]: https://github.com/halostatue/diff-lcs/pull/104
496
+ [pull-105]: https://github.com/halostatue/diff-lcs/pull/105
497
+ [pull-129]: https://github.com/halostatue/diff-lcs/pull/129
498
+ [rspec-expectations#200]: https://github.com/rspec/rspec-expectations/pull/200
499
+ [rspec-expectations#219]: https://github.com/rspec/rspec-expectations/issues/219
500
+ [rspec-expectations#238]: https://github.com/rspec/rspec-expectations/issues/238
501
+ [rspec-expectations#239]: https://github.com/rspec/rspec-expectations/issues/239
502
+ [rspec-expectations@3d6fc82c]: https://github.com/rspec/rspec-expectations/commit/3d6fc82c
503
+ [rubinius#2268]: https://github.com/rubinius/rubinius/issues/2268
504
+ [standard ruby]: https://github.com/standardrb/standard
505
+ [tidelift]: https://tidelift.com/security
506
+ [tp]: https://guides.rubygems.org/trusted-publishing/
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ - Demonstrating empathy and kindness toward other people
21
+ - Being respectful of differing opinions, viewpoints, and experiences
22
+ - Giving and gracefully accepting constructive feedback
23
+ - Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ - Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ - The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ - Trolling, insulting or derogatory comments, and personal or political attacks
33
+ - Public or private harassment
34
+ - Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ - Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at [INSERT CONTACT
63
+ METHOD]. All complaints will be reviewed and investigated promptly and fairly.
64
+
65
+ All community leaders are obligated to respect the privacy and security of the
66
+ reporter of any incident.
67
+
68
+ ## Enforcement Guidelines
69
+
70
+ Community leaders will follow these Community Impact Guidelines in determining
71
+ the consequences for any action they deem in violation of this Code of Conduct:
72
+
73
+ ### 1. Correction
74
+
75
+ **Community Impact**: Use of inappropriate language or other behavior deemed
76
+ unprofessional or unwelcome in the community.
77
+
78
+ **Consequence**: A private, written warning from community leaders, providing
79
+ clarity around the nature of the violation and an explanation of why the
80
+ behavior was inappropriate. A public apology may be requested.
81
+
82
+ ### 2. Warning
83
+
84
+ **Community Impact**: A violation through a single incident or series of
85
+ actions.
86
+
87
+ **Consequence**: A warning with consequences for continued behavior. No
88
+ interaction with the people involved, including unsolicited interaction with
89
+ those enforcing the Code of Conduct, for a specified period of time. This
90
+ includes avoiding interactions in community spaces as well as external channels
91
+ like social media. Violating these terms may lead to a temporary or permanent
92
+ ban.
93
+
94
+ ### 3. Temporary Ban
95
+
96
+ **Community Impact**: A serious violation of community standards, including
97
+ sustained inappropriate behavior.
98
+
99
+ **Consequence**: A temporary ban from any sort of interaction or public
100
+ communication with the community for a specified period of time. No public or
101
+ private interaction with the people involved, including unsolicited interaction
102
+ with those enforcing the Code of Conduct, is allowed during this period.
103
+ Violating these terms may lead to a permanent ban.
104
+
105
+ ### 4. Permanent Ban
106
+
107
+ **Community Impact**: Demonstrating a pattern of violation of community
108
+ standards, including sustained inappropriate behavior, harassment of an
109
+ individual, or aggression toward or disparagement of classes of individuals.
110
+
111
+ **Consequence**: A permanent ban from any sort of public interaction within the
112
+ community.
113
+
114
+ ## Attribution
115
+
116
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117
+ version 2.1, available at
118
+ <https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
119
+
120
+ Community Impact Guidelines were inspired by
121
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
122
+
123
+ For answers to common questions about this code of conduct, see the FAQ at
124
+ <https://www.contributor-covenant.org/faq>. Translations are available at
125
+ <https://www.contributor-covenant.org/translations>.
126
+
127
+ [homepage]: https://www.contributor-covenant.org
128
+ [Mozilla CoC]: https://github.com/mozilla/diversity