alexdunae/premailer — pull request #131 by rykov (2012-07-29 06:30:33+00:00)
Title: Allow to load CSS documents from <link> tags for an string HTML

Currently, tags do terrible things when using Premailer with inline HTML. In the code that I'm changing, it tries to do `File.join(@html_file, ...)` where `@html_file` is the HTML string. I think a better approach is to use `@base_dir` as the root for CSS files and make sure that our HTML is local. Otherwise, let the following remote fetching code retrieve the file.

Furthermore, I've added a `:base_dir` option to be able to specify the base_dir in the case where it cannot be inferred from the `@html_file` path (like inline HTML)