title: Is there a Ruby library/gem that will generate a URL based on a set of parameters?
body: <p>Rails' URL generation mechanism (most of which routes through <code>polymorphic_url</code> at some point) allows for the passing of a hash that gets serialized into a query string at least for GET requests. What's the best way to get that sort of functionality, but on top of any base path?</p>
  
  <p>For instance, I'd like to have something like the following:</p>
  
  <pre><code>generate_url('http://www.google.com/', :q =&gt; 'hello world')
    # =&gt; 'http://www.google.com/?q=hello+world'
  </code></pre>
  
  <p>I could certainly write my own that strictly suits my application's requirements, but if there existed some canonical library to take care of it, I'd rather use that :).</p>