requests 0.0.5 → 0.0.6
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 +4 -4
- data/lib/requests/sugar.rb +39 -0
- data/requests.gemspec +3 -2
- 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: 8e63934c127759755de8142e58ba3dbb5f9af88f
|
4
|
+
data.tar.gz: ec4dd9564d6f3fd906453d12a851768f176a58b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e168da35f56d8ea614132ac5ac4d0536894657380c5201530897cdb6b635be627c24451f70a1c170a92516176f3f79b67999ba07f9a40c3cf8419ed327e2ea5
|
7
|
+
data.tar.gz: d41020ef8df8b182f67dd1cfa465c73c83e9f4215d1ed39cc4bacaff8c1c100bdd63a4de98972a5bcf82227eb1068802626a8b1a6843abb04ba2350691f4ebaf
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'requests'
|
2
|
+
|
3
|
+
module Requests
|
4
|
+
module Sugar
|
5
|
+
def get(url, **kwargs)
|
6
|
+
request('GET', url, **kwargs)
|
7
|
+
end
|
8
|
+
|
9
|
+
def post(url, data: nil, **kwargs)
|
10
|
+
request('POST', url, data: data, **kwargs)
|
11
|
+
end
|
12
|
+
|
13
|
+
def put(url, data: nil, **kwargs)
|
14
|
+
request('PUT', url, data: data, **kwargs)
|
15
|
+
end
|
16
|
+
|
17
|
+
def delete(url, **kwargs)
|
18
|
+
request('DELETE', url, **kwargs)
|
19
|
+
end
|
20
|
+
|
21
|
+
def head(url, **kwargs)
|
22
|
+
request('HEAD', url, **kwargs)
|
23
|
+
end
|
24
|
+
|
25
|
+
def options(url, **kwargs)
|
26
|
+
request('OPTIONS', url, **kwargs)
|
27
|
+
end
|
28
|
+
|
29
|
+
def patch(url, **kwargs)
|
30
|
+
request('PATCH', url, **kwargs)
|
31
|
+
end
|
32
|
+
|
33
|
+
def trace(url, **kwargs)
|
34
|
+
request('TRACE', url, **kwargs)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
extend Sugar
|
39
|
+
end
|
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.
|
5
|
+
s.version = "0.0.6"
|
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"]
|
@@ -12,7 +12,8 @@ Gem::Specification.new do |s|
|
|
12
12
|
"LICENSE",
|
13
13
|
"README",
|
14
14
|
"makefile",
|
15
|
-
"lib
|
15
|
+
"lib/**/*.rb",
|
16
|
+
"lib/cacert.pem",
|
16
17
|
"tests/*.rb",
|
17
18
|
"*.gemspec"
|
18
19
|
]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril David
|
@@ -33,8 +33,9 @@ extra_rdoc_files: []
|
|
33
33
|
files:
|
34
34
|
- LICENSE
|
35
35
|
- makefile
|
36
|
-
- lib/
|
36
|
+
- lib/requests/sugar.rb
|
37
37
|
- lib/requests.rb
|
38
|
+
- lib/cacert.pem
|
38
39
|
- tests/requests_test.rb
|
39
40
|
- tests/ssl_test.rb
|
40
41
|
- requests.gemspec
|