luban-nginx 0.2.1 → 0.2.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: b631ea23bca17cadca11aabf4e5d2b81640348fd
4
- data.tar.gz: 201588804f4cd8b58a018838fb9c29a63cd8da52
3
+ metadata.gz: b424bf66e37e56f3b6a339389967eeaa9f908053
4
+ data.tar.gz: b2105b154e1ec6f1f8cafb69e5cc1dd6be7c191c
5
5
  SHA512:
6
- metadata.gz: c07174b806ee5c0bc72669bf36d38341306598e9c77a07c5bfb20a657e854937cb1f5e533dfaaf3ff2cc526fe68235f3aab26055098a4fa70b68be157e617132
7
- data.tar.gz: 10128279046c58ffd78731b2959f410f78873e2c20cab5932ad3c2289f959d5dbf18035022f11344e4948f96e405f20e26e4d4484ba42809989eb61e34e13737
6
+ metadata.gz: 5039251d11b9fd34e6acb10b209299ecb53be45e5fb1d3364be98b7e986f3fa944135003c3d7c6f326f72b208cf5c5a47831a66085fe863861983a2e8e2ba285
7
+ data.tar.gz: acda97cafd8b645759f0ee8a1bd7b8986825ff283ec1bb3436c6849e45cd887b364998f1de8afd966a9dad0b20e95bec24e44ac7c7e08682dd7f798938098115
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.2.2 (Sept 19, 2016)
4
+
5
+ Minor enhancements:
6
+ * Refactored the way of composing shell commands
7
+ * As a result, bumped up the gem dependency on Luban to version 0.8.0
8
+
3
9
  ## Version 0.2.1 (Sept 01, 2016)
4
10
 
5
11
  Bug fixes:
@@ -20,10 +20,12 @@ module Luban
20
20
  @process_pattern ||= "^nginx: master process #{nginx_command}"
21
21
  end
22
22
 
23
- alias_method :start_command, :nginx_command
23
+ def start_command
24
+ @start_command ||= shell_command(nginx_command)
25
+ end
24
26
 
25
27
  def stop_command
26
- @stop_command ||= "#{nginx_command} -s stop"
28
+ @stop_command ||= shell_command("#{nginx_command} -s stop")
27
29
  end
28
30
  end
29
31
 
@@ -55,19 +57,19 @@ module Luban
55
57
  protected
56
58
 
57
59
  def config_test!
58
- capture(compose_command("#{nginx_command} -t"))
60
+ capture(shell_command("#{nginx_command} -t"))
59
61
  end
60
62
 
61
63
  def quit_process!
62
- capture(compose_command("#{nginx_command} -s quit"))
64
+ capture(shell_command("#{nginx_command} -s quit"))
63
65
  end
64
66
 
65
67
  def reload_process!
66
- capture(compose_command("#{nginx_command} -s reload"))
68
+ capture(shell_command("#{nginx_command} -s reload"))
67
69
  end
68
70
 
69
71
  def reopen_logs!
70
- capture(compose_command("#{nginx_command} -s reopen"))
72
+ capture(shell_command("#{nginx_command} -s reopen"))
71
73
  end
72
74
  end
73
75
  end
@@ -3,8 +3,8 @@
3
3
  check process <%= service_entry %>
4
4
  with pidfile <%= pid_file_path %>
5
5
  onreboot laststate
6
- start program = "/bin/bash -c 'sleep 1; <%= compose_command(start_command) %>'"
7
- stop program = "/bin/bash -c '<%= compose_command(stop_command) %>'"
6
+ start program = "/bin/bash -c 'sleep 1; <%= start_command %>'"
7
+ stop program = "/bin/bash -c '<%= stop_command %>'"
8
8
  if totalmem is greater than 10.0 MB for 40 cycles then restart
9
9
  <%- if proxy? -%>
10
10
  if failed port <%= proxy_app.port %> for 4 times within 8 cycles then restart
@@ -2,7 +2,7 @@ module Luban
2
2
  module Deployment
3
3
  module Packages
4
4
  class Nginx
5
- VERSION = '0.2.1'
5
+ VERSION = '0.2.2'
6
6
  end
7
7
  end
8
8
  end
data/luban-nginx.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.required_ruby_version = ">= 2.1.0"
23
- spec.add_dependency 'luban', ">= 0.7.9"
23
+ spec.add_dependency 'luban', ">= 0.8.0"
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 1.11"
26
26
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luban-nginx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
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-01 00:00:00.000000000 Z
11
+ date: 2016-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: luban
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.9
19
+ version: 0.8.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.7.9
26
+ version: 0.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement