luban-rack 0.2.6 → 0.2.7
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/lib/luban/deployment/applications/rack/base.rb +0 -7
- data/lib/luban/deployment/applications/rack/configurator.rb +0 -1
- data/lib/luban/deployment/applications/rack/controller.rb +2 -8
- data/lib/luban/deployment/applications/rack/publisher.rb +0 -2
- data/lib/luban/deployment/applications/rack/templates/puma/puma.monitrc.erb +2 -2
- data/lib/luban/deployment/applications/rack/templates/thin/thin.monitrc.erb +2 -2
- data/lib/luban/deployment/applications/rack/version.rb +1 -1
- data/lib/luban/deployment/applications/rack/web_servers/puma.rb +5 -5
- data/lib/luban/deployment/applications/rack/web_servers/thin.rb +4 -4
- data/luban-rack.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 932f2f5f02ca6ef79258c826163e2f3046b5e317
|
4
|
+
data.tar.gz: f2977360ca06c07a6aebeaea3dbb57ec9f5f15f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e89dce255a7e42e197bd0e9ed40d199e3ba8a77288e8881500d9700ade058cfe779b01ef9265118675b8129afcff936783992a5dce380d96ef208a229d96d990
|
7
|
+
data.tar.gz: 8c95e6aa2392e690088e5fab41cbbf7446a51c2057d429db3d6d2b20b0ea0b233c5d839262b8ffefe16239dd450a30216e9243733e620e35b21acdf15b29d058
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## Version 0.2.7 (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.6 (Sept 04, 2016)
|
4
10
|
|
5
11
|
Bug fixes:
|
6
12
|
* Overloaded #shell_command_prefix method in all worker classes
|
7
|
-
*
|
13
|
+
* Minor bug fixes
|
8
14
|
|
9
15
|
## Version 0.2.5 (Sept 01, 2016)
|
10
16
|
|
@@ -4,13 +4,6 @@ module Luban
|
|
4
4
|
class Rack < Luban::Deployment::Application
|
5
5
|
using Luban::CLI::CoreRefinements
|
6
6
|
|
7
|
-
module Common
|
8
|
-
def shell_command_prefix
|
9
|
-
@shell_command_prefix ||=
|
10
|
-
has_gemfile? ? (super << "#{bundle_executable} exec") : super
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
7
|
module Parameters
|
15
8
|
extend Luban::Deployment::Parameters::Base
|
16
9
|
|
@@ -3,7 +3,6 @@ module Luban
|
|
3
3
|
module Applications
|
4
4
|
class Rack
|
5
5
|
class Controller < Luban::Deployment::Application::Controller
|
6
|
-
include Common
|
7
6
|
include Paths
|
8
7
|
include Parameters
|
9
8
|
include WebServer
|
@@ -38,13 +37,8 @@ module Luban
|
|
38
37
|
set_web_server_options
|
39
38
|
end
|
40
39
|
|
41
|
-
def restart_process
|
42
|
-
|
43
|
-
end
|
44
|
-
|
45
|
-
def phased_restart_process!
|
46
|
-
capture(compose_command(phased_restart_command))
|
47
|
-
end
|
40
|
+
def restart_process!; capture(restart_command); end
|
41
|
+
def phased_restart_process!; capture(phased_restart_command); end
|
48
42
|
end
|
49
43
|
end
|
50
44
|
end
|
@@ -4,8 +4,8 @@
|
|
4
4
|
check process <%= service_entry %>
|
5
5
|
with pidfile <%= pid_file_path %>
|
6
6
|
onreboot laststate
|
7
|
-
start program = "/bin/bash -c 'sleep 1; <%=
|
8
|
-
stop program = "/bin/bash -c '<%=
|
7
|
+
start program = "/bin/bash -c 'sleep 1; <%= start_command %>'"
|
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
11
|
if failed port <%= opts[:port] %> for 4 times within 8 cycles then restart
|
@@ -6,8 +6,8 @@ check process <%= service_entry %>.<%= current_web_server %>.<%= n %>
|
|
6
6
|
with pidfile <%= pid_file_path(n) %>
|
7
7
|
group <%= service_entry %>
|
8
8
|
onreboot laststate
|
9
|
-
start program = "/bin/bash -c 'sleep 1; <%=
|
10
|
-
stop program = "/bin/bash -c '<%=
|
9
|
+
start program = "/bin/bash -c 'sleep 1; <%= start_command %> -o <%=n %>'"
|
10
|
+
stop program = "/bin/bash -c '<%= stop_command %> -o <%=n %>'"
|
11
11
|
if totalmem is greater than 150.0 MB for 40 cycles then alert
|
12
12
|
<%- if tcp_socket? -%>
|
13
13
|
if failed port <%= opts[:port] + n %> for 4 times within 8 cycles then restart
|
@@ -5,7 +5,7 @@ module Luban
|
|
5
5
|
module WebServers
|
6
6
|
module Puma
|
7
7
|
module Common
|
8
|
-
|
8
|
+
def default_web_server_options
|
9
9
|
@default_web_server_options ||= {
|
10
10
|
# Server options
|
11
11
|
address: "0.0.0.0",
|
@@ -61,11 +61,11 @@ module Luban
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def start_command
|
64
|
-
@start_command ||= "#{puma_command} start"
|
64
|
+
@start_command ||= bundle_command("#{puma_command} start")
|
65
65
|
end
|
66
66
|
|
67
67
|
def stop_command
|
68
|
-
@stop_command ||= "#{puma_command} stop"
|
68
|
+
@stop_command ||= bundle_command("#{puma_command} stop")
|
69
69
|
end
|
70
70
|
|
71
71
|
def process_pattern
|
@@ -143,11 +143,11 @@ module Luban
|
|
143
143
|
include Common
|
144
144
|
|
145
145
|
def restart_command
|
146
|
-
@restart_command ||= "#{puma_command} restart"
|
146
|
+
@restart_command ||= bundle_command("#{puma_command} restart")
|
147
147
|
end
|
148
148
|
|
149
149
|
def phased_restart_command
|
150
|
-
@phased_restart_command ||= "#{puma_command} phased-restart"
|
150
|
+
@phased_restart_command ||= bundle_command("#{puma_command} phased-restart")
|
151
151
|
end
|
152
152
|
end
|
153
153
|
end
|
@@ -118,11 +118,11 @@ module Luban
|
|
118
118
|
end
|
119
119
|
|
120
120
|
def start_command
|
121
|
-
@start_command ||= "#{thin_command} start"
|
121
|
+
@start_command ||= bundle_command("#{thin_command} start")
|
122
122
|
end
|
123
123
|
|
124
124
|
def stop_command
|
125
|
-
@stop_command ||= "#{thin_command} stop"
|
125
|
+
@stop_command ||= bundle_command("#{thin_command} stop")
|
126
126
|
end
|
127
127
|
|
128
128
|
def process_pattern
|
@@ -148,11 +148,11 @@ module Luban
|
|
148
148
|
include Common
|
149
149
|
|
150
150
|
def restart_command
|
151
|
-
@restart_command ||= "#{thin_command} restart"
|
151
|
+
@restart_command ||= bundle_command("#{thin_command} restart")
|
152
152
|
end
|
153
153
|
|
154
154
|
def phased_restart_command
|
155
|
-
@phased_restart_command ||= "#{thin_command} restart --onebyone"
|
155
|
+
@phased_restart_command ||= bundle_command("#{thin_command} restart --onebyone")
|
156
156
|
end
|
157
157
|
end
|
158
158
|
end
|
data/luban-rack.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.
|
23
|
+
spec.add_dependency 'luban', ">= 0.8.0"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.12"
|
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-rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
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-
|
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.
|
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.
|
26
|
+
version: 0.8.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|