RubyGems Navigation menu

csv-diff 0.3.1

This library performs diffs of CSV files. Unlike a standard diff that compares line by line, and is sensitive to the ordering of records, CSV-Diff identifies common lines by key field(s), and then compares the contents of the fields in each line. Data may be supplied in the form of CSV files, or as an array of arrays. The diff process provides a fine level of control over what to diff, and can optionally ignore certain types of changes (e.g. changes in position). CSV-Diff is particularly well suited to data in parent-child format. Parent- child data does not lend itself well to standard text diffs, as small changes in the organisation of the tree at an upper level can lead to big movements in the position of descendant records. By instead matching records by key, CSV-Diff avoids this issue, while still being able to detect changes in sibling order. This gem implements the core diff algorithm, and handles the loading and diffing of CSV files. It returns a CSVDiff object, that contains the details of differences in object form. This is useful for projects that need diff capability, but want to handle the reporting of differences themselves. For a pre-built diff reporting capability, see the csv-diff-report gem, which provides a command-line tool for generating diff reports in HTML or Excel format.

Gemfile:
= Copy to clipboard Copied!

install:
=

Versions:

  1. 0.6.1 - October 21, 2020 (18 KB)
  2. 0.6.0 - August 31, 2020 (18 KB)
  3. 0.5.0 - July 15, 2020 (16.5 KB)
  4. 0.3.5 - March 05, 2018 (14.5 KB)
  5. 0.3.3 - May 17, 2017 (14.5 KB)
  6. 0.3.1 - January 26, 2016 (12 KB)
Show all versions (9 total)

Owners:

Authors:

  • Adam Gardiner

SHA 256 checksum:

eb6620081e2948e818db5926c6e77f49f9255c3c473574f22bea7412fdb4578c

Total downloads 3,385,482

For this version 27,960

Licenses:

N/A

Required Ruby Version: >= 0

Links: