foreman_users 0.0.27 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # ForemanUsers
2
2
 
3
+ #gem 'foreman_users', '~> 0.0.27'
4
+
5
+ #其余版本均不能使用
6
+
3
7
  *Introdction here*
4
8
 
5
9
  ## Installation
@@ -17,21 +17,26 @@ class ForemanUsers::Syuser < ActiveRecord::Base
17
17
  dir_exist_status = File.exist?(root_dir_name) #判断该目录是否存在
18
18
  if !dir_exist_status
19
19
  #创建目录结构
20
- Dir::mkdir(root_dir_name)
21
- Dir::mkdir(root_dir_name + "/files")
22
- Dir::mkdir(root_dir_name + "/manifests")
20
+ Dir::mkdir(root_dir_name)
21
+ if !File.exist?(root_dir_name + "/files")
22
+ Dir::mkdir(root_dir_name + "/files")
23
+ end
23
24
 
24
- #生成files下welcome.conf文件
25
- files_welcome_File = File.new(root_dir_name + "/files/welcome.conf", "w+")
26
- files_welcome_File.close
27
- #生成manifests下init.pp文件
28
- main_init_File = File.new(root_dir_name +"/manifests/init.pp", "w+")
29
- if main_init_File
30
- main_init_File.syswrite(self.create_content)
31
- else
32
- puts "Unable to open file!"
33
- end
34
- main_init_File.close
25
+ if !File.exist?(root_dir_name + "/manifests")
26
+ Dir::mkdir(root_dir_name + "/manifests")
27
+ end
28
+
29
+ #生成files下welcome.conf文件
30
+ files_welcome_File = File.new(root_dir_name + "/files/welcome.conf", "w+")
31
+ files_welcome_File.close
32
+ #生成manifests下init.pp文件
33
+ main_init_File = File.new(root_dir_name +"/manifests/init.pp", "w+")
34
+ if main_init_File
35
+ main_init_File.syswrite(self.create_content)
36
+ else
37
+ puts "Unable to open file!"
38
+ end
39
+ main_init_File.close
35
40
  end
36
41
  end
37
42
 
@@ -1,3 +1,3 @@
1
1
  module ForemanUsers
2
- VERSION = '0.0.27'
2
+ VERSION = '1.0.0'
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: 0.0.27
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: