turbot 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/turbot/command/bots.rb +1 -13
- data/lib/turbot/version.rb +1 -1
- metadata +4 -33
- data/schema/schemas/company-schema.json +0 -237
- data/schema/schemas/financial-payment-schema.json +0 -32
- data/schema/schemas/includes/address.json +0 -46
- data/schema/schemas/includes/alternative_name.json +0 -36
- data/schema/schemas/includes/company-for-nesting.json +0 -235
- data/schema/schemas/includes/company.json +0 -25
- data/schema/schemas/includes/filing.json +0 -52
- data/schema/schemas/includes/financial-payment-data-object.json +0 -112
- data/schema/schemas/includes/identifier.json +0 -20
- data/schema/schemas/includes/industry_code.json +0 -29
- data/schema/schemas/includes/licence-data-object.json +0 -63
- data/schema/schemas/includes/officer.json +0 -70
- data/schema/schemas/includes/organisation.json +0 -58
- data/schema/schemas/includes/permission.json +0 -46
- data/schema/schemas/includes/person.json +0 -62
- data/schema/schemas/includes/person_name.json +0 -71
- data/schema/schemas/includes/previous_name.json +0 -24
- data/schema/schemas/includes/share-parcel-data.json +0 -82
- data/schema/schemas/includes/share-parcel.json +0 -78
- data/schema/schemas/includes/subsidiary-relationship-data.json +0 -58
- data/schema/schemas/includes/total-shares.json +0 -17
- data/schema/schemas/includes/unknown_entity_type.json +0 -58
- data/schema/schemas/licence-schema.json +0 -196
- data/schema/schemas/primary-data-schema.json +0 -20
- data/schema/schemas/share-parcel-schema.json +0 -22
- data/schema/schemas/simple-financial-payment-schema.json +0 -122
- data/schema/schemas/simple-licence-schema.json +0 -74
- data/schema/schemas/simple-subsidiary-schema.json +0 -81
- data/schema/schemas/subsidiary-relationship-schema.json +0 -46
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjNkN2MwZDFkOWVkNTI4ODgzMDBjYTI0MzVkNGU1ZjIxOTU2MDZiZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjMzOTQ4NTg1MDIzYjE1YzZhNDQ3NzIxOTAwMWRmZDRkNzI3NjU3NQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2QyMWIzN2ViMTMwMmViNGVlZmQyMWFlOWM1MGNiY2ZkYmNhMTZiZmVmMjZk
|
10
|
+
MTEzMWM0MzFkNzc0MGU0NDZhMTI2NmNjNzg4M2YwYzk4ZjMzOWUxMGYzZmM2
|
11
|
+
NTNjYWFjODEwOTZiYmE3OTM1NjlkYzMxZjkzOTUzNTMwMTFiM2I=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWVkN2ZlNzJhYTQwMDQxZTI5NWIyNDMyNDY2ODJhMjAxYzYzNjkwZmJhZmZh
|
14
|
+
ODY2MmNkMDU2ODMwM2U3ZTcxNGE5YzQxOWVhODc2MDFmZDdhZjgzMmU4MDZi
|
15
|
+
NTk1MGNmMTU3MjA1ZDVmM2YwYmViOTNlZjkxZjU4NmI3OWM2MmU=
|
data/lib/turbot/command/bots.rb
CHANGED
@@ -2,7 +2,6 @@ require "turbot/command/base"
|
|
2
2
|
require 'active_support/core_ext/object/blank'
|
3
3
|
require 'active_support/core_ext/hash/slice'
|
4
4
|
require 'zip'
|
5
|
-
require 'json-schema'
|
6
5
|
require 'open3'
|
7
6
|
require 'base64'
|
8
7
|
require 'shellwords'
|
@@ -179,7 +178,7 @@ class Turbot::Command::Bots < Turbot::Command::Base
|
|
179
178
|
response = File.open(archive_path) {|file| api.update_code(bot, file)}
|
180
179
|
case response
|
181
180
|
when Turbot::API::SuccessResponse
|
182
|
-
puts "Your bot has been pushed to Turbot and will be reviewed for inclusion as soon as we can.
|
181
|
+
puts "Your bot has been pushed to Turbot and will be reviewed for inclusion as soon as we can. THANK YOU!"
|
183
182
|
when Turbot::API::FailureResponse
|
184
183
|
error(response.message)
|
185
184
|
end
|
@@ -205,12 +204,6 @@ class Turbot::Command::Bots < Turbot::Command::Base
|
|
205
204
|
|
206
205
|
type = config["data_type"]
|
207
206
|
|
208
|
-
schema = get_schema(type)
|
209
|
-
|
210
|
-
if !schema || !File.exists?(schema)
|
211
|
-
error("No schema found for data_type: #{type}")
|
212
|
-
end
|
213
|
-
|
214
207
|
handler = ValidationHandler.new
|
215
208
|
runner = TurbotRunner::Runner.new(Dir.pwd, :record_handler => handler)
|
216
209
|
rc = runner.run
|
@@ -329,11 +322,6 @@ class Turbot::Command::Bots < Turbot::Command::Base
|
|
329
322
|
File.join(Dir.pwd, 'manifest.json')
|
330
323
|
end
|
331
324
|
|
332
|
-
def get_schema(type)
|
333
|
-
hyphenated_name = type.to_s.gsub("_", "-").gsub(" ", "-")
|
334
|
-
File.expand_path("../../../../schema/schemas/#{hyphenated_name}-schema.json", __FILE__)
|
335
|
-
end
|
336
|
-
|
337
325
|
def create_zip_archive(archive_path, basepath, subpaths)
|
338
326
|
Zip.continue_on_exists_proc = true
|
339
327
|
Zip::File.open(archive_path, Zip::File::CREATE) do |zipfile|
|
data/lib/turbot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Turbot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: turbotlib
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.1.
|
117
|
+
version: 0.1.32
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - '='
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.1.
|
124
|
+
version: 0.1.32
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: excon
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -175,35 +175,6 @@ files:
|
|
175
175
|
- lib/turbot/updater.rb
|
176
176
|
- lib/turbot/version.rb
|
177
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-for-nesting.json
|
183
|
-
- schema/schemas/includes/company.json
|
184
|
-
- schema/schemas/includes/filing.json
|
185
|
-
- schema/schemas/includes/financial-payment-data-object.json
|
186
|
-
- schema/schemas/includes/identifier.json
|
187
|
-
- schema/schemas/includes/industry_code.json
|
188
|
-
- schema/schemas/includes/licence-data-object.json
|
189
|
-
- schema/schemas/includes/officer.json
|
190
|
-
- schema/schemas/includes/organisation.json
|
191
|
-
- schema/schemas/includes/permission.json
|
192
|
-
- schema/schemas/includes/person.json
|
193
|
-
- schema/schemas/includes/person_name.json
|
194
|
-
- schema/schemas/includes/previous_name.json
|
195
|
-
- schema/schemas/includes/share-parcel-data.json
|
196
|
-
- schema/schemas/includes/share-parcel.json
|
197
|
-
- schema/schemas/includes/subsidiary-relationship-data.json
|
198
|
-
- schema/schemas/includes/total-shares.json
|
199
|
-
- schema/schemas/includes/unknown_entity_type.json
|
200
|
-
- schema/schemas/licence-schema.json
|
201
|
-
- schema/schemas/primary-data-schema.json
|
202
|
-
- schema/schemas/share-parcel-schema.json
|
203
|
-
- schema/schemas/simple-financial-payment-schema.json
|
204
|
-
- schema/schemas/simple-licence-schema.json
|
205
|
-
- schema/schemas/simple-subsidiary-schema.json
|
206
|
-
- schema/schemas/subsidiary-relationship-schema.json
|
207
178
|
- spec/helper/legacy_help.rb
|
208
179
|
- spec/helper/pg_dump_restore_spec.rb
|
209
180
|
- spec/schemas/dummy_schema.json
|
@@ -1,237 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
-
"description": "A company in OpenCorporates",
|
4
|
-
"type": "object",
|
5
|
-
"properties": {
|
6
|
-
"company_number": {
|
7
|
-
"type": "string",
|
8
|
-
"description": "unique identifier given by the corporate register with which it is incorporated",
|
9
|
-
"minLength": 1
|
10
|
-
},
|
11
|
-
"name": {
|
12
|
-
"type": "string",
|
13
|
-
"description": "Legal name of the company",
|
14
|
-
"minLength": 1
|
15
|
-
},
|
16
|
-
"jurisdiction_code": {
|
17
|
-
"type": "string",
|
18
|
-
"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",
|
19
|
-
"minLength": 2,
|
20
|
-
"maxLength": 5
|
21
|
-
},
|
22
|
-
"incorporation_date": {
|
23
|
-
"type": "string",
|
24
|
-
"format": "date"
|
25
|
-
},
|
26
|
-
"dissolution_date": {
|
27
|
-
"type": "string",
|
28
|
-
"format": "date"
|
29
|
-
},
|
30
|
-
"retrieved_at": {
|
31
|
-
"type": "string",
|
32
|
-
"format": "date-time"
|
33
|
-
},
|
34
|
-
"current_status": {
|
35
|
-
"type": "string"
|
36
|
-
},
|
37
|
-
"company_type": {
|
38
|
-
"type": "string"
|
39
|
-
},
|
40
|
-
"registry_url": {
|
41
|
-
"type": "string"
|
42
|
-
},
|
43
|
-
"website": {
|
44
|
-
"type": "string",
|
45
|
-
"minLength": 5
|
46
|
-
},
|
47
|
-
"telephone_number": {
|
48
|
-
"type": "string",
|
49
|
-
"minLength": 4
|
50
|
-
},
|
51
|
-
"fax_number": {
|
52
|
-
"type": "string",
|
53
|
-
"minLength": 4
|
54
|
-
},
|
55
|
-
"registered_address": {
|
56
|
-
"$ref": "includes/address.json"
|
57
|
-
},
|
58
|
-
"headquarters_address": {
|
59
|
-
"$ref": "includes/address.json"
|
60
|
-
},
|
61
|
-
"mailing_address": {
|
62
|
-
"$ref": "includes/address.json"
|
63
|
-
},
|
64
|
-
"officers": {
|
65
|
-
"type": "array",
|
66
|
-
"items": {
|
67
|
-
"$ref": "includes/officer.json"
|
68
|
-
}
|
69
|
-
},
|
70
|
-
"share_parcels": {
|
71
|
-
"type": "array",
|
72
|
-
"items": {
|
73
|
-
"$ref": "includes/share-parcel.json"
|
74
|
-
}
|
75
|
-
},
|
76
|
-
"total_shares": {
|
77
|
-
"$ref": "includes/total-shares.json"
|
78
|
-
},
|
79
|
-
"filings": {
|
80
|
-
"type": "array",
|
81
|
-
"items": {
|
82
|
-
"$ref": "includes/filing.json"
|
83
|
-
}
|
84
|
-
},
|
85
|
-
"identifiers": {
|
86
|
-
"type": "array",
|
87
|
-
"items": {
|
88
|
-
"$ref": "includes/identifier.json"
|
89
|
-
}
|
90
|
-
},
|
91
|
-
"industry_codes": {
|
92
|
-
"type": "array",
|
93
|
-
"items": {
|
94
|
-
"$ref": "includes/industry_code.json"
|
95
|
-
}
|
96
|
-
},
|
97
|
-
"previous_names": {
|
98
|
-
"type": "array",
|
99
|
-
"items": {
|
100
|
-
"$ref": "includes/previous_name.json"
|
101
|
-
}
|
102
|
-
},
|
103
|
-
"alternative_names": {
|
104
|
-
"type": "array",
|
105
|
-
"items": {
|
106
|
-
"$ref": "includes/alternative_name.json"
|
107
|
-
}
|
108
|
-
},
|
109
|
-
"branch": {
|
110
|
-
"type": [
|
111
|
-
"string",
|
112
|
-
"null"
|
113
|
-
],
|
114
|
-
"description": "A flag to denote whether a company is a branch entity. This should only be set if the company is a type of branch (otherwise should be null). In general the only option here is 'F' for a 'Foreign' branch, i.e. an out-of-jurisdiction entity that has registered as having a presence in the jurisdiction. In the US this is sometimes called a Foreign Corporation",
|
115
|
-
"enum": [
|
116
|
-
"F",
|
117
|
-
"L",
|
118
|
-
null
|
119
|
-
]
|
120
|
-
},
|
121
|
-
"all_attributes": {
|
122
|
-
"type": "object",
|
123
|
-
"description": "Other arbitrary attributes for a given company",
|
124
|
-
"properties": {
|
125
|
-
"jurisdiction_of_origin": {
|
126
|
-
"type": [
|
127
|
-
"string",
|
128
|
-
"null"
|
129
|
-
],
|
130
|
-
"description": "The jurisdiction of the 'home' company if this is a branch",
|
131
|
-
"minLength": 1
|
132
|
-
},
|
133
|
-
"home_company_number": {
|
134
|
-
"type": [
|
135
|
-
"string",
|
136
|
-
"null"
|
137
|
-
],
|
138
|
-
"description": "If the entity is a 'branch', this is the company_number of the 'home' company in the home company's jurisdiction",
|
139
|
-
"minLength": 1
|
140
|
-
},
|
141
|
-
"home_legal_name": {
|
142
|
-
"type": [
|
143
|
-
"string",
|
144
|
-
"null"
|
145
|
-
],
|
146
|
-
"description": "The legal name of the 'home' company in its jurisdiction if this is a branch, and the name is different from the legal name of the branch",
|
147
|
-
"minLength": 1
|
148
|
-
},
|
149
|
-
"registered_agent_address": {
|
150
|
-
"type": [
|
151
|
-
"string",
|
152
|
-
"null"
|
153
|
-
],
|
154
|
-
"description": "The address of the 'Agent', a public address to which legal papers can be served",
|
155
|
-
"minLength": 1
|
156
|
-
},
|
157
|
-
"registered_agent_name": {
|
158
|
-
"type": [
|
159
|
-
"string",
|
160
|
-
"null"
|
161
|
-
],
|
162
|
-
"description": "The 'Agent' of the company – a person or entity that is empowered to accept service for the company",
|
163
|
-
"minLength": 1
|
164
|
-
},
|
165
|
-
"number_of_employees": {
|
166
|
-
"anyOf": [
|
167
|
-
{
|
168
|
-
"type": "string",
|
169
|
-
"minLength": 1
|
170
|
-
},
|
171
|
-
{
|
172
|
-
"type": "number",
|
173
|
-
"minimum": 0
|
174
|
-
}
|
175
|
-
],
|
176
|
-
"description": "The number of employees"
|
177
|
-
},
|
178
|
-
"merged_into": {
|
179
|
-
"type": "object",
|
180
|
-
"description": "Information on the merger of this company into a 'survivor' company",
|
181
|
-
"properties": {
|
182
|
-
"surviving_company": {
|
183
|
-
"type": [
|
184
|
-
"object"
|
185
|
-
],
|
186
|
-
"description": "the surviving_company that this has been merged into",
|
187
|
-
"properties": {
|
188
|
-
"name": {
|
189
|
-
"type": "string",
|
190
|
-
"description": "The legal name of the surviving company",
|
191
|
-
"minLength": 1
|
192
|
-
},
|
193
|
-
"company_number": {
|
194
|
-
"type": "string",
|
195
|
-
"description": "The company_number of the surviving company, if known",
|
196
|
-
"minLength": 1
|
197
|
-
},
|
198
|
-
"jurisdiction": {
|
199
|
-
"type": "string",
|
200
|
-
"description": "The jurisdiction of incorporation of the surviving company",
|
201
|
-
"minLength": 2
|
202
|
-
}
|
203
|
-
},
|
204
|
-
"anyOf": [
|
205
|
-
{
|
206
|
-
"required": [
|
207
|
-
"name"
|
208
|
-
]
|
209
|
-
},
|
210
|
-
{
|
211
|
-
"required": [
|
212
|
-
"company_number"
|
213
|
-
]
|
214
|
-
}
|
215
|
-
]
|
216
|
-
},
|
217
|
-
"effective_date": {
|
218
|
-
"type": "string",
|
219
|
-
"format": "date",
|
220
|
-
"description": "The date of the merger"
|
221
|
-
}
|
222
|
-
},
|
223
|
-
"additionalProperties": false,
|
224
|
-
"required": [
|
225
|
-
"surviving_company"
|
226
|
-
]
|
227
|
-
}
|
228
|
-
}
|
229
|
-
}
|
230
|
-
},
|
231
|
-
"additionalProperties": false,
|
232
|
-
"required": [
|
233
|
-
"company_number",
|
234
|
-
"name",
|
235
|
-
"jurisdiction_code"
|
236
|
-
]
|
237
|
-
}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
-
"description": "A Financial-Payment is a payment from government to a recipient",
|
4
|
-
"type": "object",
|
5
|
-
"properties": {
|
6
|
-
"sample_date": {
|
7
|
-
"type": "string",
|
8
|
-
"format": "date"
|
9
|
-
},
|
10
|
-
"source_jurisdiction": {
|
11
|
-
"description": "Jurisdiction of the source of the data",
|
12
|
-
"type": "string"
|
13
|
-
},
|
14
|
-
"company": {
|
15
|
-
"$ref": "includes/company.json"
|
16
|
-
},
|
17
|
-
"data": {
|
18
|
-
"type": "array",
|
19
|
-
"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",
|
20
|
-
"items": {
|
21
|
-
"$ref": "includes/financial-payment-data-object.json"
|
22
|
-
},
|
23
|
-
"additionalItems": false
|
24
|
-
}
|
25
|
-
},
|
26
|
-
"additionalProperties": false,
|
27
|
-
"required": [
|
28
|
-
"company",
|
29
|
-
"data",
|
30
|
-
"sample_date"
|
31
|
-
]
|
32
|
-
}
|
@@ -1,46 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
-
"oneOf": [
|
4
|
-
{
|
5
|
-
"type": [
|
6
|
-
"string",
|
7
|
-
"null"
|
8
|
-
],
|
9
|
-
"minLength": 2
|
10
|
-
},
|
11
|
-
{
|
12
|
-
"name": "Address",
|
13
|
-
"description": "An address object",
|
14
|
-
"type": "object",
|
15
|
-
"properties": {
|
16
|
-
"street_address": {
|
17
|
-
"type": "string"
|
18
|
-
},
|
19
|
-
"locality": {
|
20
|
-
"type": "string"
|
21
|
-
},
|
22
|
-
"region": {
|
23
|
-
"type": "string"
|
24
|
-
},
|
25
|
-
"postal_code": {
|
26
|
-
"type": "string"
|
27
|
-
},
|
28
|
-
"country": {
|
29
|
-
"type": "string"
|
30
|
-
}
|
31
|
-
},
|
32
|
-
"anyOf": [
|
33
|
-
{
|
34
|
-
"required": [
|
35
|
-
"street_address"
|
36
|
-
]
|
37
|
-
},
|
38
|
-
{
|
39
|
-
"required": [
|
40
|
-
"postal_code"
|
41
|
-
]
|
42
|
-
}
|
43
|
-
]
|
44
|
-
}
|
45
|
-
]
|
46
|
-
}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "http://json-schema.org/draft-04/schema#",
|
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
|
-
"type": "object",
|
5
|
-
"properties": {
|
6
|
-
"company_name": {
|
7
|
-
"type": "string",
|
8
|
-
"minLength": 1
|
9
|
-
},
|
10
|
-
"start_date": {
|
11
|
-
"type": "string",
|
12
|
-
"format": "date"
|
13
|
-
},
|
14
|
-
"end_date": {
|
15
|
-
"type": "string",
|
16
|
-
"format": "date"
|
17
|
-
},
|
18
|
-
"language": {
|
19
|
-
"type": "string",
|
20
|
-
"minLength": 2,
|
21
|
-
"maxLength": 2
|
22
|
-
},
|
23
|
-
"type": {
|
24
|
-
"type": "string",
|
25
|
-
"enum": [
|
26
|
-
"trading",
|
27
|
-
"abbreviation",
|
28
|
-
"legal"
|
29
|
-
]
|
30
|
-
}
|
31
|
-
},
|
32
|
-
"required": [
|
33
|
-
"company_name",
|
34
|
-
"type"
|
35
|
-
]
|
36
|
-
}
|