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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODcxNGUzNmVmZmFiNmQ2MmM0MzYyZWM3ZThhZjU1ZmRkY2Y3ZGU4Mw==
4
+ Njc2Y2EzZmQ0MGNhMzFiYmI1OGU5M2JmNTZhZTU2ZTA1NGI0MTliMQ==
5
5
  data.tar.gz: !binary |-
6
- MGEzZGQwNmQ4ODMwN2YzZmZmNzlkZmQ2OThkMmNiN2JjMGQ1MDgwYw==
6
+ YTViODY5YTJlZTY3MjdkOTMxZDcwNzMyNGQ0YzJkMTgyMjliZDgzMA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NmU1ZTVhNTZiMmNmMWVkZTA1Njk4NTJjMTk2ZmM5NDJiY2Y4MDkzNzdjNzQ0
10
- MDM1MDkzYzI2NTA1ZmI2MWI2ZjMyMDc1ZDBkMWJmZjk1Mjk4MTkyMDc1NTUw
11
- ODBkMDc2OTg4YWIxM2U2ZjBkZTg2N2VmNWU3NDRmNTZjNTE3NTE=
9
+ MjVmNTM2ZjRkMmNhYTc4NjZiYzU4ZDNhZTUyMDZlOGM4YTVmODU1NzdmY2Y1
10
+ NjViMzA0N2JkYzM3YmE5YzBhYzc2YjYxODUyMmE3N2MzOTZkNzcwMGI3ZjM1
11
+ YzAyNzVhMjEzMTc5ZWRhOWNkODhmMDUwMGU5M2QzZDE3MWJjZjA=
12
12
  data.tar.gz: !binary |-
13
- ZmE0MGZmYWNmNjMxN2JmZDU2M2VkMmY1ODE2OGRhZjY1MzBlZDMxZjgyZjNj
14
- OTg2MDkwYjZmYjhmNDg4YmQwYmYzNTg5NDI3OWVjZjhmZmVlYzE1YjRjMTQy
15
- YzViYTE4MzhiYjI5OWNhZGI2YTRkZTA5YjdhZDNjY2I1ZWEwNTA=
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) || DEFAULT_HEADERS
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) || DEFAULT_HEADERS
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) || DEFAULT_HEADERS
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) || DEFAULT_HEADERS
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) || DEFAULT_HEADERS
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) || DEFAULT_HEADERS
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
@@ -1,3 +1,3 @@
1
1
  module Pluct
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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-20 00:00:00.000000000 Z
11
+ date: 2013-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler