smartguard 0.2.1 → 0.2.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.
|
@@ -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