capistrano-ruboty 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/lib/capistrano/ruboty/version.rb +1 -1
- data/lib/capistrano/tasks/ruboty.rake +17 -14
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37694ac7be4eb7e623358029f51b61042fc18bde
|
4
|
+
data.tar.gz: f1bb2652df1760eb70d3b719120a606a648bdf71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 381713b830f92840a10a181c1e5bd04f929186c5a61d15206260c15e70160d78081db77084b5ea53188dc2f3a35091e249cf2209f2e83e86c6d30c55d03c8cda
|
7
|
+
data.tar.gz: 2e062331a4780f12a0654e77265684d7832ad58def7556dc90fa273fbb95a1378c8de491610d09aed983bdd30e7a0a1c4239ec2147f833faed9ca1b4faf52bb6
|
@@ -23,29 +23,35 @@ namespace :load do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
namespace :deploy do
|
26
|
-
|
27
|
-
invoke "ruboty:
|
26
|
+
after :publishing, :restart_ruboty do
|
27
|
+
invoke "ruboty:restart" if fetch(:ruboty_default_hooks)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
31
|
namespace :ruboty do
|
32
|
+
desc "Start ruboty"
|
32
33
|
task :start do
|
33
|
-
command_args = []
|
34
|
-
command_args += Array(fetch(:ruboty_command))
|
35
|
-
command_args += %w(--dotenv) if fetch(:ruboty_dotenv)
|
36
|
-
command_args += %w(--daemon) if fetch(:ruboty_daemon)
|
37
|
-
command_args += ["--pid", fetch(:ruboty_pid)] if fetch(:ruboty_pid)
|
38
|
-
command_args += Array(fetch(:ruboty_options)) if fetch(:ruboty_options)
|
39
|
-
|
40
34
|
on fetch(:ruboty_servers) do
|
41
35
|
within release_path do
|
42
36
|
with ruboty_env: fetch(:ruboty_env) do
|
43
|
-
|
37
|
+
pid = existing_pid(fetch(:ruboty_pid))
|
38
|
+
if pid
|
39
|
+
info "ruboty is already running."
|
40
|
+
else
|
41
|
+
command_args = []
|
42
|
+
command_args += Array(fetch(:ruboty_command))
|
43
|
+
command_args += %w(--dotenv) if fetch(:ruboty_dotenv)
|
44
|
+
command_args += %w(--daemon) if fetch(:ruboty_daemon)
|
45
|
+
command_args += ["--pid", fetch(:ruboty_pid)] if fetch(:ruboty_pid)
|
46
|
+
command_args += Array(fetch(:ruboty_options)) if fetch(:ruboty_options)
|
47
|
+
execute(*command_args)
|
48
|
+
end
|
44
49
|
end
|
45
50
|
end
|
46
51
|
end
|
47
52
|
end
|
48
53
|
|
54
|
+
desc "Stop ruboty"
|
49
55
|
task :stop do
|
50
56
|
on fetch(:ruboty_servers) do
|
51
57
|
within release_path do
|
@@ -77,12 +83,9 @@ namespace :ruboty do
|
|
77
83
|
pid
|
78
84
|
end
|
79
85
|
|
86
|
+
desc "Restart ruboty"
|
80
87
|
task :restart do
|
81
88
|
invoke "ruboty:stop"
|
82
89
|
invoke "ruboty:start"
|
83
90
|
end
|
84
|
-
|
85
|
-
task :add_default_hooks do
|
86
|
-
after "deploy:publishing", "ruboty:restart"
|
87
|
-
end
|
88
91
|
end
|