capper 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/capper.gemspec +1 -1
- data/lib/capper/monit.rb +8 -4
- data/lib/capper/unicorn.rb +1 -1
- metadata +1 -1
data/capper.gemspec
CHANGED
data/lib/capper/monit.rb
CHANGED
@@ -11,10 +11,14 @@ Capper.load do
|
|
11
11
|
|
12
12
|
upload_template(monitrc, :mode => "0644") do |server|
|
13
13
|
configs.keys.select do |name|
|
14
|
-
roles =
|
15
|
-
roles.
|
16
|
-
|
17
|
-
|
14
|
+
roles = configs[name][:options][:roles]
|
15
|
+
if roles.nil?
|
16
|
+
true
|
17
|
+
else
|
18
|
+
[roles].flatten.select do |r|
|
19
|
+
self.roles[r.to_sym].include?(server)
|
20
|
+
end.any?
|
21
|
+
end
|
18
22
|
end.map do |name|
|
19
23
|
"# #{name}\n#{configs[name][:body]}"
|
20
24
|
end.join("\n\n")
|
data/lib/capper/unicorn.rb
CHANGED
@@ -16,7 +16,7 @@ Capper.load do
|
|
16
16
|
set(:unicorn_config) { File.join(config_path, "unicorn.rb") }
|
17
17
|
set(:unicorn_pidfile) { File.join(pid_path, "unicorn.pid") }
|
18
18
|
|
19
|
-
monit_config "unicorn", <<EOF
|
19
|
+
monit_config "unicorn", <<EOF, :roles => :app
|
20
20
|
check process unicorn
|
21
21
|
with pidfile "<%= unicorn_pidfile %>"
|
22
22
|
start program = "<%= unicorn_script %> start" with timeout 60 seconds
|