Permalink
Browse files

updated to use vhost_type rather than just plain type to avoid conflict

  • Loading branch information...
1 parent e4b3c49 commit a815383ebff974149e05c1688aa2211669015e94 @nagey nagey committed Jan 10, 2013
Showing with 7 additions and 7 deletions.
  1. +7 −7 nginx.rb
View
@@ -26,8 +26,8 @@ def restart_nginx
end
end
-dep 'vhost enabled.nginx', :type, :domain, :domain_aliases, :path, :listen_host, :listen_port, :proxy_host, :proxy_port, :nginx_prefix, :enable_http, :enable_https, :force_https do
- requires 'vhost configured.nginx'.with(type, domain, domain_aliases, path, listen_host, listen_port, proxy_host, proxy_port, nginx_prefix, enable_http, enable_https, force_https)
+dep 'vhost enabled.nginx', :vhost_type, :domain, :domain_aliases, :path, :listen_host, :listen_port, :proxy_host, :proxy_port, :nginx_prefix, :enable_http, :enable_https, :force_https do
+ requires 'vhost configured.nginx'.with(vhost_type, domain, domain_aliases, path, listen_host, listen_port, proxy_host, proxy_port, nginx_prefix, enable_http, enable_https, force_https)
met? { vhost_link.exists? }
meet {
sudo "mkdir -p #{nginx_prefix / 'conf/vhosts/on'}"
@@ -36,7 +36,7 @@ def restart_nginx
after { restart_nginx }
end
-dep 'vhost configured.nginx', :type, :domain, :domain_aliases, :path, :listen_host, :listen_port, :proxy_host, :proxy_port, :nginx_prefix, :enable_http, :enable_https, :force_https do
+dep 'vhost configured.nginx', :vhost_type, :domain, :domain_aliases, :path, :listen_host, :listen_port, :proxy_host, :proxy_port, :nginx_prefix, :enable_http, :enable_https, :force_https do
domain_aliases.default('').ask('Domains to alias (no need to specify www. aliases)')
listen_host.default!('[::]')
listen_port.default!('80')
@@ -60,20 +60,20 @@ def server_names
).uniq
end
- type.default('unicorn').choose(%w[unicorn proxy static])
+ vhost_type.default('unicorn').choose(%w[unicorn proxy static])
path.default("~#{domain}/current".p) if shell?('id', domain)
requires 'configured.nginx'.with(nginx_prefix)
- requires 'unicorn configured'.with(path) if type == 'unicorn'
+ requires 'unicorn configured'.with(path) if vhost_type == 'unicorn'
met? {
Babushka::Renderable.new(vhost_conf).from?(dependency.load_path.parent / "nginx/vhost.conf.erb") and
- Babushka::Renderable.new(vhost_common).from?(dependency.load_path.parent / "nginx/#{type}_vhost.common.erb")
+ Babushka::Renderable.new(vhost_common).from?(dependency.load_path.parent / "nginx/#{vhost_type}_vhost.common.erb")
}
meet {
sudo "mkdir -p #{nginx_prefix / 'conf/vhosts'}"
render_erb "nginx/vhost.conf.erb", :to => vhost_conf, :sudo => true
- render_erb "nginx/#{type}_vhost.common.erb", :to => vhost_common, :sudo => true
+ render_erb "nginx/#{vhost_type}_vhost.common.erb", :to => vhost_common, :sudo => true
}
end

0 comments on commit a815383

Please sign in to comment.