thomaskay-curb-fu 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/curb-fu/request/common.rb +4 -1
  2. metadata +1 -1
@@ -12,8 +12,11 @@ module CurbFu
12
12
  def build_url(url_params, query_params = {})
13
13
  if url_params.is_a? String
14
14
  built_url = url_params
15
+ elsif url_params[:url]
16
+ built_url = url_params[:url]
15
17
  else
16
- built_url = "http://#{url_params[:host]}"
18
+ built_url = ( (url_params[:scheme]) ? url_params[:scheme] : "http" ) + "://"
19
+ built_url += "#{url_params[:host]}"
17
20
  built_url += ":" + url_params[:port].to_s if url_params[:port]
18
21
  built_url += url_params[:path] if url_params[:path]
19
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thomaskay-curb-fu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phil Green, Derek Kastner, Matt Wilson