forked from agardiner/csv-diff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
csv-diff.gemspec
43 lines (38 loc) · 2.25 KB
/
csv-diff.gemspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
GEMSPEC = Gem::Specification.new do |s|
s.name = "csv-diff"
s.version = "0.6.1"
s.authors = ["Adam Gardiner"]
s.date = "2020-10-21"
s.summary = "CSV Diff is a library for generating diffs from data in CSV or XML format"
s.description = <<-EOQ
This library performs diffs of CSV data, or any table-like source.
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 (or Arrays of Arrays). It also supports converting
data in XML format into tabular form, so that it can then be processed
like any other CSV or table-like source. It returns a CSVDiff object
containing the details of differences in object form. This is useful for
projects that need diff capability, but want to handle the reporting or
actioning 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,
Excel, or text formats.
EOQ
s.email = "[email protected]"
s.homepage = 'https://github.com/agardiner/csv-diff'
s.require_paths = ['lib']
s.files = ['README.md', 'LICENSE'] + Dir['lib/**/*.rb']
s.licenses = 'MIT'
s.post_install_message = "For command-line tools and diff reports, 'gem install csv-diff-report'"
end