redd 0.8.2 → 0.8.3

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: eb84c87afa0fb9151b0be21985da7f69c261df24
4
- data.tar.gz: 2969272d1ae4cb25234ed9ff3902f2cdce51114d
3
+ metadata.gz: a8d7432aa8e8e95a979a1beda6cd0b029968bc47
4
+ data.tar.gz: a64f085356bee811050a5036567eb48bad118363
5
5
  SHA512:
6
- metadata.gz: 0ad8183da54e6dbbea67234b2cab3796b2aaf79b7bfd8f1e35dc7a6c3f93c5c92a0f63830c8d8f9d39042bcf02ed99841aea0bd4b225754a992328503464eea9
7
- data.tar.gz: 8b7bce2305a66a554d484015e593d212f646aaead6efc894219e32ad14a2e86c4b99198d99fd01f83432938f1cf176c4fb2eaf7f1aae35112c5acf53b857c567
6
+ metadata.gz: 52a9e1c3605c7c9b50fee521a7d792e01c2f9e878ce91ef3e8042da02620eb04dd61576930a0b6b67ecf7c526ae6f7861876c48bc2f27339dabf431af8d30a63
7
+ data.tar.gz: f284a123a0e135a5647d83ceda77a602f56281d24a62a1355c540ad4c196fcdec3bc33ece6c786b8153fe552aa608e76f35625c0c6f5451ef641e54934d61939
@@ -21,8 +21,10 @@ module Redd
21
21
  # Refresh the authentication and return a new refreshed access
22
22
  # @return [Access] the new access
23
23
  def refresh(access)
24
- refresh_token = access.is_a?(String) ? refresh_token : access.refresh_token
25
- request_access('refresh_token', refresh_token: refresh_token)
24
+ token = access.is_a?(String) ? refresh_token : access.refresh_token
25
+ response = post('/api/v1/access_token', grant_type: 'refresh_token', refresh_token: token)
26
+ # When refreshed, the response doesn't include an access token, so we have to add it.
27
+ Models::Access.new(self, response.body.merge(refresh_token: token))
26
28
  end
27
29
  end
28
30
  end
data/lib/redd/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Redd
4
- VERSION = '0.8.2'
4
+ VERSION = '0.8.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Avinash Dwarapu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-03 00:00:00.000000000 Z
11
+ date: 2017-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http