diff-lcs 1.3 → 1.5.0

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 (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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9eaea5f8fa364e74d93c2721fd6cb20c6fa9d65e
4
- data.tar.gz: 7cd7569297e671da52b753db36ad4128d109fddf
2
+ SHA256:
3
+ metadata.gz: 0df61a794bf8b132a80753391063526ffc15277d5f2dc592d319d37255d3700f
4
+ data.tar.gz: 9664b2f8338ff376bf7b4c9c1ae45e591e789b00b726a53523a2076f014aa5e0
5
5
  SHA512:
6
- metadata.gz: 33ec7c9966bd92aaa989d561a3895cccb1321809ef784dde9757b39ebc9162dd3ba0dc322a089c48dc7a706531c85d1dbbaa3203cd837b4db57059f74563901d
7
- data.tar.gz: bad9e1d0f49830f81feba65cf8e0542c3e9ac8d50f4e0663712be639ff377832fad701e299279081b35b48655c0563c7269c0b7e432bf590232ede1cf397a5b6
6
+ metadata.gz: 37e529e14e23a3c121f3d5cc3f88fbed90d9efe44376bb579699126c2c1d2ea34649a079902dca42cb72f891daa27e347c99b2e0a32b58245117dd2567af2db0
7
+ data.tar.gz: 30576530bd6e1634635989729caeeaed68b9268423b659443b95abc66549491376f179b558b07dc8cc9bcf14f2768433d771c037514ec720a21a43dc9c197a5f
data/Contributing.md CHANGED
@@ -1,32 +1,35 @@
1
1
  ## Contributing
2
2
 
3
- I value any contribution to Diff::LCS you can provide: a bug report, a feature
4
- request, or code contributions. Code contributions to Diff::LCS are especially
5
- <del>welcome</del>encouraged. Because Diff::LCS is a complex codebase, there
6
- are a few guidelines:
7
-
8
- * Code changes *will not* be accepted without tests. The test suite is
9
- written with [RSpec][].
10
- * Match my coding style.
11
- * Use a thoughtfully-named topic branch that contains your change. Rebase
12
- your commits into logical chunks as necessary.
13
- * Use [quality commit messages][].
14
- * Do not change the version number; when your patch is accepted and a release
15
- is made, the version will be updated at that point.
16
- * Submit a GitHub pull request with your changes.
17
- * New or changed behaviours require appropriate documentation.
3
+ I value any contribution to Diff::LCS you can provide: a bug report, a
4
+ feature request, or code contributions. Code contributions to Diff::LCS are
5
+ especially <del>welcome</del>encouraged. Because Diff::LCS is a complex
6
+ codebase, there are a few guidelines:
7
+
8
+ - Code changes _will not_ be accepted without tests. The test suite is
9
+ written with [RSpec][].
10
+ - Match my coding style.
11
+ - Use a thoughtfully-named topic branch that contains your change. Rebase
12
+ your commits into logical chunks as necessary.
13
+ - Use [quality commit messages][].
14
+ - Do not change the version number; when your patch is accepted and a release
15
+ is made, the version will be updated at that point.
16
+ - Submit a GitHub pull request with your changes.
17
+ - New or changed behaviours require appropriate documentation.
18
18
 
19
19
  ### Test Dependencies
20
20
 
21
- Diff::LCS uses Ryan Davis’s [Hoe][] to manage the release process, and it adds
22
- a number of rake tasks. You will mostly be interested in:
21
+ Diff::LCS uses Ryan Davis’s [Hoe][] to manage the release process, and it
22
+ adds a number of rake tasks. You will mostly be interested in:
23
23
 
24
- $ rake
24
+ ```sh
25
+ $ rake
26
+ ```
25
27
 
26
28
  which runs the tests the same way that:
27
29
 
28
- $ rake spec
29
- $ rake travis
30
+ ```sh
31
+ $ rake spec
32
+ ```
30
33
 
31
34
  will do.
32
35
 
@@ -34,50 +37,83 @@ To assist with the installation of the development dependencies, I have
34
37
  provided a Gemfile pointing to the (generated) `diff-lcs.gemspec` file. This
35
38
  will permit you to do:
36
39
 
37
- $ bundle install
40
+ ```sh
41
+ $ bundle install
42
+ ```
38
43
 
39
44
  to get the development dependencies. If you aleady have `hoe` installed, you
40
45
  can accomplish the same thing with:
41
46
 
42
- $ rake newb
47
+ ```sh
48
+ $ rake newb
49
+ ```
43
50
 
44
51
  This task will install any missing dependencies, run the tests/specs, and
45
52
  generate the RDoc.
46
53
 
47
54
  You can run tests with code coverage analysis by running:
48
55
 
49
- $ rake spec:coverage
56
+ ```sh
57
+ $ rake spec:coverage
58
+ ```
50
59
 
51
60
  ### Workflow
52
61
 
53
62
  Here's the most direct way to get your work merged into the project:
54
63
 
55
- * Fork the project.
56
- * Clone down your fork (`git clone git://github.com/<username>/diff-lcs.git`).
57
- * Create a topic branch to contain your change (`git checkout -b
58
- my_awesome_feature`).
59
- * Hack away, add tests. Not necessarily in that order.
60
- * Make sure everything still passes by running `rake`.
61
- * If necessary, rebase your commits into logical chunks, without errors.
62
- * Push the branch up (`git push origin my_awesome_feature`).
63
- * Create a pull request against halostatue/diff-lcs and describe what your
64
- change does and the why you think it should be merged.
64
+ - Fork the project.
65
+ - Clone down your fork (`git clone git://github.com/<username>/diff-lcs.git`).
66
+ - Create a topic branch to contain your change (`git checkout -b my_awesome_feature`).
67
+ - Hack away, add tests. Not necessarily in that order.
68
+ - Make sure everything still passes by running `rake`.
69
+ - If necessary, rebase your commits into logical chunks, without errors.
70
+ - Push the branch up (`git push origin my_awesome_feature`).
71
+ - Create a pull request against halostatue/diff-lcs and describe what your
72
+ change does and the why you think it should be merged.
65
73
 
66
74
  ### Contributors
67
75
 
68
- * Austin Ziegler created Diff::LCS.
69
-
70
- Thanks to everyone else who has contributed to Diff::LCS:
71
-
72
- * Kenichi Kamiya
73
- * Michael Granger
74
- * Vít Ondruch
75
- * Jon Rowe
76
- * Koichi Ito
77
- * Josef Strzibny
78
- * Josh Bronson
79
- * Mark Friedgan
80
-
81
- [Rspec]: http://rspec.info/documentation/
76
+ - Austin Ziegler created Diff::LCS.
77
+
78
+ Thanks to everyone else who has contributed code or bug reports to Diff::LCS:
79
+
80
+ - @ginriki
81
+ - @joshbronson
82
+ - @kevinmook
83
+ - @mckaz
84
+ - Akinori Musha
85
+ - Artem Ignatyev
86
+ - Brandon Fish
87
+ - Camille Drapier
88
+ - Cédric Boutillier
89
+ - Gregg Kellogg
90
+ - Jagdeep Singh
91
+ - Jason Gladish
92
+ - Jon Rowe
93
+ - Josef Strzibny
94
+ - Josep (@apuratepp)
95
+ - Josh Bronson
96
+ - Jun Aruga
97
+ - Kenichi Kamiya
98
+ - Kensuke Nagae
99
+ - Kevin Ansfield
100
+ - Koichi Ito
101
+ - Mark Friedgan
102
+ - Michael Granger
103
+ - Myron Marston
104
+ - Nicolas Leger
105
+ - Oleg Orlov
106
+ - Paul Kunysch
107
+ - Pete Higgins
108
+ - Peter Wagenet
109
+ - Philippe Lafoucrière
110
+ - Ryan Lovelett
111
+ - Scott Steele
112
+ - Simon Courtois
113
+ - Tien (@tiendo1011)
114
+ - Tomas Jura
115
+ - Vít Ondruch
116
+
117
+ [rspec]: http://rspec.info/documentation/
82
118
  [quality commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
83
- [Hoe]: https://github.com/seattlerb/hoe
119
+ [hoe]: https://github.com/seattlerb/hoe