lib/earl/url_assembler.rb in earl-0.2.0 vs lib/earl/url_assembler.rb in earl-0.3.0

- old
+ new

@@ -1,16 +1,15 @@ module Earl - class UrlAssembler + class URLAssembler def assemble( parts={} ) ''.tap do |url| url << ( parts[ :scheme ] + '://' ) if parts[ :scheme ] url << ( parts[ :subdomain ] + '.' ) if parts[ :subdomain ] url << ( parts[ :host ] ) if parts[ :host ] - url << ( ':' + parts[ :port ] ) if parts[ :port ] + url << ( ':' + parts[ :port ].to_s ) if parts[ :port ] url << ( '/' + parts[ :path ] ) if parts[ :path ] url << ( '?' + parts[ :search ] ) if parts[ :search ] - url end end end end