diff-lcs 1.3 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +5 -5
  2. data/Contributing.md +84 -48
  3. data/History.md +334 -154
  4. data/Manifest.txt +23 -1
  5. data/README.rdoc +10 -10
  6. data/Rakefile +85 -21
  7. data/bin/htmldiff +7 -4
  8. data/bin/ldiff +4 -1
  9. data/lib/diff/lcs/array.rb +1 -1
  10. data/lib/diff/lcs/backports.rb +9 -0
  11. data/lib/diff/lcs/block.rb +1 -1
  12. data/lib/diff/lcs/callbacks.rb +15 -12
  13. data/lib/diff/lcs/change.rb +30 -37
  14. data/lib/diff/lcs/htmldiff.rb +17 -16
  15. data/lib/diff/lcs/hunk.rb +156 -74
  16. data/lib/diff/lcs/internals.rb +43 -42
  17. data/lib/diff/lcs/ldiff.rb +46 -42
  18. data/lib/diff/lcs/string.rb +1 -1
  19. data/lib/diff/lcs.rb +188 -174
  20. data/lib/diff-lcs.rb +1 -1
  21. data/spec/change_spec.rb +31 -7
  22. data/spec/diff_spec.rb +16 -12
  23. data/spec/fixtures/aX +1 -0
  24. data/spec/fixtures/bXaX +1 -0
  25. data/spec/fixtures/ldiff/output.diff +4 -0
  26. data/spec/fixtures/ldiff/output.diff-c +7 -0
  27. data/spec/fixtures/ldiff/output.diff-e +3 -0
  28. data/spec/fixtures/ldiff/output.diff-f +3 -0
  29. data/spec/fixtures/ldiff/output.diff-u +5 -0
  30. data/spec/fixtures/ldiff/output.diff.chef +4 -0
  31. data/spec/fixtures/ldiff/output.diff.chef-c +15 -0
  32. data/spec/fixtures/ldiff/output.diff.chef-e +3 -0
  33. data/spec/fixtures/ldiff/output.diff.chef-f +3 -0
  34. data/spec/fixtures/ldiff/output.diff.chef-u +9 -0
  35. data/spec/fixtures/ldiff/output.diff.chef2 +7 -0
  36. data/spec/fixtures/ldiff/output.diff.chef2-c +20 -0
  37. data/spec/fixtures/ldiff/output.diff.chef2-d +7 -0
  38. data/spec/fixtures/ldiff/output.diff.chef2-e +7 -0
  39. data/spec/fixtures/ldiff/output.diff.chef2-f +7 -0
  40. data/spec/fixtures/ldiff/output.diff.chef2-u +16 -0
  41. data/spec/fixtures/new-chef +4 -0
  42. data/spec/fixtures/new-chef2 +17 -0
  43. data/spec/fixtures/old-chef +4 -0
  44. data/spec/fixtures/old-chef2 +14 -0
  45. data/spec/hunk_spec.rb +37 -26
  46. data/spec/issues_spec.rb +115 -10
  47. data/spec/lcs_spec.rb +10 -10
  48. data/spec/ldiff_spec.rb +71 -31
  49. data/spec/patch_spec.rb +93 -99
  50. data/spec/sdiff_spec.rb +89 -89
  51. data/spec/spec_helper.rb +118 -65
  52. data/spec/traverse_balanced_spec.rb +173 -173
  53. data/spec/traverse_sequences_spec.rb +29 -31
  54. metadata +54 -33
  55. data/autotest/discover.rb +0 -1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diff-lcs
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.3'
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Austin Ziegler
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-18 00:00:00.000000000 Z
11
+ date: 2021-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hoe-doofus
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.0'
69
- - !ruby/object:Gem::Dependency
70
- name: hoe-travis
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.2'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.2'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: rspec
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +95,7 @@ dependencies:
109
95
  version: '10.0'
110
96
  - - "<"
111
97
  - !ruby/object:Gem::Version
112
- version: '12'
98
+ version: '14'
113
99
  type: :development
114
100
  prerelease: false
115
101
  version_requirements: !ruby/object:Gem::Requirement
@@ -119,44 +105,55 @@ dependencies:
119
105
  version: '10.0'
120
106
  - - "<"
121
107
  - !ruby/object:Gem::Version
122
- version: '12'
108
+ version: '14'
123
109
  - !ruby/object:Gem::Dependency
124
110
  name: rdoc
125
111
  requirement: !ruby/object:Gem::Requirement
126
112
  requirements:
127
113
  - - ">="
128
114
  - !ruby/object:Gem::Version
129
- version: '0'
115
+ version: 6.3.1
116
+ - - "<"
117
+ - !ruby/object:Gem::Version
118
+ version: '7'
130
119
  type: :development
131
120
  prerelease: false
132
121
  version_requirements: !ruby/object:Gem::Requirement
133
122
  requirements:
134
123
  - - ">="
135
124
  - !ruby/object:Gem::Version
136
- version: '0'
125
+ version: 6.3.1
126
+ - - "<"
127
+ - !ruby/object:Gem::Version
128
+ version: '7'
137
129
  - !ruby/object:Gem::Dependency
138
130
  name: hoe
139
131
  requirement: !ruby/object:Gem::Requirement
140
132
  requirements:
