simple_uri 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_uri.rb +2 -2
- data/lib/simple_uri/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d4f5e6e03c7756b4ae1e473fe1f2aff09e50cc1
|
4
|
+
data.tar.gz: 0208f7c688b5582491f74d8c8b1ca2c3eb4b29da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
data/lib/simple_uri/version.rb
CHANGED
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.
|
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
|
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:
|