enviroblyd 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: 4662a74b3e3eb17cad2ef6c6f511fc79e4460eb9a40635a8f476e50076b075e7
4
- data.tar.gz: 4fba6adca14dd3247decf29333e6452e544c91b9772012c494c1e452cdee74ae
3
+ metadata.gz: c88f9afa8cae744a95f4b3813a6ba92b273fb259b6b58815baadc60a889bc698
4
+ data.tar.gz: e1e3938c06ffa662ad066cca2b49d3f69500a04178e264721c78faf954523135
5
5
  SHA512:
6
- metadata.gz: 9ea39b7b42bdd486e064ef256524fcb5ca42030bcc3a91d51382436b0f5c035c8da438cc4d5f094aec714319429df255dc717fb74b7240e44cb051d86bd2e987
7
- data.tar.gz: eeb5ea402402c421d298da8dd2e641fa8c0c46e39dfd5e27abffe89752aa180df8c5a965461d337ca097446486a27f47e25a265b48142df9018245d7cd43f4cf
6
+ metadata.gz: ff3a731d3ba7d43faeb6da6573060db09dd0087ceaba056bdbe9d2d6e71223b00ed6452199d895d8d3fcae4a4cd9504708ea82296628d58c6cff11a3a822dbe3
7
+ data.tar.gz: 79a94b0c5a26173b5d10d39da7a513073be4cf280ad6d47c510d211fc8939cfe7ad2eea45e126dc529174ac34ea96b60b5781f3cd4049bd7593927b69b18ef8a
@@ -39,8 +39,14 @@ class Enviroblyd::Cli::Main < Enviroblyd::Base
39
39
 
40
40
  yield request if block_given?
41
41
 
42
- response = http.request(request)
43
- if success_codes.include?(response.code.to_i)
42
+ response =
43
+ begin
44
+ http.request(request)
45
+ rescue Net::OpenTimeout, Net::ReadTimeout, Errno::EHOSTUNREACH, Errno::EHOSTDOWN
46
+ nil
47
+ end
48
+
49
+ if response && success_codes.include?(response.code.to_i)
44
50
  response
45
51
  elsif retries <= tries
46
52
  $stderr.puts "Retried #{tries} times. Aborting."
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Enviroblyd
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enviroblyd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Starsi