capistrano-websocket-rails 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa747717f35989c68d5788129ceedc2a2c53e109
|
4
|
+
data.tar.gz: 38b73506cdeee363ce00799231e91fb41ebfdaf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6175940e8371e11e408406f2d0775b1d3b41f838ec8459ee2eb755b5f758613e6bac2ce6d377744712ff4b35e57cf156641d2c97101f45aaa3095d50823ddaa9
|
7
|
+
data.tar.gz: 7cc9c2ce20469529cbfb19bf2cc996fc0204933cdbc73ba90cd29e3ed0328934bb92a177aaaea5f517a91cf946a3dfd30fa647f5fc4eaf5ad25841918ffb0929
|
@@ -1,5 +1,5 @@
|
|
1
1
|
namespace :load do
|
2
|
-
set :websocket_rails_pid, -> {
|
2
|
+
set :websocket_rails_pid, -> { File.join(shared_path, 'tmp', 'pids', 'websocket_rails.pid') }
|
3
3
|
set :websocket_rails_env, -> { fetch :rack_env, fetch(:rails_env, fetch(:stage)) }
|
4
4
|
set :websocket_rails_role, -> { :app }
|
5
5
|
end
|
@@ -31,17 +31,13 @@ namespace :websocket_rails do
|
|
31
31
|
|
32
32
|
def start_server
|
33
33
|
info 'Starting websocket-rails server...'
|
34
|
-
|
35
|
-
rake 'websocket_rails:start_server'
|
36
|
-
end
|
34
|
+
run_rake_command! 'start_server'
|
37
35
|
info 'Websocket-rails server started.'
|
38
36
|
end
|
39
37
|
def stop_server
|
40
38
|
if pid_file_exists?
|
41
39
|
info 'Stopping websocket-rails server...'
|
42
|
-
|
43
|
-
rake 'websocket_rails:stop_server'
|
44
|
-
end
|
40
|
+
run_rake_command! 'stop_server'
|
45
41
|
info 'Websocket-rails server stopped.'
|
46
42
|
else
|
47
43
|
info 'Websocket-rails server not running.'
|
@@ -50,5 +46,10 @@ namespace :websocket_rails do
|
|
50
46
|
def pid_file_exists?
|
51
47
|
test "[ -f #{fetch(:websocket_rails_pid)} ]"
|
52
48
|
end
|
49
|
+
def run_rake_command!(cmd)
|
50
|
+
with rails_env: fetch(:websocket_rails_env) do
|
51
|
+
rake "websocket_rails:#{cmd}"
|
52
|
+
end
|
53
|
+
end
|
53
54
|
|
54
55
|
end
|