devbox_launcher 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +4 -2
- data/lib/devbox_launcher/models/box.rb +2 -3
- data/lib/devbox_launcher/models/box_config.rb +10 -0
- 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: c247836992ba6c6f8b7dc733aca134394ea41eaf0ccf1026e72837992d77aa57
|
4
|
+
data.tar.gz: 7fde1e5aeff66e1b199d9b1bac17d80368c50d90eb74cd7ddf29fa9923122886
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bb774576f0003c53c757751b3d502cfedee2f4ef685a0e15031265f80f8d70bcf106f1cd752492f496f1ccce42068d8bceb33219de2b833b0022b1aae348bc2
|
7
|
+
data.tar.gz: d8fe891e797ba651ee5591ee309d6ab51045179746af5b57c88d75e32773321accb2ae60332bf1bc79a4028f2347f3f49493daabf4b9edba176211f69ee7ded8
|
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.7.0] - 2021-09-23
|
8
|
+
### Added
|
9
|
+
- Add ability to set a box's user and identity_file
|
10
|
+
|
7
11
|
## [0.6.1] - 2021-09-22
|
8
12
|
### Fixed
|
9
13
|
- Do not blow up if mutagen is not configured
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -23,8 +23,10 @@ ramon@email.com:
|
|
23
23
|
alpha: /mnt/c/Users/me/src # local machine
|
24
24
|
beta: ~/src # remote machine
|
25
25
|
ramon@company.com:
|
26
|
-
project: development-254604
|
27
|
-
|
26
|
+
- project: development-254604
|
27
|
+
box: ramon
|
28
|
+
user: another_user # only needed if ramon_company_com is not the user
|
29
|
+
identity_file: /path/to/ssh-private # ~/.ssh/google_compute_engine by default
|
28
30
|
```
|
29
31
|
|
30
32
|
To start and create the mutagen session:
|
@@ -10,7 +10,6 @@ module DevboxLauncher
|
|
10
10
|
]
|
11
11
|
WAIT_BOOT_IN_SECONDS = 10.freeze
|
12
12
|
MAX_BOOT_RETRIES = 20
|
13
|
-
DEFAULT_IDENTIFY_FILE_PATH = "~/.ssh/google_compute_engine".freeze
|
14
13
|
SSH_CONFIG_PATH = File.expand_path("~/.ssh/config").freeze
|
15
14
|
CONFIG_PATH = File.expand_path("~/.devbox_launcher.yml").freeze
|
16
15
|
CONFIG = YAML.load_file(CONFIG_PATH).freeze
|
@@ -104,7 +103,7 @@ module DevboxLauncher
|
|
104
103
|
args = {
|
105
104
|
"HostName" => description.ip,
|
106
105
|
"User" => username,
|
107
|
-
"IdentityFile" =>
|
106
|
+
"IdentityFile" => box_config.identity_file,
|
108
107
|
}
|
109
108
|
args.each do |key, value|
|
110
109
|
ssh_config.set(hostname, key, value)
|
@@ -206,7 +205,7 @@ module DevboxLauncher
|
|
206
205
|
end
|
207
206
|
|
208
207
|
def username
|
209
|
-
@username ||= account.gsub(/\W/, "_")
|
208
|
+
@username ||= box_config.user || account.gsub(/\W/, "_")
|
210
209
|
end
|
211
210
|
|
212
211
|
def account_config
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module DevboxLauncher
|
2
2
|
class BoxConfig
|
3
3
|
|
4
|
+
DEFAULT_IDENTIFY_FILE_PATH = "~/.ssh/google_compute_engine".freeze
|
5
|
+
|
4
6
|
attr_reader :config
|
5
7
|
|
6
8
|
def initialize(config)
|
@@ -19,5 +21,13 @@ module DevboxLauncher
|
|
19
21
|
config[:zone]
|
20
22
|
end
|
21
23
|
|
24
|
+
def user
|
25
|
+
config[:user]
|
26
|
+
end
|
27
|
+
|
28
|
+
def identity_file
|
29
|
+
config[:identity_file] || DEFAULT_IDENTIFY_FILE_PATH
|
30
|
+
end
|
31
|
+
|
22
32
|
end
|
23
33
|
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.
|
4
|
+
version: 0.7.0
|
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-09-
|
11
|
+
date: 2021-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|