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 +4 -4
- data/lib/turbot_runner/processor.rb +1 -4
- data/lib/turbot_runner/version.rb +1 -1
- data/schema/schemas/financial-payment-schema.json +4 -0
- data/schema/schemas/register-entry-schema.json +5 -1
- data/schema/schemas/simple-financial-payment-schema.json +4 -0
- data/schema/schemas/simple-licence-schema.json +4 -0
- data/schema/schemas/simple-subsidiary-schema.json +4 -0
- data/schema/schemas/subsidiary-relationship-schema.json +4 -0
- data/spec/lib/processor_spec.rb +0 -19
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f570fdd4142ee231aac55e792fc748ddbaf19717
|
4
|
+
data.tar.gz: 3f8119df620df1c2e660f2a5be093cae3a0fe982
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
23
|
+
record,
|
27
24
|
@identifying_fields,
|
28
25
|
@seen_uids
|
29
26
|
)
|
@@ -7,9 +7,13 @@
|
|
7
7
|
},
|
8
8
|
"register": {"$ref": "#/definitions/register"},
|
9
9
|
"identifier": {
|
10
|
-
"description": "A unique identifier
|
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": [
|
data/spec/lib/processor_spec.rb
CHANGED
@@ -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.
|
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-
|
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:
|