omniauth-ekuaishou 0.2.0 → 0.3.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
  SHA256:
3
- metadata.gz: 1a9db35a70811ae93a5621785285aaf0721b96fde9a935692d406f5cfcd42a4a
4
- data.tar.gz: 9399a320f12dc4483caf686973c86a285e4024b5c143cae9d720a8f0083c46cf
3
+ metadata.gz: 57aa46885e2bb75fe4ff44a863a074aff252f3f71c9cb12b3c1f40741c4e6c7f
4
+ data.tar.gz: 333546da365f2ad15173f70c2911884fb1b769b44fcc015eb57bdcad4504d213
5
5
  SHA512:
6
- metadata.gz: 250c609fe82b04dab58190e5e129d234ab141bc844e3990260213b5d97cd2c8ec853284b8503cfd5866ef16474093ff6c5eaad26c2a682b7cd859f87b0bf32da
7
- data.tar.gz: d2a42c587f145e46be77a6489425570680aa1f4449275072201b97532bcf07cbbd498d628d98766aad3b2feb2a24b5e502aab72a5bcdb7a8f9df5e0516620b67
6
+ metadata.gz: 16605a455f5e4f0bb3995f77aabab41485599bbc3ef84228c9d6a72310942bd5b57a96ce568f030aace7af12bf2d5817fd0fc42fa116c57d93440e3dc162be73
7
+ data.tar.gz: 43134b8201bc60fe33faa7afef01ad84ec8eb7dbe0a013063108926f60c8dfc4eb62d37f17924b84f01754549830c39708b419803121c6f8148d4c2154396d77
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-ekuaishou (0.2.0)
4
+ omniauth-ekuaishou (0.3.0)
5
5
  omniauth (~> 2.0)
6
6
  omniauth-oauth2 (~> 1.7.1)
7
7
 
@@ -3,10 +3,10 @@ module OmniAuth
3
3
  class AccessToken < ::OAuth2::AccessToken
4
4
  class << self
5
5
  def from_hash(client, hash)
6
- return unless hash && hash['code'] == 0 && hash.dig('data', 'access_token').present?
6
+ return unless hash && hash['code'] == 0 && hash.dig('data', 'access_token')
7
7
 
8
8
  data = hash['data'].merge('expires_in' => hash.dig('data', 'access_token_expires_in'))
9
- data['refresh_token_expires_at'] ||= Time.now.to_i + data['refresh_token_expires_in'].to_i if data['refresh_token_expires_in'].present?
9
+ data['refresh_token_expires_at'] ||= Time.now.to_i + data['refresh_token_expires_in'].to_i if data['refresh_token_expires_in'].to_i > 0
10
10
  super(client, data)
11
11
  end
12
12
  end
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Ekuaishou
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-ekuaishou
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jimcheung
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-20 00:00:00.000000000 Z
11
+ date: 2021-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth