foreman_users 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,8 +9,6 @@ class ForemanUsers::Sygroup < ActiveRecord::Base
9
9
  #该处需要注意权限问题,当前用户是否具有该目录的操作权限
10
10
  root_dir_name = "/etc/puppet/environments/production/modules/" + self.foreman_users_syusermodel.name
11
11
 
12
- #该处需要注意权限问题,当前用户是否具有该目录的操作权限
13
- root_dir_name = "/etc/puppet/environments/production/modules/" + self.foreman_users_syusermodel.name
14
12
  #判断该目录是否存在
15
13
  dir_exist_status = File.exist?(root_dir_name )
16
14
  if dir_exist_status
@@ -56,7 +54,7 @@ class ForemanUsers::Sygroup < ActiveRecord::Base
56
54
  end
57
55
 
58
56
  def create_content
59
- title_content = "class users {"
57
+ title_content = "class" + "\s" + self.foreman_users_syusermodel.name +"{"
60
58
  user_content = "\n" + "\s\s"
61
59
  if self.foreman_users_syusermodel.syusers.size > 0
62
60
  self.foreman_users_syusermodel.syusers.each do |syuser|
@@ -8,11 +8,7 @@ class ForemanUsers::Syuser < ActiveRecord::Base
8
8
  after_destroy :create_dir
9
9
  def create_dir
10
10
  #该处需要注意权限问题,当前用户是否具有该目录的操作权限
11
- puts "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
12
- puts self.foreman_users_syusermodel
13
- puts ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
14
- self.foreman_users_syusermodel.name
15
- puts "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
11
+
16
12
  root_dir_name = "/etc/puppet/environments/production/modules/" + self.foreman_users_syusermodel.name
17
13
 
18
14
  dir_exist_status = File.exist?(root_dir_name) #判断该目录是否存在
@@ -59,7 +55,7 @@ class ForemanUsers::Syuser < ActiveRecord::Base
59
55
 
60
56
 
61
57
  def create_content
62
- title_content = "class users {"
58
+ title_content = "class" + "\s" + self.foreman_users_syusermodel.name +"{"
63
59
  user_content = "\n" + "\s\s"
64
60
  if self.foreman_users_syusermodel.syusers.size > 0
65
61
  self.foreman_users_syusermodel.syusers.each do |syuser|
@@ -59,7 +59,7 @@ class ForemanUsers::Syusermodel < ActiveRecord::Base
59
59
  end
60
60
 
61
61
  def create_content
62
- title_content = "class users {"
62
+ title_content = "class" + "\s" + self.name +"{"
63
63
  user_content = "\n" + "\s\s"
64
64
  if self.syusers.size > 0
65
65
  self.syusers.each do |syuser|
@@ -1,3 +1,3 @@
1
1
  module ForemanUsers
2
- VERSION = '1.2.1'
2
+ VERSION = '1.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_users
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-13 00:00:00.000000000 Z
12
+ date: 2015-10-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: deface