wework 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wework/config.rb +5 -1
- data/lib/wework/js_ticket/redis_store.rb +1 -1
- data/lib/wework/token/redis_store.rb +1 -1
- data/lib/wework/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: 73b9f44413eff7e54924569e7c769db0529aaec6
|
4
|
+
data.tar.gz: da37a68c10c5fe703e15d6634fd3cd71c659d93f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a6b77220dcd8c57a8868f2ed0d473786f95229e5becf77724bf37e4fb0e4ce6b3888009e59772f92f1d69681a1652f5535b6feeaec63368d0d8da8ad3e4b90d
|
7
|
+
data.tar.gz: 88955aaab3ee265877a583b4680ac946b9dc4a5482d99fc3f300c2a22333c42d7f48558279e5275e44a989a5be8d779278e691687bad24fcb6781e705974335d
|
data/lib/wework/config.rb
CHANGED
@@ -17,9 +17,13 @@ module Wework
|
|
17
17
|
def http_timeout_options
|
18
18
|
config.http_timeout_options || {write: 2, connect: 5, read: 10}
|
19
19
|
end
|
20
|
+
|
21
|
+
def expired_shift_seconds
|
22
|
+
config.expired_shift_seconds || 100
|
23
|
+
end
|
20
24
|
end
|
21
25
|
|
22
26
|
class Config
|
23
|
-
attr_accessor :redis, :http_timeout_options
|
27
|
+
attr_accessor :redis, :http_timeout_options, :expired_shift_seconds
|
24
28
|
end
|
25
29
|
end
|
@@ -19,7 +19,7 @@ module Wework
|
|
19
19
|
def refresh_token
|
20
20
|
result = super
|
21
21
|
if result.success?
|
22
|
-
expires_at = Time.now.to_i + result.expires_in.to_i -
|
22
|
+
expires_at = Time.now.to_i + result.expires_in.to_i - Wework.expired_shift_seconds
|
23
23
|
redis.hmset(
|
24
24
|
key,
|
25
25
|
"ticket", result.ticket,
|
@@ -19,7 +19,7 @@ module Wework
|
|
19
19
|
def refresh_token
|
20
20
|
result = super
|
21
21
|
if result.success?
|
22
|
-
expires_at = Time.now.to_i + result.expires_in.to_i -
|
22
|
+
expires_at = Time.now.to_i + result.expires_in.to_i - Wework.expired_shift_seconds
|
23
23
|
redis.hmset(
|
24
24
|
key,
|
25
25
|
"access_token", result.access_token,
|
data/lib/wework/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- seandong
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|