openc_bot 0.0.16 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +3 -0
- data/.travis.yml +2 -1
- data/examples/basic/lib/basic.rb +3 -2
- data/lib/openc_bot/helpers/register_methods.rb +2 -1
- data/lib/openc_bot/templates/lib/simple_bot.rb +3 -2
- data/lib/openc_bot/version.rb +1 -1
- data/lib/simple_openc_bot.rb +2 -2
- data/openc_bot.gemspec +13 -0
- data/publish.sh +12 -0
- data/schemas/.gitignore +13 -0
- data/schemas/.travis.yml +5 -0
- data/schemas/Gemfile +9 -0
- data/schemas/Gemfile.lock +34 -0
- data/schemas/README.md +2 -0
- data/schemas/Rakefile +46 -0
- data/schemas/lib/base-statement.json +22 -0
- data/schemas/lib/snippets/financial-payment-base.json +4 -0
- data/schemas/lib/snippets/licence-base.json +4 -0
- data/schemas/{company-schema.json → schemas/company-schema.json} +0 -0
- data/schemas/schemas/financial-payment-schema.json +27 -0
- data/schemas/{includes → schemas/includes}/address.json +0 -0
- data/schemas/{includes → schemas/includes}/alternative_name.json +1 -1
- data/schemas/{includes → schemas/includes}/company.json +2 -0
- data/schemas/{includes → schemas/includes}/filing.json +0 -0
- data/schemas/schemas/includes/financial-payment-data-object.json +60 -0
- data/schemas/{includes → schemas/includes}/industry_code.json +0 -0
- data/schemas/{includes/license-data.json → schemas/includes/licence-data-object.json} +13 -4
- data/schemas/{includes → schemas/includes}/officer.json +0 -0
- data/schemas/{includes → schemas/includes}/previous_name.json +0 -0
- data/schemas/{includes → schemas/includes}/share-parcel-data.json +0 -0
- data/schemas/{includes → schemas/includes}/share-parcel.json +0 -0
- data/schemas/{includes → schemas/includes}/subsidiary-relationship-data.json +4 -9
- data/schemas/{includes → schemas/includes}/total-shares.json +0 -0
- data/schemas/schemas/licence-schema.json +27 -0
- data/schemas/schemas/primary-data-schema.json +17 -0
- data/schemas/{share-parcel-schema.json → schemas/share-parcel-schema.json} +0 -0
- data/schemas/schemas/simple-financial-payment-schema.json +85 -0
- data/schemas/schemas/simple-licence-schema.json +54 -0
- data/schemas/schemas/simple-subsidiary-schema.json +62 -0
- data/schemas/schemas/subsidiary-relationship-schema.json +27 -0
- data/schemas/spec/sample-data/invalid/company-01.json +4 -0
- data/schemas/spec/sample-data/invalid/company-02.json +5 -0
- data/schemas/spec/sample-data/invalid/company-03.json +5 -0
- data/schemas/spec/sample-data/invalid/company-04.json +5 -0
- data/schemas/spec/sample-data/invalid/company-05.json +5 -0
- data/schemas/spec/sample-data/invalid/company-06.json +6 -0
- data/schemas/spec/sample-data/invalid/company-07.json +8 -0
- data/schemas/spec/sample-data/invalid/company-08.json +7 -0
- data/schemas/spec/sample-data/invalid/company-09.json +9 -0
- data/schemas/spec/sample-data/invalid/company-10.json +7 -0
- data/schemas/spec/sample-data/invalid/company-11.json +9 -0
- data/schemas/spec/sample-data/invalid/company-12.json +11 -0
- data/schemas/spec/sample-data/invalid/company-13.json +11 -0
- data/schemas/spec/sample-data/invalid/company-14.json +7 -0
- data/schemas/spec/sample-data/invalid/company-15.json +7 -0
- data/schemas/spec/sample-data/invalid/company-16.json +7 -0
- data/schemas/spec/sample-data/invalid/company-17.json +9 -0
- data/schemas/spec/sample-data/invalid/company-18.json +9 -0
- data/schemas/spec/sample-data/invalid/company-19.json +9 -0
- data/schemas/spec/sample-data/invalid/company-20.json +9 -0
- data/schemas/spec/sample-data/invalid/company-21.json +11 -0
- data/schemas/spec/sample-data/invalid/company-22.json +11 -0
- data/schemas/spec/sample-data/invalid/company-23.json +7 -0
- data/schemas/spec/sample-data/invalid/company-24.json +12 -0
- data/schemas/spec/sample-data/invalid/company-25.json +9 -0
- data/schemas/spec/sample-data/invalid/company-26.json +11 -0
- data/schemas/spec/sample-data/invalid/company-27.json +7 -0
- data/schemas/spec/sample-data/invalid/company-28.json +9 -0
- data/schemas/spec/sample-data/invalid/company-29.json +12 -0
- data/schemas/spec/sample-data/invalid/company-30.json +16 -0
- data/schemas/spec/sample-data/invalid/company-31.json +14 -0
- data/schemas/spec/sample-data/invalid/company-32.json +11 -0
- data/schemas/spec/sample-data/invalid/company-33.json +7 -0
- data/schemas/spec/sample-data/invalid/company-34.json +9 -0
- data/schemas/spec/sample-data/invalid/company-35.json +9 -0
- data/schemas/spec/sample-data/invalid/company-36.json +10 -0
- data/schemas/spec/sample-data/invalid/company-37.json +7 -0
- data/schemas/spec/sample-data/invalid/company-38.json +9 -0
- data/schemas/spec/sample-data/invalid/company-39.json +11 -0
- data/schemas/spec/sample-data/invalid/company-40.json +12 -0
- data/schemas/spec/sample-data/invalid/company-41.json +12 -0
- data/schemas/spec/sample-data/invalid/company-42.json +7 -0
- data/schemas/spec/sample-data/invalid/company-43.json +9 -0
- data/schemas/spec/sample-data/invalid/company-44.json +11 -0
- data/schemas/spec/sample-data/invalid/company-45.json +11 -0
- data/schemas/spec/sample-data/invalid/company-46.json +7 -0
- data/schemas/spec/sample-data/invalid/company-47.json +9 -0
- data/schemas/spec/sample-data/invalid/company-48.json +9 -0
- data/schemas/spec/sample-data/invalid/company-49.json +9 -0
- data/schemas/spec/sample-data/invalid/company-50.json +9 -0
- data/schemas/spec/sample-data/invalid/company-51.json +9 -0
- data/schemas/spec/sample-data/invalid/company-52.json +9 -0
- data/schemas/spec/sample-data/invalid/company-53.json +10 -0
- data/schemas/spec/sample-data/invalid/company-54.json +9 -0
- data/schemas/spec/sample-data/invalid/company-55.json +9 -0
- data/schemas/spec/sample-data/invalid/financial-payment-01.json +24 -0
- data/schemas/spec/sample-data/invalid/licence-01.json +18 -0
- data/schemas/spec/sample-data/invalid/licence-02.json +18 -0
- data/schemas/spec/sample-data/invalid/licence-03.json +12 -0
- data/schemas/spec/sample-data/invalid/licence-04.json +18 -0
- data/schemas/spec/sample-data/invalid/licence-05.json +18 -0
- data/schemas/spec/sample-data/invalid/licence-06.json +18 -0
- data/schemas/spec/sample-data/invalid/licence-07.json +20 -0
- data/schemas/spec/sample-data/invalid/licence-08.json +21 -0
- data/schemas/spec/sample-data/invalid/primary-data-01.json +4 -0
- data/schemas/spec/sample-data/invalid/primary-data-02.json +4 -0
- data/schemas/spec/sample-data/invalid/simple-licence-01.json +9 -0
- data/schemas/spec/sample-data/invalid/simple-licence-02.json +8 -0
- data/schemas/spec/sample-data/invalid/simple-licence-03.json +9 -0
- data/schemas/spec/sample-data/invalid/simple-subsidiary-01.json +13 -0
- data/schemas/{licence-schema.json → spec/sample-data/licence-schema.json.old} +1 -1
- data/schemas/spec/sample-data/valid/company-01.json +6 -0
- data/schemas/spec/sample-data/valid/company-02.json +7 -0
- data/schemas/spec/sample-data/valid/company-03.json +8 -0
- data/schemas/spec/sample-data/valid/company-04.json +7 -0
- data/schemas/spec/sample-data/valid/company-05.json +7 -0
- data/schemas/spec/sample-data/valid/company-06.json +12 -0
- data/schemas/spec/sample-data/valid/company-07.json +9 -0
- data/schemas/spec/sample-data/valid/company-08.json +9 -0
- data/schemas/spec/sample-data/valid/company-09.json +20 -0
- data/schemas/spec/sample-data/valid/company-10.json +9 -0
- data/schemas/spec/sample-data/valid/company-11.json +7 -0
- data/schemas/spec/sample-data/valid/company-12.json +7 -0
- data/schemas/spec/sample-data/valid/company-13.json +7 -0
- data/schemas/spec/sample-data/valid/company-14.json +15 -0
- data/schemas/spec/sample-data/valid/company-15.json +8 -0
- data/schemas/spec/sample-data/valid/company-16.json +9 -0
- data/schemas/spec/sample-data/valid/company-17.json +9 -0
- data/schemas/spec/sample-data/valid/company-18.json +9 -0
- data/schemas/spec/sample-data/valid/company-19.json +26 -0
- data/schemas/spec/sample-data/valid/company-20.json +9 -0
- data/schemas/spec/sample-data/valid/company-21.json +26 -0
- data/schemas/spec/sample-data/valid/company-22.json +20 -0
- data/schemas/spec/sample-data/valid/company-23.json +9 -0
- data/schemas/spec/sample-data/valid/company-24.json +12 -0
- data/schemas/spec/sample-data/valid/company-25.json +12 -0
- data/schemas/spec/sample-data/valid/company-26.json +12 -0
- data/schemas/spec/sample-data/valid/company-27.json +28 -0
- data/schemas/spec/sample-data/valid/company-28.json +9 -0
- data/schemas/spec/sample-data/valid/company-29.json +10 -0
- data/schemas/spec/sample-data/valid/company-30.json +9 -0
- data/schemas/spec/sample-data/valid/company-31.json +17 -0
- data/schemas/spec/sample-data/valid/company-32.json +9 -0
- data/schemas/spec/sample-data/valid/company-33.json +24 -0
- data/schemas/spec/sample-data/valid/company-34.json +9 -0
- data/schemas/spec/sample-data/valid/company-35.json +9 -0
- data/schemas/spec/sample-data/valid/company-36.json +9 -0
- data/schemas/spec/sample-data/valid/company-37.json +9 -0
- data/schemas/spec/sample-data/valid/company-38.json +9 -0
- data/schemas/spec/sample-data/valid/company-39.json +9 -0
- data/schemas/spec/sample-data/valid/company-40.json +9 -0
- data/schemas/spec/sample-data/valid/company-41.json +9 -0
- data/schemas/spec/sample-data/valid/company-42.json +10 -0
- data/schemas/spec/sample-data/valid/financial-payment-01.json +25 -0
- data/schemas/spec/sample-data/valid/financial-payment-02.json +29 -0
- data/schemas/spec/sample-data/valid/licence-01.json +19 -0
- data/schemas/spec/sample-data/valid/licence-02.json +21 -0
- data/schemas/spec/sample-data/valid/licence-03.json +21 -0
- data/schemas/spec/sample-data/valid/licence-04.json +26 -0
- data/schemas/spec/sample-data/valid/primary-data-01.json +4 -0
- data/schemas/spec/sample-data/valid/primary-data-02.json +5 -0
- data/schemas/spec/sample-data/valid/simple-licence-01.json +10 -0
- data/schemas/spec/sample-data/valid/simple-licence-02.json +10 -0
- data/schemas/spec/sample-data/valid/simple-licence-03.json +12 -0
- data/schemas/spec/sample-data/valid/simple-subsidiary-01.json +13 -0
- data/schemas/spec/sample-data/valid/simple-subsidiary-02.json +13 -0
- data/schemas/spec/sample-data/valid/subsidiary-relationship-01.json +23 -0
- data/schemas/spec/spec_helper.rb +78 -0
- data/schemas/spec/validation_spec.rb +39 -0
- data/spec/lib/helpers/register_methods_spec.rb +1 -1
- data/spec/schemas/company-schema_spec.rb +4 -3
- data/spec/simple_openc_bot_spec.rb +9 -8
- metadata +164 -19
- data/schemas/includes/base-statement.json +0 -27
- data/schemas/subsidiary-relationship-schema.json +0 -19
@@ -0,0 +1,24 @@
|
|
1
|
+
{ "company":
|
2
|
+
{
|
3
|
+
"name": "Some suppplier",
|
4
|
+
"jurisdiction": "France"
|
5
|
+
},
|
6
|
+
"data": [
|
7
|
+
{ "data_type": "financial_payment",
|
8
|
+
"properties": {
|
9
|
+
"currency": "GBP",
|
10
|
+
"transaction_number": "ABC1224",
|
11
|
+
"reporting_date": "2014-06-01",
|
12
|
+
"jurisdiction": "gb",
|
13
|
+
"more_details_url": "http://spendnetwork.com/trans_id/12345",
|
14
|
+
"description": "some big project",
|
15
|
+
"payee_name": "Govt Jobs R Us Inc",
|
16
|
+
"entity_name": "Efficiency Agency",
|
17
|
+
"department_name": "Department Of Everything",
|
18
|
+
"date": "2012-10-22"
|
19
|
+
},
|
20
|
+
"source_url": "http://example.com/abc123",
|
21
|
+
"confidence": "67"
|
22
|
+
}
|
23
|
+
]
|
24
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{ "company":
|
2
|
+
{
|
3
|
+
"name": "CENTRAL BANK",
|
4
|
+
},
|
5
|
+
"data": [
|
6
|
+
{ "data_type": "licence",
|
7
|
+
"properties": {
|
8
|
+
"licence_number": "ABC123",
|
9
|
+
"category": "Financial",
|
10
|
+
"jurisdiction_classification": ["Bank"],
|
11
|
+
"jurisdiction_code": "France",
|
12
|
+
"reporting_date": "2014-06-01"
|
13
|
+
},
|
14
|
+
"source_url": "http://example.com/abc123",
|
15
|
+
"confidence": "67"
|
16
|
+
}
|
17
|
+
]
|
18
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{ "company":
|
2
|
+
{
|
3
|
+
"jurisdiction": "IA"
|
4
|
+
},
|
5
|
+
"data": [
|
6
|
+
{ "data_type": "licence",
|
7
|
+
"properties": {
|
8
|
+
"licence_number": "ABC123",
|
9
|
+
"category": "Financial",
|
10
|
+
"jurisdiction_classification": ["Bank"],
|
11
|
+
"jurisdiction_code": "France",
|
12
|
+
"reporting_date": "2014-06-01"
|
13
|
+
},
|
14
|
+
"source_url": "http://example.com/abc123",
|
15
|
+
"confidence": "67"
|
16
|
+
}
|
17
|
+
]
|
18
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{ "company":
|
2
|
+
{
|
3
|
+
"name": "CENTRAL BANK",
|
4
|
+
"jurisdiction": "IA"
|
5
|
+
},
|
6
|
+
"data": [
|
7
|
+
{ "properties": {
|
8
|
+
"licence_number": "ABC123",
|
9
|
+
"category": "Financial",
|
10
|
+
"jurisdiction_classification": ["Bank"],
|
11
|
+
"jurisdiction_code": "France",
|
12
|
+
"reporting_date": "2014-06-01"
|
13
|
+
},
|
14
|
+
"source_url": "http://example.com/abc123",
|
15
|
+
"confidence": "67"
|
16
|
+
}
|
17
|
+
]
|
18
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{ "company":
|
2
|
+
{
|
3
|
+
"name": "CENTRAL BANK",
|
4
|
+
"jurisdiction": "IA"
|
5
|
+
},
|
6
|
+
"data": [
|
7
|
+
{ "data_type": "licence",
|
8
|
+
"properties": {
|
9
|
+
"licence_number": "ABC123",
|
10
|
+
"category": "Financial",
|
11
|
+
"jurisdiction_classification": ["Bank"],
|
12
|
+
"jurisdiction_code": "France",
|
13
|
+
"reporting_date": "2014-06-01"
|
14
|
+
},
|
15
|
+
"confidence": "67"
|
16
|
+
}
|
17
|
+
]
|
18
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{ "company":
|
2
|
+
{
|
3
|
+
"name": "CENTRAL BANK",
|
4
|
+
"jurisdiction": "IA"
|
5
|
+
},
|
6
|
+
"data": [
|
7
|
+
{ "data_type": "licence",
|
8
|
+
"properties": {
|
9
|
+
"licence_number": "ABC123",
|
10
|
+
"category": "Financial",
|
11
|
+
"jurisdiction_classification": ["Bank"],
|
12
|
+
"jurisdiction_code": "France",
|
13
|
+
"reporting_date": "2014-06-01"
|
14
|
+
},
|
15
|
+
"source_url": "http://example.com/abc123"
|
16
|
+
}
|
17
|
+
]
|
18
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{ "company":
|
2
|
+
{
|
3
|
+
"name": "CENTRAL BANK",
|
4
|
+
"jurisdiction": "IA",
|
5
|
+
"identifier": "abc/123",
|
6
|
+
"company_number": "12345"
|
7
|
+
},
|
8
|
+
"data": [
|
9
|
+
{ "data_type": "licence",
|
10
|
+
"properties": {
|
11
|
+
"licence_number": "ABC123",
|
12
|
+
"jurisdiction_classification": ["Bank"],
|
13
|
+
"jurisdiction_code": "France",
|
14
|
+
"sample_date": "2014-06-01"
|
15
|
+
},
|
16
|
+
"source_url": "http://example.com/abc123",
|
17
|
+
"confidence": "67"
|
18
|
+
}
|
19
|
+
]
|
20
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{ "company":
|
2
|
+
{
|
3
|
+
"name": "CENTRAL BANK",
|
4
|
+
"jurisdiction": "IA",
|
5
|
+
"identifier": "abc/123",
|
6
|
+
"company_number": "12345"
|
7
|
+
},
|
8
|
+
"data": [
|
9
|
+
{ "data_type": "licence",
|
10
|
+
"properties": {
|
11
|
+
"category":"foo",
|
12
|
+
"licence_number": "ABC123",
|
13
|
+
"jurisdiction_classification": ["Bank"],
|
14
|
+
"jurisdiction_code": "France",
|
15
|
+
"sample_date": "2014-06-01"
|
16
|
+
},
|
17
|
+
"source_url": "http://example.com/abc123",
|
18
|
+
"confidence": "67"
|
19
|
+
}
|
20
|
+
]
|
21
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"source_url": "http://somewhere.com/a",
|
3
|
+
"sample_date": "2014/02/01",
|
4
|
+
"start_date": "2014/01/01",
|
5
|
+
"end_date": "2015/02/01",
|
6
|
+
"confidence": "HIGH",
|
7
|
+
"parent_name": "Widgets R US",
|
8
|
+
"parent_jurisdiction": "us_de",
|
9
|
+
"direct": true,
|
10
|
+
"percentage_controlled": "56.124",
|
11
|
+
"subsidiary_name": "Little Widgets",
|
12
|
+
"subsidiary_jurisdiction": "us_de"
|
13
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*valid registered_address object*/
|
2
|
+
{
|
3
|
+
"name": "Foo Inc",
|
4
|
+
"company_number": "12345",
|
5
|
+
"jurisdiction_code": "us_de",
|
6
|
+
"registered_address": {
|
7
|
+
"street_address": "32 Foo St",
|
8
|
+
"locality": "Footown",
|
9
|
+
"region": "Fooshire",
|
10
|
+
"postal_code": "FO1 2BA"
|
11
|
+
}
|
12
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/*valid previous_names*/
|
2
|
+
{
|
3
|
+
"name": "Foo Inc",
|
4
|
+
"company_number": "12345",
|
5
|
+
"jurisdiction_code": "ie",
|
6
|
+
"previous_names": [
|
7
|
+
{
|
8
|
+
"company_name": "FooBar Inc"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"company_name": "FooBaz",
|
12
|
+
"con_date": "2012-07-22"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"company_name": "FooBaz",
|
16
|
+
"con_date": "2012-07-22",
|
17
|
+
"start_date": "2008-01-08"
|
18
|
+
}
|
19
|
+
]
|
20
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/*valid officers*/
|
2
|
+
{
|
3
|
+
"name": "Foo Inc",
|
4
|
+
"company_number": "12345",
|
5
|
+
"jurisdiction_code": "ie",
|
6
|
+
"officers": [
|
7
|
+
{
|
8
|
+
"name": "Fred Flintstone"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"name": "Barney Rubble",
|
12
|
+
"position": "Director"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"name": "Barney Rubble",
|
16
|
+
"other_attributes": {
|
17
|
+
"foo": "bar"
|
18
|
+
}
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"name": "Pebbles",
|
22
|
+
"start_date": "2010-12-22",
|
23
|
+
"end_date": "2011-01-03"
|
24
|
+
}
|
25
|
+
]
|
26
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/*valid filings*/
|
2
|
+
{
|
3
|
+
"name": "Foo Inc",
|
4
|
+
"company_number": "12345",
|
5
|
+
"jurisdiction_code": "ie",
|
6
|
+
"filings": [
|
7
|
+
{
|
8
|
+
"title": "Annual Report",
|
9
|
+
"date": "2010-11-22"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"description": "Another type of filing",
|
13
|
+
"date": "2010-11-22"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"title": "Annual Report",
|
17
|
+
"description": "Another type of filing",
|
18
|
+
"uid": "12345A321",
|
19
|
+
"date": "2010-11-22"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"filing_type_name": "Some type",
|
23
|
+
"date": "2010-11-22"
|
24
|
+
}
|
25
|
+
]
|
26
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/*valid filings*/
|
2
|
+
{
|
3
|
+
"name": "Foo Inc",
|
4
|
+
"company_number": "12345",
|
5
|
+
"jurisdiction_code": "ie",
|
6
|
+
"filings": [
|
7
|
+
{
|
8
|
+
"title": "Annual Report",
|
9
|
+
"date": "2010-11-22",
|
10
|
+
"other_attributes": {
|
11
|
+
"foo": "bar"
|
12
|
+
}
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"filing_type_name": "Some type",
|
16
|
+
"filing_type_code": "10-K",
|
17
|
+
"date": "2010-11-22"
|
18
|
+
}
|
19
|
+
]
|
20
|
+
}
|