csvlint 0.0.1

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 +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +22 -0
  4. data/.travis.yml +10 -0
  5. data/Gemfile +7 -0
  6. data/LICENSE.md +22 -0
  7. data/README.md +214 -0
  8. data/Rakefile +17 -0
  9. data/bin/create_schema +32 -0
  10. data/bin/csvlint +52 -0
  11. data/csvlint.gemspec +39 -0
  12. data/features/check_format.feature +46 -0
  13. data/features/csv_options.feature +35 -0
  14. data/features/fixtures/cr-line-endings.csv +1 -0
  15. data/features/fixtures/crlf-line-endings.csv +3 -0
  16. data/features/fixtures/inconsistent-line-endings.csv +2 -0
  17. data/features/fixtures/invalid-byte-sequence.csv +24 -0
  18. data/features/fixtures/lf-line-endings.csv +3 -0
  19. data/features/fixtures/spreadsheet.xls +0 -0
  20. data/features/fixtures/title-row.csv +4 -0
  21. data/features/fixtures/valid.csv +3 -0
  22. data/features/fixtures/windows-line-endings.csv +2 -0
  23. data/features/information.feature +22 -0
  24. data/features/parse_csv.feature +90 -0
  25. data/features/schema_validation.feature +63 -0
  26. data/features/sources.feature +18 -0
  27. data/features/step_definitions/csv_options_steps.rb +19 -0
  28. data/features/step_definitions/information_steps.rb +13 -0
  29. data/features/step_definitions/parse_csv_steps.rb +30 -0
  30. data/features/step_definitions/schema_validation_steps.rb +7 -0
  31. data/features/step_definitions/sources_steps.rb +7 -0
  32. data/features/step_definitions/validation_errors_steps.rb +43 -0
  33. data/features/step_definitions/validation_info_steps.rb +18 -0
  34. data/features/step_definitions/validation_warnings_steps.rb +46 -0
  35. data/features/support/env.rb +30 -0
  36. data/features/support/webmock.rb +1 -0
  37. data/features/validation_errors.feature +151 -0
  38. data/features/validation_info.feature +24 -0
  39. data/features/validation_warnings.feature +74 -0
  40. data/lib/csvlint.rb +13 -0
  41. data/lib/csvlint/error_collector.rb +43 -0
  42. data/lib/csvlint/error_message.rb +15 -0
  43. data/lib/csvlint/field.rb +102 -0
  44. data/lib/csvlint/schema.rb +69 -0
  45. data/lib/csvlint/types.rb +113 -0
  46. data/lib/csvlint/validate.rb +253 -0
  47. data/lib/csvlint/version.rb +3 -0
  48. data/lib/csvlint/wrapped_io.rb +39 -0
  49. data/spec/field_spec.rb +247 -0
  50. data/spec/schema_spec.rb +149 -0
  51. data/spec/spec_helper.rb +20 -0
  52. data/spec/validator_spec.rb +279 -0
  53. metadata +367 -0
