simple_uri 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74f5e10edc2a5053bb124fd877a74c3278908b08
4
- data.tar.gz: 45c5254e30dc959b0323b079907582ef22f5981c
3
+ metadata.gz: f95a041f4a73d5f7167199496cc9916931d31003
4
+ data.tar.gz: 654e79c3b12fd6eb8985da8ef63bfb025c877da0
5
5
  SHA512:
6
- metadata.gz: b97f485ac75ebfd908be7fe69a5b8a2587f244f573abf12b9f3eed3c4cd0278a1838e784b2c3348e7398d7add4464ba4ab77bf5e67638502c2ae7c2a9f316e88
7
- data.tar.gz: 962655fd86de8a4f5cda78e4e05e17ae38ea4fc30986bb4e942b0aa4e0c6f7e75ec7bbb2a29c544f9977b716538f858a422590df9b33af847035cd94621efb3b
6
+ metadata.gz: 0e4f00d0c8dd24fd9e476b09b5025effb9ae91db77f9f535df54e5e5d7c034510563c3cea61dac98173a50cd404f3f2db0b20157f6408815a1d89f6b419487ed
7
+ data.tar.gz: 9a83db5b9e30f6fb35fe451c312704e8e307cb2f0484129a47f3913f9df48f0cd004c0c60236d357ca19b38344c341508c755a6d0ac072d91a4a55d4b04770e0
@@ -1,3 +1,3 @@
1
1
  module SimpleUri
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
data/lib/simple_uri.rb CHANGED
@@ -30,7 +30,7 @@ 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) ? nil : '?'+prepare_req_body(options[:req_body])
33
+ options[:params] = (method==:post && options[:req_body].present?) ? nil : '?'+prepare_req_body(options[:req_body]).to_s
34
34
  req, http = connect(url, method, { params: options[:params], user: options[:user], password: options[:password], debug: options[:debug] })
35
35
  req.body = prepare_req_body(options[:req_body]) if method == :post
36
36
  options[:req_headers].each { |k, v| req[k] = v } if options[:req_headers]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_uri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikulin Aleksander
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-24 00:00:00.000000000 Z
11
+ date: 2014-10-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: To simplify working with url
14
14
  email: nikulinaleksandr@gmail.com