turbot-runner 0.2.19 → 0.2.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76081147102e8b5f21227dc822dc458834855a30
4
- data.tar.gz: f3ea3e8235ab0ab19a803a5bc08092aa9c427985
3
+ metadata.gz: f570fdd4142ee231aac55e792fc748ddbaf19717
4
+ data.tar.gz: 3f8119df620df1c2e660f2a5be093cae3a0fe982
5
5
  SHA512:
6
- metadata.gz: baa178b3a0ac7d41910840214cbdd0bd26faddb2888682f5aa3f103659795765cf10cab4279c940f87e352bfbcafa01d00b7aeec53ea54e6fe7ca08be134a3eb
7
- data.tar.gz: 95b00b90422db03b7a88e639397624f1a8b74f83ec94960862251f120483f52acc012f16a3dd76da9ad45f91f7941d229ecdb5c07a786cc4653bdf3a0c40156d
6
+ metadata.gz: 941d062afee4a4cf7d92557b2c7434f91c5acf0c85861bb1936b6415f206d292b19549d622a5003291176efde2769a06bf0764ef975c206fe09d58e1af12dae4
7
+ data.tar.gz: 9a0a15ce2bfe5e6101082da35f3a7c084a711a218f725353f6412fcea773b37b873ee80ce597107a184863d1bf6f4c58818f68552127428eb260bc268e557e48
@@ -18,12 +18,9 @@ module TurbotRunner
18
18
  else
19
19
  record = Openc::JsonSchema.convert_dates(schema_path, JSON.parse(line))
20
20
 
21
- # TODO Document why we aren't passing retrieved_at to the validator.
22
- record_to_validate = record.select {|k, v| k != 'retrieved_at'}
23
-
24
21
  error_message = Validator.validate(
25
22
  @data_type,
26
- record_to_validate,
23
+ record,
27
24
  @identifying_fields,
28
25
  @seen_uids
29
26
  )
@@ -1,3 +1,3 @@
1
1
  module TurbotRunner
2
- VERSION = '0.2.19'
2
+ VERSION = '0.2.20'
3
3
  end
@@ -21,6 +21,10 @@
21
21
  "$ref": "includes/financial-payment-data-object.json"
22
22
  },
23
23
  "additionalItems": false
24
+ },
25
+ "retrieved_at": {
26
+ "type": "string",
27
+ "format": "date"
24
28
  }
25
29
  },
26
30
  "additionalProperties": false,
@@ -7,9 +7,13 @@
7
7
  },
8
8
  "register": {"$ref": "#/definitions/register"},
9
9
  "identifier": {
10
- "description": "A unique identifier given to the register entry by the register. In some cases – e.g. Charity Register for England & Wales, these identifiers (in this case known as the 'charity number') are used outside of the context of the register",
10
+ "description": "A unique identifier used by the register to identifier the register entry. In some cases – e.g. Charity Register for England & Wales, these identifiers (in this case known as the 'charity number') are used outside of the context of the register",
11
11
  "type": "string"
12
12
  },
13
+ "identifier_system_code": {
14
+ "type": "string",
15
+ "description": "A code representing the identifier scheme. Some examples of this are us_fein (US Federal tax number), us_sec_cik (US Securities and Exchange Commission CIK), uk_ew_cc (Charity Commission of England & Wales), lei (Global Legal Entity Identifier System). Not all registers have identifier_systems, and some registers may use identifiers from other identifiers systems (e.g. the EBA is planning on using LEI in its bank register)"
16
+ },
13
17
  "start_date": {
14
18
  "description": "The date the register entry started, e.g. the date the entity was registered from, or appeared on the register the first time",
15
19
  "type": "string",
@@ -54,6 +54,10 @@
54
54
  "description": "The jurisdiction of the body that made the payment, eg. UK, France, Delaware, Manchester",
55
55
  "type": "string"
56
56
  },
57
+ "retrieved_at": {
58
+ "type": "string",
59
+ "format": "date"
60
+ },
57
61
  "more_details_url": {
58
62
  "description": "A url from which more details can be seen (may be the same as the source_url)",
59
63
  "type": [
@@ -63,6 +63,10 @@
63
63
  "description": "Status of the licence",
64
64
  "type": "string"
65
65
  },
66
+ "retrieved_at": {
67
+ "type": "string",
68
+ "format": "date"
69
+ },
66
70
  "category": {
67
71
  "description": "Category of licence",
68
72
  "type": "string",
@@ -31,6 +31,10 @@
31
31
  "LOW"
32
32
  ]
33
33
  },
34
+ "retrieved_at": {
35
+ "type": "string",
36
+ "format": "date"
37
+ },
34
38
  "parent_name": {
35
39
  "description": "Name of the controlling company",
36
40
  "type": "string",
@@ -21,6 +21,10 @@
21
21
  "end_date_type": {
22
22
  "type": "string"
23
23
  },
24
+ "retrieved_at": {
25
+ "type": "string",
26
+ "format": "date"
27
+ },
24
28
  "source_jurisdiction": {
25
29
  "description": "Jurisdiction of the source of the data",
26
30
  "type": "string"
@@ -126,25 +126,6 @@ describe TurbotRunner::Processor do
126
126
  expect(@handler).to receive(:handle_valid_record).with(converted_record, @data_type)
127
127
  @processor.process(record.to_json)
128
128
  end
129
-
130
- it 'does not pass retrieved_at to validator' do
131
- record = {
132
- 'sample_date' => '2014-06-01',
133
- 'retrieved_at' => '2014-06-01 12:34:56 +0000',
134
- 'source_url' => 'http://example.com/123',
135
- 'number' => 123
136
- }
137
-
138
- expected_record_to_validate = {
139
- 'sample_date' => '2014-06-01',
140
- 'source_url' => 'http://example.com/123',
141
- 'number' => 123
142
- }
143
-
144
- expect(TurbotRunner::Validator).to receive(:validate).
145
- with('primary data', expected_record_to_validate, ['number'], Set.new)
146
- @processor.process(record.to_json)
147
- end
148
129
  end
149
130
 
150
131
  it 'can handle schemas with $refs' do
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.2.19
4
+ version: 0.2.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenCorporates
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-24 00:00:00.000000000 Z
11
+ date: 2016-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -226,3 +226,4 @@ signing_key:
226
226
  specification_version: 4
227
227
  summary: Utilities for running bots with Turbot
228
228
  test_files: []
229
+ has_rdoc: