outreach 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 728741869e2d409c8a9b36af355f44fcacf903b4
4
- data.tar.gz: cb7a65b916ea0f68e377b920f760776e0a1348ae
3
+ metadata.gz: a10c78843683a030051a42d197d7aa67c4059fd4
4
+ data.tar.gz: 5045736b7b892177fe963064c0957992a63393a3
5
5
  SHA512:
6
- metadata.gz: fced1a8be302d3381f4a5c280541234baa28abf188ece3b19ad2c592bb0dc405cbda16cb3913e31bc13279544e64248775152d40213162a254d21343d51b0b8a
7
- data.tar.gz: c370fa71c906cae340fe146fbad93b70564780a91d15d7fa442e77e33c428af794fb5994fd586f1e895907e4eae5d130834a5a5dbef22b6f291b94f07364e322
6
+ metadata.gz: 3adb9d073c6ed0b4e6aebff27166430e4975e25d107e8549adf98192ff46a82cafd8c83432b73d4752470d688883a92f3fcb14c7d15560271015e0ca3cd27371
7
+ data.tar.gz: d8902b4f3a053bfc7b3c957c0f4cacb044b55770fd31bb22a6a5ab99c13383dee65f55ab647736732ec914afcc7630e077317bef8ffdd5572da6648542843456
@@ -13,24 +13,40 @@ module Outreach
13
13
  end
14
14
 
15
15
  def get(url, query={})
16
- response = HTTParty.get(url, query: query, headers: auth_header)
16
+ attrs = {
17
+ query: query, headers: auth_header
18
+ }
19
+ attrs[:debug_output] = $stdout if Outreach.debug
20
+ response = HTTParty.get(url, attrs)
17
21
  parse_response(response)
18
22
  end
19
23
 
20
24
  def post(url, params)
21
25
  response_format = params.delete(:response_format) || :json
22
- response = HTTParty.post(url, body: params.to_json, headers: auth_header)
26
+ attrs = {
27
+ body: params.to_json, headers: auth_header
28
+ }
29
+ attrs[:debug_output] = $stdout if Outreach.debug
30
+ response = HTTParty.post(url, attrs)
23
31
  parse_response(response, response_format)
24
32
  end
25
33
 
26
34
  def patch(url, params)
27
35
  response_format = params.delete(:response_format) || :json
28
- response = HTTParty.patch(url, body: params.to_json, headers: auth_header)
36
+ attrs = {
37
+ body: params.to_json, headers: auth_header
38
+ }
39
+ attrs[:debug_output] = $stdout if Outreach.debug
40
+ response = HTTParty.patch(url, attrs)
29
41
  parse_response(response, response_format)
30
42
  end
31
43
 
32
44
  def delete(url)
33
- response = HTTParty.delete(url, headers: auth_header)
45
+ attrs = {
46
+ headers: auth_header
47
+ }
48
+ attrs[:debug_output] = $stdout if Outreach.debug
49
+ response = HTTParty.delete(url, attrs)
34
50
  parse_response(response)
35
51
  end
36
52
 
@@ -1,3 +1,3 @@
1
1
  module Outreach
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outreach
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris O'Sullivan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-27 00:00:00.000000000 Z
11
+ date: 2016-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler