danarchy_deploy 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/danarchy_deploy/users.rb +3 -1
- data/lib/danarchy_deploy/version.rb +1 -1
- data/lib/danarchy_deploy.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0406a8098df204707b733c088b8d7c3b6687eff1
|
4
|
+
data.tar.gz: 5d90efdf7ef7f9395a01739042bad070f975c9b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69679ec98250902bf0575a842660ac146614398b5eb45fd2223dc9c6bcfa14b17f87635c7adcaf8f20259c9a1fb61e6d3bb09add2d182d2157141e8c1f7d81c4
|
7
|
+
data.tar.gz: 3350fc7773f44aed90034b23b30ae788f4f9c4e22aa5498d53f5ab71af3b1a28a7bf99162a265b174171ea13bb9f3633584493d4d87ab2d9dacbdeb2816d8e93
|
@@ -106,7 +106,8 @@ module DanarchyDeploy
|
|
106
106
|
ssh_path = user[:home] + '/.ssh'
|
107
107
|
authkeys = ssh_path + '/authorized_keys'
|
108
108
|
|
109
|
-
Dir.exist?(ssh_path) || Dir.mkdir(ssh_path)
|
109
|
+
Dir.exist?(ssh_path) || Dir.mkdir(ssh_path, 0700)
|
110
|
+
File.chown(user[:uid], user[:gid], ssh_path)
|
110
111
|
File.open(authkeys, 'a+') do |f|
|
111
112
|
user[:authorized_keys].each do |authkey|
|
112
113
|
if !f.read.include?(authkey)
|
@@ -131,6 +132,7 @@ module DanarchyDeploy
|
|
131
132
|
puts ' - No change needed'
|
132
133
|
end
|
133
134
|
|
135
|
+
f.chown(user[:uid], user[:gid])
|
134
136
|
f.close
|
135
137
|
end
|
136
138
|
end
|
data/lib/danarchy_deploy.rb
CHANGED
@@ -28,7 +28,7 @@ module DanarchyDeploy
|
|
28
28
|
deployment[:last_deploy] = DateTime.now.strftime("%Y/%m/%d %H:%M:%S")
|
29
29
|
puts "\nFinished Local Deployment at #{deployment[:last_deploy]}!"
|
30
30
|
File.write(options[:deploy_file],
|
31
|
-
JSON.pretty_generate(deployment) if options[:deploy_file].end_with?('.json')
|
31
|
+
JSON.pretty_generate(deployment)) if options[:deploy_file].end_with?('.json')
|
32
32
|
File.write(options[:deploy_file], deployment.to_yaml) if options[:deploy_file].end_with?('.yaml')
|
33
33
|
deployment
|
34
34
|
end
|