lxd-common 0.9.1 → 0.9.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
  SHA256:
3
- metadata.gz: 64fff3620f0df985c5890a234085cb238ac72a4592bed8a0880f727d09154c19
4
- data.tar.gz: cab1676fb2a6779f0333c4f92215d7dd967455073b48ca78dd449f6ec4606db3
3
+ metadata.gz: 2286cd19d517ff08809f9340c726f927a3eb8d56b9ffd6ab5011004aa83ee65d
4
+ data.tar.gz: d879c3fb6a3555bef1d7f16afe967a1c46b7d299c3558ac9b7b9204350816e05
5
5
  SHA512:
6
- metadata.gz: 6f38f384ae42e4355d0b04175e89c4d80d2a7267e3abf957eb394ecb73e63f810a6da0439fb6dce7bcb4730a29aa39c41514fbf62aba8f427ecdb3c74d16e1bc
7
- data.tar.gz: 9637d609a8fcc1ec77880c0e32886c07d514d203c3ebcb4520cfa4ac571713574892ebbd214468b5166d765baa3fdd86b0dd663ff2c643c115ddb7c117e44b76
6
+ metadata.gz: 8fc3cfbcaf288273a2e599238d6f656020db016cb70ac585101bb150755d5eb8d0454f9f422edf1c237c819a864e2f5c34c0dce0a866c1368efd4f6bab284fd3
7
+ data.tar.gz: f271a4cf6beb8b71f75b125cc315a7295dfc17013bce42b08ffb7e98a0ffc2b9de283181a2bb75e048c86932a83a7506459de934169c04a6629b8c548b54e586
@@ -70,12 +70,7 @@ module NexusSW
70
70
  fname = '/tmp/' + File.basename(tfile.path) + '.tgz'
71
71
  upload_file tfile.path, fname, options
72
72
 
73
- myuid = options[:uid] || uid || (0 if is_a?(Mixins::CLI))
74
- mygid = options[:gid] || gid || (0 if is_a?(Mixins::CLI))
75
- mymode = options[:file_mode] || file_mode
76
- chown = " && chown -R #{myuid}:#{mygid} #{File.basename(local_path)}" if myuid
77
- chmod = " && chmod -R #{mymode} #{File.basename(local_path)}" if mymode
78
- execute("bash -c 'mkdir -p #{path} && cd #{path} && tar -xf #{fname} && rm -rf #{fname}#{chmod}#{chown}'").error!
73
+ execute("bash -c 'mkdir -p #{path} && cd #{path} && tar -xf #{fname} && rm -rf #{fname}'").error!
79
74
  ensure
80
75
  tfile.unlink
81
76
  end
@@ -21,6 +21,10 @@ module NexusSW
21
21
  attr_accessor :file_mode, :gid
22
22
  attr_reader :uid, :username
23
23
 
24
+ def reset_user
25
+ @username = @uid = @gid = nil
26
+ end
27
+
24
28
  private
25
29
 
26
30
  def runas_command(command, options = {})
@@ -1,5 +1,5 @@
1
1
  module NexusSW
2
2
  module LXD
3
- VERSION = '0.9.1'.freeze
3
+ VERSION = '0.9.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lxd-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Zachariasen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-03 00:00:00.000000000 Z
11
+ date: 2018-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday