Skip to content

Commit

Permalink
Merge pull request #2 from ezkl/ezkl/prep-for-release
Browse files Browse the repository at this point in the history
Prepare for v0.1.0
  • Loading branch information
ezkl authored Jul 24, 2020
2 parents 12503fa + 7d73ae7 commit 44bd7c9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 10 deletions.
47 changes: 40 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# DiMaPa (Ruby Implementation of Google's DiffMatchPatch)
# DiMaPa (Diff Match and Patch)
A modern Ruby implementation of Google's [Diff Match and Patch][google]
libraries.

> The Diff Match and Patch libraries offer robust algorithms to perform the
> operations required for synchronizing plain text.
## Usage
```ruby
Expand Down Expand Up @@ -31,15 +36,43 @@ dmp.patch_apply(patch, "This is a sentence.")
#=> ["This is also a sentence.", [true]]
```

A ruby implementation of the google diff-match-patch library.
http://code.google.com/p/google-diff-match-patch/
## Installation
```sh
# RubyGem
gem install dimapa

# From source
bundle install
bundle exec rake install
```

## Benchmarks

This project includes [scripts/](speedtests) mirroring those in the official
project. Performance is on par with those reported for [Lua and Python][speedtest]
albeit run on a faster machine.

The Diff Match and Patch libraries offer robust algorithms to perform the operations required for synchronizing plain text.
```
$ rake speedtest
This work was inspired by the diff_match_patch-ruby module.
(https://github.com/reima/diff_match_patch-ruby)
user system total real
diff(t2,t1) 13.658214 0.003937 13.662151 ( 13.662453)
diff(t1,t2) 14.074079 0.000001 14.074080 ( 14.074350)
```

## Tests and Linting

```sh
bundle exec rake
```

### Forked from kalmbach/diff_match_patch
### Fork of [kalmbach/diff_match_patch][kalmbach] b/w/o [DavidMikeSimon/diff_match_patch][davidmikesimon]
Copyright (c) 2011, Jorge Kalmbach <kalmbach.at.gmail.com>

Work was inspired by the [reima/diff_match_patch-ruby][reima] module.

[speedtest]: https://docs.google.com/spreadsheets/d/1zpZccuBpjMZTvL1nGDMKJc7rWL_m_drF4XKOJvB27Kc/edit#gid=0
[kalmbach]: https://github.com/kalmbach/diff_match_patch
[davidmikesimon]: https://github.com/DavidMikeSimon/diff_match_patch
[reima]: https://github.com/reima/diff_match_patch-ruby
[google]: https://github.com/google/diff-match-patch
6 changes: 3 additions & 3 deletions dimapa.gemspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Gem::Specification.new do |s|
s.name = "dimapa"
s.version = "0.1.0"
s.date = "2020-06-03"
s.summary = "Ruby implementation of Google's diff_match_patch"
s.description = "Ruby implementation of Google's diff_match_patch"
s.date = "2020-07-23"
s.summary = "Ruby implementation of Google's diff-match-patch"
s.description = "A modern Ruby implementation of Google's Diff Match Patch"
s.authors = ["Ezekiel Templin", "Jorge Kalmbach"]
s.email = ["zeke@templ.in", "kalmbach@gmail.com"]
s.files = [
Expand Down

0 comments on commit 44bd7c9

Please # to comment.