deprec-core 3.1.9 → 3.1.10

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,6 +1,10 @@
1
1
  deprec-core changelog
2
2
  =====================
3
3
 
4
+ = 3.1.10 (Jul 29, 2011)
5
+
6
+ * bugfix: use #{sudo} when setting owner
7
+
4
8
  = 3.1.9 (Jul 28, 2011)
5
9
 
6
10
  * Moved rubygem deps from deprec to deprec-core
@@ -215,7 +215,6 @@ module Deprec2
215
215
 
216
216
  # create a new group on target system
217
217
  def groupadd(group, options={})
218
- # XXX I don't like specifying the path to groupadd - need to sort out paths before long
219
218
  run "grep '#{group}:' /etc/group || #{sudo} /usr/sbin/groupadd #{group}"
220
219
  end
221
220
 
@@ -230,9 +229,10 @@ module Deprec2
230
229
  def mkdir(path, options={})
231
230
  run "test -d #{path} || #{sudo} mkdir -p #{path}"
232
231
  run "chmod #{sprintf("%3o",options[:mode]||0755)} #{path}" if options[:mode]
233
- run "chown -R #{options[:owner]} #{path}" if options[:owner]
232
+ # We only use sudo when setting owner and/or group
233
+ run "#{sudo} chown -R #{options[:owner]} #{path}" if options[:owner]
234
234
  groupadd(options[:group]) if options[:group]
235
- run "chgrp -R #{options[:group]} #{path}" if options[:group]
235
+ run "#{sudo} chgrp -R #{options[:group]} #{path}" if options[:group]
236
236
  end
237
237
 
238
238
  def create_src_dir
@@ -1,5 +1,5 @@
1
1
  module Deprec
2
2
  module Core
3
- VERSION = "3.1.9"
3
+ VERSION = "3.1.10"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: deprec-core
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 3.1.9
5
+ version: 3.1.10
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mike Bailey
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-28 00:00:00 Z
13
+ date: 2011-07-29 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake