requests 0.0.4 → 0.0.5

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/requests.rb +6 -2
  3. data/requests.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fdcad323fb10dc5bcc26c6ebc615955c31a24871
4
- data.tar.gz: e1060f1ab04b7a6be93678dcad0d6be75e47fc71
3
+ metadata.gz: 70030d0c564540cf59556d4cb499df6089e7d82c
4
+ data.tar.gz: 96f42fee737f1ffa0888c77d75f64b265d18deba
5
5
  SHA512:
6
- metadata.gz: 6641d4c04922f25b2e8fd2ea8f2913798ad8b8de8364a722a5015e625e934894e431cbfe86bccfa4202f2bffe100b8078a2aa6120a0dbbd6fa45574f0902eb19
7
- data.tar.gz: 4933cc26746b1fd7ff6861b2b8692573dbe6a6e7f9f2bd2e31fdcc8ff6a68406e8a0d2b757f7f783993e8ce9b2eb4adce19dc6f371d4ec1827e62c225eac0618
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 = URI.encode_www_form(params) if params
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
- URI.encode_www_form(data)
60
+ encode_www_form(data)
57
61
  end
58
62
  end
59
63
 
data/requests.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "requests"
5
- s.version = "0.0.4"
5
+ s.version = "0.0.5"
6
6
  s.summary = "Requests: HTTP for Humans (Ruby port)"
7
7
  s.description = "Because Requests for Python is awesome"
8
8
  s.authors = ["Cyril David"]
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
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-02 00:00:00.000000000 Z
11
+ date: 2013-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cutest