devbox_launcher 0.5.0 → 0.5.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d035caddf255e1498c26b8695f9b1bc538f5e10eebadced13a96854570160627
4
- data.tar.gz: a8a84b35b07deed752c2d955a0bfa7a7e54c0c1999e8aaa56be3e71437da6733
3
+ metadata.gz: 0d2b9f957cb18b171f3d4acc9d802576b1bd768eb6afa6036ae23143b9403ab1
4
+ data.tar.gz: f0dc90ba120f6d34f42b0432b53728bd9caf40468262091dd2c88e15bdc16fcf
5
5
  SHA512:
6
- metadata.gz: ee9fabcc46289524f0f6ebdfc1c1725c2e2530bc763e802661a54773ad071bbd225614f1835aab75b3bfef9dbc3c68c6567d396cd3286693319501e109b1134a
7
- data.tar.gz: 441a937f1606f125f4c18125ac8bc646df62d052dee14fdeb570a7dfcb2d7e56805d5c601e1940a735fd4b448434bbf925fe7b3a571cee1ed7bb38b534a68b76
6
+ metadata.gz: ba367cf32efeef9ac13b46c9c3af638b1998ff7c335a458c4c4421e0c849a043e44fb97d904b69428936393fdc1754adef71ead9197c46d96beacb25e6bee909
7
+ data.tar.gz: 5b7b7216addc48d9982e9706069a7ecf293e5543f3d11c4aff7997882b2f274ab0fe3bbf6b98b1833008cc9354b8753c9e3591756e9df7ad82c949bd353e1cb4
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.5.1] - 2021-04-08
8
+ ### Fixed
9
+ - Use configured `zone` for describe as well
10
+
7
11
  ## [0.5.0] - 2021-04-06
8
12
  ### Added
9
13
  - Ability to specify `zone` in config
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- devbox_launcher (0.5.0)
4
+ devbox_launcher (0.5.1)
5
5
  activesupport (~> 6.0)
6
6
  bcrypt_pbkdf (~> 1.0)
7
7
  ed25519 (~> 1.2)
@@ -35,23 +35,7 @@ module DevboxLauncher
35
35
  end
36
36
 
37
37
  def start_cmd
38
- args = {
39
- project: config[:project],
40
- account: account,
41
- zone: config[:zone],
42
- }.each_with_object([]) do |(key, val), arr|
43
- next if val.blank?
44
- arr << ["--#{key}", val].join("=")
45
- end.join(" ")
46
-
47
- [
48
- "gcloud",
49
- "compute",
50
- "instances",
51
- "start",
52
- name,
53
- args
54
- ].join(" ")
38
+ cmd_args_for('start')
55
39
  end
56
40
 
57
41
  def connect_mosh
@@ -101,21 +85,7 @@ module DevboxLauncher
101
85
  end
102
86
 
103
87
  def describe_cmd
104
- args = {
105
- project: config[:project],
106
- account: account,
107
- }.map do |(key, val)|
108
- ["--#{key}", val].join("=")
109
- end.join(" ")
110
-
111
- [
112
- "gcloud",
113
- "compute",
114
- "instances",
115
- "describe",
116
- name,
117
- args
118
- ].join(" ")
88
+ cmd_args_for('describe')
119
89
  end
120
90
 
121
91
  def set_ssh_config!
@@ -220,5 +190,26 @@ module DevboxLauncher
220
190
  @mutagen_config ||= Mutagen.new(config[:mutagen])
221
191
  end
222
192
 
193
+ def cmd_args_for(method)
194
+ args = {
195
+ project: config[:project],
196
+ account: account,
197
+ zone: config[:zone],
198
+ }.each_with_object([]) do |(key, val), arr|
199
+ next if val.blank?
200
+ arr << ["--#{key}", val].join("=")
201
+ end.join(" ")
202
+
203
+ [
204
+ "gcloud",
205
+ "compute",
206
+ "instances",
207
+ method,
208
+ name,
209
+ args
210
+ ].join(" ")
211
+ end
212
+
213
+
223
214
  end
224
215
  end
@@ -1,3 +1,3 @@
1
1
  module DevboxLauncher
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
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.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-06 00:00:00.000000000 Z
11
+ date: 2021-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler