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"
def r301(*opt)
if opt.first && !opt.first.kind_of?(::String)
raise "First parameter should be a String. Did you mean to wrap this in a rewrites block? #{opt.first}"
if first = 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
self << "Redirect permanent #{opt.quoteize * " "}"
end

View File

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