summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Contributing.md132
-rw-r--r--History.md27
2 files changed, 110 insertions, 49 deletions
diff --git a/Contributing.md b/Contributing.md
index 08f424b..7ec1f52 100644
--- a/Contributing.md
+++ b/Contributing.md
@@ -1,32 +1,35 @@
## Contributing
-I value any contribution to Diff::LCS you can provide: a bug report, a feature
-request, or code contributions. Code contributions to Diff::LCS are especially
-<del>welcome</del>encouraged. Because Diff::LCS is a complex codebase, there
-are a few guidelines:
-
-* Code changes *will not* be accepted without tests. The test suite is
- written with [RSpec][].
-* Match my coding style.
-* Use a thoughtfully-named topic branch that contains your change. Rebase
- your commits into logical chunks as necessary.
-* Use [quality commit messages][].
-* Do not change the version number; when your patch is accepted and a release
- is made, the version will be updated at that point.
-* Submit a GitHub pull request with your changes.
-* New or changed behaviours require appropriate documentation.
+I value any contribution to Diff::LCS you can provide: a bug report, a
+feature request, or code contributions. Code contributions to Diff::LCS are
+especially <del>welcome</del>encouraged. Because Diff::LCS is a complex
+codebase, there are a few guidelines:
+
+- Code changes _will not_ be accepted without tests. The test suite is
+ written with [RSpec][].
+- Match my coding style.
+- Use a thoughtfully-named topic branch that contains your change. Rebase
+ your commits into logical chunks as necessary.
+- Use [quality commit messages][].
+- Do not change the version number; when your patch is accepted and a release
+ is made, the version will be updated at that point.
+- Submit a GitHub pull request with your changes.
+- New or changed behaviours require appropriate documentation.
### Test Dependencies
-Diff::LCS uses Ryan Davis’s [Hoe][] to manage the release process, and it adds
-a number of rake tasks. You will mostly be interested in:
+Diff::LCS uses Ryan Davis’s [Hoe][] to manage the release process, and it
+adds a number of rake tasks. You will mostly be interested in:
- $ rake
+```sh
+$ rake
+```
which runs the tests the same way that:
- $ rake spec
- $ rake travis
+```sh
+$ rake spec
+```
will do.
@@ -34,51 +37,82 @@ To assist with the installation of the development dependencies, I have
provided a Gemfile pointing to the (generated) `diff-lcs.gemspec` file. This
will permit you to do:
- $ bundle install
+```sh
+$ bundle install
+```
to get the development dependencies. If you aleady have `hoe` installed, you
can accomplish the same thing with:
- $ rake newb
+```sh
+$ rake newb
+```
This task will install any missing dependencies, run the tests/specs, and
generate the RDoc.
You can run tests with code coverage analysis by running:
- $ rake spec:coverage
+```sh
+$ rake spec:coverage
+```
### Workflow
Here's the most direct way to get your work merged into the project:
-* Fork the project.
-* Clone down your fork (`git clone git://github.com/<username>/diff-lcs.git`).
-* Create a topic branch to contain your change (`git checkout -b
- my_awesome_feature`).
-* Hack away, add tests. Not necessarily in that order.
-* Make sure everything still passes by running `rake`.
-* If necessary, rebase your commits into logical chunks, without errors.
-* Push the branch up (`git push origin my_awesome_feature`).
-* Create a pull request against halostatue/diff-lcs and describe what your
- change does and the why you think it should be merged.
+- Fork the project.
+- Clone down your fork (`git clone git://github.com/<username>/diff-lcs.git`).
+- Create a topic branch to contain your change (`git checkout -b my_awesome_feature`).
+- Hack away, add tests. Not necessarily in that order.
+- Make sure everything still passes by running `rake`.
+- If necessary, rebase your commits into logical chunks, without errors.
+- Push the branch up (`git push origin my_awesome_feature`).
+- Create a pull request against halostatue/diff-lcs and describe what your
+ change does and the why you think it should be merged.
### Contributors
-* Austin Ziegler created Diff::LCS.
-
-Thanks to everyone else who has contributed to Diff::LCS:
-
-* Kenichi Kamiya
-* Michael Granger
-* Vít Ondruch
-* Jon Rowe
-* Koichi Ito
-* Josef Strzibny
-* Josh Bronson
-* Mark Friedgan
-* Akinori MUSHA
-
-[Rspec]: http://rspec.info/documentation/
+- Austin Ziegler created Diff::LCS.
+
+Thanks to everyone else who has contributed code or bug reports to Diff::LCS:
+
+- @ginriki
+- @joshbronson
+- @kevinmook
+- @mckaz
+- Akinori Musha
+- Artem Ignatyev
+- Brandon Fish
+- Camille Drapier
+- Cédric Boutillier
+- Gregg Kellogg
+- Jagdeep Singh
+- Jason Gladish
+- Jon Rowe
+- Josef Strzibny
+- Josep (@apuratepp)
+- Josh Bronson
+- Jun Aruga
+- Kenichi Kamiya
+- Kensuke Nagae
+- Kevin Ansfield
+- Koichi Ito
+- Mark Friedgan
+- Michael Granger
+- Myron Marston
+- Nicolas Leger
+- Oleg Orlov
+- Paul Kunysch
+- Pete Higgins
+- Peter Wagenet
+- Philippe Lafoucrière
+- Ryan Lovelett
+- Scott Steele
+- Simon Courtois
+- Tomas Jura
+- Vít Ondruch
+
+[rspec]: http://rspec.info/documentation/
[quality commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
-[Hoe]: https://github.com/seattlerb/hoe
+[hoe]: https://github.com/seattlerb/hoe
diff --git a/History.md b/History.md
index 3690990..063387b 100644
--- a/History.md
+++ b/History.md
@@ -8,8 +8,35 @@
a more useful exception. [#43][]
- Added documentation that should address custom object issues as reported in
[#35][].
+
- Fixed more diff errors, in part reported in [#65][].
+ - The use of `Numeric#abs` is incorrect in `Diff::LCS::Block#diff_size`.
+ The diff size _must_ be accurate for correct change placement.
+ - When selecting @max_diff_size in Diff::LCS::Hunk, choose it based on
+ `block.diff_size.abs`.
+ - Made a number of changes that will, unfortunately, increase allocations
+ at the cost of being safe with frozen strings.
+ - Add some knowledge that when `Diff::LCS::Hunk#diff` is called, that we
+ are processing the _last_ hunk, so some changes will be made to how the
+ output is generated.
+
+ - `old`, `ed`, and `reverse_ed` formats have no differences.
+ - `unified` format will report `\ No newline at end of file` given the
+ correct conditions, at most once. Unified range reporting also
+ differs for the last hunk such that the `length` of the range is
+ reduced by one.
+ - `context` format will report `\No newline at end of file` given the
+ correct conditions, up to once per "file". Context range reporting also
+ differs for the last hunk such that the `end` part of the range is
+ reduced by one to a minimum of one.
+
+- Added a bunch more tests for the cases above, and fixed `hunk_spec.rb` so
+ that the phrase being compared isn't nonsense French.
+
+- Updated formatting.
+- Added a Rake task to assist with manual testing on Ruby 1.8.
+
## 1.4.3 / 2020-06-29
- Fixed several issues with the 1.4 on Rubies older than 2.0. Some of this was