smartguard 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,16 +7,23 @@ module Smartguard
|
|
7
7
|
|
8
8
|
Logging.logger.info "Starting thin"
|
9
9
|
|
10
|
+
if Smartguard.environment == :development
|
11
|
+
port = 3001
|
12
|
+
else
|
13
|
+
port = 3000
|
14
|
+
end
|
15
|
+
|
10
16
|
if !run(@path,
|
11
17
|
{},
|
12
18
|
"bundle", "exec",
|
13
|
-
"thin", "-e", Smartguard.environment.to_s, "
|
19
|
+
"thin", "-e", Smartguard.environment.to_s, "-p", port.to_s,
|
20
|
+
"start"
|
14
21
|
)
|
15
22
|
return false
|
16
23
|
end
|
17
24
|
|
18
25
|
without_respawn do
|
19
|
-
wait_for_port
|
26
|
+
wait_for_port port
|
20
27
|
end
|
21
28
|
end
|
22
29
|
|
@@ -46,6 +46,11 @@ module Smartguard
|
|
46
46
|
system 'reboot'
|
47
47
|
end
|
48
48
|
|
49
|
+
def reboot_async
|
50
|
+
Thread.new{ self.reboot }
|
51
|
+
true
|
52
|
+
end
|
53
|
+
|
49
54
|
def switch_release(release)
|
50
55
|
if Smartguard.environment != :production
|
51
56
|
raise "Release switching is only supported in the production environment."
|
data/lib/smartguard/version.rb
CHANGED