devbox_launcher 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +8 -8
- data/lib/devbox_launcher/box.rb +11 -4
- data/lib/devbox_launcher/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0ec99b19a115672c4122d2c1b8827727d32d184fa9fee7328ab503b85529f3d9
|
|
4
|
+
data.tar.gz: 230126704d2e2d5cc7d8c9be29450ec35ccc9d716b605c2831696155f6889eca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b770f908bb60e3108b5b99b8f83f008f5ca77f83be40349da8f283f95ce725b9edbac6a6dcc9439769ee2206ccc3d8ba35cec6b0458a879d8afcf2d97a4faab
|
|
7
|
+
data.tar.gz: 53ac5dfd4eaa3356b15bdb846bbc418b277758458381e2b9f903a2900f0685a2e1a051181aa5e4e165d75ee2003537c241f98a9392f2c6e42bba7533fd55be33
|
data/CHANGELOG.md
CHANGED
|
@@ -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
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
devbox_launcher (0.3.
|
|
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.
|
|
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.
|
|
26
|
+
concurrent-ruby (1.1.7)
|
|
27
27
|
diff-lcs (1.3)
|
|
28
28
|
ed25519 (1.2.4)
|
|
29
|
-
i18n (1.8.
|
|
29
|
+
i18n (1.8.5)
|
|
30
30
|
concurrent-ruby (~> 1.0)
|
|
31
31
|
method_source (0.9.2)
|
|
32
|
-
minitest (5.14.
|
|
32
|
+
minitest (5.14.2)
|
|
33
33
|
net-ssh (5.2.0)
|
|
34
|
-
os (1.1.
|
|
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.
|
|
59
|
+
tzinfo (1.2.8)
|
|
60
60
|
thread_safe (~> 0.1)
|
|
61
|
-
zeitwerk (2.
|
|
61
|
+
zeitwerk (2.4.1)
|
|
62
62
|
|
|
63
63
|
PLATFORMS
|
|
64
64
|
ruby
|
data/lib/devbox_launcher/box.rb
CHANGED
|
@@ -22,7 +22,7 @@ module DevboxLauncher
|
|
|
22
22
|
|
|
23
23
|
def start
|
|
24
24
|
start_stdout, start_stderr, start_status =
|
|
25
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
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
|
+
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-
|
|
11
|
+
date: 2020-11-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|