def concatenate_and_tag_assets(paths, variant=nil)
      stylesheets = [paths].flatten.map do |css_path|
        contents = read_binary_file(css_path)
        contents.gsub(EMBED_DETECTOR) do |url|
          ipath, cpath = Pathname.new($1), Pathname.new(File.expand_path(css_path))
          is_url = URI.parse($1).absolute?
          is_url ? url : "url(#{construct_asset_path(ipath, cpath, variant)})"
        end
      end
      stylesheets.join("\n")
    end
def concatenate_and_tag_assets(paths, variant=nil)
      stylesheets = [paths].flatten.map do |css_path|
        contents = read_binary_file(css_path)
        contents.gsub(EMBED_DETECTOR) do |url|
          ipath, cpath = Pathname.new($1), Pathname.new(File.expand_path(css_path))
          is_url = URI.parse($1).absolute?
          is_url ? url : "url(#{construct_asset_path(ipath, cpath, variant)})"
        end
      end
      stylesheets.join("\n")
    end
In order to support embedded assets from relative paths, we need to
 expand the paths before contatenating the CSS together and losing the
 location of the original stylesheet path. Validate the assets while we're
 at it.