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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d27ed8ebe6a52e48face1634ec324df797fc5911
4
- data.tar.gz: 984a5dd15941c77724f0adab1158f7f06257141c
3
+ metadata.gz: 0406a8098df204707b733c088b8d7c3b6687eff1
4
+ data.tar.gz: 5d90efdf7ef7f9395a01739042bad070f975c9b3
5
5
  SHA512:
6
- metadata.gz: ec05b6367357474d110db4bf3c74f2af2ec03b1dd75922c6b8d37087c7dc6bd0fdf55302e727afa11748d3caefab6551f903fa46f2d828fa79289875faf179e6
7
- data.tar.gz: 3fe0235b25830068af8a1de8ef7d2e0b592248c0302ceb1c65a22008bb1f93237b4fabe8988431366b7e7515750a666eb3ef86b2932f2edd09f9eff2b5e48d17
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
@@ -1,3 +1,3 @@
1
1
  module DanarchyDeploy
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danarchy_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan James