turbot 0.0.30 → 0.0.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZDA5ZDU1YmEwNTE2ZGM5NDExNWU4ZTZjNDY4NDY4ZjNkZjlmODhjZA==
5
- data.tar.gz: !binary |-
6
- NzRjMDk5YmYyZGIxN2ZkYmI0OTg4Yjc2MDAzMzA0Yzg5ZTdjNzM3Mg==
2
+ SHA1:
3
+ metadata.gz: 63a50a991f01d97eccb3b81bd91ec01e8283bcd4
4
+ data.tar.gz: 033f5a762128b3060e385c39a93333e9a2ab3fca
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NTI3NWIxMjM2YzE2YzEwMWE2OThhZDUwMzllZjc1NGMwZjg2Nzk4ZWQ5Zjc3
10
- Yjg1ZWY5NWY1ZGEwNWFlOTFmMDVlODE0ZmVkMjM5NDQxZDg0NmJlM2NhYTI0
11
- NTYwOTgwODMyNTc1ZmQwOTUwYmIzYTU4MDIxZThjNTVmZTc2MWU=
12
- data.tar.gz: !binary |-
13
- YTdmOWI5ZDZhZjkxMWExYzM1YmEzN2EyYmUxMjE1MjZkZGI3NDMwZDM1N2Jj
14
- MWZkNmFlNWQ4YjViNDY2NzJmNGZiNjZhOTdmZWY0YjFmNjZjNmIyNTRkMDU2
15
- NGJiZjUzMGZkMDk0MjEyM2FiMGFjYTIyYjU5MzlmMWY3NzZkZjM=
6
+ metadata.gz: 7a09713ea6e5355e0cc4db8e7d259b092761a631382d84f3e6e2e804634fb4e1c3fff93c502f8aacadc0934c3ff16691139bf30502bb7b5196295d37953bc554
7
+ data.tar.gz: 65dfa81262d92982df9b918133b0e84f82b56c7358f2f602bfb43f1acb19e4a3c5885f91a26de13c25740d72f3122d86a78d7f667c51ccd0e248af919a249b4c
@@ -160,7 +160,10 @@ class Turbot::Command::Bots < Turbot::Command::Base
160
160
 
161
161
  def push
162
162
  validate_arguments!
163
-
163
+ puts "This will submit your bot and its data for review."
164
+ puts "Are you happy your bot produces valid data (e.g. with `turbot bots:validate`)? [Y/n]"
165
+ confirmed = ask
166
+ error("Aborting push") if !confirmed.downcase.empty? && confirmed.downcase != "y"
164
167
  working_dir = Dir.pwd
165
168
  manifest = parsed_manifest(working_dir)
166
169
  #archive_file = File.join(working_dir, 'tmp', "#{manifest['bot_id']}.zip")
@@ -261,6 +264,10 @@ class Turbot::Command::Bots < Turbot::Command::Base
261
264
  puts "Sending to turbot... "
262
265
 
263
266
  runner = PreviewRunner.new(bot, api)
267
+ Signal.trap("INT") do
268
+ Process.kill("ABRT", runner.wait_thread[:pid])
269
+ runner.interrupt
270
+ end
264
271
  runner.run
265
272
  end
266
273
 
@@ -319,6 +326,13 @@ class PreviewRunner < TurbotRunner::BaseRunner
319
326
  puts
320
327
  end
321
328
 
329
+ def handle_interrupted_run
330
+ result = submit_batch
331
+ puts "Run interrupted!"
332
+ puts "Sent #{@count} records."
333
+ puts "View your records at #{result.data[:url]}"
334
+ end
335
+
322
336
  def handle_successful_run
323
337
  result = submit_batch
324
338
  puts "Sent #{@count} records."
@@ -1,3 +1,3 @@
1
1
  module Turbot
2
- VERSION = "0.0.30"
2
+ VERSION = "0.0.31"
3
3
  end
@@ -4,7 +4,7 @@ import json
4
4
  import datetime
5
5
  import turbotlib
6
6
 
7
- turbotlib.log("starting run...")
7
+ turbotlib.log("Starting run...") # Optional debug logging
8
8
 
9
9
  for n in range(0,20):
10
10
  data = {"number": n,
@@ -13,5 +13,3 @@ for n in range(0,20):
13
13
  "source_url": "http://somewhere.com/%s" % n}
14
14
  # The Turbot specification simply requires us to output lines of JSON
15
15
  print json.dumps(data)
16
-
17
- turbotlib.log("done!")
@@ -3,7 +3,7 @@
3
3
  require 'json'
4
4
  require 'turbotlib'
5
5
 
6
- Turbotlib.log("Starting run...")
6
+ Turbotlib.log("Starting run...") # optional debug logging
7
7
 
8
8
  (1...20).each do |n|
