simple_uri 0.0.11 → 0.0.12

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: 2e05ec3ed68d47c4d1e5014a03fa778a2a15d82e
4
- data.tar.gz: 2b4ff8f760a510a0cf03d85036992abb579b6749
3
+ metadata.gz: 5d4f5e6e03c7756b4ae1e473fe1f2aff09e50cc1
4
+ data.tar.gz: 0208f7c688b5582491f74d8c8b1ca2c3eb4b29da
5
5
  SHA512:
6
- metadata.gz: a8bbab9e126f3de9de9581e02cc915766f4fab43a240e14122237cff291b776f7cef74416e7c53776a7ee4901e545fcc53bcb875376e5c928275b7fa3800bf49
7
- data.tar.gz: 41447113367896c8f5a8e4b24d7cfc587c2c0725d59d8b8adaf3124e456f52a8c0d89e88f9ae336c7b75e3ee59783b1132d9424542850bcb1039760ae8cbdfcc
6
+ metadata.gz: 3556c0420d62583a9cf0c317f0189f646c1c1fcffd2808ef7aaaac7f260feea2b6715f6847d7f34e07bb75f86cff7c2b911a9c9dcd09542ef749127de71f0ff5
7
+ data.tar.gz: 735606853f863acacabd7e08066a883571224e940be26fd180f01beb5643e90f5f8653a3d3f8b11fa5802d9e244cd0b0ec04737a9c1beb7300bf033b3664b2df
data/lib/simple_uri.rb CHANGED
@@ -32,9 +32,9 @@ module SimpleUri
32
32
  enable_debug_mode(options[:debug])
33
33
  enable_autofix_mode(options[:autofix])
34
34
  get_params = options[:req_body] ? '?'+prepare_req_body(options[:req_body]).to_s : ''
35
- options[:params] = method==:post ? nil : get_params
35
+ options[:params] = (method==:post || method==:put) ? nil : get_params
36
36
  req, http = connect(url, method, { params: options[:params], user: options[:user], password: options[:password], debug: options[:debug] })
37
- req.body = prepare_req_body(options[:req_body]) if method == :post
37
+ req.body = prepare_req_body(options[:req_body]) if (method==:post || method==:put)
38
38
  options[:req_headers].each { |k, v| req[k] = v } if options[:req_headers]
39
39
  res = http.request(req)
40
40
  res.body
@@ -1,3 +1,3 @@
1
1
  module SimpleUri
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
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.11
4
+ version: 0.0.12
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-30 00:00:00.000000000 Z
11
+ date: 2014-12-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: To simplify working with url
14
14
  email: nikulinaleksandr@gmail.com
@@ -43,3 +43,4 @@ signing_key:
43
43
  specification_version: 4
44
44
  summary: To simplify working with url
45
45
  test_files: []
46
+ has_rdoc: