brightbox 2.0.1 → 2.0.2
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/lib/brightbox/recipes/deploy.rb +26 -3
- data/lib/brightbox/recipes/helpers.rb +1 -1
- data/lib/brightbox/version.rb +1 -1
- metadata +2 -2
@@ -31,12 +31,35 @@ namespace :deploy do
|
|
31
31
|
end
|
32
32
|
depend :remote, :command, monit_command
|
33
33
|
|
34
|
-
|
34
|
+
def mongrel_cluster_command(event)
|
35
|
+
"#{mongrel_command} cluster::#{event} -C #{mongrel_config_file}" <<
|
36
|
+
if event == "status"
|
37
|
+
""
|
38
|
+
else
|
39
|
+
" --clean"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def monitor_cluster_command(event)
|
44
|
+
case event
|
45
|
+
when "start","restart"
|
46
|
+
"#{monit_command} -g #{application} monitor all"
|
47
|
+
when "stop"
|
48
|
+
"#{monit_command} -g #{application} unmonitor all"
|
49
|
+
else
|
50
|
+
nil
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
#Override start, stop and restart so that they use mongrel to restart the
|
35
55
|
#application servers
|
36
|
-
%
|
56
|
+
%w(start stop restart status).each do |event|
|
37
57
|
desc "Ask mongrel to #{event} your application."
|
38
58
|
task event, :roles => :app, :except => {:no_release => true } do
|
39
|
-
try_sudo
|
59
|
+
try_sudo mongrel_cluster_command(event)
|
60
|
+
if cmd = monitor_cluster_command(event)
|
61
|
+
sudo cmd
|
62
|
+
end
|
40
63
|
end
|
41
64
|
end
|
42
65
|
|
@@ -23,7 +23,7 @@ def rake_task(taskname)
|
|
23
23
|
rake_env = fetch(:rake_env, "")
|
24
24
|
directory = current_release
|
25
25
|
|
26
|
-
|
26
|
+
%Q{sh -c 'cd #{directory}; #{rake} RAILS_ENV=#{rails_env} #{rake_env} #{taskname}'}
|
27
27
|
end
|
28
28
|
|
29
29
|
def on_one_line(cmd_list)
|
data/lib/brightbox/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brightbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Leach
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2008-06-
|
13
|
+
date: 2008-06-12 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|