diff --git a/lib/compass/sass_extensions/functions/urls.rb b/lib/compass/sass_extensions/functions/urls.rb index 2a96b6dce7..b38dc518b8 100644 --- a/lib/compass/sass_extensions/functions/urls.rb +++ b/lib/compass/sass_extensions/functions/urls.rb @@ -18,7 +18,6 @@ def image_url(path) path = path.value # get to the string value of the literal. # Short curcuit if they have provided an absolute url. if absolute_path?(path) - puts "#{path} is absolute" return Sass::Script::String.new("url(#{path})") end @@ -44,7 +43,9 @@ def image_url(path) end # Compute the asset host unless in relative mode. - asset_host = (compute_asset_host(path) unless relative?) + asset_host = if !relative? && Compass.configuration.asset_host + Compass.configuration.asset_host.call(path) + end # Compute and append the cache buster if there is one. if buster = compute_cache_buster(path, real_path) @@ -101,12 +102,4 @@ def default_cache_buster(path, real_path) end end - def compute_asset_host(path) - if Compass.configuration.asset_host - Compass.configuration.asset_host.call(path) - else - nil - end - end - -end \ No newline at end of file +end