simple_uri 0.0.8 → 0.0.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f95a041f4a73d5f7167199496cc9916931d31003
4
- data.tar.gz: 654e79c3b12fd6eb8985da8ef63bfb025c877da0
3
+ metadata.gz: 5a07c2e31c26acd24004059f3cb5116fdc74fe6e
4
+ data.tar.gz: 2908dd5fbf76ecf1c2fc9b391e28d166b2889ea5
5
5
  SHA512:
6
- metadata.gz: 0e4f00d0c8dd24fd9e476b09b5025effb9ae91db77f9f535df54e5e5d7c034510563c3cea61dac98173a50cd404f3f2db0b20157f6408815a1d89f6b419487ed
7
- data.tar.gz: 9a83db5b9e30f6fb35fe451c312704e8e307cb2f0484129a47f3913f9df48f0cd004c0c60236d357ca19b38344c341508c755a6d0ac072d91a4a55d4b04770e0
6
+ metadata.gz: 423305348bad1077ada24476475ae531a8b23a10d080f0518aeb26193a237c9a9ae0cc98f960545d2ed82d9ac22ab81db21bd4db451b8dfbbb30ad8671818bb4
7
+ data.tar.gz: 3b0b60d72fe1f0925b59cc3a13bf69138a72dbd9891363e65cc22f44c76ed3683ba2a57159c31ce40fb732831e8f237da683cbbdb3370cd4e8e73636ee47e46d
@@ -1,3 +1,3 @@
1
1
  module SimpleUri
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
data/lib/simple_uri.rb CHANGED
@@ -30,7 +30,8 @@ module SimpleUri
30
30
  end
31
31
 
32
32
  def send_request(url=nil, method=:get, options={ params: nil, req_body: nil, req_headers: nil, user: nil, password: nil, debug: @@debug_mode, cookies: false })
33
- options[:params] = (method==:post && options[:req_body].present?) ? nil : '?'+prepare_req_body(options[:req_body]).to_s
33
+ get_params = options[:req_body].present? ? '?'+prepare_req_body(options[:req_body]).to_s : ''
34
+ options[:params] = method==:post ? nil : get_params
34
35
  req, http = connect(url, method, { params: options[:params], user: options[:user], password: options[:password], debug: options[:debug] })
35
36
  req.body = prepare_req_body(options[:req_body]) if method == :post
36
37
  options[:req_headers].each { |k, v| req[k] = v } if options[:req_headers]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_uri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikulin Aleksander