v0.1.0 · Pure Ruby
Text changes, without opinion attached.
Porrima computes line, word, and three-way diffs. You decide how they look, where they live, and what happens next.
1
profile = {2
name: "Porrima",3−
state: :draft,3+
state: :ready,4
}1
require "porrima"2
3
diff = Porrima.diff(before, after)4
diff.stat.to_h5
# { insertions: 1, deletions: 1, hunks: 1 }The diff is data.
Inspect structured edits, hunks, gutter marks, paired rows, and inline spans. Rendering policy stays in your application.
- Compare
- Linear-space Myers diff with line and token-level refinement.
- Patch
- Strict unified patches that apply or revert only against exact text.
- Merge
- Three-way merge with structured conflicts and optional diff3 markers.
Small core. Clear boundaries.
No file reads, no terminal styling, no runtime dependencies. Porrima does the text work and gets out of the way.
Install from RubyGems
$ gem install porrima