• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

trotzig / diffux / 267 / 1
99%
master: 99%

Build:
DEFAULT BRANCH: master
Ran 11 Mar 2014 12:12AM UTC
Files 26
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Mar 2014 12:03AM UTC coverage: 96.457% (-1.1%) from 97.51%
2.0.0

push

travis-ci

lencioni
Use diff-lcs gem for diffing

Textual diffing tools allow you to easily understand when code is
inserted or deleted without showing everything after that bit as having
been changed. This problem is known as the longest common subsequence
problem.

As pages change, they often have elements added or removed that cause
much of the page to be pushed down or moved up, but this content hasn't
actually changed. With the way we are currently computing diffs,
everything following this common type of change will appear as having
changed, making the diff difficult to read and less valuable.

We would like our visual diffs to work more like textual diffs.

To that end, we are bringing in the diff-lcs gem, which implements diff
algorithms in a convenient Ruby gem.

We use this gem by first converting the before and after images into
arrays of arrays of integers that represent the color of each pixel.
These arrays are then sent to the diff-lcs gem to generate an sdiff.
This returns a new object that represents the difference between the two
images, where each row is either the same, added, deleted, or changed.
We take this information to render a new diff where added lines are
highlighted in green, deleted lines are highlighted in red, and changed
lines are highlighted in hot pink.

Because the diff-lcs gem has implemented the standard diff algorithm, it
actually does a pretty good job of managing content that was added
without counting the rest of the page as a diff. In practice, this works
really well for single-column content, but not super great for
multi-column content.

Resolves #63.

Change-Id: I6c81e4132

490 of 508 relevant lines covered (96.46%)

27.7 hits per line

Source Files on job 267.1 (2.0.0)
  • Tree
  • List 0
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 267
  • Travis Job 267.1
  • 695b4db9 on github
  • Prev Job for 2.0.0 on master (#253.1)
  • Next Job for 2.0.0 on master (#268.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc