nfsadmin 0.0.6 → 0.0.7

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: 7e280b92cd84087cad8ce81e4f3e854e362d6fd3
4
- data.tar.gz: 80dde07cb3cc5e62f30fca5e11b2b60de7c90c95
3
+ metadata.gz: cdd4e0aab0092c50e03824a29c03883fc525b27a
4
+ data.tar.gz: 398e68c67d18f074d25c66a6d7bceca2422893cf
5
5
  SHA512:
6
- metadata.gz: 0becf284b6c7e6cd0e33433507adb0bfbcf0ed9fca667f2a64e501d46a54e50b2911fa9981f57cd5ecfcf4d84412d82eefc623f5c3da7670807b5ec6860be5dc
7
- data.tar.gz: eeca722357dcaad1410d9a8670c646f068db6f417c0e2faf95cec7a219b4fe1b10404d6dc7ffc50956f65f9ca34a6e682d2458cf81b1d5681ea2c0a6d25091bd
6
+ metadata.gz: f4709b0f54c63d968b695155c5e5fe98264db4e7dd8b1dcf2f13409a92e78be398e0b038967e603242e2935922a2107c4dc978dce9f75ba95d204ec110b331ea
7
+ data.tar.gz: 26590eaa1a8bf801ea4699f379649c86db56feb95993ffa9b1fa9c0140ff156b65fb00183992c9a96552f97b48d7f301613b41c594ca445f21fcbdec47d7e61c
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nfsadmin (0.0.6)
4
+ nfsadmin (0.0.7)
5
5
  gli (~> 2.9)
6
6
 
7
7
  GEM
@@ -1,5 +1,6 @@
1
1
  require 'json'
2
2
  require 'fileutils'
3
+ require 'etc'
3
4
 
4
5
  module Nfsadmin
5
6
 
@@ -39,7 +40,11 @@ module Nfsadmin
39
40
  acl << entry
40
41
  end
41
42
  end
43
+ stat = File.stat(location)
42
44
  share[:location] = location
45
+ share[:owner] = Etc.getpwuid(stat.uid).name
46
+ share[:group] = Etc.getgrgid(stat.gid).name
47
+ share[:mode] = stat.mode.to_s(8)[-3,3]
43
48
  share[:acl] = acl
44
49
  shares << share
45
50
  end
@@ -74,7 +79,9 @@ module Nfsadmin
74
79
  share[:acl].each do |acl|
75
80
  print acl[:address] + '(' + acl[:options] + ')' + ' '
76
81
  end
77
- print "\n"
82
+ print(share[:owner]) unless share[:owner].nil?
83
+ print(':' + share[:group] + ' ') unless share[:group].nil?
84
+ print(share[:mode] + "\n")
78
85
  end
79
86
  STDOUT.flush
80
87
  elsif output_type.downcase == 'json'
@@ -1,3 +1,3 @@
1
1
  module Nfsadmin
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nfsadmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bastiaan Schaap