metadata ADDED
@@ -0,0 +1,367 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: csvlint
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - pezholio
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-05-14 00:00:00.000000000 Z
12
+ dependencies:
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
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: open_uri_redirections
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: activesupport
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: addressable
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: bundler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '1.3'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '1.3'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rake
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: cucumber
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: simplecov-rcov
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: spork
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: webmock
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - '>='
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: rspec
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - '>='
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - '>='
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: rspec-pride
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - '>='
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - '>='
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: rspec-expectations
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - '>='
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - '>='
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: coveralls
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - '>='
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - '>='
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: pry
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - '>='
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - '>='
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
251
+ description: CSV Validator
252
+ email:
253
+ - pezholio@gmail.com
254
+ executables:
255
+ - create_schema
256
+ - csvlint
257
+ extensions: []
258
+ extra_rdoc_files: []
259
+ files:
260
+ - .coveralls.yml
261
+ - .gitignore
262
+ - .travis.yml
263
+ - Gemfile
264
+ - LICENSE.md
265
+ - README.md
266
+ - Rakefile
267
+ - bin/create_schema
268
+ - bin/csvlint
269
+ - csvlint.gemspec
270
+ - features/check_format.feature
271
+ - features/csv_options.feature
272
+ - features/fixtures/cr-line-endings.csv
273
+ - features/fixtures/crlf-line-endings.csv
274
+ - features/fixtures/inconsistent-line-endings.csv
275
+ - features/fixtures/invalid-byte-sequence.csv
276
+ - features/fixtures/lf-line-endings.csv
277
+ - features/fixtures/spreadsheet.xls
278
+ - features/fixtures/title-row.csv
279
+ - features/fixtures/valid.csv
280
+ - features/fixtures/windows-line-endings.csv
281
+ - features/information.feature
282
+ - features/parse_csv.feature
283
+ - features/schema_validation.feature
284
+ - features/sources.feature
285
+ - features/step_definitions/csv_options_steps.rb
286
+ - features/step_definitions/information_steps.rb
287
+ - features/step_definitions/parse_csv_steps.rb
288
+ - features/step_definitions/schema_validation_steps.rb
289
+ - features/step_definitions/sources_steps.rb
290
+ - features/step_definitions/validation_errors_steps.rb
291
+ - features/step_definitions/validation_info_steps.rb
292
+ - features/step_definitions/validation_warnings_steps.rb
293
+ - features/support/env.rb
294
+ - features/support/webmock.rb
295
+ - features/validation_errors.feature
296
+ - features/validation_info.feature
297
+ - features/validation_warnings.feature
298
+ - lib/csvlint.rb
299
+ - lib/csvlint/error_collector.rb
300
+ - lib/csvlint/error_message.rb
301
+ - lib/csvlint/field.rb
302
+ - lib/csvlint/schema.rb
303
+ - lib/csvlint/types.rb
304
+ - lib/csvlint/validate.rb
305
+ - lib/csvlint/version.rb
306
+ - lib/csvlint/wrapped_io.rb
307
+ - spec/field_spec.rb
308
+ - spec/schema_spec.rb
309
+ - spec/spec_helper.rb
310
+ - spec/validator_spec.rb
311
+ homepage: ''
312
+ licenses:
313
+ - MIT
314
+ metadata: {}
315
+ post_install_message:
316
+ rdoc_options: []
317
+ require_paths:
318
+ - lib
319
+ required_ruby_version: !ruby/object:Gem::Requirement
320
+ requirements:
321
+ - - '>='
322
+ - !ruby/object:Gem::Version
323
+ version: '0'
324
+ required_rubygems_version: !ruby/object:Gem::Requirement
325
+ requirements:
326
+ - - '>='
327
+ - !ruby/object:Gem::Version
328
+ version: '0'
329
+ requirements: []
330
+ rubyforge_project:
331
+ rubygems_version: 2.2.2
332
+ signing_key:
333
+ specification_version: 4
334
+ summary: CSV Validator
335
+ test_files:
336
+ - features/check_format.feature
337
+ - features/csv_options.feature
338
+ - features/fixtures/cr-line-endings.csv
339
+ - features/fixtures/crlf-line-endings.csv
340
+ - features/fixtures/inconsistent-line-endings.csv
341
+ - features/fixtures/invalid-byte-sequence.csv
342
+ - features/fixtures/lf-line-endings.csv
343
+ - features/fixtures/spreadsheet.xls
344
+ - features/fixtures/title-row.csv
345
+ - features/fixtures/valid.csv
346
+ - features/fixtures/windows-line-endings.csv
347
+ - features/information.feature
348
+ - features/parse_csv.feature
349
+ - features/schema_validation.feature
350
+ - features/sources.feature
351
+ - features/step_definitions/csv_options_steps.rb
352
+ - features/step_definitions/information_steps.rb
353
+ - features/step_definitions/parse_csv_steps.rb
354
+ - features/step_definitions/schema_validation_steps.rb
355
+ - features/step_definitions/sources_steps.rb
356
+ - features/step_definitions/validation_errors_steps.rb
357
+ - features/step_definitions/validation_info_steps.rb
358
+ - features/step_definitions/validation_warnings_steps.rb
359
+ - features/support/env.rb
360
+ - features/support/webmock.rb
361
+ - features/validation_errors.feature
362
+ - features/validation_info.feature
363
+ - features/validation_warnings.feature
364
+ - spec/field_spec.rb
365
+ - spec/schema_spec.rb
366
+ - spec/spec_helper.rb
367
+ - spec/validator_spec.rb