unresponsys 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 041bc50501ae1f8deb8f12dd258b0a290a062254
4
- data.tar.gz: ce3847787e4907d4051f4af0478a0a886a35a45d
3
+ metadata.gz: ea90b44c341a434f258b7f58d271bd0c9802dc3c
4
+ data.tar.gz: db2c3236c86d41bb76a57d0c8480166a34723ebe
5
5
  SHA512:
6
- metadata.gz: e671a298e294a4a7dc20561f118aa4e9d19b0d6a564308821ddbfc0f765b68073879cc1dc357bc237fda8da999b4715aede22abc20d0c4f15ab68b32f13fe4d7
7
- data.tar.gz: e010fe01bc5ca6a505ee958f55e7e960416550d3419f368c2a88f17de3e8d32408d63772e4168631fbe628f5a15b834b55dc5d0f28558fbc10d87ea78529d766
6
+ metadata.gz: 1e78e40cadf789df9030d86fcf00a1f1456acc1b02d4d1aaa5bc5bc84ccb37cbe0914ebc2444a4eee47974074e50d1509f4fc0077f8880b79172af31f7740224
7
+ data.tar.gz: c7dfca9ecc69801d14bd530cf0766c68d1cdedef2eca5014366b4c9961198155993c115df0789c896cccebd81f89d69b4bb4fa761611a1d89480c3e81f499f74
@@ -6,12 +6,16 @@ class Unresponsys
6
6
  raise Unresponsys::ArgumentError unless options[:username] && options[:password]
7
7
  @username = options[:username]
8
8
  @password = options[:password]
9
+ @debug = options[:debug]
10
+ @logger = Logger.new(STDOUT) if @debug
11
+ @log_opts = { logger: @logger, log_level: :debug, log_format: :curl }
9
12
  authenticate
10
13
  end
11
14
 
12
15
  def get(path, options = {}, &block)
13
16
  path = "#{@base_uri}#{path}"
14
17
  options = @options.merge(options)
18
+ options = options.merge(@log_opts) if @debug
15
19
  response = HTTParty.get(path, options, &block)
16
20
  handle_error(response)
17
21
  end
@@ -19,6 +23,7 @@ class Unresponsys
19
23
  def post(path, options = {}, &block)
20
24
  path = "#{@base_uri}#{path}"
21
25
  options = @options.merge(options)
26
+ options = options.merge(@log_opts) if @debug
22
27
  response = HTTParty.post(path, options, &block)
23
28
  handle_error(response)
24
29
  end
@@ -26,6 +31,7 @@ class Unresponsys
26
31
  def delete(path, options = {}, &block)
27
32
  path = "#{@base_uri}#{path}"
28
33
  options = @options.merge(options)
34
+ options = options.merge(@log_opts) if @debug
29
35
  response = HTTParty.delete(path, options, &block)
30
36
  handle_error(response)
31
37
  end
@@ -1,3 +1,3 @@
1
1
  class Unresponsys
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unresponsys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Kimball
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-07 00:00:00.000000000 Z
11
+ date: 2015-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty