diff-lcs 1.3 → 1.5.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 (56) hide show
  1. checksums.yaml +5 -5
  2. data/Contributing.md +86 -48
  3. data/History.md +370 -159
  4. data/License.md +6 -4
  5. data/Manifest.txt +23 -1
  6. data/README.rdoc +10 -10
  7. data/Rakefile +109 -36
  8. data/bin/htmldiff +9 -6
  9. data/bin/ldiff +4 -1
  10. data/lib/diff/lcs/array.rb +2 -2
  11. data/lib/diff/lcs/backports.rb +9 -0
  12. data/lib/diff/lcs/block.rb +5 -5
  13. data/lib/diff/lcs/callbacks.rb +22 -17
  14. data/lib/diff/lcs/change.rb +42 -49
  15. data/lib/diff/lcs/htmldiff.rb +21 -12
  16. data/lib/diff/lcs/hunk.rb +160 -73
  17. data/lib/diff/lcs/internals.rb +57 -56
  18. data/lib/diff/lcs/ldiff.rb +63 -57
  19. data/lib/diff/lcs/string.rb +1 -1
  20. data/lib/diff/lcs.rb +226 -210
  21. data/lib/diff-lcs.rb +2 -2
  22. data/spec/change_spec.rb +58 -34
  23. data/spec/diff_spec.rb +13 -9
  24. data/spec/fixtures/aX +1 -0
  25. data/spec/fixtures/bXaX +1 -0
  26. data/spec/fixtures/ldiff/output.diff +4 -0
  27. data/spec/fixtures/ldiff/output.diff-c +7 -0
  28. data/spec/fixtures/ldiff/output.diff-e +3 -0
  29. data/spec/fixtures/ldiff/output.diff-f +3 -0
  30. data/spec/fixtures/ldiff/output.diff-u +5 -0
  31. data/spec/fixtures/ldiff/output.diff.chef +4 -0
  32. data/spec/fixtures/ldiff/output.diff.chef-c +15 -0
  33. data/spec/fixtures/ldiff/output.diff.chef-e +3 -0
  34. data/spec/fixtures/ldiff/output.diff.chef-f +3 -0
  35. data/spec/fixtures/ldiff/output.diff.chef-u +9 -0
  36. data/spec/fixtures/ldiff/output.diff.chef2 +7 -0
  37. data/spec/fixtures/ldiff/output.diff.chef2-c +20 -0
  38. data/spec/fixtures/ldiff/output.diff.chef2-d +7 -0
  39. data/spec/fixtures/ldiff/output.diff.chef2-e +7 -0
  40. data/spec/fixtures/ldiff/output.diff.chef2-f +7 -0
  41. data/spec/fixtures/ldiff/output.diff.chef2-u +16 -0
  42. data/spec/fixtures/new-chef +4 -0
  43. data/spec/fixtures/new-chef2 +17 -0
  44. data/spec/fixtures/old-chef +4 -0
  45. data/spec/fixtures/old-chef2 +14 -0
  46. data/spec/hunk_spec.rb +48 -37
  47. data/spec/issues_spec.rb +132 -21
  48. data/spec/lcs_spec.rb +3 -3
  49. data/spec/ldiff_spec.rb +74 -32
  50. data/spec/patch_spec.rb +14 -20
  51. data/spec/sdiff_spec.rb +83 -81
  52. data/spec/spec_helper.rb +146 -91
  53. data/spec/traverse_balanced_spec.rb +138 -136
  54. data/spec/traverse_sequences_spec.rb +7 -9
  55. metadata +76 -48
  56. 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: 3538bd306feb87c5a2d957b3956a9b8ede2a2782db387f9f253115053c2066a1
4
+ data.tar.gz: af8dd06512d39de79534212726c6ed9beba9560e110a1026666181a21dbb5dcb
5
5
  SHA512:
6
- metadata.gz: 33ec7c9966bd92aaa989d561a3895cccb1321809ef784dde9757b39ebc9162dd3ba0dc322a089c48dc7a706531c85d1dbbaa3203cd837b4db57059f74563901d
7
- data.tar.gz: bad9e1d0f49830f81feba65cf8e0542c3e9ac8d50f4e0663712be639ff377832fad701e299279081b35b48655c0563c7269c0b7e432bf590232ede1cf397a5b6
6
+ metadata.gz: 3598cd0dc37b22112495d82949a3d846751ca2dc3717dffe313acf6740761df98ed6d9f158ebc1fc7be6739bb3ac774ee3d8a0c4ccb4f2f651aaa5c45b49e9d9
7
+ data.tar.gz: 77f4c9705752143e88953395b991d4105de3e744f524421ff9a3933aa18febf82854462835ede955b72c62884143f27b9278f968f4629f40bbce2192ca44aa5b
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,85 @@ 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
+ - Justin Steele
98
+ - Kenichi Kamiya
99
+ - Kensuke Nagae
100
+ - Kevin Ansfield
101
+ - Koichi Ito
102
+ - Mark Friedgan
103
+ - Michael Granger
104
+ - Myron Marston
105
+ - Nicolas Leger
106
+ - Oleg Orlov
107
+ - Paul Kunysch
108
+ - Pete Higgins
109
+ - Peter Goldstein
110
+ - Peter Wagenet
111
+ - Philippe Lafoucrière
112
+ - Ryan Lovelett
113
+ - Scott Steele
114
+ - Simon Courtois
115
+ - Tien (@tiendo1011)
116
+ - Tomas Jura
117
+ - Vít Ondruch
118
+
119
+ [rspec]: http://rspec.info/documentation/
82
120
  [quality commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
83
- [Hoe]: https://github.com/seattlerb/hoe
121
+ [hoe]: https://github.com/seattlerb/hoe