9
9
  data = {
@@ -15,5 +15,3 @@ Turbotlib.log("Starting run...")
15
15
  # The Turbot specification simply requires us to output lines of JSON
16
16
  puts JSON.dump(data)
17
17
  end
18
-
19
- Turbotlib.log("Done!")
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.0.30
4
+ version: 0.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Turbot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-01 00:00:00.000000000 Z
11
+ date: 2014-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: netrc
@@ -42,42 +42,42 @@ dependencies:
42
42
  name: launchy
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.3.2
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.3.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubyzip
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.0.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.0.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: json-schema
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ! '>='
73
+ - - '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ! '>='
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
@@ -114,26 +114,26 @@ dependencies:
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 0.0.3
117
+ version: 0.0.4
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.0.3
124
+ version: 0.0.4
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: excon
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ! '>='
129
+ - - '>='
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ! '>='
136
+ - - '>='
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  description: Client library and command-line tool to deploy and manage apps on Turbot.
@@ -175,23 +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/includes/address.json
180
- - schema/schemas/includes/base-statement.json
181
- - schema/schemas/includes/company.json
182
- - schema/schemas/includes/filing.json
183
- - schema/schemas/includes/license-data.json
184
- - schema/schemas/includes/officer.json
185
- - schema/schemas/includes/previous_name.json
186
- - schema/schemas/includes/share-parcel-data.json
187
- - schema/schemas/includes/share-parcel.json
188
- - schema/schemas/includes/subsidiary-relationship-data.json
189
- - schema/schemas/includes/total-shares.json
190
- - schema/schemas/licence-schema.json
191
- - schema/schemas/primary-data-schema.json
192
- - schema/schemas/share-parcel-schema.json
193
- - schema/schemas/simple-licence-schema.json
194
- - schema/schemas/subsidiary-relationship-schema.json
195
178
  - spec/helper/legacy_help.rb
196
179
  - spec/helper/pg_dump_restore_spec.rb
197
180
  - spec/schemas/dummy_schema.json
@@ -225,6 +208,22 @@ files:
225
208
  - templates/manifest.json
226
209
  - templates/python/scraper.py
227
210
  - templates/ruby/scraper.rb
211
+ - schema/schemas/company-schema.json
212
+ - schema/schemas/includes/address.json
213
+ - schema/schemas/includes/base-statement.json
214
+ - schema/schemas/includes/company.json
215
+ - schema/schemas/includes/filing.json
216
+ - schema/schemas/includes/license-data.json
217
+ - schema/schemas/includes/officer.json
218
+ - schema/schemas/includes/previous_name.json
219
+ - schema/schemas/includes/share-parcel-data.json
220
+ - schema/schemas/includes/share-parcel.json
221
+ - schema/schemas/includes/subsidiary-relationship-data.json
222
+ - schema/schemas/includes/total-shares.json
223
+ - schema/schemas/licence-schema.json
224
+ - schema/schemas/primary-data-schema.json
225
+ - schema/schemas/share-parcel-schema.json
226
+ - schema/schemas/subsidiary-relationship-schema.json
228
227
  homepage: http://turbot.com/
229
228
  licenses:
230
229
  - MIT
@@ -235,19 +234,18 @@ require_paths:
235
234
  - lib
236
235
  required_ruby_version: !ruby/object:Gem::Requirement
237
236
  requirements:
238
- - - ! '>='
237
+ - - '>='
239
238
  - !ruby/object:Gem::Version
240
239
  version: 1.9.2
241
240
  required_rubygems_version: !ruby/object:Gem::Requirement
242
241
  requirements:
243
- - - ! '>='
242
+ - - '>='
244
243
  - !ruby/object:Gem::Version
245
244
  version: '0'
246
245
  requirements: []
247
246
  rubyforge_project:
248
- rubygems_version: 2.2.2
247
+ rubygems_version: 2.0.14
249
248
  signing_key:
250
249
  specification_version: 4
251
250
  summary: Client library and CLI to deploy apps on Turbot.
252
251
  test_files: []
253
- has_rdoc:
@@ -1,50 +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
- },
10
- "sample_date": {
11
- "description": "Date on which this fact was known to be true",
12
- "type": "string"
13
- },
14
- "confidence": {
15
- "description": "Confidence in accuracy of data",
16
- "type": "string",
17
- "enum": ["HIGH", "MEDIUM", "LOW"]
18
- },
19
- "company_name": {
20
- "description": "Name of the company holding the licence",
21
- "type": "string"
22
- },
23
- "company_jurisdiction": {
24
- "description": "Jurisdiction where company is based",
25
- "type": "string"
26
- },
27
- "licence_number": {
28
- "description": "Licence number or code",
29
- "type": "string"
30
- },
31
- "jurisdiction_classification": {
32
- "description": "Description of how regulator classifies licence",
33
- "type": "string"
34
- },
35
- "regulator": {
36
- "description": "The regulating body that issued the licence",
37
- "type": "string"
38
- },
39
- "licence_jurisdiction": {
40
- "description": "Jurisdiction where licence is issued",
41
- "type": "string"
42
- },
43
- "category": {
44
- "description": "Category of licence",
45
- "type": "string",
46
- "enum": ["Financial"]
47
- }
48
- },
49
- "required": ["source_url", "sample_date", "company_name", "company_jurisdiction"]
50
- }