pluct 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/pluct/helpers/request.rb +7 -6
- data/lib/pluct/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Njc2Y2EzZmQ0MGNhMzFiYmI1OGU5M2JmNTZhZTU2ZTA1NGI0MTliMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTViODY5YTJlZTY3MjdkOTMxZDcwNzMyNGQ0YzJkMTgyMjliZDgzMA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjVmNTM2ZjRkMmNhYTc4NjZiYzU4ZDNhZTUyMDZlOGM4YTVmODU1NzdmY2Y1
|
10
|
+
NjViMzA0N2JkYzM3YmE5YzBhYzc2YjYxODUyMmE3N2MzOTZkNzcwMGI3ZjM1
|
11
|
+
YzAyNzVhMjEzMTc5ZWRhOWNkODhmMDUwMGU5M2QzZDE3MWJjZjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDMyN2M1NmJiMWM4MWYyOWU2MGJhYzFiODg0OWM0ZmE5OTk5MzNlNTJjZDkx
|
14
|
+
ZjM3N2MyZTNiODQ3NTdiNDhhNTgzNjkzN2Y5ZDIwMzUxMmYzNDg0NjljMDk4
|
15
|
+
YmU0MWFhZDU0ZDBhODM1NzBhYzUzNmIyYWVlMDFmYTIxZDM0ZWQ=
|
@@ -11,7 +11,7 @@ module Pluct
|
|
11
11
|
def get(url, *opts)
|
12
12
|
options = Hash[*opts]
|
13
13
|
resource = RestClient::Resource.new(url)
|
14
|
-
options = DEFAULT_HEADERS.merge(options)
|
14
|
+
options = (options ? DEFAULT_HEADERS.merge(options) : DEFAULT_HEADERS)
|
15
15
|
resource.get(options)
|
16
16
|
rescue RestClient::Exception => e
|
17
17
|
raise_exception(e)
|
@@ -20,7 +20,7 @@ module Pluct
|
|
20
20
|
def head(url, *opts)
|
21
21
|
options = Hash[*opts]
|
22
22
|
resource = RestClient::Resource.new(url)
|
23
|
-
options = DEFAULT_HEADERS.merge(options)
|
23
|
+
options = (options ? DEFAULT_HEADERS.merge(options) : DEFAULT_HEADERS)
|
24
24
|
resource.head(options)
|
25
25
|
rescue RestClient::Exception => e
|
26
26
|
raise_exception(e)
|
@@ -29,7 +29,7 @@ module Pluct
|
|
29
29
|
def delete(url, *opts)
|
30
30
|
options = Hash[*opts]
|
31
31
|
resource = RestClient::Resource.new(url)
|
32
|
-
options = DEFAULT_HEADERS.merge(options)
|
32
|
+
options = (options ? DEFAULT_HEADERS.merge(options) : DEFAULT_HEADERS)
|
33
33
|
resource.delete(options)
|
34
34
|
rescue RestClient::Exception => e
|
35
35
|
raise_exception(e)
|
@@ -38,8 +38,9 @@ module Pluct
|
|
38
38
|
def post(url, *opts)
|
39
39
|
data, options = *opts
|
40
40
|
options = Hash[*opts] if options
|
41
|
+
binding.pry
|
41
42
|
resource = RestClient::Resource.new(url)
|
42
|
-
options = DEFAULT_HEADERS.merge(options)
|
43
|
+
options = (options ? DEFAULT_HEADERS.merge(options) : DEFAULT_HEADERS)
|
43
44
|
resource.post(data.to_json, options)
|
44
45
|
rescue RestClient::Exception => e
|
45
46
|
raise_exception(e)
|
@@ -49,7 +50,7 @@ module Pluct
|
|
49
50
|
data, options = *opts
|
50
51
|
options = Hash[*opts] if options
|
51
52
|
resource = RestClient::Resource.new(url)
|
52
|
-
options = DEFAULT_HEADERS.merge(options)
|
53
|
+
options = (options ? DEFAULT_HEADERS.merge(options) : DEFAULT_HEADERS)
|
53
54
|
resource.put(data, options)
|
54
55
|
rescue RestClient::Exception => e
|
55
56
|
raise_exception(e)
|
@@ -59,7 +60,7 @@ module Pluct
|
|
59
60
|
data, options = *opts
|
60
61
|
options = Hash[*opts] if options
|
61
62
|
resource = RestClient::Resource.new(url)
|
62
|
-
options = DEFAULT_HEADERS.merge(options)
|
63
|
+
options = (options ? DEFAULT_HEADERS.merge(options) : DEFAULT_HEADERS)
|
63
64
|
resource.patch(data, options)
|
64
65
|
rescue RestClient::Exception => e
|
65
66
|
raise_exception(e)
|
data/lib/pluct/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pluct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alberto Leal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|