ruby_http_client 3.1.0 → 3.2.0

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: 3f9d4f32d8569bd5aa2e86656e3d6e68b5334442
4
- data.tar.gz: 475cbb494afc68fe05165188196d7ae5f4e56113
3
+ metadata.gz: fd2bae5a62b790be5bb8dcd0a4f6935ba6a492b0
4
+ data.tar.gz: 0400770eb4b4b3f921ad7450923ac1a5af91e369
5
5
  SHA512:
6
- metadata.gz: 98ed2fbc4320ce9a9391db9f63d3c7bc02f27eb52cddb548af2a2b98dcb55ab015477911af84850aedcfc0a5b11992aaa50cf2b544df1f333461459e6b08e0ea
7
- data.tar.gz: ce31fc3da4472576bfc3f2ca373c1a9719a3d3f34d8d3a3567737dea9152aeafa2ec04ac1eb39b467605f5d9b6e091ecb699e3b07b502fad0bc5963670f3c4d4
6
+ metadata.gz: e5adcab6dc4beeb623159e1facafba66e96933e82d069b413990299c719ede148eb49a33426c76972a148d53f05d23a865c48ce890264950643d8d2d97987ecd
7
+ data.tar.gz: a371df8050251e72ac056b3580ddb9084301ce5a6c045476e1b8f6ffde64a47deed14384d32e86314f9380010cd13cd69c6447b848d2255b7eea135c571ae0fc
data/.travis.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.2
4
+ before_install:
5
+ - gem install minitest
4
6
  notifications:
5
7
  hipchat:
6
8
  rooms:
data/CHANGELOG.md CHANGED
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [3.2.0] - 2017-09-01
7
+ ### Added
8
+ - #12 Add a helper returns the response body as a hash
9
+ - Thanks to [Diego Camargo](https://github.com/belfazt) for the pull request!
10
+
6
11
  ## [3.1.0] - 2016-04-10
7
12
  ### Added
8
13
  - #5 Ability to set the Content-Type header
@@ -15,6 +15,12 @@ module SendGrid
15
15
  @body = response.body
16
16
  @headers = response.to_hash
17
17
  end
18
+
19
+ # Returns the body as a hash
20
+ #
21
+ def parsed_body
22
+ @parsed_body ||= JSON.parse(@body, symbolize_names: true)
23
+ end
18
24
  end
19
25
 
20
26
  # A simple REST client.
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'ruby_http_client'
7
- spec.version = '3.1.0'
7
+ spec.version = '3.2.0'
8
8
  spec.authors = ['Elmer Thomas']
9
9
  spec.email = 'dx@sendgrid.com'
10
10
  spec.summary = 'A simple REST client'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_http_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elmer Thomas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-11 00:00:00.000000000 Z
11
+ date: 2017-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake