csvlint 0.4.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +5 -5
  2. data/.github/dependabot.yml +11 -0
  3. data/.github/workflows/push.yml +35 -0
  4. data/.gitignore +1 -0
  5. data/.ruby-version +1 -1
  6. data/.standard_todo.yml +43 -0
  7. data/CHANGELOG.md +38 -0
  8. data/Dockerfile +16 -0
  9. data/Gemfile +2 -2
  10. data/README.md +13 -10
  11. data/Rakefile +7 -7
  12. data/bin/create_schema +2 -2
  13. data/csvlint.gemspec +19 -22
  14. data/docker_notes_for_windows.txt +20 -0
  15. data/features/step_definitions/cli_steps.rb +11 -11
  16. data/features/step_definitions/information_steps.rb +4 -4
  17. data/features/step_definitions/parse_csv_steps.rb +11 -11
  18. data/features/step_definitions/schema_validation_steps.rb +10 -10
  19. data/features/step_definitions/sources_steps.rb +1 -1
  20. data/features/step_definitions/validation_errors_steps.rb +19 -19
  21. data/features/step_definitions/validation_info_steps.rb +9 -9
  22. data/features/step_definitions/validation_warnings_steps.rb +11 -11
  23. data/features/support/aruba.rb +10 -9
  24. data/features/support/earl_formatter.rb +39 -39
  25. data/features/support/env.rb +10 -11
  26. data/features/support/load_tests.rb +109 -105
  27. data/features/support/webmock.rb +3 -1
  28. data/lib/csvlint/cli.rb +136 -142
  29. data/lib/csvlint/csvw/column.rb +279 -280
  30. data/lib/csvlint/csvw/date_format.rb +90 -92
  31. data/lib/csvlint/csvw/metadata_error.rb +1 -3
  32. data/lib/csvlint/csvw/number_format.rb +40 -32
  33. data/lib/csvlint/csvw/property_checker.rb +714 -717
  34. data/lib/csvlint/csvw/table.rb +49 -52
  35. data/lib/csvlint/csvw/table_group.rb +24 -23
  36. data/lib/csvlint/error_collector.rb +2 -0
  37. data/lib/csvlint/error_message.rb +0 -1
  38. data/lib/csvlint/field.rb +153 -141
  39. data/lib/csvlint/schema.rb +35 -43
  40. data/lib/csvlint/validate.rb +173 -151
  41. data/lib/csvlint/version.rb +1 -1
  42. data/lib/csvlint.rb +22 -23
  43. data/spec/csvw/column_spec.rb +15 -16
  44. data/spec/csvw/date_format_spec.rb +5 -7
  45. data/spec/csvw/number_format_spec.rb +2 -4
  46. data/spec/csvw/table_group_spec.rb +103 -105
  47. data/spec/csvw/table_spec.rb +71 -73
  48. data/spec/field_spec.rb +116 -121
  49. data/spec/schema_spec.rb +131 -141
  50. data/spec/spec_helper.rb +6 -6
  51. data/spec/validator_spec.rb +167 -203
  52. metadata +41 -85
  53. data/.travis.yml +0 -37
metadata CHANGED
@@ -1,31 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csvlint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - pezholio
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-05 00:00:00.000000000 Z
11
+ date: 2022-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: mime-types
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: colorize
14
+ name: rainbow
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - ">="
@@ -154,28 +140,28 @@ dependencies:
154
140
  name: net-http-persistent
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
- - - "<"
143
+ - - ">="
158
144
  - !ruby/object:Gem::Version
159
- version: '3.0'
145
+ version: '0'
160
146
  type: :runtime
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
- - - "<"
150
+ - - ">="
165
151
  - !ruby/object:Gem::Version
166
- version: '3.0'
152
+ version: '0'
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: bundler
169
155
  requirement: !ruby/object:Gem::Requirement
170
156
  requirements:
171
- - - "~>"
157
+ - - ">="
172
158
  - !ruby/object:Gem::Version
173
159
  version: '1.3'
174
160
  type: :development
175
161
  prerelease: false
176
162
  version_requirements: !ruby/object:Gem::Requirement
177
163
  requirements:
178
- - - "~>"
164
+ - - ">="
179
165
  - !ruby/object:Gem::Version
180
166
  version: '1.3'
181
167
  - !ruby/object:Gem::Dependency
@@ -319,7 +305,7 @@ dependencies:
319
305
  - !ruby/object:Gem::Version
320
306
  version: '0'
321
307
  - !ruby/object:Gem::Dependency
322
- name: pry
308
+ name: byebug
323
309
  requirement: !ruby/object:Gem::Requirement
324
310
  requirements:
325
311
  - - ">="
@@ -366,14 +352,14 @@ dependencies:
366
352
  requirements:
367
353
  - - "<"
368
354
  - !ruby/object:Gem::Version
369
- version: '2.0'
355
+ version: '4.0'
370
356
  type: :development
371
357
  prerelease: false
372
358
  version_requirements: !ruby/object:Gem::Requirement
373
359
  requirements:
374
360
  - - "<"
375
361
  - !ruby/object:Gem::Version
376
- version: '2.0'
362
+ version: '4.0'
377
363
  - !ruby/object:Gem::Dependency
378
364
  name: rdf-turtle
379
365
  requirement: !ruby/object:Gem::Requirement
@@ -402,6 +388,20 @@ dependencies:
402
388
  - - ">="
403
389
  - !ruby/object:Gem::Version
404
390
  version: '0'
391
+ - !ruby/object:Gem::Dependency
392
+ name: standardrb
393
+ requirement: !ruby/object:Gem::Requirement
394
+ requirements:
395
+ - - ">="
396
+ - !ruby/object:Gem::Version
397
+ version: '0'
398
+ type: :development
399
+ prerelease: false
400
+ version_requirements: !ruby/object:Gem::Requirement
401
+ requirements:
402
+ - - ">="
403
+ - !ruby/object:Gem::Version
404
+ version: '0'
405
405
  description: CSV Validator
406
406
  email:
407
407
  - pezholio@gmail.com
@@ -415,12 +415,15 @@ files:
415
415
  - ".gitattributes"
416
416
  - ".github/ISSUE_TEMPLATE.md"
417
417
  - ".github/PULL_REQUEST_TEMPLATE.md"
418
+ - ".github/dependabot.yml"
419
+ - ".github/workflows/push.yml"
418
420
  - ".gitignore"
419
421
  - ".ruby-version"
420
- - ".travis.yml"
422
+ - ".standard_todo.yml"
421
423
  - CHANGELOG.md
422
424
  - CODE_OF_CONDUCT.md
423
425
  - CONTRIBUTING.md
426
+ - Dockerfile
424
427
  - Gemfile
425
428
  - LICENSE.md
426
429
  - README.md
@@ -428,6 +431,7 @@ files:
428
431
  - bin/create_schema
429
432
  - bin/csvlint
430
433
  - csvlint.gemspec
434
+ - docker_notes_for_windows.txt
431
435
  - features/check_format.feature
432
436
  - features/cli.feature
433
437
  - features/csv_options.feature
@@ -497,74 +501,26 @@ homepage: https://github.com/theodi/csvlint.rb
497
501
  licenses:
498
502
  - MIT
499
503
  metadata: {}
500
- post_install_message:
504
+ post_install_message:
501
505
  rdoc_options: []
502
506
  require_paths:
503
507
  - lib
504
508
  required_ruby_version: !ruby/object:Gem::Requirement
505
509
  requirements:
506
- - - "~>"
510
+ - - ">="
511
+ - !ruby/object:Gem::Version
512
+ version: '2.5'
513
+ - - "<"
507
514
  - !ruby/object:Gem::Version
508
- version: '2.0'
515
+ version: '3.3'
509
516
  required_rubygems_version: !ruby/object:Gem::Requirement
510
517
  requirements:
511
518
  - - ">="
512
519
  - !ruby/object:Gem::Version
513
520
  version: '0'
514
521
  requirements: []
515
- rubyforge_project:
516
- rubygems_version: 2.6.13
517
- signing_key:
522
+ rubygems_version: 3.4.1
523
+ signing_key:
518
524
  specification_version: 4
519
525
  summary: CSV Validator
