csvlint 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/.gitattributes +2 -0
- data/CHANGELOG.md +19 -1
- data/README.md +15 -1
- data/bin/csvlint +13 -3
- data/csvlint.gemspec +1 -0
- data/features/csvupload.feature +5 -5
- data/features/fixtures/inconsistent-line-endings-unquoted.csv +0 -0
- data/features/fixtures/inconsistent-line-endings.csv +0 -0
- data/features/fixtures/invalid_many_rows.csv +0 -0
- data/features/fixtures/valid_many_rows.csv +0 -0
- data/features/information.feature +4 -4
- data/features/step_definitions/csv_options_steps.rb +5 -0
- data/features/validation_errors.feature +1 -1
- data/features/validation_info.feature +6 -6
- data/lib/csvlint.rb +1 -1
- data/lib/csvlint/csvw/number_format.rb +1 -1
- data/lib/csvlint/field.rb +10 -4
- data/lib/csvlint/validate.rb +326 -219
- data/lib/csvlint/version.rb +1 -1
- data/spec/csvw/number_format_spec.rb +14 -0
- data/spec/validator_spec.rb +450 -146
- metadata +21 -3
- data/lib/csvlint/wrapped_io.rb +0 -21
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csvlint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pezholio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ! '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: typhoeus
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: escape_utils
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -300,6 +314,7 @@ extensions: []
|
|
300
314
|
extra_rdoc_files: []
|
301
315
|
files:
|
302
316
|
- .coveralls.yml
|
317
|
+
- .gitattributes
|
303
318
|
- .gitignore
|
304
319
|
- .ruby-version
|
305
320
|
- .travis.yml
|
@@ -320,11 +335,13 @@ files:
|
|
320
335
|
- features/fixtures/inconsistent-line-endings-unquoted.csv
|
321
336
|
- features/fixtures/inconsistent-line-endings.csv
|
322
337
|
- features/fixtures/invalid-byte-sequence.csv
|
338
|
+
- features/fixtures/invalid_many_rows.csv
|
323
339
|
- features/fixtures/lf-line-endings.csv
|
324
340
|
- features/fixtures/spreadsheet.xls
|
325
341
|
- features/fixtures/spreadsheet.xlsx
|
326
342
|
- features/fixtures/title-row.csv
|
327
343
|
- features/fixtures/valid.csv
|
344
|
+
- features/fixtures/valid_many_rows.csv
|
328
345
|
- features/fixtures/windows-line-endings.csv
|
329
346
|
- features/information.feature
|
330
347
|
- features/parse_csv.feature
|
@@ -358,7 +375,6 @@ files:
|
|
358
375
|
- lib/csvlint/schema.rb
|
359
376
|
- lib/csvlint/validate.rb
|
360
377
|
- lib/csvlint/version.rb
|
361
|
-
- lib/csvlint/wrapped_io.rb
|
362
378
|
- spec/csvw/column_spec.rb
|
363
379
|
- spec/csvw/date_format_spec.rb
|
364
380
|
- spec/csvw/number_format_spec.rb
|
@@ -402,11 +418,13 @@ test_files:
|
|
402
418
|
- features/fixtures/inconsistent-line-endings-unquoted.csv
|
403
419
|
- features/fixtures/inconsistent-line-endings.csv
|
404
420
|
- features/fixtures/invalid-byte-sequence.csv
|
421
|
+
- features/fixtures/invalid_many_rows.csv
|
405
422
|
- features/fixtures/lf-line-endings.csv
|
406
423
|
- features/fixtures/spreadsheet.xls
|
407
424
|
- features/fixtures/spreadsheet.xlsx
|
408
425
|
- features/fixtures/title-row.csv
|
409
426
|
- features/fixtures/valid.csv
|
427
|
+
- features/fixtures/valid_many_rows.csv
|
410
428
|
- features/fixtures/windows-line-endings.csv
|
411
429
|
- features/information.feature
|
412
430
|
- features/parse_csv.feature
|
data/lib/csvlint/wrapped_io.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
module Csvlint
|
2
|
-
class WrappedIO < SimpleDelegator
|
3
|
-
attr_reader :line
|
4
|
-
|
5
|
-
def reset_line
|
6
|
-
@line = ''
|
7
|
-
end
|
8
|
-
|
9
|
-
def gets(*args)
|
10
|
-
if args.size == 1 && args[0].is_a?(String)
|
11
|
-
s = __getobj__.gets(args[0])
|
12
|
-
if s
|
13
|
-
@line << s
|
14
|
-
end
|
15
|
-
s
|
16
|
-
else
|
17
|
-
__getobj__.gets(*args)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|