unicorn-directory-watcher 0.1.1 → 0.1.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.
- data/Gemfile.lock +1 -1
- data/lib/unicorn_directory_watcher.rb +0 -17
- data/lib/unicorn_directory_watcher/version.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
|
@@ -29,16 +29,6 @@ module UnicornDirectoryWatcher
|
|
|
29
29
|
EM.epoll = true
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
ENV["UNICORN_STDERR_PATH"] = "#{log_dir}/#{app_name}.development.stderr.log"
|
|
33
|
-
ENV["UNICORN_STDOUT_PATH"] = "#{log_dir}/#{app_name}.development.stdout.log"
|
|
34
|
-
|
|
35
|
-
tail_stderr_log = fork do
|
|
36
|
-
system "tail -f #{ENV["UNICORN_STDERR_PATH"]}"
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
# remove the old log
|
|
40
|
-
system "rm -f -- #{logfile}"
|
|
41
|
-
|
|
42
32
|
# start the unicorn
|
|
43
33
|
yield
|
|
44
34
|
|
|
@@ -49,8 +39,6 @@ module UnicornDirectoryWatcher
|
|
|
49
39
|
File.open(pidfile) { |f| f.read }.chomp.to_i
|
|
50
40
|
end
|
|
51
41
|
|
|
52
|
-
system "touch #{logfile}"
|
|
53
|
-
|
|
54
42
|
directory_watchers = watcher_globs.map do |dir, glob|
|
|
55
43
|
# watch our app for changes
|
|
56
44
|
dw = DirectoryWatcher.new dir,
|
|
@@ -70,7 +58,6 @@ module UnicornDirectoryWatcher
|
|
|
70
58
|
end
|
|
71
59
|
Process.kill :QUIT, old_pid
|
|
72
60
|
end
|
|
73
|
-
Process.kill :HUP, tail_stderr_log
|
|
74
61
|
|
|
75
62
|
dw
|
|
76
63
|
end
|
|
@@ -93,10 +80,6 @@ module UnicornDirectoryWatcher
|
|
|
93
80
|
end
|
|
94
81
|
|
|
95
82
|
protected
|
|
96
|
-
def logfile
|
|
97
|
-
"#{log_dir}/unicorn.log"
|
|
98
|
-
end
|
|
99
|
-
|
|
100
83
|
def pidfile
|
|
101
84
|
"#{pid_dir}/unicorn.pid"
|
|
102
85
|
end
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: unicorn-directory-watcher
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.1.
|
|
5
|
+
version: 0.1.2
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Brian Takita
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-07-
|
|
13
|
+
date: 2011-07-17 00:00:00 -07:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|