520
- test_files:
521
- - features/check_format.feature
522
- - features/cli.feature
523
- - features/csv_options.feature
524
- - features/csvupload.feature
525
- - features/csvw_schema_validation.feature
526
- - features/fixtures/cr-line-endings.csv
527
- - features/fixtures/crlf-line-endings.csv
528
- - features/fixtures/inconsistent-line-endings-unquoted.csv
529
- - features/fixtures/inconsistent-line-endings.csv
530
- - features/fixtures/invalid-byte-sequence.csv
531
- - features/fixtures/invalid_many_rows.csv
532
- - features/fixtures/lf-line-endings.csv
533
- - features/fixtures/spreadsheet.xls
534
- - features/fixtures/spreadsheet.xlsx
535
- - features/fixtures/title-row.csv
536
- - features/fixtures/valid.csv
537
- - features/fixtures/valid_many_rows.csv
538
- - features/fixtures/w3.org/.well-known/csvm
539
- - features/fixtures/white space in filename.csv
540
- - features/fixtures/windows-line-endings.csv
541
- - features/information.feature
542
- - features/parse_csv.feature
543
- - features/schema_validation.feature
544
- - features/sources.feature
545
- - features/step_definitions/cli_steps.rb
546
- - features/step_definitions/csv_options_steps.rb
547
- - features/step_definitions/information_steps.rb
548
- - features/step_definitions/parse_csv_steps.rb
549
- - features/step_definitions/schema_validation_steps.rb
550
- - features/step_definitions/sources_steps.rb
551
- - features/step_definitions/validation_errors_steps.rb
552
- - features/step_definitions/validation_info_steps.rb
553
- - features/step_definitions/validation_warnings_steps.rb
554
- - features/support/aruba.rb
555
- - features/support/earl_formatter.rb
556
- - features/support/env.rb
557
- - features/support/load_tests.rb
558
- - features/support/webmock.rb
559
- - features/validation_errors.feature
560
- - features/validation_info.feature
561
- - features/validation_warnings.feature
562
- - spec/csvw/column_spec.rb
563
- - spec/csvw/date_format_spec.rb
564
- - spec/csvw/number_format_spec.rb
565
- - spec/csvw/table_group_spec.rb
566
- - spec/csvw/table_spec.rb
567
- - spec/field_spec.rb
568
- - spec/schema_spec.rb
569
- - spec/spec_helper.rb
570
- - spec/validator_spec.rb
526
+ test_files: []
data/.travis.yml DELETED
@@ -1,37 +0,0 @@
1
- ---
2
- rvm:
3
- - 2.0.0-p648
4
- - 2.1.10
5
- - 2.2.7
6
- - 2.3.4
7
- - 2.4.1
8
- sudo: false
9
- cache: bundler
10
- notifications:
11
- irc:
12
- channels:
13
- - irc.freenode.net#theodi
14
- template:
15
- - "%{repository} %{branch} - %{message} %{build_url}"
16
- on_success: change
17
- on_failure: always
18
- deploy:
19
- provider: rubygems
20
- api_key:
21
- secure: fjnPS61/skQ1PsRJu1SYWIct0vjdkTyQhj0ria9zfcJfbWbfiHnpehVh1ege3sTUkDSTvoOFT35jzEeozvtKZOlAWMU5QbL8LTXu+JSp9olOdSuGeWRWVuQT3NLgRJW0+2c7N66piZvnRUUTyt2P8VIR8c/Ltuhc32bUGL7X6Gw=
22
- gem: csvlint
23
- true:
24
- tags: true
25
- repo: theodi/csvlint.rb
26
- all_branches: true
27
- after_success:
28
- - export GEM_VERSION=`ruby -e "puts Gem::Specification.load(Dir['*.gemspec'].first).version.to_s"`
29
- - '[ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && curl
30
- -v -X POST -d ''{"ref":"refs/tags/''$GEM_VERSION''","sha":"''$TRAVIS_COMMIT''"}'' --header
31
- "Content-Type:application/json" -u $GITHUB_USER:$GITHUB_PASSWORD "https://api.github.com/repos/$TRAVIS_REPO_SLUG/git/refs"'
32
- - bundle exec henry deploy
33
- env:
34
- global:
35
- - secure: hM8Pv/EAZoB4fGGEUwKQQ/2+mgKbUac+PH2cwud25l2MJ64eoKEMZzfy4TF6+XMIzXhlWpsg4s51y6K3+W8pUyRAuwo2MsN5Iee7HnLz+LlYTiT0//iQdAmxQ0JlOyh8vd2SEFBcVfwpp/iZFIHAfbBO73ZDXhtGMEieMk025I0=
36
- - secure: hsKbZ0kVKVU/e8oVCPJpRmBxbbieN2tVbyjdhJo/UYchcyLWeGAmAj/ApUDL4SyR0HZxpfi+SIsGFNRy5LnrFeCFgY9aZ6u9ma4n0Y2cTElMRt5kvI/c28FehsRjCzAe6W8dxwhJ8wSkvFDNpLml47/iy8bw4a7aUZDdq3OYXck=
37
- - secure: FW0iyoq4yS55yVTxWXv0OrnOQWuUzpsv32w0FsE7E6OgS/UtCSAQeXO+T448+JXVbJClQDQNM9Pimdfzz/znGzHF6//UVmIbxfKwbyGtvzg4dZUexK8KlGnQy1na/4qiOi5xBSQQ5q/CwtblkCkklhDIs8CwV1M7mCIK5Sf0HZ4=