csvlint 1.0.0 → 1.2.0
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 +4 -4
- data/.github/dependabot.yml +4 -0
- data/.github/workflows/push.yml +14 -2
- data/.pre-commit-hooks.yaml +5 -0
- data/.ruby-version +1 -1
- data/.standard_todo.yml +43 -0
- data/CHANGELOG.md +84 -32
- data/Dockerfile +16 -0
- data/Gemfile +2 -2
- data/README.md +30 -9
- data/Rakefile +7 -7
- data/csvlint.gemspec +14 -16
- data/docker_notes_for_windows.txt +20 -0
- data/features/step_definitions/cli_steps.rb +11 -11
- data/features/step_definitions/information_steps.rb +4 -4
- data/features/step_definitions/parse_csv_steps.rb +11 -11
- data/features/step_definitions/schema_validation_steps.rb +10 -10
- data/features/step_definitions/sources_steps.rb +1 -1
- data/features/step_definitions/validation_errors_steps.rb +19 -19
- data/features/step_definitions/validation_info_steps.rb +9 -9
- data/features/step_definitions/validation_warnings_steps.rb +11 -11
- data/features/support/aruba.rb +6 -6
- data/features/support/earl_formatter.rb +39 -39
- data/features/support/env.rb +10 -11
- data/features/support/load_tests.rb +107 -103
- data/features/support/webmock.rb +2 -2
- data/lib/csvlint/cli.rb +133 -130
- data/lib/csvlint/csvw/column.rb +279 -280
- data/lib/csvlint/csvw/date_format.rb +90 -92
- data/lib/csvlint/csvw/metadata_error.rb +1 -3
- data/lib/csvlint/csvw/number_format.rb +40 -32
- data/lib/csvlint/csvw/property_checker.rb +714 -717
- data/lib/csvlint/csvw/table.rb +49 -52
- data/lib/csvlint/csvw/table_group.rb +24 -23
- data/lib/csvlint/error_collector.rb +2 -0
- data/lib/csvlint/error_message.rb +0 -1
- data/lib/csvlint/field.rb +153 -141
- data/lib/csvlint/schema.rb +34 -42
- data/lib/csvlint/validate.rb +161 -143
- data/lib/csvlint/version.rb +1 -1
- data/lib/csvlint.rb +22 -23
- data/spec/csvw/column_spec.rb +15 -16
- data/spec/csvw/date_format_spec.rb +5 -7
- data/spec/csvw/number_format_spec.rb +2 -4
- data/spec/csvw/table_group_spec.rb +103 -105
- data/spec/csvw/table_spec.rb +71 -73
- data/spec/field_spec.rb +116 -121
- data/spec/schema_spec.rb +129 -139
- data/spec/spec_helper.rb +6 -6
- data/spec/validator_spec.rb +167 -190
- metadata +23 -55
@@ -12,31 +12,31 @@ Given(/^it is stored at the url "(.*?)"$/) do |url|
|
|
12
12
|
charset = @encoding || "UTF-8"
|
13
13
|
headers = {"Content-Type" => "#{content_type}; charset=#{charset}"}
|
14
14
|
headers["Link"] = @link if @link
|
15
|
-
stub_request(:get, url).to_return(:
|
16
|
-
stub_request(:get, URI.join(url,
|
17
|
-
stub_request(:get, url +
|
18
|
-
stub_request(:get, URI.join(url,
|
15
|
+
stub_request(:get, url).to_return(status: 200, body: @csv, headers: headers)
|
16
|
+
stub_request(:get, URI.join(url, "/.well-known/csvm")).to_return(status: 404)
|
17
|
+
stub_request(:get, url + "-metadata.json").to_return(status: 404)
|
18
|
+
stub_request(:get, URI.join(url, "csv-metadata.json")).to_return(status: 404)
|
19
19
|
end
|
20
20
|
|
21
21
|
Given(/^it is stored at the url "(.*?)" with no character set$/) do |url|
|
22
22
|
@url = url
|
23
23
|
content_type = @content_type || "text/csv"
|
24
|
-
stub_request(:get, url).to_return(:
|
25
|
-
stub_request(:get, URI.join(url,
|
26
|
-
stub_request(:get, url +
|
27
|
-
stub_request(:get, URI.join(url,
|
24
|
+
stub_request(:get, url).to_return(status: 200, body: @csv, headers: {"Content-Type" => content_type.to_s})
|
25
|
+
stub_request(:get, URI.join(url, "/.well-known/csvm")).to_return(status: 404)
|
26
|
+
stub_request(:get, url + "-metadata.json").to_return(status: 404)
|
27
|
+
stub_request(:get, URI.join(url, "csv-metadata.json")).to_return(status: 404)
|
28
28
|
end
|
29
29
|
|
30
30
|
When(/^I ask if the CSV is valid$/) do
|
31
31
|
@csv_options ||= default_csv_options
|
32
|
-
@validator = Csvlint::Validator.new(
|
32
|
+
@validator = Csvlint::Validator.new(@url, @csv_options)
|
33
33
|
@valid = @validator.valid?
|
34
34
|
end
|
35
35
|
|
36
36
|
Then(/^I should get the value of true$/) do
|
37
|
-
expect(
|
37
|
+
expect(@valid).to be(true)
|
38
38
|
end
|
39
39
|
|
40
40
|
Then(/^I should get the value of false$/) do
|
41
|
-
expect(
|
41
|
+
expect(@valid).to be(false)
|
42
42
|
end
|
@@ -10,24 +10,24 @@ end
|
|
10
10
|
|
11
11
|
Given(/^I have a metadata file called "([^"]*)"$/) do |filename|
|
12
12
|
@schema_type = :csvw_metadata
|
13
|
-
@schema_json = File.read(
|
13
|
+
@schema_json = File.read(File.join(File.dirname(__FILE__), "..", "fixtures", filename))
|
14
14
|
end
|
15
15
|
|
16
|
-
Given(/^the (schema|metadata) is stored at the url "(.*?)"$/) do |schema_type,schema_url|
|
16
|
+
Given(/^the (schema|metadata) is stored at the url "(.*?)"$/) do |schema_type, schema_url|
|
17
17
|
@schema_url = schema_url
|
18
|
-
stub_request(:get, @schema_url).to_return(:
|
18
|
+
stub_request(:get, @schema_url).to_return(status: 200, body: @schema_json.to_str)
|
19
19
|
end
|
20
20
|
|
21
21
|
Given(/^there is a file at "(.*?)" with the content:$/) do |url, content|
|
22
|
-
stub_request(:get, url).to_return(:
|
22
|
+
stub_request(:get, url).to_return(status: 200, body: content.to_str)
|
23
23
|
end
|
24
24
|
|
25
|
-
Given(/^I have a file called "(.*?)" at the url "(.*?)"$/) do |filename,url|
|
26
|
-
content = File.read(
|
27
|
-
content_type =
|
28
|
-
stub_request(:get, url).to_return(:
|
25
|
+
Given(/^I have a file called "(.*?)" at the url "(.*?)"$/) do |filename, url|
|
26
|
+
content = File.read(File.join(File.dirname(__FILE__), "..", "fixtures", filename))
|
27
|
+
content_type = /.csv$/.match?(filename) ? "text/csv" : "application/csvm+json"
|
28
|
+
stub_request(:get, url).to_return(status: 200, body: content, headers: {"Content-Type" => "#{content_type}; charset=UTF-8"})
|
29
29
|
end
|
30
30
|
|
31
31
|
Given(/^there is no file at the url "(.*?)"$/) do |url|
|
32
|
-
stub_request(:get, url).to_return(:
|
33
|
-
end
|
32
|
+
stub_request(:get, url).to_return(status: 404)
|
33
|
+
end
|
@@ -3,5 +3,5 @@ Given(/^it is parsed as a StringIO$/) do
|
|
3
3
|
end
|
4
4
|
|
5
5
|
Given(/^I parse a file called "(.*?)"$/) do |filename|
|
6
|
-
@url = File.new(
|
6
|
+
@url = File.new(File.join(File.dirname(__FILE__), "..", "fixtures", filename))
|
7
7
|
end
|
@@ -2,14 +2,14 @@ When(/^I ask if there are errors$/) do
|
|
2
2
|
@csv_options ||= default_csv_options
|
3
3
|
|
4
4
|
if @schema_json
|
5
|
-
if @schema_type == :json_table
|
6
|
-
|
5
|
+
@schema = if @schema_type == :json_table
|
6
|
+
Csvlint::Schema.from_json_table(@schema_url || "http://example.org ", JSON.parse(@schema_json))
|
7
7
|
else
|
8
|
-
|
8
|
+
Csvlint::Schema.from_csvw_metadata(@schema_url || "http://example.org ", JSON.parse(@schema_json))
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
@validator = Csvlint::Validator.new(
|
12
|
+
@validator = Csvlint::Validator.new(@url, @csv_options, @schema)
|
13
13
|
@errors = @validator.errors
|
14
14
|
end
|
15
15
|
|
@@ -19,10 +19,10 @@ When(/^I carry out CSVW validation$/) do
|
|
19
19
|
begin
|
20
20
|
if @schema_json
|
21
21
|
json = JSON.parse(@schema_json)
|
22
|
-
if @schema_type == :json_table
|
23
|
-
|
22
|
+
@schema = if @schema_type == :json_table
|
23
|
+
Csvlint::Schema.from_json_table(@schema_url || "http://example.org ", json)
|
24
24
|
else
|
25
|
-
|
25
|
+
Csvlint::Schema.from_csvw_metadata(@schema_url || "http://example.org ", json)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -30,12 +30,12 @@ When(/^I carry out CSVW validation$/) do
|
|
30
30
|
@errors = []
|
31
31
|
@warnings = []
|
32
32
|
@schema.tables.keys.each do |table_url|
|
33
|
-
validator = Csvlint::Validator.new(
|
33
|
+
validator = Csvlint::Validator.new(table_url, @csv_options, @schema)
|
34
34
|
@errors += validator.errors
|
35
35
|
@warnings += validator.warnings
|
36
36
|
end
|
37
37
|
else
|
38
|
-
validator = Csvlint::Validator.new(
|
38
|
+
validator = Csvlint::Validator.new(@url, @csv_options, @schema)
|
39
39
|
@errors = validator.errors
|
40
40
|
@warnings = validator.warnings
|
41
41
|
end
|
@@ -49,42 +49,42 @@ end
|
|
49
49
|
Then(/^there should be errors$/) do
|
50
50
|
# this test is only used for CSVW testing; :invalid_encoding & :line_breaks mask lack of real errors
|
51
51
|
@errors.delete_if { |e| e.instance_of?(Csvlint::ErrorMessage) && [:invalid_encoding, :line_breaks].include?(e.type) }
|
52
|
-
expect(
|
52
|
+
expect(@errors.count).to be > 0
|
53
53
|
end
|
54
54
|
|
55
55
|
Then(/^there should not be errors$/) do
|
56
|
-
expect(
|
56
|
+
expect(@errors.count).to eq(0)
|
57
57
|
end
|
58
58
|
|
59
59
|
Then(/^there should be (\d+) error$/) do |count|
|
60
|
-
expect(
|
60
|
+
expect(@errors.count).to eq(count.to_i)
|
61
61
|
end
|
62
62
|
|
63
63
|
Then(/^that error should have the type "(.*?)"$/) do |type|
|
64
|
-
expect(
|
64
|
+
expect(@errors.first.type).to eq(type.to_sym)
|
65
65
|
end
|
66
66
|
|
67
67
|
Then(/^that error should have the row "(.*?)"$/) do |row|
|
68
|
-
expect(
|
68
|
+
expect(@errors.first.row).to eq(row.to_i)
|
69
69
|
end
|
70
70
|
|
71
71
|
Then(/^that error should have the column "(.*?)"$/) do |column|
|
72
|
-
expect(
|
72
|
+
expect(@errors.first.column).to eq(column.to_i)
|
73
73
|
end
|
74
74
|
|
75
75
|
Then(/^that error should have the content "(.*)"$/) do |content|
|
76
|
-
expect(
|
76
|
+
expect(@errors.first.content.chomp).to eq(content.chomp)
|
77
77
|
end
|
78
78
|
|
79
79
|
Then(/^that error should have no content$/) do
|
80
|
-
expect(
|
80
|
+
expect(@errors.first.content).to eq(nil)
|
81
81
|
end
|
82
82
|
|
83
83
|
Given(/^I have a CSV that doesn't exist$/) do
|
84
84
|
@url = "http//www.example.com/fake-csv.csv"
|
85
|
-
stub_request(:get, @url).to_return(:
|
85
|
+
stub_request(:get, @url).to_return(status: 404)
|
86
86
|
end
|
87
87
|
|
88
88
|
Then(/^there should be no "(.*?)" errors$/) do |type|
|
89
|
-
@errors.each
|
89
|
+
@errors.each { |error| error.type.should_not == type.to_sym }
|
90
90
|
end
|
@@ -1,22 +1,22 @@
|
|
1
1
|
Given(/^I ask if there are info messages$/) do
|
2
2
|
@csv_options ||= default_csv_options
|
3
|
-
|
3
|
+
|
4
4
|
if @schema_json
|
5
|
-
if @schema_type == :json_table
|
6
|
-
|
5
|
+
@schema = if @schema_type == :json_table
|
6
|
+
Csvlint::Schema.from_json_table(@schema_url || "http://example.org ", JSON.parse(@schema_json))
|
7
7
|
else
|
8
|
-
|
8
|
+
Csvlint::Schema.from_csvw_metadata(@schema_url || "http://example.org ", JSON.parse(@schema_json))
|
9
9
|
end
|
10
10
|
end
|
11
|
-
|
12
|
-
@validator = Csvlint::Validator.new(
|
11
|
+
|
12
|
+
@validator = Csvlint::Validator.new(@url, @csv_options, @schema)
|
13
13
|
@info_messages = @validator.info_messages
|
14
14
|
end
|
15
15
|
|
16
16
|
Then(/^there should be (\d+) info messages?$/) do |num|
|
17
|
-
expect(
|
17
|
+
expect(@info_messages.count).to eq(num.to_i)
|
18
18
|
end
|
19
19
|
|
20
20
|
Then(/^one of the messages should have the type "(.*?)"$/) do |msg_type|
|
21
|
-
expect(
|
22
|
-
end
|
21
|
+
expect(@info_messages.find { |x| x.type == msg_type.to_sym }).to be_present
|
22
|
+
end
|
@@ -12,35 +12,35 @@ Given(/^I do not set an encoding header$/) do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
Given(/^I have a CSV file called "(.*?)"$/) do |filename|
|
15
|
-
@csv = File.read(
|
15
|
+
@csv = File.read(File.join(File.dirname(__FILE__), "..", "fixtures", filename))
|
16
16
|
end
|
17
17
|
|
18
18
|
When(/^I ask if there are warnings$/) do
|
19
19
|
@csv_options ||= default_csv_options
|
20
20
|
if @schema_json
|
21
|
-
if @schema_type == :json_table
|
22
|
-
|
21
|
+
@schema = if @schema_type == :json_table
|
22
|
+
Csvlint::Schema.from_json_table(@schema_url || "http://example.org ", JSON.parse(@schema_json))
|
23
23
|
else
|
24
|
-
|
24
|
+
Csvlint::Schema.from_csvw_metadata(@schema_url || "http://example.org ", JSON.parse(@schema_json))
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
@validator = Csvlint::Validator.new(
|
28
|
+
@validator = Csvlint::Validator.new(@url, @csv_options, @schema)
|
29
29
|
@warnings = @validator.warnings
|
30
30
|
end
|
31
31
|
|
32
32
|
Then(/^there should be warnings$/) do
|
33
|
-
expect(
|
33
|
+
expect(@warnings.count).to be > 0
|
34
34
|
end
|
35
35
|
|
36
36
|
Then(/^there should not be warnings$/) do
|
37
37
|
# this test is only used for CSVW testing, and :inconsistent_values warnings don't count in CSVW
|
38
38
|
@warnings.delete_if { |w| [:inconsistent_values, :check_options].include?(w.type) }
|
39
|
-
expect(
|
39
|
+
expect(@warnings.count).to eq(0)
|
40
40
|
end
|
41
41
|
|
42
42
|
Then(/^there should be (\d+) warnings$/) do |count|
|
43
|
-
expect(
|
43
|
+
expect(@warnings.count).to eq(count.to_i)
|
44
44
|
end
|
45
45
|
|
46
46
|
Given(/^the content type is set to "(.*?)"$/) do |type|
|
@@ -48,13 +48,13 @@ Given(/^the content type is set to "(.*?)"$/) do |type|
|
|
48
48
|
end
|
49
49
|
|
50
50
|
Then(/^that warning should have the row "(.*?)"$/) do |row|
|
51
|
-
expect(
|
51
|
+
expect(@warnings.first.row).to eq(row.to_i)
|
52
52
|
end
|
53
53
|
|
54
54
|
Then(/^that warning should have the column "(.*?)"$/) do |column|
|
55
|
-
expect(
|
55
|
+
expect(@warnings.first.column).to eq(column.to_i)
|
56
56
|
end
|
57
57
|
|
58
58
|
Then(/^that warning should have the type "(.*?)"$/) do |type|
|
59
|
-
expect(
|
59
|
+
expect(@warnings.first.type).to eq(type.to_sym)
|
60
60
|
end
|
data/features/support/aruba.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "aruba"
|
2
|
+
require "aruba/cucumber"
|
3
3
|
|
4
|
-
require
|
4
|
+
require "csvlint/cli"
|
5
5
|
|
6
6
|
module Csvlint
|
7
7
|
class CliRunner
|
8
8
|
# Allow everything fun to be injected from the outside while defaulting to normal implementations.
|
9
|
-
def initialize(argv, stdin =
|
9
|
+
def initialize(argv, stdin = $stdin, stdout = $stdout, stderr = $stderr, kernel = Kernel)
|
10
10
|
@argv, @stdin, @stdout, @stderr, @kernel = argv, stdin, stdout, stderr, kernel
|
11
11
|
end
|
12
12
|
|
@@ -22,11 +22,11 @@ module Csvlint
|
|
22
22
|
|
23
23
|
# Thor::Base#start does not have a return value, assume success if no exception is raised.
|
24
24
|
0
|
25
|
-
rescue
|
25
|
+
rescue => e
|
26
26
|
# The ruby interpreter would pipe this to STDERR and exit 1 in the case of an unhandled exception
|
27
27
|
b = e.backtrace
|
28
28
|
@stderr.puts("#{b.shift}: #{e.message} (#{e.class})")
|
29
|
-
@stderr.puts(b.map{|s| "\tfrom #{s}"}.join("\n"))
|
29
|
+
@stderr.puts(b.map { |s| "\tfrom #{s}" }.join("\n"))
|
30
30
|
1
|
31
31
|
rescue SystemExit => e
|
32
32
|
e.status
|
@@ -1,33 +1,33 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "rdf"
|
2
|
+
require "rdf/turtle"
|
3
3
|
|
4
4
|
class EarlFormatter
|
5
5
|
def initialize(step_mother, io, options)
|
6
6
|
output = RDF::Resource.new("")
|
7
7
|
@graph = RDF::Graph.new
|
8
|
-
@graph << [
|
9
|
-
@graph << [
|
10
|
-
@graph << [
|
11
|
-
@graph << [
|
12
|
-
@graph << [
|
13
|
-
@graph << [
|
14
|
-
@graph << [
|
15
|
-
@graph << [
|
16
|
-
@graph << [
|
17
|
-
@graph << [
|
18
|
-
@graph << [
|
19
|
-
@graph << [
|
20
|
-
@graph << [
|
21
|
-
@graph << [
|
22
|
-
@graph << [
|
23
|
-
@graph << [
|
24
|
-
@graph << [
|
25
|
-
@graph << [
|
26
|
-
@graph << [
|
27
|
-
@graph << [
|
28
|
-
@graph << [
|
29
|
-
@graph << [
|
30
|
-
@graph << [
|
8
|
+
@graph << [CSVLINT, RDF.type, RDF::DOAP.Project]
|
9
|
+
@graph << [CSVLINT, RDF.type, EARL.TestSubject]
|
10
|
+
@graph << [CSVLINT, RDF.type, EARL.Software]
|
11
|
+
@graph << [CSVLINT, RDF::DOAP.name, "csvlint"]
|
12
|
+
@graph << [CSVLINT, RDF::DC.title, "csvlint"]
|
13
|
+
@graph << [CSVLINT, RDF::DOAP.description, "CSV validator"]
|
14
|
+
@graph << [CSVLINT, RDF::DOAP.homepage, RDF::Resource.new("https://github.com/theodi/csvlint.rb")]
|
15
|
+
@graph << [CSVLINT, RDF::DOAP.license, RDF::Resource.new("https://raw.githubusercontent.com/theodi/csvlint.rb/master/LICENSE.md")]
|
16
|
+
@graph << [CSVLINT, RDF::DOAP["programming-language"], "Ruby"]
|
17
|
+
@graph << [CSVLINT, RDF::DOAP.implements, RDF::Resource.new("http://www.w3.org/TR/tabular-data-model/")]
|
18
|
+
@graph << [CSVLINT, RDF::DOAP.implements, RDF::Resource.new("http://www.w3.org/TR/tabular-metadata/")]
|
19
|
+
@graph << [CSVLINT, RDF::DOAP.developer, ODI]
|
20
|
+
@graph << [CSVLINT, RDF::DOAP.maintainer, ODI]
|
21
|
+
@graph << [CSVLINT, RDF::DOAP.documenter, ODI]
|
22
|
+
@graph << [CSVLINT, RDF::FOAF.maker, ODI]
|
23
|
+
@graph << [CSVLINT, RDF::DC.creator, ODI]
|
24
|
+
@graph << [output, RDF::FOAF["primaryTopic"], CSVLINT]
|
25
|
+
@graph << [output, RDF::DC.issued, DateTime.now]
|
26
|
+
@graph << [output, RDF::FOAF.maker, ODI]
|
27
|
+
@graph << [ODI, RDF.type, RDF::FOAF.Organization]
|
28
|
+
@graph << [ODI, RDF.type, EARL.Assertor]
|
29
|
+
@graph << [ODI, RDF::FOAF.name, "Open Data Institute"]
|
30
|
+
@graph << [ODI, RDF::FOAF.homepage, "https://theodi.org/"]
|
31
31
|
end
|
32
32
|
|
33
33
|
def scenario_name(keyword, name, file_colon_line, source_indent)
|
@@ -40,27 +40,27 @@ class EarlFormatter
|
|
40
40
|
passed = false unless s.status == :passed
|
41
41
|
end
|
42
42
|
a = RDF::Node.new
|
43
|
-
@graph << [
|
44
|
-
@graph << [
|
45
|
-
@graph << [
|
46
|
-
@graph << [
|
47
|
-
@graph << [
|
43
|
+
@graph << [a, RDF.type, EARL.Assertion]
|
44
|
+
@graph << [a, EARL.assertedBy, ODI]
|
45
|
+
@graph << [a, EARL.subject, CSVLINT]
|
46
|
+
@graph << [a, EARL.test, @test]
|
47
|
+
@graph << [a, EARL.mode, EARL.automatic]
|
48
48
|
r = RDF::Node.new
|
49
|
-
@graph << [
|
50
|
-
@graph << [
|
51
|
-
@graph << [
|
52
|
-
@graph << [
|
49
|
+
@graph << [a, EARL.result, r]
|
50
|
+
@graph << [r, RDF.type, EARL.TestResult]
|
51
|
+
@graph << [r, EARL.outcome, passed ? EARL.passed : EARL.failed]
|
52
|
+
@graph << [r, RDF::DC.date, DateTime.now]
|
53
53
|
end
|
54
54
|
|
55
55
|
def after_features(features)
|
56
|
-
RDF::Writer.for(:ttl).open("csvlint-earl.ttl", {
|
56
|
+
RDF::Writer.for(:ttl).open("csvlint-earl.ttl", {prefixes: {"earl" => EARL}, standard_prefixes: true, canonicalize: true, literal_shorthand: true}) do |writer|
|
57
57
|
writer << @graph
|
58
|
-
end
|
58
|
+
end
|
59
59
|
end
|
60
60
|
|
61
61
|
private
|
62
|
-
EARL = RDF::Vocabulary.new("http://www.w3.org/ns/earl#")
|
63
|
-
ODI = RDF::Resource.new("https://theodi.org/")
|
64
|
-
CSVLINT = RDF::Resource.new("https://github.com/theodi/csvlint.rb")
|
65
62
|
|
63
|
+
EARL = RDF::Vocabulary.new("http://www.w3.org/ns/earl#")
|
64
|
+
ODI = RDF::Resource.new("https://theodi.org/")
|
65
|
+
CSVLINT = RDF::Resource.new("https://github.com/theodi/csvlint.rb")
|
66
66
|
end
|
data/features/support/env.rb
CHANGED
@@ -1,23 +1,22 @@
|
|
1
|
-
require
|
2
|
-
Coveralls.wear_merged!(
|
1
|
+
require "coveralls"
|
2
|
+
Coveralls.wear_merged!("test_frameworks")
|
3
3
|
|
4
|
-
$:.unshift File.join(
|
4
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "..", "lib")
|
5
5
|
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
9
|
-
require
|
6
|
+
require "rspec/expectations"
|
7
|
+
require "cucumber/rspec/doubles"
|
8
|
+
require "csvlint"
|
9
|
+
require "byebug"
|
10
10
|
|
11
|
-
require
|
11
|
+
require "spork"
|
12
12
|
|
13
13
|
Spork.each_run do
|
14
|
-
require
|
14
|
+
require "csvlint"
|
15
15
|
end
|
16
16
|
|
17
17
|
class CustomWorld
|
18
18
|
def default_csv_options
|
19
|
-
|
20
|
-
}
|
19
|
+
{}
|
21
20
|
end
|
22
21
|
end
|
23
22
|
|