brycesch-devise_oauth2_providable 1.2.4 → 1.2.5

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: ea15053b8b93482be2fb3311a262707b92ddc8f1
4
- data.tar.gz: 39d442dd4326105dac93a32f85ee7484345b3f11
3
+ metadata.gz: 5828131303ddc5fc22d7cad94d85175ccec490b8
4
+ data.tar.gz: de7cd32f42c9e9de1457f65935d3c64fd183fbd4
5
5
  SHA512:
6
- metadata.gz: 8ca83847417559f613de8650350c174ebe466f073f81cfa72b5eabf8cf1eb98a4af789d03dbb4e6ba0828a60208bc5770ce7b6c11bf41ceb097361068c03d2d9
7
- data.tar.gz: 10cd151cd7475a2d642347c3f26815d32ae893002563791d97e8a5a9afe7fa809f719533b72855558df0df1f0ed8f45901e03e888db747a99f5ea04d9592ba7a
6
+ metadata.gz: 680abaa16b01f33b5699159683d720e220d7ccfc75c207f6c297a2fb916f1d266448ced6d6f5fc9afd4cd580a5cb3ec7f46423307e6eadec1eceb30e13392101
7
+ data.tar.gz: fbcfce9dd05a30d89211c8b02746ae4342f96bbb5583b8a19a97659e4b535310fd3230581a6ff9818c04fed18d2370177d9736e7a595df78c5cf4e8a0ec5ee68
@@ -4,9 +4,6 @@ class Devise::Oauth2Providable::AccessToken < ActiveRecord::Base
4
4
  before_validation :restrict_expires_at, :on => :create, :if => :refresh_token
5
5
  belongs_to :refresh_token
6
6
 
7
- scope :unexpired, -> { where('expires_at > ?', Time.zone.now) }
8
- scope :user_id, ->(user_id){ where(user_id: user_id) }
9
-
10
7
  def token_response
11
8
  response = {
12
9
  :access_token => token,
@@ -10,7 +10,7 @@ class Devise::Oauth2Providable::Client < ActiveRecord::Base
10
10
  validates :identifier, :presence => true, :uniqueness => true
11
11
 
12
12
  def expire_tokens_for_user(user)
13
- access_tokens.unexpired.user_id(user.id).update_all(expires_at: Time.zone.now)
13
+ access_tokens.where(user_id: user.id).where('expires_at > ?', Time.zone.now).update_all(expires_at: Time.zone.now)
14
14
  end
15
15
 
16
16
  private
@@ -1,5 +1,5 @@
1
1
  module Devise
2
2
  module Oauth2Providable
3
- VERSION = "1.2.4"
3
+ VERSION = "1.2.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brycesch-devise_oauth2_providable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Sonnek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-25 00:00:00.000000000 Z
11
+ date: 2015-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails