turbot 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/turbot/command/bots.rb +6 -1
- data/lib/turbot/distribution.rb +1 -1
- data/lib/turbot/version.rb +1 -1
- data/schema/schemas/company-schema.json +8 -3
- data/schema/schemas/includes/address.json +1 -1
- data/schema/schemas/includes/alternative_name.json +2 -2
- data/schema/schemas/includes/filing.json +1 -1
- data/schema/schemas/includes/industry_code.json +6 -3
- data/schema/schemas/includes/officer.json +8 -4
- data/schema/schemas/includes/previous_name.json +1 -1
- data/schema/schemas/includes/share-parcel.json +3 -0
- data/templates/manifest.json +1 -0
- data/templates/python/scraper.py +1 -0
- data/templates/ruby/scraper.rb +1 -0
- metadata +30 -49
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ODM4NTgyMTg4MTczZWFhMjczYjhjMWYwNDQ4OGY0MzJmNTUxN2VkNA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZDcxZjdlZWI2ZTY1ODM2NmM3YWVkN2QxYjNhNjU0OGQ1MWZiNmI5Yw==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MjY0MjM5OWIxY2RhM2Q0ZmE2ZTRhZWQ1ZDVmMmM3ZWM2MTdlN2RlOTJlODUz
|
10
|
+
ZjFiNjIzMjgxZWEwMTRiY2NhNjMwZTc1YWI0MzNkOGRhNWM1ZWUzZDlkMGU1
|
11
|
+
YTM4MDc2MmI2NWRlYzIyMzc1NmNmNDNmZDEzOWYzNjEzMmQyNzM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NjE2ZTNiZTUzODY3N2VkZWIwOTQxMDhhZGY3NDY0YzcwMWFjNGNjNThmNTg2
|
14
|
+
ZDhhNTlkZTk4MDU2N2M3ZTA4ZDBiMWZkMDM4ZDg4YzYzNDliOTVkNmFmZjVh
|
15
|
+
Nzc0ZjM4NWMxOTRkOTdmYjJlNjAwYTU2ZjRlZTU0ZTFmMmJlNzA=
|
data/lib/turbot/command/bots.rb
CHANGED
@@ -199,10 +199,15 @@ class Turbot::Command::Bots < Turbot::Command::Base
|
|
199
199
|
validate_arguments!
|
200
200
|
config = parsed_manifest(Dir.pwd)
|
201
201
|
|
202
|
-
%w(bot_id data_type identifying_fields files publisher).each do |key|
|
202
|
+
%w(bot_id data_type identifying_fields company_fields files publisher).each do |key|
|
203
203
|
error("Manifest is missing #{key}") unless config.has_key?(key)
|
204
204
|
end
|
205
205
|
|
206
|
+
company_field_keys = %w(name company_number jurisdiction)
|
207
|
+
unless Set.new(config['company_fields'].keys).subset?(Set.new(company_field_keys))
|
208
|
+
error("In manifest, company_fields should contain at least one of #{company_field_keys}")
|
209
|
+
end
|
210
|
+
|
206
211
|
type = config["data_type"]
|
207
212
|
|
208
213
|
schema = get_schema(type)
|
data/lib/turbot/distribution.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Turbot
|
2
2
|
module Distribution
|
3
3
|
def self.files
|
4
|
-
Dir[File.expand_path("../../../{bin,data,lib}/**/*", __FILE__)].select do |file|
|
4
|
+
(Dir[File.expand_path("../../../{Gemfile,turbot.gemspec,.gitmodules,schema}", __FILE__)] + Dir[File.expand_path("../../../{.git,bin,data,lib,templates}/**/*", __FILE__)]).select do |file|
|
5
5
|
File.file?(file)
|
6
6
|
end
|
7
7
|
end
|
data/lib/turbot/version.rb
CHANGED
@@ -6,14 +6,17 @@
|
|
6
6
|
"properties": {
|
7
7
|
"company_number": {
|
8
8
|
"type": "string",
|
9
|
+
"description": "unique identifier given by the corporate register with which it is incorporated",
|
9
10
|
"minLength": 1
|
10
11
|
},
|
11
12
|
"name": {
|
12
13
|
"type": "string",
|
14
|
+
"description": "Legal name of the company",
|
13
15
|
"minLength": 1
|
14
16
|
},
|
15
17
|
"jurisdiction_code": {
|
16
18
|
"type": "string",
|
19
|
+
"description": "Code representing the jurisdiction/company register which is the canonical record of the company’s existence. Uses underscored ISO 3166-2 to represent it, e.g. es for Spain, us_de for Delaware",
|
17
20
|
"minLength": 2,
|
18
21
|
"maxLength": 5
|
19
22
|
},
|
@@ -130,9 +133,11 @@
|
|
130
133
|
"minLength": 1
|
131
134
|
},
|
132
135
|
"number_of_employees": {
|
133
|
-
"
|
134
|
-
|
135
|
-
|
136
|
+
"anyOf": [
|
137
|
+
{"type":"string","minLength": 1},
|
138
|
+
{"type":"number","minimum": 0}
|
139
|
+
],
|
140
|
+
"description": "The number of employees"
|
136
141
|
},
|
137
142
|
"merged_into": {
|
138
143
|
"type": "object",
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"description": "An address object",
|
10
10
|
"type": "object",
|
11
11
|
"properties": { "street_address": { "type": "string" },
|
12
|
-
"locality": {
|
12
|
+
"locality": {"type":"string"},
|
13
13
|
"region": { "type": "string" },
|
14
14
|
"postal_code": { "type": "string" },
|
15
15
|
"country": { "type": "string" }
|
@@ -3,8 +3,8 @@
|
|
3
3
|
"description": "An alternative name of a company, e.g. abbreviation, trading (including dba or doing business as), legal. As well as trading names etc, it can be used for storing alternative language representations of the legal name, in which case the language should be represented as two-letter ISO-639 code",
|
4
4
|
"type": "object",
|
5
5
|
"properties": { "company_name": { "type": "string", "minLength": 1 },
|
6
|
-
"start_date": {
|
7
|
-
"end_date": {
|
6
|
+
"start_date": {"type":"string","format": "date"},
|
7
|
+
"end_date": {"type":"string","format": "date"},
|
8
8
|
"language": { "type": "string", "minLength": 2, "maxLength": 2 },
|
9
9
|
"type": { "type": "string", "enum": ["trading", "abbreviation", "legal"] }
|
10
10
|
},
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"description": "A statutory filing",
|
4
4
|
"type": "object",
|
5
5
|
"properties": { "title": { "type": "string" },
|
6
|
-
"date": {
|
6
|
+
"date": {"type":"string","format": "date"},
|
7
7
|
"description": { "type": "string" },
|
8
8
|
"uid": { "type": "string" },
|
9
9
|
"url": { "type": "string" },
|
@@ -4,9 +4,12 @@
|
|
4
4
|
"type": "object",
|
5
5
|
"properties": { "name": { "type": "string" },
|
6
6
|
"code": { "type": "string" },
|
7
|
-
"code_scheme_id": {
|
8
|
-
|
9
|
-
|
7
|
+
"code_scheme_id": {
|
8
|
+
"type": "string",
|
9
|
+
"description": "An identifier representing industry code scheme. At the moment these are eu_nace_2, uk_sic_2003, uk_sic_2007, us_naics_2002, us_naics_2007, be_nace_2008, dk_db_2007, nz_bic_2006, no_sic_2007, anz_sic_2006, nz_bic_2006, in_nic_2004_mca, ca_qc_cae, lu_nace_2. For other code schemes, or details of these, contact info@opencorporates.com"
|
10
|
+
},
|
11
|
+
"start_date": {"type":"string","format": "date"},
|
12
|
+
"end_date": {"type":"string","format": "date"}
|
10
13
|
},
|
11
14
|
"required": [ "code", "code_scheme_id" ]
|
12
15
|
}
|
@@ -4,12 +4,16 @@
|
|
4
4
|
"type": "object",
|
5
5
|
"properties": { "name": { "type": "string", "minLength": 1 },
|
6
6
|
"start_date": {
|
7
|
-
"
|
8
|
-
|
7
|
+
"anyOf": [
|
8
|
+
{"type":"string","format": "date"},
|
9
|
+
{"type":"null"}
|
10
|
+
]
|
9
11
|
},
|
10
12
|
"end_date": {
|
11
|
-
"
|
12
|
-
|
13
|
+
"anyOf": [
|
14
|
+
{"type":"string","format": "date"},
|
15
|
+
{"type":"null"}
|
16
|
+
]
|
13
17
|
},
|
14
18
|
"position": { "type": "string" },
|
15
19
|
"other_attributes": {
|
@@ -13,6 +13,9 @@
|
|
13
13
|
"maximum": 100,
|
14
14
|
"minimum": 0
|
15
15
|
},
|
16
|
+
"start_date": {"type":"string","format": "date"},
|
17
|
+
"end_date": {"type":"string","format": "date"},
|
18
|
+
"sample_date": {"type":"string","format": "date"},
|
16
19
|
"shareholders": {
|
17
20
|
"description": "Legal persons who own this share parcel",
|
18
21
|
"type": "array",
|
data/templates/manifest.json
CHANGED
data/templates/python/scraper.py
CHANGED
@@ -8,6 +8,7 @@ turbotlib.log("Starting run...") # Optional debug logging
|
|
8
8
|
|
9
9
|
for n in range(0,20):
|
10
10
|
data = {"number": n,
|
11
|
+
"company": "Company %s Ltd" % n,
|
11
12
|
"message": "Hello %s" % n,
|
12
13
|
"sample_date": datetime.datetime.now().isoformat(),
|
13
14
|
"source_url": "http://somewhere.com/%s" % n}
|
data/templates/ruby/scraper.rb
CHANGED
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Turbot
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-11-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: netrc
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rest-client
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: launchy
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rubyzip
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ! '>='
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ! '>='
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: json-schema
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ! '>='
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ! '>='
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -94,7 +83,6 @@ dependencies:
|
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: activesupport
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
87
|
- - '='
|
100
88
|
- !ruby/object:Gem::Version
|
@@ -102,7 +90,6 @@ dependencies:
|
|
102
90
|
type: :runtime
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
94
|
- - '='
|
108
95
|
- !ruby/object:Gem::Version
|
@@ -110,7 +97,6 @@ dependencies:
|
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: turbot-api
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
101
|
- - '='
|
116
102
|
- !ruby/object:Gem::Version
|
@@ -118,7 +104,6 @@ dependencies:
|
|
118
104
|
type: :runtime
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
108
|
- - '='
|
124
109
|
- !ruby/object:Gem::Version
|
@@ -126,23 +111,20 @@ dependencies:
|
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: turbot-runner
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
115
|
- - '='
|
132
116
|
- !ruby/object:Gem::Version
|
133
|
-
version: 0.1.
|
117
|
+
version: 0.1.7
|
134
118
|
type: :runtime
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
122
|
- - '='
|
140
123
|
- !ruby/object:Gem::Version
|
141
|
-
version: 0.1.
|
124
|
+
version: 0.1.7
|
142
125
|
- !ruby/object:Gem::Dependency
|
143
126
|
name: excon
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
128
|
requirements:
|
147
129
|
- - ! '>='
|
148
130
|
- !ruby/object:Gem::Version
|
@@ -150,7 +132,6 @@ dependencies:
|
|
150
132
|
type: :runtime
|
151
133
|
prerelease: false
|
152
134
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
135
|
requirements:
|
155
136
|
- - ! '>='
|
156
137
|
- !ruby/object:Gem::Version
|
@@ -194,6 +175,28 @@ files:
|
|
194
175
|
- lib/turbot/updater.rb
|
195
176
|
- lib/turbot/version.rb
|
196
177
|
- lib/vendor/turbot/okjson.rb
|
178
|
+
- schema/schemas/company-schema.json
|
179
|
+
- schema/schemas/financial-payment-schema.json
|
180
|
+
- schema/schemas/includes/address.json
|
181
|
+
- schema/schemas/includes/alternative_name.json
|
182
|
+
- schema/schemas/includes/company.json
|
183
|
+
- schema/schemas/includes/filing.json
|
184
|
+
- schema/schemas/includes/financial-payment-data-object.json
|
185
|
+
- schema/schemas/includes/industry_code.json
|
186
|
+
- schema/schemas/includes/licence-data-object.json
|
187
|
+
- schema/schemas/includes/officer.json
|
188
|
+
- schema/schemas/includes/previous_name.json
|
189
|
+
- schema/schemas/includes/share-parcel-data.json
|
190
|
+
- schema/schemas/includes/share-parcel.json
|
191
|
+
- schema/schemas/includes/subsidiary-relationship-data.json
|
192
|
+
- schema/schemas/includes/total-shares.json
|
193
|
+
- schema/schemas/licence-schema.json
|
194
|
+
- schema/schemas/primary-data-schema.json
|
195
|
+
- schema/schemas/share-parcel-schema.json
|
196
|
+
- schema/schemas/simple-financial-payment-schema.json
|
197
|
+
- schema/schemas/simple-licence-schema.json
|
198
|
+
- schema/schemas/simple-subsidiary-schema.json
|
199
|
+
- schema/schemas/subsidiary-relationship-schema.json
|
197
200
|
- spec/helper/legacy_help.rb
|
198
201
|
- spec/helper/pg_dump_restore_spec.rb
|
199
202
|
- spec/schemas/dummy_schema.json
|
@@ -227,51 +230,29 @@ files:
|
|
227
230
|
- templates/manifest.json
|
228
231
|
- templates/python/scraper.py
|
229
232
|
- templates/ruby/scraper.rb
|
230
|
-
- schema/schemas/company-schema.json
|
231
|
-
- schema/schemas/financial-payment-schema.json
|
232
|
-
- schema/schemas/includes/address.json
|
233
|
-
- schema/schemas/includes/alternative_name.json
|
234
|
-
- schema/schemas/includes/company.json
|
235
|
-
- schema/schemas/includes/filing.json
|
236
|
-
- schema/schemas/includes/financial-payment-data-object.json
|
237
|
-
- schema/schemas/includes/industry_code.json
|
238
|
-
- schema/schemas/includes/licence-data-object.json
|
239
|
-
- schema/schemas/includes/officer.json
|
240
|
-
- schema/schemas/includes/previous_name.json
|
241
|
-
- schema/schemas/includes/share-parcel-data.json
|
242
|
-
- schema/schemas/includes/share-parcel.json
|
243
|
-
- schema/schemas/includes/subsidiary-relationship-data.json
|
244
|
-
- schema/schemas/includes/total-shares.json
|
245
|
-
- schema/schemas/licence-schema.json
|
246
|
-
- schema/schemas/primary-data-schema.json
|
247
|
-
- schema/schemas/share-parcel-schema.json
|
248
|
-
- schema/schemas/simple-financial-payment-schema.json
|
249
|
-
- schema/schemas/simple-licence-schema.json
|
250
|
-
- schema/schemas/simple-subsidiary-schema.json
|
251
|
-
- schema/schemas/subsidiary-relationship-schema.json
|
252
233
|
homepage: http://turbot.com/
|
253
234
|
licenses:
|
254
235
|
- MIT
|
236
|
+
metadata: {}
|
255
237
|
post_install_message:
|
256
238
|
rdoc_options: []
|
257
239
|
require_paths:
|
258
240
|
- lib
|
259
241
|
required_ruby_version: !ruby/object:Gem::Requirement
|
260
|
-
none: false
|
261
242
|
requirements:
|
262
243
|
- - ! '>='
|
263
244
|
- !ruby/object:Gem::Version
|
264
245
|
version: 1.9.2
|
265
246
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
266
|
-
none: false
|
267
247
|
requirements:
|
268
248
|
- - ! '>='
|
269
249
|
- !ruby/object:Gem::Version
|
270
250
|
version: '0'
|
271
251
|
requirements: []
|
272
252
|
rubyforge_project:
|
273
|
-
rubygems_version:
|
253
|
+
rubygems_version: 2.2.2
|
274
254
|
signing_key:
|
275
|
-
specification_version:
|
255
|
+
specification_version: 4
|
276
256
|
summary: Client library and CLI to deploy apps on Turbot.
|
277
257
|
test_files: []
|
258
|
+
has_rdoc:
|