turbot 0.0.45 → 0.0.46

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ba0f986513743496f076e45c3281df0d7a0340f
4
- data.tar.gz: 0380c81bf5a47aa6456b9bd2dfd82bdde19d7145
3
+ metadata.gz: 66019d75113e4ff7d97e4543facdffe032321927
4
+ data.tar.gz: d31bb1bd2f728fbbc2052eeb52f2ac02c4e05953
5
5
  SHA512:
6
- metadata.gz: 50f5799e4016538dbb0f13c593e2f057969ea497730e65098138a29bd8fe0a0fde8574f343e1a0388e71f3b79db0eea5d8a6fc034428011a01eda3ae827266f2
7
- data.tar.gz: a1ebd1928f80de4cbd1b6bf6c0a69a7199a4ac79e8662ae087920ca28fd3575c654104a367ca972e910d50583277bae54ae8b0f355e79ceac98331f7b53a828e
6
+ metadata.gz: 910128b476fd7c49f43cfe34d131b5c6f3d7c948fe7e292879b55c6b99acd553a0b6214e5fb95f45e2555f99e63773a86f61e2ea5ab23444ce92e45d12d5ca4e
7
+ data.tar.gz: 8dcb910a5f2c2f1b8011bc1598dbd1d6972e5c1e86499179e4b8c268e11c389de9ebb35045fd7d53a8cc818cf32d8694553f510e456790c9568692072942934a
@@ -273,10 +273,6 @@ class Turbot::Command::Bots < Turbot::Command::Base
273
273
  puts "Sending to turbot... "
274
274
 
275
275
  runner = PreviewRunner.new(bot, api)
276
- Signal.trap("INT") do
277
- Process.kill("ABRT", runner.wait_thread[:pid])
278
- runner.interrupt
279
- end
280
276
  runner.run
281
277
  end
282
278
 
@@ -352,13 +348,23 @@ class PreviewRunner < TurbotRunner::BaseRunner
352
348
 
353
349
  def handle_successful_run
354
350
  result = submit_batch
355
- puts
356
- puts "Sent #{@count} records."
357
- puts "View your records at #{result.data[:url]}"
351
+ if result.is_a? Turbot::API::FailureResponse
352
+ @status = :failed
353
+ handle_failed_run(result.message)
354
+ else
355
+ puts "Run completed!"
356
+ if @count > 0
357
+ puts "Sent #{@count} records"
358
+ puts "View your records at #{result.data[:url]}"
359
+ else
360
+ puts "No records sent"
361
+ end
362
+ end
358
363
  end
359
364
 
360
- def handle_failed_run
361
- puts "Bot did not run to completion:"
365
+ def handle_failed_run(message=nil)
366
+ STDERR.puts("Error:")
367
+ STDERR.puts(message) if message
362
368
  end
363
369
 
364
370
  private
@@ -1,3 +1,3 @@
1
1
  module Turbot
2
- VERSION = "0.0.45"
2
+ VERSION = "0.0.46"
3
3
  end
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.45
4
+ version: 0.0.46
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-11 00:00:00.000000000 Z
11
+ date: 2014-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: netrc