omniauth-fishbrain 0.11.2 → 0.11.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
  SHA256:
3
- metadata.gz: bedfbaf6891f13e4fde627ca255cd69bd2fd662a68fcc0bdc929a81886cd33f6
4
- data.tar.gz: c92b9f4458eda83cd28c7b30dbff8c59576584a9ec159963a9d9ea04b23a4a37
3
+ metadata.gz: 815a9d4e769ec9b9d05bb7cd0314395df844c3190b148960403207030b4b5cfc
4
+ data.tar.gz: 29f2f2cde590788567aedfbb85ff569943f77a8068a3d78590a35876e2d762f6
5
5
  SHA512:
6
- metadata.gz: 2a61f6e3c4a649bb40e03b992335191e742bd760f5a372f72711ed09ac58da1fa53116424e9f3ed75a869de4bb1210ea1a5f97626f14c4107ec62c5c0e41bc7c
7
- data.tar.gz: bb2cfe13d12b9706b18739dfd967f63f770a68228bb12148285a26173383bd132660668d4fdd94ac9a3a6ec9daf25701a2cedbda30681f75730a79f2d30edf6a
6
+ metadata.gz: 174826683c500756bc406c58e0bca176d9e43ded8eb65eaf4c445981e702dd6de42cf43a8e0a86bc64a29ba8b5d4ca621e9f6ccaf6524904b5acdef8054c3552
7
+ data.tar.gz: c93625fad9bcc3ce07f51191992cc89cee90eef27b2593003ae807141a285c0ae963a40902bfdf2dbd006325af0c22edd75d63745782155d07432542a2788376
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module Fishbrain
5
- VERSION = '0.11.2'
5
+ VERSION = '0.11.3'
6
6
  end
7
7
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'date'
4
3
  require 'json'
5
4
 
6
5
  module OmniAuth
@@ -9,15 +8,14 @@ module OmniAuth
9
8
  def premium_status
10
9
  return {} unless id_token['premium_status']
11
10
 
12
- JSON.parse id_token['premium_status']
11
+ JSON.parse(id_token['premium_status'])
13
12
  rescue JSON::ParserError
14
13
  {}
15
14
  end
16
15
 
17
16
  def premium?
18
- DateTime.rfc3339(premium_status['premium_end_date']) > DateTime.now
17
+ Time.xmlschema(premium_status['end_date']) > Time.new.utc
19
18
  rescue ArgumentError
20
- # if format was wrong
21
19
  false
22
20
  end
23
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-fishbrain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Dalen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-04-06 00:00:00.000000000 Z
12
+ date: 2020-05-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jwt