yolo 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
data/lib/yolo/deployment/ota.rb
CHANGED
@@ -60,8 +60,10 @@ module Yolo
|
|
60
60
|
while line = io.readline
|
61
61
|
response << line
|
62
62
|
end
|
63
|
-
|
64
|
-
|
63
|
+
if response.length == 0
|
64
|
+
@error_formatter.deploy_failed("Upload error")
|
65
|
+
end
|
66
|
+
rescue EOFError
|
65
67
|
end
|
66
68
|
end
|
67
69
|
upload_complete(response) if response.length > 0
|
@@ -25,8 +25,10 @@ module Yolo
|
|
25
25
|
while line = io.readline
|
26
26
|
response << line
|
27
27
|
end
|
28
|
-
|
29
|
-
|
28
|
+
if response.length == 0
|
29
|
+
@error_formatter.deploy_failed("Upload error")
|
30
|
+
end
|
31
|
+
rescue EOFError
|
30
32
|
end
|
31
33
|
end
|
32
34
|
upload_complete(response) if response.length > 0
|
data/spec/deployment/ota_spec.rb
CHANGED
@@ -63,8 +63,8 @@ describe Yolo::Deployment::OTA do
|
|
63
63
|
@ota.upload
|
64
64
|
end
|
65
65
|
|
66
|
-
it "should catch
|
67
|
-
@io.stub(:readline)
|
66
|
+
it "should catch empty responses" do
|
67
|
+
@io.stub(:readline){nil}
|
68
68
|
@error_formatter.should_receive(:deploy_failed).at_least(1).times
|
69
69
|
@ota.upload
|
70
70
|
end
|
@@ -29,8 +29,8 @@ describe Yolo::Deployment::TestFlight do
|
|
29
29
|
@tf.deploy("test")
|
30
30
|
end
|
31
31
|
|
32
|
-
it "should catch
|
33
|
-
@io.stub(:readline)
|
32
|
+
it "should catch empty responses" do
|
33
|
+
@io.stub(:readline){nil}
|
34
34
|
@error_formatter.should_receive(:deploy_failed).at_least(1).times
|
35
35
|
@tf.deploy("test")
|
36
36
|
end
|