vagrant-digitalocean 0.1.1 → 0.1.2
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.
@@ -5,7 +5,7 @@ module VagrantPlugins
|
|
5
5
|
module Actions
|
6
6
|
class SetupKey
|
7
7
|
include Helpers::Client
|
8
|
-
|
8
|
+
|
9
9
|
def initialize(app, env)
|
10
10
|
@app = app
|
11
11
|
@machine = env[:machine]
|
@@ -37,8 +37,9 @@ module VagrantPlugins
|
|
37
37
|
|
38
38
|
def create_ssh_key(name, env)
|
39
39
|
# assumes public key exists on the same path as private key with .pub ext
|
40
|
-
|
41
|
-
|
40
|
+
path = @machine.config.ssh.private_key_path
|
41
|
+
path = File.expand_path(path, @machine.env.root_path)
|
42
|
+
pub_key = DigitalOcean.public_key(path)
|
42
43
|
|
43
44
|
env[:ui].info I18n.t('vagrant_digital_ocean.info.creating_key', {
|
44
45
|
:name => name
|
@@ -38,8 +38,9 @@ module VagrantPlugins
|
|
38
38
|
@machine.communicate.execute("su #{user} -c 'mkdir -p ~/.ssh'")
|
39
39
|
|
40
40
|
# add the specified key to the authorized keys file
|
41
|
-
|
42
|
-
|
41
|
+
path = @machine.config.ssh.private_key_path
|
42
|
+
path = File.expand_path(path, @machine.env.root_path)
|
43
|
+
pub_key = DigitalOcean.public_key(path)
|
43
44
|
@machine.communicate.execute(<<-BASH)
|
44
45
|
if ! grep '#{pub_key}' /home/#{user}/.ssh/authorized_keys; then
|
45
46
|
echo '#{pub_key}' >> /home/#{user}/.ssh/authorized_keys;
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-digitalocean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|