aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/nginx.rb
diff options
context:
space:
mode:
authorJack Nagel2014-10-26 22:30:29 -0500
committerJack Nagel2014-10-26 22:30:29 -0500
commitf3ab3fa1a1ab39c5cce8c25c58e8d2d91ce79227 (patch)
tree9aaf36970e5a46f7f6d004686826404417d43c13 /Library/Formula/nginx.rb
parent0afea711dc2048ba3c36646d7fef91394d191e20 (diff)
downloadhomebrew-f3ab3fa1a1ab39c5cce8c25c58e8d2d91ce79227.tar.bz2
nginx: simplify code for passenger support
We don't need to protect against passenger not being found.
Diffstat (limited to 'Library/Formula/nginx.rb')
-rw-r--r--Library/Formula/nginx.rb18
1 files changed, 5 insertions, 13 deletions
diff --git a/Library/Formula/nginx.rb b/Library/Formula/nginx.rb
index e44beecab..ec19fd161 100644
--- a/Library/Formula/nginx.rb
+++ b/Library/Formula/nginx.rb
@@ -33,18 +33,6 @@ class Nginx < Formula
depends_on "passenger" => :optional
depends_on "openssl"
- def passenger_config_args
- passenger_config = "#{HOMEBREW_PREFIX}/opt/passenger/bin/passenger-config"
- nginx_ext = `#{passenger_config} --nginx-addon-dir`.chomp
-
- if File.directory?(nginx_ext)
- return "--add-module=#{nginx_ext}"
- end
-
- puts "Unable to install nginx with passenger support."
- exit
- end
-
def install
# Changes default port to 8080
inreplace "conf/nginx.conf", "listen 80;", "listen 8080;"
@@ -74,7 +62,11 @@ class Nginx < Formula
"--with-http_gzip_static_module"
]
- args << passenger_config_args if build.with? "passenger"
+ if build.with? "passenger"
+ nginx_ext = `#{Formula["passenger"].opt_bin}/passenger-config --nginx-addon-dir`.chomp
+ args << "--add-module=#{nginx_ext}"
+ end
+
args << "--with-http_dav_module" if build.with? "webdav"
args << "--with-debug" if build.with? "debug"
args << "--with-http_spdy_module" if build.with? "spdy"