authie 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/authie/session.rb +6 -2
- data/lib/authie/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db86dfa1839811d7896e1906d7e42a3b7ebcffc1
|
4
|
+
data.tar.gz: 7482919291dc9fffe55f5a9c7307a64fa882abac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1ff02b07834284e53746ee7dcf9f894ba9801a535dc0fa786ef189328a15684fe9342e4894cdf454d61e06d72eb6220cc5c6ccde9decd31a812228b7875a41a
|
7
|
+
data.tar.gz: 5334c04d22104d0c7e9a4c2c0ff33975100bf44ad5d582ccaca31d17dced23ae840847ddfa404394423759cf664cb976a315477e9e101b52f38a22b9f07cf766
|
data/lib/authie/session.rb
CHANGED
@@ -12,7 +12,11 @@ module Authie
|
|
12
12
|
|
13
13
|
# Relationships
|
14
14
|
belongs_to :user, {:polymorphic => true}.merge(Authie.config.user_relationship_options)
|
15
|
-
|
15
|
+
parent_options = {:class_name => "Authie::Session"}
|
16
|
+
if ActiveRecord::VERSION::MAJOR >= 5
|
17
|
+
parent_options[:optional] = true
|
18
|
+
end
|
19
|
+
belongs_to :parent, parent_options
|
16
20
|
|
17
21
|
# Scopes
|
18
22
|
scope :active, -> { where(:active => true) }
|
@@ -209,7 +213,7 @@ module Authie
|
|
209
213
|
session.browser_id = cookies[:browser_id]
|
210
214
|
session.login_at = Time.now
|
211
215
|
session.login_ip = controller.request.ip
|
212
|
-
session.save
|
216
|
+
session.save!
|
213
217
|
session
|
214
218
|
end
|
215
219
|
|
data/lib/authie/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Cooke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Rails library for storing user sessions in a backend database
|
14
14
|
email:
|
@@ -55,3 +55,4 @@ signing_key:
|
|
55
55
|
specification_version: 4
|
56
56
|
summary: A Rails library for storing user sessions in a backend database
|
57
57
|
test_files: []
|
58
|
+
has_rdoc:
|