csv-diff-report 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/csvdiff +0 -0
- data/lib/csv-diff-report/cli.rb +1 -1
- data/lib/csv-diff-report/report.rb +15 -8
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56cdc0f5cb3e6c6032e8cbd9de325bceede2a895
|
4
|
+
data.tar.gz: 729b39b7a6373da8fd499d228930a01fbce695d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3650d3644596522ee283c80c792d3c3d35832ed630843ef02492708911e09683c1c3d58fe8023664b995e3dd5c4d46eeec347b8c991df15cf8c1006f9f82355b
|
7
|
+
data.tar.gz: 1747526e29d2dd0fabe3a20bc8dbadaa405d506ab56ccb822610f516b383897c697cf3407f7ed5cd5cc5868106f621b2c4a3b2894faf95a0f60632b78435a045
|
data/bin/csvdiff
CHANGED
File without changes
|
data/lib/csv-diff-report/cli.rb
CHANGED
@@ -43,7 +43,7 @@ class CSVDiff
|
|
43
43
|
'Requires the presence of a .csvdiff file in the FROM or current directory to define ' +
|
44
44
|
'the file type patterns.',
|
45
45
|
short_key: 't', on_parse: :split_to_array
|
46
|
-
keyword_arg :
|
46
|
+
keyword_arg :exclude_pattern, 'A file name pattern of files to exclude from the diff if a directory ' +
|
47
47
|
'diff is being performed.',
|
48
48
|
short_key: 'x'
|
49
49
|
keyword_arg :field_names, 'A comma-separated list of field names for each field in the source files.' +
|
@@ -242,7 +242,8 @@ class CSVDiff
|
|
242
242
|
end
|
243
243
|
end
|
244
244
|
if hsh[:matched_files].include?(left.to_s)
|
245
|
-
|
245
|
+
echo "Matched file #{left} to file type #{file_type}"
|
246
|
+
settings = settings.merge(hsh)
|
246
247
|
[:pattern, :exclude_pattern, :matched_files].each{ |k| settings.delete(k) }
|
247
248
|
break
|
248
249
|
end
|
@@ -257,14 +258,20 @@ class CSVDiff
|
|
257
258
|
# @param options [Hash] An options hash to be passed to CSVSource.
|
258
259
|
def open_source(src, left_right, options)
|
259
260
|
out = ["Opening #{left_right.to_s.upcase} file '#{File.basename(src)}'..."]
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
261
|
+
begin
|
262
|
+
csv_src = CSVDiff::CSVSource.new(src.to_s, options)
|
263
|
+
out << [" #{csv_src.lines.size} lines read", :white]
|
264
|
+
if csv_src.skip_count > 0
|
265
|
+
out << [" (#{csv_src.skip_count} lines skipped)", :yellow]
|
266
|
+
end
|
267
|
+
echo(*out)
|
268
|
+
csv_src.warnings.each{ |warn| echo [warn, :yellow] }
|
269
|
+
csv_src
|
270
|
+
rescue Object => ex
|
271
|
+
echo(*out)
|
272
|
+
echo(["An error occurred opening file #{src}: #{ex}", :red])
|
273
|
+
raise
|
264
274
|
end
|
265
|
-
echo(*out)
|
266
|
-
csv_src.warnings.each{ |warn| echo [warn, :yellow] }
|
267
|
-
csv_src
|
268
275
|
end
|
269
276
|
|
270
277
|
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csv-diff-report
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Gardiner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: csv-diff
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.3.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.3.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: arg-parser
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: color-console
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0.1'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: axlsx
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.3'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.3'
|
69
69
|
description: |2
|
@@ -88,16 +88,16 @@ executables:
|
|
88
88
|
extensions: []
|
89
89
|
extra_rdoc_files: []
|
90
90
|
files:
|
91
|
-
- README.md
|
92
91
|
- LICENSE
|
92
|
+
- README.md
|
93
|
+
- bin/csvdiff
|
94
|
+
- lib/csv-diff-report.rb
|
93
95
|
- lib/csv-diff-report/cli.rb
|
94
96
|
- lib/csv-diff-report/excel.rb
|
95
97
|
- lib/csv-diff-report/html.rb
|
96
98
|
- lib/csv-diff-report/report.rb
|
97
99
|
- lib/csv-diff-report/text.rb
|
98
|
-
- lib/csv-diff-report.rb
|
99
100
|
- lib/csv_diff_report.rb
|
100
|
-
- bin/csvdiff
|
101
101
|
homepage: https://github.com/agardiner/csv-diff-report
|
102
102
|
licenses: []
|
103
103
|
metadata: {}
|
@@ -107,17 +107,17 @@ require_paths:
|
|
107
107
|
- lib
|
108
108
|
required_ruby_version: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
|
-
- -
|
110
|
+
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '0'
|
113
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.5.2
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: CSV Diff Report is a library for generating diff reports using the CSV Diff
|