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

trotzig / diffux / 267
99%

Build:
DEFAULT BRANCH: master
Ran 11 Mar 2014 12:12AM UTC
Jobs 2
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

pending completion
267

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%)

55.4 hits per line

Jobs
ID Job ID Ran Files Coverage
1 267.1 (2.0.0) 11 Mar 2014 12:12AM UTC 0
96.46
Travis Job 267.1
2 267.2 (2.1.0) 11 Mar 2014 12:14AM UTC 0
96.46
Travis Job 267.2
Source Files on build 267
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #267
  • 695b4db9 on github
  • Prev Build on master (#253)
  • Next Build on master (#268)
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