141
133
  - - "~>"
142
134
  - !ruby/object:Gem::Version
143
- version: '3.16'
135
+ version: '3.23'
144
136
  type: :development
145
137
  prerelease: false
146
138
  version_requirements: !ruby/object:Gem::Requirement
147
139
  requirements:
148
140
  - - "~>"
149
141
  - !ruby/object:Gem::Version
150
- version: '3.16'
142
+ version: '3.23'
151
143
  description: |-
152
144
  Diff::LCS computes the difference between two Enumerable sequences using the
153
145
  McIlroy-Hunt longest common subsequence (LCS) algorithm. It includes utilities
154
146
  to create a simple HTML diff output format and a standard diff-like tool.
155
147
 
156
- This is release 1.3, providing a tentative fix to a long-standing issue related
157
- to incorrect detection of a patch direction. Also modernizes the gem
158
- infrastructure, testing infrastructure, and provides a warning-free experience
159
- to Ruby 2.4 users.
148
+ This is release 1.4.3, providing a simple extension that allows for
149
+ Diff::LCS::Change objects to be treated implicitly as arrays and fixes a
150
+ number of formatting issues.
151
+
152
+ Ruby versions below 2.5 are soft-deprecated, which means that older versions
153
+ are no longer part of the CI test suite. If any changes have been introduced
154
+ that break those versions, bug reports and patches will be accepted, but it
155
+ will be up to the reporter to verify any fixes prior to release. The next
156
+ major release will completely break compatibility.
160
157
  email:
161
158
  - halostatue@gmail.com
162
159
  executables:
@@ -181,7 +178,6 @@ files:
181
178
  - Manifest.txt
182
179
  - README.rdoc
183
180
  - Rakefile
184
- - autotest/discover.rb
185
181
  - bin/htmldiff
186
182
  - bin/ldiff
187
183
  - docs/COPYING.txt
@@ -189,6 +185,7 @@ files:
189
185
  - lib/diff-lcs.rb
190
186
  - lib/diff/lcs.rb
191
187
  - lib/diff/lcs/array.rb
188
+ - lib/diff/lcs/backports.rb
192
189
  - lib/diff/lcs/block.rb
193
190
  - lib/diff/lcs/callbacks.rb
194
191
  - lib/diff/lcs/change.rb
@@ -199,8 +196,30 @@ files:
199
196
  - lib/diff/lcs/string.rb
200
197
  - spec/change_spec.rb
201
198
  - spec/diff_spec.rb
199
+ - spec/fixtures/aX
200
+ - spec/fixtures/bXaX
202
201
  - spec/fixtures/ds1.csv
203
202
  - spec/fixtures/ds2.csv
203
+ - spec/fixtures/ldiff/output.diff
204
+ - spec/fixtures/ldiff/output.diff-c
205
+ - spec/fixtures/ldiff/output.diff-e
206
+ - spec/fixtures/ldiff/output.diff-f
207
+ - spec/fixtures/ldiff/output.diff-u
208
+ - spec/fixtures/ldiff/output.diff.chef
209
+ - spec/fixtures/ldiff/output.diff.chef-c
210
+ - spec/fixtures/ldiff/output.diff.chef-e
211
+ - spec/fixtures/ldiff/output.diff.chef-f
212
+ - spec/fixtures/ldiff/output.diff.chef-u
213
+ - spec/fixtures/ldiff/output.diff.chef2
214
+ - spec/fixtures/ldiff/output.diff.chef2-c
215
+ - spec/fixtures/ldiff/output.diff.chef2-d
216
+ - spec/fixtures/ldiff/output.diff.chef2-e
217
+ - spec/fixtures/ldiff/output.diff.chef2-f
218
+ - spec/fixtures/ldiff/output.diff.chef2-u
219
+ - spec/fixtures/new-chef
220
+ - spec/fixtures/new-chef2
221
+ - spec/fixtures/old-chef
222
+ - spec/fixtures/old-chef2
204
223
  - spec/hunk_spec.rb
205
224
  - spec/issues_spec.rb
206
225
  - spec/lcs_spec.rb
@@ -215,8 +234,11 @@ licenses:
215
234
  - MIT
216
235
  - Artistic-2.0
217
236
  - GPL-2.0+
218
- metadata: {}
219
- post_install_message:
237
+ metadata:
238
+ homepage_uri: https://github.com/halostatue/diff-lcs
239
+ source_code_uri: https://github.com/halostatue/diff-lcs
240
+ bug_tracker_uri: https://github.com/halostatue/diff-lcs/issues
241
+ post_install_message:
220
242
  rdoc_options:
221
243
  - "--main"
222
244
  - README.rdoc
@@ -233,9 +255,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
255
  - !ruby/object:Gem::Version
234
256
  version: '0'
235
257
  requirements: []
236
- rubyforge_project:
237
- rubygems_version: 2.5.1
238
- signing_key:
258
+ rubygems_version: 3.1.6
259
+ signing_key:
239
260
  specification_version: 4
240
261
  summary: Diff::LCS computes the difference between two Enumerable sequences using
241
262
  the McIlroy-Hunt longest common subsequence (LCS) algorithm
data/autotest/discover.rb DELETED
@@ -1 +0,0 @@
1
- Autotest.add_discovery { "rspec2" }