unicorn-rails 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/unicorn/rails/version.rb +1 -1
- data/lib/unicorn/rails.rb +8 -0
- metadata +2 -2
data/lib/unicorn/rails.rb
CHANGED
@@ -16,9 +16,17 @@ module Rack
|
|
16
16
|
unicorn_options[:worker_processes] = (ENV["UNICORN_WORKERS"] || "1").to_i
|
17
17
|
unicorn_options[:timeout] = 31 * 24 * 60 * 60
|
18
18
|
|
19
|
+
if ::File.exist?("config/unicorn/#{environment}.rb")
|
20
|
+
unicorn_options[:config_file] = "config/unicorn/#{environment}.rb"
|
21
|
+
end
|
22
|
+
|
19
23
|
::Unicorn::Launcher.daemonize!(unicorn_options) if options[:daemonize]
|
20
24
|
::Unicorn::HttpServer.new(app, unicorn_options).start.join
|
21
25
|
end
|
26
|
+
|
27
|
+
def environment
|
28
|
+
ENV['RACK_ENV'] || ENV['RAILS_ENV']
|
29
|
+
end
|
22
30
|
end
|
23
31
|
end
|
24
32
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicorn-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|