foreman_god 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -89,6 +89,11 @@ module ForemanGod
89
89
  @options[:log] || 'log'
90
90
  end
91
91
 
92
+ def group_name
93
+ gid = Etc.getpwnam(user_name).gid
94
+ Etc.getgrgid(gid).name
95
+ end
96
+
92
97
 
93
98
  def wrap_command(cmd)
94
99
  if user_name
@@ -140,6 +145,7 @@ module ForemanGod
140
145
  if user_name && (Etc.getlogin != user_name)
141
146
  # Only set the uid if the user is different from the current user
142
147
  w.uid = user_name
148
+ w.gid = group_name
143
149
  end
144
150
 
145
151
  # w.gid = ?
@@ -1,3 +1,3 @@
1
1
  module ForemanGod
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -28,7 +28,7 @@ describe GodConfig do
28
28
  watch.log.should == '/dev/null'
29
29
 
30
30
  watch.uid.should == nil # The user name is the same as the current user
31
-
31
+ watch.gid.should == nil
32
32
  end
33
33
 
34
34
  it "should log if log is specified" do
@@ -79,6 +79,7 @@ describe GodConfig do
79
79
  # We cannot easily test watch.uid in a single-user setup
80
80
  pending "Test watch.uid"
81
81
  #watch.uid.should == user
82
+ #watch.gid.should == ?
82
83
  end
83
84
  end
84
85
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_god
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: