devbox_launcher 0.3.4 → 0.3.5

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: 5d79623bafc3e14c6b9f9f58a8031282a334d8ea833e188546d1bffa4ffc1c10
4
- data.tar.gz: 350a59f18358ba1c473aed63dd033b3699b658e69a02d63bd7d29306a57bd695
3
+ metadata.gz: 0ec99b19a115672c4122d2c1b8827727d32d184fa9fee7328ab503b85529f3d9
4
+ data.tar.gz: 230126704d2e2d5cc7d8c9be29450ec35ccc9d716b605c2831696155f6889eca
5
5
  SHA512:
6
- metadata.gz: d25e43064171246a712be3a2ab71d2b30d5a3a58891bdeb84538293004147ed6a2b5f7bea5054e66cf433b5a47c0bce154a9aa2649e863e282c5a4a9d95a89dd
7
- data.tar.gz: 59102e2931d6327865ddc9bb87706dd31bffd703b618a7c9b05735062ac4c0cf69852b9b70be89223f99ee8f82858ceeb6091f7d784b3f43339402f9b070731f
6
+ metadata.gz: 0b770f908bb60e3108b5b99b8f83f008f5ca77f83be40349da8f283f95ce725b9edbac6a6dcc9439769ee2206ccc3d8ba35cec6b0458a879d8afcf2d97a4faab
7
+ data.tar.gz: 53ac5dfd4eaa3356b15bdb846bbc418b277758458381e2b9f903a2900f0685a2e1a051181aa5e4e165d75ee2003537c241f98a9392f2c6e42bba7533fd55be33
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.3.5]
8
+ ### Fixed
9
+ - When running commands, also rescue from whitelist of exceptions, and retry
10
+
7
11
  ## [0.3.4]
8
12
  ### Added
9
13
  - Rescue from `Errno::ECONNREFUSED` and retry
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- devbox_launcher (0.3.4)
4
+ devbox_launcher (0.3.5)
5
5
  activesupport (~> 6.0)
6
6
  bcrypt_pbkdf (~> 1.0)
7
7
  ed25519 (~> 1.2)
@@ -14,7 +14,7 @@ PATH
14
14
  GEM
15
15
  remote: https://rubygems.org/
16
16
  specs:
17
- activesupport (6.0.3.1)
17
+ activesupport (6.0.3.4)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 0.7, < 2)
20
20
  minitest (~> 5.1)
@@ -23,15 +23,15 @@ GEM
23
23
  bcrypt_pbkdf (1.0.1)
24
24
  byebug (11.0.1)
25
25
  coderay (1.1.2)
26
- concurrent-ruby (1.1.6)
26
+ concurrent-ruby (1.1.7)
27
27
  diff-lcs (1.3)
28
28
  ed25519 (1.2.4)
29
- i18n (1.8.2)
29
+ i18n (1.8.5)
30
30
  concurrent-ruby (~> 1.0)
31
31
  method_source (0.9.2)
32
- minitest (5.14.1)
32
+ minitest (5.14.2)
33
33
  net-ssh (5.2.0)
34
- os (1.1.0)
34
+ os (1.1.1)
35
35
  pry (0.12.2)
36
36
  coderay (~> 1.1.0)
37
37
  method_source (~> 0.9.0)
@@ -56,9 +56,9 @@ GEM
56
56
  ssh-config (0.1.3)
57
57
  thor (1.0.1)
58
58
  thread_safe (0.3.6)
59
- tzinfo (1.2.7)
59
+ tzinfo (1.2.8)
60
60
  thread_safe (~> 0.1)
61
- zeitwerk (2.3.0)
61
+ zeitwerk (2.4.1)
62
62
 
63
63
  PLATFORMS
64
64
  ruby
@@ -22,7 +22,7 @@ module DevboxLauncher
22
22
 
23
23
  def start
24
24
  start_stdout, start_stderr, start_status =
25
- Open3.capture3(start_cmd)
25
+ run_command(start_cmd)
26
26
 
27
27
  set_ssh_config!(hostname, {
28
28
  username: username,
@@ -81,7 +81,7 @@ module DevboxLauncher
81
81
 
82
82
  describe_command = %Q(gcloud compute instances describe #{name})
83
83
  describe_stdout, describe_stderr, describe_status =
84
- Open3.capture3(describe_command)
84
+ run_command(describe_command)
85
85
 
86
86
  if !describe_status.success?
87
87
  msg = "Problem fetching the description of #{name}. "
@@ -138,7 +138,7 @@ module DevboxLauncher
138
138
  terminate_mutagen_stdout,
139
139
  terminate_mutagen_stderr,
140
140
  terminate_mutagen_status =
141
- Open3.capture3(terminate_mutagen_command)
141
+ run_command(terminate_mutagen_command)
142
142
 
143
143
  if not terminate_mutagen_status.success?
144
144
  # mutagen prints to stdout and stderr
@@ -164,7 +164,7 @@ module DevboxLauncher
164
164
  create_mutagen_stdout,
165
165
  create_mutagen_stderr,
166
166
  create_mutagen_status =
167
- Open3.capture3(create_mutagen_command.join(" "))
167
+ run_command(create_mutagen_command.join(" "))
168
168
 
169
169
  if not create_mutagen_status.success?
170
170
  # mutagen prints to stdout and stderr
@@ -202,5 +202,12 @@ module DevboxLauncher
202
202
  @config = CONFIG[account].with_indifferent_access
203
203
  end
204
204
 
205
+ def run_command(command, tries: 0)
206
+ Open3.capture3(command)
207
+ rescue *WAIT_BOOT_RESCUED_EXCEPTIONS
208
+ sleep WAIT_BOOT_IN_SECONDS
209
+ run_command(command, tries+1)
210
+ end
211
+
205
212
  end
206
213
  end
@@ -1,3 +1,3 @@
1
1
  module DevboxLauncher
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devbox_launcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-17 00:00:00.000000000 Z
11
+ date: 2020-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler