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 +4 -4
- data/lib/redd/auth_strategies/web.rb +4 -2
- data/lib/redd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8d7432aa8e8e95a979a1beda6cd0b029968bc47
|
4
|
+
data.tar.gz: a64f085356bee811050a5036567eb48bad118363
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
25
|
-
|
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
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.
|
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-
|
11
|
+
date: 2017-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|