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, "start"
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 3000
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."
@@ -1,3 +1,3 @@
1
1
  module Smartguard
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartguard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: