lockie 0.2.14 → 0.2.15

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: 2fbe268cb9149d19e62b0e508449c3c805f735162911db10c1e14469ce4598ea
4
- data.tar.gz: 8192dc9af5ca2a778be648bbe364b1ed005a8fd5b13edf966662056acb387877
3
+ metadata.gz: 298288d117d17ddaf268f81276589a834172749c13a5c102f84c298d3d2e29de
4
+ data.tar.gz: 9303b8957b43b541dd97e1bda31064b4a4d0b5dce747869b67f786d7053f6981
5
5
  SHA512:
6
- metadata.gz: 8820f4ffe9b93814b235eab3faea5f110c2d13d5f339a62e1b22476ceb8cb4c43bd5907f1e1b1e04cab6558e05a01a09f2c233100f25b146bfeb87022286506d
7
- data.tar.gz: ab3109f87d1f6204a455c50b38dcf4895e48ca2c205fa2407e839f427e689a7ad1cffdca5cbb074db84bb989713b55f137ef403afab7e17b929b52bd964091d2
6
+ metadata.gz: a77b99573c18b86c9e1bd9c6e8a9ae84c0f0033d133f121d3fd3794e8c676a5564a00f77dda056947332f9e479b89fede0ff5b364dcb95caea96fcb4ab068d62
7
+ data.tar.gz: 157d67827693cc3798b01a4311a543aa6982547eed064efe803b4d2248f4972c98e8baec4dce29d970f23922d636e2ddffe88688c118ce0e0f03a7f5bae10b5e
@@ -30,6 +30,7 @@ module Lockie
30
30
  def authenticated?(*args)
31
31
  warden.authenticated?(*args)
32
32
  end
33
+
33
34
  alias logged_in? authenticated?
34
35
 
35
36
  def logout(*args)
@@ -38,5 +39,6 @@ module Lockie
38
39
  end
39
40
 
40
41
  end
42
+
41
43
  end
42
44
  end
@@ -8,14 +8,14 @@ module Lockie
8
8
  manager.failure_app = Lockie::FailureApp
9
9
 
10
10
  if Lockie.config.serialize_session
11
- serializer_to_session = Lockie.config.serializer_to_session || proc { |u| u.email }
11
+ serializer_to_session = Lockie.config.serializer_to_session || proc { |u| [u.class.name, u.id] }
12
12
  manager.serialize_into_session(&serializer_to_session)
13
- serializer_from_session = Lockie.config.serializer_from_session || proc { |email| Lockie.config.model_name.classify.constantize.find_by_email(email) }
13
+ serializer_from_session = Lockie.config.serializer_from_session || proc { |s| s.first.constantize.find(s.last) }
14
14
  manager.serialize_from_session(&serializer_from_session)
15
15
  end
16
16
 
17
17
  Lockie.config.scopes.each do |scope|
18
- manager.scope_defaults *scope
18
+ manager.scope_defaults(*scope)
19
19
  end
20
20
 
21
21
  end
@@ -1,3 +1,3 @@
1
1
  module Lockie
2
- VERSION = '0.2.14'
2
+ VERSION = '0.2.15'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.14
4
+ version: 0.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Melvin Sembrano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-20 00:00:00.000000000 Z
11
+ date: 2020-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -135,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  requirements: []
138
- rubyforge_project:
139
- rubygems_version: 2.7.7
138
+ rubygems_version: 3.0.8
140
139
  signing_key:
141
140
  specification_version: 4
142
141
  summary: Drop in password and JWT token authentication for Ruby on Rails