server-starter 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/CHANGELOG.md +6 -0
- data/README.md +3 -3
- data/example/config/unicorn.conf +1 -1
- data/example/restart_server +1 -1
- data/example/start_server +1 -1
- data/lib/server/starter/helper.rb +8 -1
- data/lib/server/starter/version.rb +1 -1
- data/lib/server/starter.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68c36a989a31dbedc64dbf0151ae27ba31b62423
|
4
|
+
data.tar.gz: 4cf2050173783280a3c4a0f649af09badb8715b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f40f2dfcb2b27c656948cabd4971dfec25ecc190fbce8373c0483736bac0c19396be8afa46e19657cca01f8bedb5bca67ff7587933c006ab382fe1123dc236a
|
7
|
+
data.tar.gz: b5e563e113f13c990aefae3a29caa4d638a289d44ed3fc94d284c2da9c56645a87fac77de13f3c16501b7675eb3233490e274ffafb67edd216a6287a642579d0
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -24,8 +24,8 @@ Following is an example to run unicorn server under ```Server::Starter```.
|
|
24
24
|
The command line example:
|
25
25
|
|
26
26
|
```
|
27
|
-
bundle exec start_server.rb --
|
28
|
-
--
|
27
|
+
bundle exec start_server.rb --port=10080 --signal-on-hup=CONT --dir=/path/to/app \
|
28
|
+
--status-file=/path/to/app/log/start_server.stat --pid-file=/path/to/app/log/start_server.pid -- \
|
29
29
|
bundle exec --keep-file-descriptors unicorn -c config/unicorn.conf.rb config.ru
|
30
30
|
```
|
31
31
|
|
@@ -39,7 +39,7 @@ worker_processes 2
|
|
39
39
|
preload_app true
|
40
40
|
|
41
41
|
APP_ROOT = File.expand_path('../..', __FILE__)
|
42
|
-
status_file = File.join(APP_ROOT, 'log/
|
42
|
+
status_file = File.join(APP_ROOT, 'log/start_server.stat')
|
43
43
|
|
44
44
|
fd = listener.listen
|
45
45
|
unless fd
|
data/example/config/unicorn.conf
CHANGED
data/example/restart_server
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
#!/bin/sh
|
2
|
-
bundle exec start_server.rb --restart --pid-file=log/start_server.pid --status-file=log/
|
2
|
+
bundle exec start_server.rb --restart --pid-file=log/start_server.pid --status-file=log/start_server.stat
|
data/example/start_server
CHANGED
@@ -6,7 +6,7 @@ bundle exec start_server.rb \
|
|
6
6
|
--signal-on-hup=CONT \
|
7
7
|
--signal-on-TERM=TERM \
|
8
8
|
--pid-file=$(pwd)/log/start_server.pid \
|
9
|
-
--status-file=$(pwd)/log/
|
9
|
+
--status-file=$(pwd)/log/start_server.stat \
|
10
10
|
--envdir=env \
|
11
11
|
--enable-auto-restart \
|
12
12
|
--auto-restart-interval=100 \
|
@@ -27,10 +27,17 @@ class Server
|
|
27
27
|
ENV.update(orig_env)
|
28
28
|
end
|
29
29
|
|
30
|
+
# A small tweaked version of Bundler.with_clean_env
|
31
|
+
#
|
32
|
+
# Bundler has Bundler.with_clean_env by its own, but the method
|
33
|
+
# replace ENV with ENV captured on starting.
|
34
|
+
# cf. https://github.com/bundler/bundler/blob/e8c962ef2a3215cdc6fd411b6724f091a16793d6/lib/bundler.rb#L230
|
35
|
+
# Server::Starter changes ENV during running to communicate
|
36
|
+
# with child processes, so we need to keep the changed ENV.
|
37
|
+
# This is why I needed this small tweaked version
|
30
38
|
def bundler_with_clean_env(&block)
|
31
39
|
if defined?(Bundler)
|
32
40
|
begin
|
33
|
-
# Bundler.with_clean_env resets ENV to initial env on loading ruby
|
34
41
|
orig_env = ENV.to_hash
|
35
42
|
ENV.delete_if { |k,_| k[0,7] == 'BUNDLE_' }
|
36
43
|
if ENV.has_key? 'RUBYOPT'
|
data/lib/server/starter.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: server-starter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
73
|
rubyforge_project:
|
74
|
-
rubygems_version: 2.
|
74
|
+
rubygems_version: 2.5.1
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: a superdaemon for hot-deploying server programs (ruby port of p5-Server-Starter)
|