openc_bot 0.0.27 → 0.0.46
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 +5 -13
- data/.travis.yml +1 -0
- data/Gemfile +2 -0
- data/lib/openc_bot.rb +16 -1
- data/lib/openc_bot/company_fetcher_bot.rb +50 -0
- data/lib/openc_bot/helpers/register_methods.rb +59 -15
- data/lib/openc_bot/tasks.rb +15 -2
- data/lib/openc_bot/templates/spec/spec_helper.rb +4 -0
- data/lib/openc_bot/version.rb +1 -1
- data/openc_bot.gemspec +6 -3
- data/spec/lib/company_fetcher_bot_spec.rb +23 -0
- data/spec/lib/helpers/register_methods_spec.rb +120 -2
- data/spec/lib/openc_bot_spec.rb +14 -1
- data/spec/simple_openc_bot_spec.rb +1 -0
- data/spec/spec_helper.rb +3 -1
- metadata +43 -220
- data/schemas/.gitignore +0 -13
- data/schemas/.travis.yml +0 -5
- data/schemas/Gemfile +0 -9
- data/schemas/README.md +0 -2
- data/schemas/Rakefile +0 -46
- data/schemas/lib/base-statement.json +0 -22
- data/schemas/lib/snippets/financial-payment-base.json +0 -4
- data/schemas/lib/snippets/licence-base.json +0 -4
- data/schemas/schemas/company-schema.json +0 -183
- data/schemas/schemas/financial-payment-schema.json +0 -27
- data/schemas/schemas/includes/address.json +0 -23
- data/schemas/schemas/includes/alternative_name.json +0 -13
- data/schemas/schemas/includes/company.json +0 -16
- data/schemas/schemas/includes/filing.json +0 -20
- data/schemas/schemas/includes/financial-payment-data-object.json +0 -60
- data/schemas/schemas/includes/industry_code.json +0 -16
- data/schemas/schemas/includes/licence-data-object.json +0 -36
- data/schemas/schemas/includes/officer.json +0 -50
- data/schemas/schemas/includes/previous_name.json +0 -14
- data/schemas/schemas/includes/share-parcel-data.json +0 -67
- data/schemas/schemas/includes/share-parcel.json +0 -63
- data/schemas/schemas/includes/subsidiary-relationship-data.json +0 -47
- data/schemas/schemas/includes/total-shares.json +0 -10
- data/schemas/schemas/licence-schema.json +0 -27
- data/schemas/schemas/primary-data-schema.json +0 -17
- data/schemas/schemas/share-parcel-schema.json +0 -21
- data/schemas/schemas/simple-financial-payment-schema.json +0 -85
- data/schemas/schemas/simple-licence-schema.json +0 -59
- data/schemas/schemas/simple-subsidiary-schema.json +0 -68
- data/schemas/schemas/subsidiary-relationship-schema.json +0 -27
- data/schemas/spec/sample-data/invalid/company-01.json +0 -4
- data/schemas/spec/sample-data/invalid/company-02.json +0 -5
- data/schemas/spec/sample-data/invalid/company-03.json +0 -5
- data/schemas/spec/sample-data/invalid/company-04.json +0 -5
- data/schemas/spec/sample-data/invalid/company-05.json +0 -5
- data/schemas/spec/sample-data/invalid/company-06.json +0 -6
- data/schemas/spec/sample-data/invalid/company-07.json +0 -8
- data/schemas/spec/sample-data/invalid/company-08.json +0 -7
- data/schemas/spec/sample-data/invalid/company-09.json +0 -9
- data/schemas/spec/sample-data/invalid/company-10.json +0 -7
- data/schemas/spec/sample-data/invalid/company-11.json +0 -9
- data/schemas/spec/sample-data/invalid/company-12.json +0 -11
- data/schemas/spec/sample-data/invalid/company-13.json +0 -11
- data/schemas/spec/sample-data/invalid/company-14.json +0 -7
- data/schemas/spec/sample-data/invalid/company-15.json +0 -7
- data/schemas/spec/sample-data/invalid/company-16.json +0 -7
- data/schemas/spec/sample-data/invalid/company-17.json +0 -9
- data/schemas/spec/sample-data/invalid/company-18.json +0 -9
- data/schemas/spec/sample-data/invalid/company-19.json +0 -9
- data/schemas/spec/sample-data/invalid/company-20.json +0 -9
- data/schemas/spec/sample-data/invalid/company-21.json +0 -11
- data/schemas/spec/sample-data/invalid/company-22.json +0 -11
- data/schemas/spec/sample-data/invalid/company-23.json +0 -7
- data/schemas/spec/sample-data/invalid/company-24.json +0 -12
- data/schemas/spec/sample-data/invalid/company-25.json +0 -9
- data/schemas/spec/sample-data/invalid/company-26.json +0 -11
- data/schemas/spec/sample-data/invalid/company-27.json +0 -7
- data/schemas/spec/sample-data/invalid/company-28.json +0 -9
- data/schemas/spec/sample-data/invalid/company-29.json +0 -12
- data/schemas/spec/sample-data/invalid/company-30.json +0 -16
- data/schemas/spec/sample-data/invalid/company-31.json +0 -14
- data/schemas/spec/sample-data/invalid/company-32.json +0 -11
- data/schemas/spec/sample-data/invalid/company-33.json +0 -7
- data/schemas/spec/sample-data/invalid/company-34.json +0 -9
- data/schemas/spec/sample-data/invalid/company-35.json +0 -9
- data/schemas/spec/sample-data/invalid/company-36.json +0 -10
- data/schemas/spec/sample-data/invalid/company-37.json +0 -7
- data/schemas/spec/sample-data/invalid/company-38.json +0 -9
- data/schemas/spec/sample-data/invalid/company-39.json +0 -11
- data/schemas/spec/sample-data/invalid/company-40.json +0 -12
- data/schemas/spec/sample-data/invalid/company-41.json +0 -12
- data/schemas/spec/sample-data/invalid/company-42.json +0 -7
- data/schemas/spec/sample-data/invalid/company-43.json +0 -9
- data/schemas/spec/sample-data/invalid/company-44.json +0 -11
- data/schemas/spec/sample-data/invalid/company-45.json +0 -11
- data/schemas/spec/sample-data/invalid/company-46.json +0 -7
- data/schemas/spec/sample-data/invalid/company-47.json +0 -9
- data/schemas/spec/sample-data/invalid/company-48.json +0 -9
- data/schemas/spec/sample-data/invalid/company-49.json +0 -9
- data/schemas/spec/sample-data/invalid/company-50.json +0 -9
- data/schemas/spec/sample-data/invalid/company-51.json +0 -9
- data/schemas/spec/sample-data/invalid/company-52.json +0 -9
- data/schemas/spec/sample-data/invalid/company-53.json +0 -10
- data/schemas/spec/sample-data/invalid/company-54.json +0 -9
- data/schemas/spec/sample-data/invalid/company-55.json +0 -9
- data/schemas/spec/sample-data/invalid/company-56.json +0 -7
- data/schemas/spec/sample-data/invalid/company-57.json +0 -7
- data/schemas/spec/sample-data/invalid/company-58.json +0 -7
- data/schemas/spec/sample-data/invalid/company-59.json +0 -13
- data/schemas/spec/sample-data/invalid/company-60.json +0 -7
- data/schemas/spec/sample-data/invalid/company-61.json +0 -7
- data/schemas/spec/sample-data/invalid/company-62.json +0 -9
- data/schemas/spec/sample-data/invalid/company-63.json +0 -12
- data/schemas/spec/sample-data/invalid/company-64.json +0 -14
- data/schemas/spec/sample-data/invalid/company-65.json +0 -14
- data/schemas/spec/sample-data/invalid/company-66.json +0 -13
- data/schemas/spec/sample-data/invalid/company-67.json +0 -14
- data/schemas/spec/sample-data/invalid/company-68.json +0 -12
- data/schemas/spec/sample-data/invalid/company-69.json +0 -12
- data/schemas/spec/sample-data/invalid/company-70.json +0 -14
- data/schemas/spec/sample-data/invalid/financial-payment-01.json +0 -24
- data/schemas/spec/sample-data/invalid/licence-01.json +0 -18
- data/schemas/spec/sample-data/invalid/licence-02.json +0 -18
- data/schemas/spec/sample-data/invalid/licence-03.json +0 -12
- data/schemas/spec/sample-data/invalid/licence-04.json +0 -18
- data/schemas/spec/sample-data/invalid/licence-05.json +0 -18
- data/schemas/spec/sample-data/invalid/licence-06.json +0 -18
- data/schemas/spec/sample-data/invalid/licence-07.json +0 -20
- data/schemas/spec/sample-data/invalid/licence-08.json +0 -21
- data/schemas/spec/sample-data/invalid/primary-data-01.json +0 -4
- data/schemas/spec/sample-data/invalid/primary-data-02.json +0 -4
- data/schemas/spec/sample-data/invalid/simple-licence-01.json +0 -9
- data/schemas/spec/sample-data/invalid/simple-licence-02.json +0 -8
- data/schemas/spec/sample-data/invalid/simple-licence-03.json +0 -9
- data/schemas/spec/sample-data/invalid/simple-licence-04.json +0 -10
- data/schemas/spec/sample-data/invalid/simple-licence-05.json +0 -10
- data/schemas/spec/sample-data/invalid/simple-licence-06.json +0 -10
- data/schemas/spec/sample-data/invalid/simple-subsidiary-01.json +0 -13
- data/schemas/spec/sample-data/invalid/simple-subsidiary-02.json +0 -13
- data/schemas/spec/sample-data/licence-schema.json.old +0 -21
- data/schemas/spec/sample-data/valid/company-01.json +0 -6
- data/schemas/spec/sample-data/valid/company-02.json +0 -7
- data/schemas/spec/sample-data/valid/company-03.json +0 -8
- data/schemas/spec/sample-data/valid/company-04.json +0 -7
- data/schemas/spec/sample-data/valid/company-05.json +0 -7
- data/schemas/spec/sample-data/valid/company-06.json +0 -12
- data/schemas/spec/sample-data/valid/company-07.json +0 -9
- data/schemas/spec/sample-data/valid/company-08.json +0 -9
- data/schemas/spec/sample-data/valid/company-09.json +0 -20
- data/schemas/spec/sample-data/valid/company-10.json +0 -9
- data/schemas/spec/sample-data/valid/company-11.json +0 -7
- data/schemas/spec/sample-data/valid/company-12.json +0 -7
- data/schemas/spec/sample-data/valid/company-13.json +0 -7
- data/schemas/spec/sample-data/valid/company-14.json +0 -15
- data/schemas/spec/sample-data/valid/company-15.json +0 -8
- data/schemas/spec/sample-data/valid/company-16.json +0 -9
- data/schemas/spec/sample-data/valid/company-17.json +0 -9
- data/schemas/spec/sample-data/valid/company-18.json +0 -9
- data/schemas/spec/sample-data/valid/company-19.json +0 -37
- data/schemas/spec/sample-data/valid/company-20.json +0 -9
- data/schemas/spec/sample-data/valid/company-21.json +0 -26
- data/schemas/spec/sample-data/valid/company-22.json +0 -20
- data/schemas/spec/sample-data/valid/company-23.json +0 -9
- data/schemas/spec/sample-data/valid/company-24.json +0 -12
- data/schemas/spec/sample-data/valid/company-25.json +0 -12
- data/schemas/spec/sample-data/valid/company-26.json +0 -12
- data/schemas/spec/sample-data/valid/company-27.json +0 -28
- data/schemas/spec/sample-data/valid/company-28.json +0 -9
- data/schemas/spec/sample-data/valid/company-29.json +0 -10
- data/schemas/spec/sample-data/valid/company-30.json +0 -9
- data/schemas/spec/sample-data/valid/company-31.json +0 -17
- data/schemas/spec/sample-data/valid/company-32.json +0 -9
- data/schemas/spec/sample-data/valid/company-33.json +0 -29
- data/schemas/spec/sample-data/valid/company-34.json +0 -9
- data/schemas/spec/sample-data/valid/company-35.json +0 -9
- data/schemas/spec/sample-data/valid/company-36.json +0 -9
- data/schemas/spec/sample-data/valid/company-37.json +0 -9
- data/schemas/spec/sample-data/valid/company-38.json +0 -9
- data/schemas/spec/sample-data/valid/company-39.json +0 -9
- data/schemas/spec/sample-data/valid/company-40.json +0 -9
- data/schemas/spec/sample-data/valid/company-41.json +0 -9
- data/schemas/spec/sample-data/valid/company-42.json +0 -10
- data/schemas/spec/sample-data/valid/company-43.json +0 -7
- data/schemas/spec/sample-data/valid/company-44.json +0 -7
- data/schemas/spec/sample-data/valid/company-45.json +0 -23
- data/schemas/spec/sample-data/valid/company-46.json +0 -7
- data/schemas/spec/sample-data/valid/company-47.json +0 -12
- data/schemas/spec/sample-data/valid/company-48.json +0 -7
- data/schemas/spec/sample-data/valid/company-49.json +0 -14
- data/schemas/spec/sample-data/valid/company-50.json +0 -13
- data/schemas/spec/sample-data/valid/company-51.json +0 -14
- data/schemas/spec/sample-data/valid/company-52.json +0 -12
- data/schemas/spec/sample-data/valid/company-53.json +0 -9
- data/schemas/spec/sample-data/valid/financial-payment-01.json +0 -25
- data/schemas/spec/sample-data/valid/financial-payment-02.json +0 -29
- data/schemas/spec/sample-data/valid/licence-01.json +0 -19
- data/schemas/spec/sample-data/valid/licence-02.json +0 -21
- data/schemas/spec/sample-data/valid/licence-03.json +0 -21
- data/schemas/spec/sample-data/valid/licence-04.json +0 -26
- data/schemas/spec/sample-data/valid/primary-data-01.json +0 -4
- data/schemas/spec/sample-data/valid/primary-data-02.json +0 -5
- data/schemas/spec/sample-data/valid/simple-licence-01.json +0 -10
- data/schemas/spec/sample-data/valid/simple-licence-02.json +0 -10
- data/schemas/spec/sample-data/valid/simple-licence-03.json +0 -12
- data/schemas/spec/sample-data/valid/simple-subsidiary-01.json +0 -13
- data/schemas/spec/sample-data/valid/simple-subsidiary-02.json +0 -13
- data/schemas/spec/sample-data/valid/subsidiary-relationship-01.json +0 -23
- data/schemas/spec/spec_helper.rb +0 -78
- data/schemas/spec/validation_spec.rb +0 -39
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
-
"title": "Simple Licence Schema",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"properties": {
|
|
6
|
-
"source_url": {
|
|
7
|
-
"description": "Place where this fact can be verified",
|
|
8
|
-
"type": "string",
|
|
9
|
-
"minLength": 1
|
|
10
|
-
},
|
|
11
|
-
"sample_date": {
|
|
12
|
-
"description": "Date on which this fact was known to be true",
|
|
13
|
-
"type": "date",
|
|
14
|
-
"minLength": 1
|
|
15
|
-
},
|
|
16
|
-
"confidence": {
|
|
17
|
-
"description": "Confidence in accuracy of data",
|
|
18
|
-
"type": "string",
|
|
19
|
-
"enum": ["HIGH", "MEDIUM", "LOW"]
|
|
20
|
-
},
|
|
21
|
-
"company_name": {
|
|
22
|
-
"description": "Name of the company holding the licence",
|
|
23
|
-
"type": "string",
|
|
24
|
-
"minLength": 1
|
|
25
|
-
},
|
|
26
|
-
"company_jurisdiction": {
|
|
27
|
-
"description": "Jurisdiction where company is based",
|
|
28
|
-
"type": "string",
|
|
29
|
-
"minLength": 1
|
|
30
|
-
},
|
|
31
|
-
"licence_number": {
|
|
32
|
-
"description": "Licence number or code",
|
|
33
|
-
"type": "string"
|
|
34
|
-
},
|
|
35
|
-
"jurisdiction_classification": {
|
|
36
|
-
"description": "Description of how regulator classifies licence",
|
|
37
|
-
"type": ["string", "array"]
|
|
38
|
-
},
|
|
39
|
-
"regulator": {
|
|
40
|
-
"description": "The regulating body that issued the licence",
|
|
41
|
-
"type": "string"
|
|
42
|
-
},
|
|
43
|
-
"licence_jurisdiction": {
|
|
44
|
-
"description": "Jurisdiction for which licence is issued",
|
|
45
|
-
"type": "string",
|
|
46
|
-
"minLength": 1
|
|
47
|
-
},
|
|
48
|
-
"status": {
|
|
49
|
-
"description": "Status of the licence",
|
|
50
|
-
"type": "string"
|
|
51
|
-
},
|
|
52
|
-
"category": {
|
|
53
|
-
"description": "Category of licence",
|
|
54
|
-
"type": "string",
|
|
55
|
-
"enum": ["Financial", "Business"]
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"required": ["source_url", "sample_date", "company_name", "company_jurisdiction"]
|
|
59
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
-
"title": "Simple Subsidiary Schema",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"properties": {
|
|
6
|
-
"source_url": {
|
|
7
|
-
"description": "Place where this fact can be verified",
|
|
8
|
-
"type": "string",
|
|
9
|
-
"minLength": 1
|
|
10
|
-
},
|
|
11
|
-
"sample_date": {
|
|
12
|
-
"description": "Date on which this fact was known to be true",
|
|
13
|
-
"type": "string",
|
|
14
|
-
"minLength": 1
|
|
15
|
-
},
|
|
16
|
-
"start_date": {
|
|
17
|
-
"description": "Earliest known date this was known to be a subsidiary",
|
|
18
|
-
"type": "string"
|
|
19
|
-
},
|
|
20
|
-
"end_date": {
|
|
21
|
-
"description": "Latest known date this was known to be a subsidiary",
|
|
22
|
-
"type": "string"
|
|
23
|
-
},
|
|
24
|
-
"confidence": {
|
|
25
|
-
"description": "Confidence in accuracy of data",
|
|
26
|
-
"type": "string",
|
|
27
|
-
"enum": ["HIGH", "MEDIUM", "LOW"]
|
|
28
|
-
},
|
|
29
|
-
"parent_name": {
|
|
30
|
-
"description": "Name of the controlling company",
|
|
31
|
-
"type": "string",
|
|
32
|
-
"minLength": 1
|
|
33
|
-
},
|
|
34
|
-
"parent_jurisdiction": {
|
|
35
|
-
"description": "Jurisdiction where controlling company is based",
|
|
36
|
-
"type": "string",
|
|
37
|
-
"minLength": 1
|
|
38
|
-
},
|
|
39
|
-
"parent_identifier": {
|
|
40
|
-
"description": "Any unique ID for the controlling company",
|
|
41
|
-
"type": "string"
|
|
42
|
-
},
|
|
43
|
-
"direct": {
|
|
44
|
-
"description": "Is the control relationship direct or indirect (if unknown, leave blank)?",
|
|
45
|
-
"type": "boolean"
|
|
46
|
-
},
|
|
47
|
-
"percentage_controlled": {
|
|
48
|
-
"description": "Percentage of the subsidiary that is controlled (if known), either directly or indirectly",
|
|
49
|
-
"type": "string",
|
|
50
|
-
"pattern": "^[0-9]{1,2}[.]?[0-9]{0,2}$"
|
|
51
|
-
},
|
|
52
|
-
"subsidiary_name": {
|
|
53
|
-
"description": "The name of the subsidiary",
|
|
54
|
-
"type": "string",
|
|
55
|
-
"minLength": 1
|
|
56
|
-
},
|
|
57
|
-
"subsidiary_jurisdiction": {
|
|
58
|
-
"description": "Jurisdiction of the subsidiary",
|
|
59
|
-
"type": "string",
|
|
60
|
-
"minLength": 1
|
|
61
|
-
},
|
|
62
|
-
"subsidiary_identifier": {
|
|
63
|
-
"description": "Any unique id for the subsidiary that might be provided in the source",
|
|
64
|
-
"type": "string"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"required": ["source_url", "sample_date", "parent_name", "parent_jurisdiction", "subsidiary_name", "subsidiary_jurisdiction"]
|
|
68
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Subsidiary Relationship",
|
|
3
|
-
"description": "A relationship of control between two companies",
|
|
4
|
-
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"source_jurisdiction": {
|
|
8
|
-
"description": "Jurisdiction of the source of the data",
|
|
9
|
-
"type": "string"
|
|
10
|
-
},
|
|
11
|
-
"company": {
|
|
12
|
-
"$ref": "includes/company.json"
|
|
13
|
-
},
|
|
14
|
-
"data": {
|
|
15
|
-
"type": "array",
|
|
16
|
-
"description": "This is an array of data objects, that is the objects which actually contain the data about the datum. Generally there will only be one element in this, although in for some types of data_types there may naturally be several releated to the same company, e.g. shareholders",
|
|
17
|
-
"items": {
|
|
18
|
-
"$ref": "includes/subsidiary-relationship-data.json"
|
|
19
|
-
},
|
|
20
|
-
"additionalItems": false
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"required": [
|
|
24
|
-
"company",
|
|
25
|
-
"data"
|
|
26
|
-
]
|
|
27
|
-
}
|