requests 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/requests.rb +6 -2
- data/requests.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70030d0c564540cf59556d4cb499df6089e7d82c
|
4
|
+
data.tar.gz: 96f42fee737f1ffa0888c77d75f64b265d18deba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c59f784b1cfa3ccc36e94e038f81ea5905a57be2e231a8bf6e6940729e60f596524c89f565f0d5cf09c2f933b550b6a4907cb795372bcb050f3029bdc0d487d
|
7
|
+
data.tar.gz: 178f6fd5f8a7aff4523d25d06f926dad37495ad293649ac4af3f996ad46ba3f7e0f2cc0aeb118e6b1ccf5287bea8e829ef221ce81afbda4f3a7c9da8149b1491
|
data/lib/requests.rb
CHANGED
@@ -16,7 +16,7 @@ module Requests
|
|
16
16
|
auth: nil)
|
17
17
|
|
18
18
|
uri = URI.parse(url)
|
19
|
-
uri.query =
|
19
|
+
uri.query = encode_www_form(params) if params
|
20
20
|
|
21
21
|
body = process_params(headers: headers, data: data) if data
|
22
22
|
|
@@ -34,6 +34,10 @@ module Requests
|
|
34
34
|
end
|
35
35
|
|
36
36
|
private
|
37
|
+
def self.encode_www_form(params)
|
38
|
+
URI.encode_www_form(params)
|
39
|
+
end
|
40
|
+
|
37
41
|
def self.opts(uri)
|
38
42
|
if uri.scheme == 'https'
|
39
43
|
{ use_ssl: true,
|
@@ -53,7 +57,7 @@ private
|
|
53
57
|
else
|
54
58
|
headers['content-type'] = 'application/x-www-form-urlencoded'
|
55
59
|
|
56
|
-
|
60
|
+
encode_www_form(data)
|
57
61
|
end
|
58
62
|
end
|
59
63
|
|
data/requests.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: requests
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril David
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cutest
|