openc_bot 0.0.27 → 0.0.46
Sign up to get free protection for your applications and to get access to all the features.
- 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,20 +0,0 @@
|
|
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
|
-
}
|
@@ -1,37 +0,0 @@
|
|
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
|
-
"start_date": null,
|
17
|
-
"end_date": null,
|
18
|
-
"other_attributes": {
|
19
|
-
"foo": "bar"
|
20
|
-
}
|
21
|
-
},
|
22
|
-
{
|
23
|
-
"name": "Wilman Rubble",
|
24
|
-
"start_date": "2010-12-22",
|
25
|
-
"end_date": "2011-01-03",
|
26
|
-
"uid": "ABC1234",
|
27
|
-
"other_attributes": {
|
28
|
-
"address": "32 Rubble St, Bedrock",
|
29
|
-
"nationality": "United States",
|
30
|
-
"date_of_birth": "1970-04-22",
|
31
|
-
"occupation": "Caveman",
|
32
|
-
"type": "Person",
|
33
|
-
"person_uid": "CD444"
|
34
|
-
}
|
35
|
-
}
|
36
|
-
]
|
37
|
-
}
|
@@ -1,26 +0,0 @@
|
|
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
|
-
}
|
@@ -1,20 +0,0 @@
|
|
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
|
-
}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
/*valid share_parcels*/
|
2
|
-
{
|
3
|
-
"name": "Foo Inc",
|
4
|
-
"company_number": "12345",
|
5
|
-
"jurisdiction_code": "ie",
|
6
|
-
"share_parcels": [
|
7
|
-
{
|
8
|
-
"number_of_shares": 1234,
|
9
|
-
"shareholders": [
|
10
|
-
{
|
11
|
-
"name": "Fred Flintstone"
|
12
|
-
}
|
13
|
-
],
|
14
|
-
"confidence": 42
|
15
|
-
},
|
16
|
-
{
|
17
|
-
"percentage_of_shares": 23.5,
|
18
|
-
"shareholders": [
|
19
|
-
{
|
20
|
-
"name": "Barney Rubble"
|
21
|
-
},
|
22
|
-
{
|
23
|
-
"name": "Wilma Flintstone"
|
24
|
-
}
|
25
|
-
]
|
26
|
-
}
|
27
|
-
]
|
28
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
/*valid alternative_names*/
|
2
|
-
{
|
3
|
-
"name": "Foo Inc",
|
4
|
-
"company_number": "12345",
|
5
|
-
"jurisdiction_code": "ie",
|
6
|
-
"alternative_names": [
|
7
|
-
{
|
8
|
-
"company_name": "Foobar Inc",
|
9
|
-
"type": "trading"
|
10
|
-
},
|
11
|
-
{
|
12
|
-
"company_name": "Foobar Inc",
|
13
|
-
"type": "legal",
|
14
|
-
"language": "fr"
|
15
|
-
}
|
16
|
-
]
|
17
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
/*valid industry_codes*/
|
2
|
-
{
|
3
|
-
"name": "Foo Inc",
|
4
|
-
"company_number": "12345",
|
5
|
-
"jurisdiction_code": "ie",
|
6
|
-
"industry_codes": [
|
7
|
-
{
|
8
|
-
"code": "1234",
|
9
|
-
"code_scheme_id": "eu_nace_2",
|
10
|
-
"name": "Some Industry"
|
11
|
-
},
|
12
|
-
{
|
13
|
-
"code": "1234",
|
14
|
-
"code_scheme_id": "unknown_code_scheme",
|
15
|
-
"name": "Some Industry"
|
16
|
-
},
|
17
|
-
{
|
18
|
-
"code": "22.11",
|
19
|
-
"code_scheme_id": "uk_sic_2007"
|
20
|
-
},
|
21
|
-
{
|
22
|
-
"code": "43.21",
|
23
|
-
"code_scheme_id": "us_naics_2007",
|
24
|
-
"name": "Another Industry",
|
25
|
-
"start_date": "2010-12-22",
|
26
|
-
"end_date": "2011-01-03"
|
27
|
-
}
|
28
|
-
]
|
29
|
-
}
|