nfsadmin 0.0.4 → 0.0.5

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: b6c94061c5c00876cf185e93b32e40784c5775ad
4
- data.tar.gz: 86b2988b4d4aa307c44b82482836a0645297b768
3
+ metadata.gz: 2bb7c6fd8eaae9ef79536fc3c84d5a7428e6bd9d
4
+ data.tar.gz: 3e502c1e4e139f116fd2be4a9e2375c9208e4f1c
5
5
  SHA512:
6
- metadata.gz: b7431a7c5c7f7dc1ac7251a8bd2be89732a5701111edf85cbc72ac7469f6df2fa8a40665378ba3b84628a42b3c9c0566dabefa9bfd68e07a697ed50f5ae609e9
7
- data.tar.gz: c77422dc03df9f6d13d0fc7e7b0421999b539ba1bb072387b5cc0621efac9ff97fd0d16188fd8040eb8c9761266a318609d98e0a4673229257e8bd766bc3f3e4
6
+ metadata.gz: 2fb0999d0fa007ff68c60c38e4d5df91eb08d7152a3aac8b29b816807c2dc2808827e5ae8ef5ee862761ac86b4659f0d8ce6a7e8c6ad531a0c146697f732b340
7
+ data.tar.gz: 8f83ac71bf2286f53a660cbd59a08ef6cee65f8935e32efe6774014ca521b1b42c8d2d5e19f0b4c3e22cd4ca480358bf2cbcd1560e9e11c0eb32e1f40c88736f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nfsadmin (0.0.4)
4
+ nfsadmin (0.0.5)
5
5
  gli (~> 2.9)
6
6
 
7
7
  GEM
data/bin/nfsadmin CHANGED
@@ -38,8 +38,12 @@ command :export do |c|
38
38
  add.flag [:o, :options]
39
39
  add.desc 'This option forces the location to be created'
40
40
  add.switch [:c, :create]
41
+ add.desc 'OS user that should own the created location'
42
+ add.flag [:u, :user]
43
+ add.desc 'OS group that should own the created location'
44
+ add.flag [:g, :group]
41
45
  add.action do |global_options,options,args|
42
- Nfsadmin::Tasks.create_share(global_options[:c], options[:l], options[:a], options[:o], options[:c])
46
+ Nfsadmin::Tasks.create_share(global_options[:c], options[:l], options[:a], options[:o], options[:c], options[:u], options[:g])
43
47
  end
44
48
  end
45
49
 
@@ -85,7 +85,7 @@ module Nfsadmin
85
85
  end
86
86
  end
87
87
 
88
- def self.create_share(exportsfile, location, address, options, createlocation)
88
+ def self.create_share(exportsfile, location, address, options, createlocation, user, group)
89
89
  if location.nil?
90
90
  fail 'Location must be specified'
91
91
  else
@@ -99,6 +99,7 @@ module Nfsadmin
99
99
  end
100
100
  if createlocation
101
101
  FileUtils::mkdir_p location unless File.directory?(location)
102
+ FileUtils::chown user, group, location unless user.nil? or group.nil?
102
103
  end
103
104
  share = { :location => location,
104
105
  :acl => [{
@@ -1,3 +1,3 @@
1
1
  module Nfsadmin
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nfsadmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bastiaan Schaap
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-15 00:00:00.000000000 Z
11
+ date: 2014-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake