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.
- checksums.yaml +5 -5
- data/Contributing.md +84 -48
- data/History.md +334 -154
- data/Manifest.txt +23 -1
- data/README.rdoc +10 -10
- data/Rakefile +85 -21
- data/bin/htmldiff +7 -4
- data/bin/ldiff +4 -1
- data/lib/diff/lcs/array.rb +1 -1
- data/lib/diff/lcs/backports.rb +9 -0
- data/lib/diff/lcs/block.rb +1 -1
- data/lib/diff/lcs/callbacks.rb +15 -12
- data/lib/diff/lcs/change.rb +30 -37
- data/lib/diff/lcs/htmldiff.rb +17 -16
- data/lib/diff/lcs/hunk.rb +156 -74
- data/lib/diff/lcs/internals.rb +43 -42
- data/lib/diff/lcs/ldiff.rb +46 -42
- data/lib/diff/lcs/string.rb +1 -1
- data/lib/diff/lcs.rb +188 -174
- data/lib/diff-lcs.rb +1 -1
- data/spec/change_spec.rb +31 -7
- data/spec/diff_spec.rb +16 -12
- data/spec/fixtures/aX +1 -0
- data/spec/fixtures/bXaX +1 -0
- data/spec/fixtures/ldiff/output.diff +4 -0
- data/spec/fixtures/ldiff/output.diff-c +7 -0
- data/spec/fixtures/ldiff/output.diff-e +3 -0
- data/spec/fixtures/ldiff/output.diff-f +3 -0
- data/spec/fixtures/ldiff/output.diff-u +5 -0
- data/spec/fixtures/ldiff/output.diff.chef +4 -0
- data/spec/fixtures/ldiff/output.diff.chef-c +15 -0
- data/spec/fixtures/ldiff/output.diff.chef-e +3 -0
- data/spec/fixtures/ldiff/output.diff.chef-f +3 -0
- data/spec/fixtures/ldiff/output.diff.chef-u +9 -0
- data/spec/fixtures/ldiff/output.diff.chef2 +7 -0
- data/spec/fixtures/ldiff/output.diff.chef2-c +20 -0
- data/spec/fixtures/ldiff/output.diff.chef2-d +7 -0
- data/spec/fixtures/ldiff/output.diff.chef2-e +7 -0
- data/spec/fixtures/ldiff/output.diff.chef2-f +7 -0
- data/spec/fixtures/ldiff/output.diff.chef2-u +16 -0
- data/spec/fixtures/new-chef +4 -0
- data/spec/fixtures/new-chef2 +17 -0
- data/spec/fixtures/old-chef +4 -0
- data/spec/fixtures/old-chef2 +14 -0
- data/spec/hunk_spec.rb +37 -26
- data/spec/issues_spec.rb +115 -10
- data/spec/lcs_spec.rb +10 -10
- data/spec/ldiff_spec.rb +71 -31
- data/spec/patch_spec.rb +93 -99
- data/spec/sdiff_spec.rb +89 -89
- data/spec/spec_helper.rb +118 -65
- data/spec/traverse_balanced_spec.rb +173 -173
- data/spec/traverse_sequences_spec.rb +29 -31
- metadata +54 -33
- data/autotest/discover.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0df61a794bf8b132a80753391063526ffc15277d5f2dc592d319d37255d3700f
|
4
|
+
data.tar.gz: 9664b2f8338ff376bf7b4c9c1ae45e591e789b00b726a53523a2076f014aa5e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
4
|
-
request, or code contributions. Code contributions to Diff::LCS are
|
5
|
-
<del>welcome</del>encouraged. Because Diff::LCS is a complex
|
6
|
-
are a few guidelines:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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
|
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
|
-
|
24
|
+
```sh
|
25
|
+
$ rake
|
26
|
+
```
|
25
27
|
|
26
28
|
which runs the tests the same way that:
|
27
29
|
|
28
|
-
|
29
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
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
|
-
|
69
|
-
|
70
|
-
Thanks to everyone else who has contributed to Diff::LCS:
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
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
|
-
[
|
119
|
+
[hoe]: https://github.com/seattlerb/hoe
|