nuke a few more smells

This commit is contained in:
John Bintz 2010-05-19 09:48:33 -04:00
parent f336947d15
commit 513cd859ea
2 changed files with 6 additions and 4 deletions

View File

@ -34,8 +34,10 @@ module Apache
# #
# r301 '/here', '/there' #=> Redirect permanent "/here" "/there" # r301 '/here', '/there' #=> Redirect permanent "/here" "/there"
def r301(*opt) def r301(*opt)
if opt.first && !opt.first.kind_of?(::String) if first = opt.first
raise "First parameter should be a String. Did you mean to wrap this in a rewrites block? #{opt.first}" if !first.kind_of?(::String)
raise "First parameter should be a String. Did you mean to wrap this in a rewrites block? #{first}"
end
end end
self << "Redirect permanent #{opt.quoteize * " "}" self << "Redirect permanent #{opt.quoteize * " "}"
end end

View File

@ -3,7 +3,7 @@ module Apache
def enable_ssl_engine(options = {}) def enable_ssl_engine(options = {})
self + [ '', "SSLEngine on" ] self + [ '', "SSLEngine on" ]
options.each do |key, value| options.each do |key, value|
value = quoteize(value).first value = value.quoteize
case key case key
when :certificate_file, :certificate_key_file when :certificate_file, :certificate_key_file
self << "SSL#{key.apachify} #{value}" self << "SSL#{key.apachify} #{value}"
@ -11,7 +11,7 @@ module Apache
self << "SSLCACertificateFile #{value}" self << "SSLCACertificateFile #{value}"
end end
end end
self << "" blank_line!
end end
end end
end end