luban-rack 0.2.8 → 0.2.9

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: 401673444edec353be4fdafec57295762afe901b
4
- data.tar.gz: 6882a24445150e56bad3e66e435bcafd08a0d679
3
+ metadata.gz: 6c259256c907040be68bcc8e691d834ab91cfa6e
4
+ data.tar.gz: b601b76535446719c83900f707f9669aec0356c2
5
5
  SHA512:
6
- metadata.gz: bc2919ae7f28b1cf8342f29b12182a8d7c9d65cc9e47b2c0ed71f93ade24299d358014989cc33d21ee74f4c62c144a87ff847b45cebb99c0d467c7d1dff403aa
7
- data.tar.gz: a67412dad37c8d561809512c6004003cae56fafd528964bd0da3ad038c42bff3a7ee5e640ed311e5f34bd16c8e59ba5ce39a394219a2cf7672c95e5b1ad278b1
6
+ metadata.gz: d4ba2920f0c93cdd4d578beacb6c30bb59da68e2d164ab6d1c20bc78d63493b2acfe871e172deb994fead34f1d4da4170cef52728ba5010c341762432f1f1a99
7
+ data.tar.gz: 85bebbacc003b3fa0dba25ea98770c2170fdc89915dfae135fb0b69d72cb3123f2bc42f4960f46fa84ea2c8c9ab9985c850722664ead7d665ea3fcb01b18010d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.2.9 (Sept 21, 2016)
4
+
5
+ Bug fixes:
6
+ * Changed default server address to 127.0.0.1 for both Thin and Puma
7
+ * Changed Puma default port next to the web server port
8
+ * Passed the right arguments to monitor_command/unmonitor_command
9
+ * Checked if process is monitorable before enable/disable process monitoring
10
+
3
11
  ## Version 0.2.8 (Sept 20, 2016)
4
12
 
5
13
  Bug fixes:
@@ -13,12 +13,12 @@ module Luban
13
13
  return
14
14
  end
15
15
 
16
- unmonitor_process
16
+ unmonitor_process if process_monitorable?
17
17
  output = (phased ? phased_restart_process! : restart_process!) || 'OK'
18
18
 
19
19
  if check_until { process_started? }
20
20
  update_result "Restart #{service_full_name}: [OK] #{output}"
21
- monitor_process
21
+ monitor_process if process_monitorable?
22
22
  else
23
23
  remove_orphaned_pid_file
24
24
  update_result "Restart #{service_full_name}: [FAILED] #{output}",
@@ -8,7 +8,7 @@ check process <%= service_entry %>
8
8
  stop program = "/bin/bash -c '<%= stop_command %>'"
9
9
  if totalmem is greater than 150.0 MB for 40 cycles then alert
10
10
  <%- if tcp_socket? -%>
11
- if failed port <%= opts[:port] %> for 4 times within 8 cycles then restart
11
+ if failed port <%= port + 1 %> for 4 times within 8 cycles then restart
12
12
  <%- end -%>
13
13
  <%- if unix_socket? -%>
14
14
  if failed unixsocket <%= socket_file_path %> for 4 times within 8 cycles then restart
@@ -6,7 +6,7 @@ upstream <%= service_entry %> {
6
6
  # to return a good HTTP response
7
7
 
8
8
  <%- if tcp_socket? -%>
9
- server <%= opts[:address] %>:<%= opts[:port] %> fail_timeout=0;
9
+ server <%= "127.0.0.1" %>:<%= port + 1 %> fail_timeout=0;
10
10
  <%- end -%>
11
11
  <%- if unix_socket? -%>
12
12
  server unix:<%= socket_file_path %> fail_timeout=0;
@@ -2,7 +2,7 @@ module Luban
2
2
  module Deployment
3
3
  module Applications
4
4
  class Rack
5
- VERSION = '0.2.8'
5
+ VERSION = '0.2.9'
6
6
  end
7
7
  end
8
8
  end
@@ -8,8 +8,8 @@ module Luban
8
8
  def default_web_server_options
9
9
  @default_web_server_options ||= {
10
10
  # Server options
11
- address: "0.0.0.0",
12
- port: port,
11
+ address: "127.0.0.1",
12
+ port: port + 1,
13
13
  socket: socket_file_path.to_s,
14
14
  directory: release_path.to_s,
15
15
  environment: stage,
@@ -34,11 +34,11 @@ module Luban
34
34
  rm(pid_files_path) if pid_file_orphaned?
35
35
  end
36
36
 
37
- def monitor_command
37
+ def monitor_command(service_entry)
38
38
  @monitor_command ||= "#{monitor_executable} monitor -g #{service_entry}"
39
39
  end
40
40
 
41
- def unmonitor_command
41
+ def unmonitor_command(service_entry)
42
42
  @unmonitor_command ||= "#{monitor_executable} unmonitor -g #{service_entry}"
43
43
  end
44
44
  end
@@ -88,7 +88,7 @@ module Luban
88
88
  def default_web_server_options
89
89
  @default_web_server_options ||= {
90
90
  # Server options
91
- address: "0.0.0.0",
91
+ address: "127.0.0.1",
92
92
  port: port + 1,
93
93
  socket: socket_file_path.to_s,
94
94
  chdir: release_path.to_s,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luban-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rubyist Chi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-20 00:00:00.000000000 Z
11
+ date: 2016-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: luban