turbot-runner 0.1.27 → 0.1.28

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWIwOWIxZjA3YTkxYWE4MjY2N2VhYzI2MzAxNGJkMGI2N2Y5NGM5Zg==
4
+ MjYzZDlmY2UyY2RkYWQ0MzI5YTAxNjVmNGM4NWJlZWM5MWNmNGZjMg==
5
5
  data.tar.gz: !binary |-
6
- NGZjZmUxMzk1ZWJlN2MxZGY5MGUxM2M4NzkyMjE1YTA0ZTFkY2M3Zg==
6
+ MGQyN2QwNjI5YTI2YzdiOTBhMzIxOWJiODdmZjhlM2NlNGEzYjBkNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MDE3NmM3MjY2ODhlMzM4NmU1ZDdkM2RkOGFhNmU5MzNhZjc3MTY3MDQyZjA4
10
- ZTBlNDFmZTRkMDBhYWY3OWY3Mjg1Mjk0NjZlZjk4ODVjNGQzNWVlMDVmMGU3
11
- MmUxZWZmZDBkNDdjYWZkY2U1Y2Q2ZmMyOWYxNGYyZWI0ZDU2MTE=
9
+ MzFjNjk5MWNhM2JjNjFlOTEyNzE2M2ZjZjdkOTBiY2VhMDM1ZjYyYTgzYzRl
10
+ ZjkwODM3MjBmNmUxMjM3YWE1ZGM2ZGYyNTFmOGM5N2NjMjJjMmI4YmIyOWFi
11
+ ZmE1NGJjNjM3Yzc3MGQ4YjViODVkYzFiZWJjYWIxYjk4ZmViMmU=
12
12
  data.tar.gz: !binary |-
13
- MDlhNTM3ZWM2NjQ5OTk1MWY2Y2JjZTkyYTMwZTBlMGQ4ZDIxNDczNzZkM2Ex
14
- YmZlZTcwMDgwM2ZlOTM1MzMwZTQ0ZWRhMmE3OTIxNjMxYjY1YzQ5MTRiZTk4
15
- ODIzYjY4ZWUyNjQzMjQwYzJmN2MwN2Q2NmM2NzAxNjM4Mjg1Y2U=
13
+ MTYxZjYyZWIzZWQ3YmY0M2I3MDViZmY5MGE2Y2JkNzVkYWE3ZjQwMDIwYmUw
14
+ OWI1YmZmZmI3YjhhM2I2NzhkZjNmM2IzZTQ4MTNjNDliMDM1YTQzMzcwODgx
15
+ ODdjYWU3YjljZGMwODk1YjFkZDY3OTVmZDM2NGQ3NzNiYzM1Yjg=
@@ -19,26 +19,7 @@ module TurbotRunner
19
19
  message = "There were no values provided for any of the identifying fields: #{identifying_fields.join(', ')}"
20
20
  end
21
21
  else
22
- message = case error[:type]
23
- when :missing
24
- "Missing required property: #{error[:path]}"
25
- when :one_of_no_matches
26
- "No match for property: #{error[:path]}"
27
- when :one_of_many_matches
28
- "Multiple possible matches for property: #{error[:path]}"
29
- when :too_short
30
- "Property too short: #{error[:path]} (must be at least #{error[:length]} characters)"
31
- when :too_long
32
- "Property too long: #{error[:path]} (must be at most #{error[:length]} characters)"
33
- when :type_mismatch
34
- "Property of wrong type: #{error[:path]} (must be of type #{error[:allowed_types].join(', ')})"
35
- when :enum_mismatch
36
- "Property not an allowed value: #{error[:path]} (must be one of #{error[:allowed_values].join(', ')})"
37
- when :format_mismatch
38
- "Property not of expected format: #{error[:path]} (must be of format #{error[:expected_format]})"
39
- when :unknown
40
- error[:message]
41
- end
22
+ message = error[:message]
42
23
  end
43
24
 
44
25
  message
@@ -1,3 +1,3 @@
1
1
  module TurbotRunner
2
- VERSION = '0.1.27'
2
+ VERSION = '0.1.28'
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -3,7 +3,12 @@ require 'turbot_runner'
3
3
  RSpec::Matchers.define(:fail_validation_with) do |expected_error|
4
4
  match do |record|
5
5
  identifying_fields = ['number']
6
- expect(TurbotRunner::Validator.validate('primary-data', record, identifying_fields)).to eq(expected_error)
6
+ @error = TurbotRunner::Validator.validate('primary-data', record, identifying_fields)
7
+ expect(@error).to eq(expected_error)
8
+ end
9
+
10
+ failure_message do |actual|
11
+ "Expected error to be #{expected_error}, but was #{@error}"
7
12
  end
8
13
  end
9
14
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbot-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.27
4
+ version: 0.1.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenCorporates
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2015-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: openc-json_schema
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.0.5
19
+ version: 0.0.8
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
- version: 0.0.5
26
+ version: 0.0.8
27
27
  description:
28
28
  email: bots@opencorporates.com
29
29
  executables: []