foreman-export-initd 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/initd/export.rb +10 -5
- data/templates/monit_config.erb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80074fd4db1be05b5b2a0cf3ebe86ac839bbcec0
|
4
|
+
data.tar.gz: cff958ed59ee473c56ac263671cb1c5df748d415
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d88c6b4d37109213e440ef048c3ef2fd5227293087bd340e3fd2ea6f84e2523608ed46fca4c5608d1eae0575847e5680e7d7a3302e0251425c80336655ffe651
|
7
|
+
data.tar.gz: 4623920327cabb8deb52c18ada5fd416633d0755f9d4a30ed0b215ac54ca9c5e4f73e6d6de0460a159b3a9c6d908e6e93d6ad366aa2ef30be30f0738690a691c
|
data/README.md
CHANGED
data/lib/initd/export.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Initd::Export
|
2
2
|
|
3
3
|
def export_path
|
4
|
-
Pathname.new
|
4
|
+
Pathname.new(location).expand_path
|
5
5
|
end
|
6
6
|
|
7
7
|
def setup
|
@@ -12,18 +12,23 @@ module Initd::Export
|
|
12
12
|
|
13
13
|
def cleanup
|
14
14
|
Dir.glob export_path.join("#{app}-*") do |filename|
|
15
|
+
filename = Pathname.new(filename)
|
15
16
|
contents = File.new(filename, 'r').read
|
16
17
|
next unless contents.match(/# Autogenerated by foreman/)
|
17
|
-
next if @exported.include? filename
|
18
|
-
say 'removing ' + filename
|
19
|
-
|
18
|
+
next if @exported.include? filename
|
19
|
+
say 'removing ' + filename.to_s
|
20
|
+
remove filename
|
20
21
|
end
|
21
22
|
end
|
22
23
|
|
24
|
+
def remove path
|
25
|
+
File.unlink path
|
26
|
+
end
|
27
|
+
|
23
28
|
def export_file (path, contents)
|
24
29
|
write_file(path, contents)
|
25
30
|
File.chmod(0755, path)
|
26
|
-
@exported.push path
|
31
|
+
@exported.push path
|
27
32
|
end
|
28
33
|
|
29
34
|
def concurrency(name)
|
data/templates/monit_config.erb
CHANGED
@@ -3,4 +3,4 @@ check process <%= name.shellescape %> with pidfile <%= pidfile.to_s.shellescape
|
|
3
3
|
group <%= app %>
|
4
4
|
start program = "/etc/init.d/<%= name %> start"
|
5
5
|
stop program = "/etc/init.d/<%= name %> stop"
|
6
|
-
if 25 restarts within 50 cycles
|
6
|
+
if 25 restarts within 50 cycles
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman-export-initd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cargo Media
|
@@ -9,62 +9,62 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: foreman
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 0.59.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 0.59.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rspec
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '2.0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '2.0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: fakefs
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: 0.4.3
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: 0.4.3
|
70
70
|
description: Foreman-exporter to create init.d- and monit-scripts
|
@@ -76,9 +76,9 @@ extra_rdoc_files:
|
|
76
76
|
files:
|
77
77
|
- LICENSE
|
78
78
|
- README.md
|
79
|
+
- lib/foreman-export-initd.rb
|
79
80
|
- lib/foreman/export/initd.rb
|
80
81
|
- lib/foreman/export/initd_monit.rb
|
81
|
-
- lib/foreman-export-initd.rb
|
82
82
|
- lib/initd/export.rb
|
83
83
|
- lib/initd/monit_config.rb
|
84
84
|
- lib/initd/script.rb
|
@@ -94,17 +94,17 @@ require_paths:
|
|
94
94
|
- lib
|
95
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- -
|
97
|
+
- - ">="
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0'
|
100
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
106
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.
|
107
|
+
rubygems_version: 2.2.2
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: init.d export scripts for foreman
|