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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56b443d6b4a4317115f81a35294d8b664a53cebe
4
- data.tar.gz: 5daecd96aa58ef613edbf71ec2058e840d03d723
3
+ metadata.gz: db86dfa1839811d7896e1906d7e42a3b7ebcffc1
4
+ data.tar.gz: 7482919291dc9fffe55f5a9c7307a64fa882abac
5
5
  SHA512:
6
- metadata.gz: 65b47300090ae7926e146ff274dd9db1fef0364334778cced0c3fd469ac4168f2cf53f46a25210e49c10172995f6e30f3ebe4d644608a8159a341ad97861fc07
7
- data.tar.gz: a0293d05e3bba9b8f95a232ae0fc49824a217ca486a5fec7ca8fdde6b456d753349754fdee6f750a772e006eefac9c773001f2a86d60549536bbc7bbcd74c472
6
+ metadata.gz: d1ff02b07834284e53746ee7dcf9f894ba9801a535dc0fa786ef189328a15684fe9342e4894cdf454d61e06d72eb6220cc5c6ccde9decd31a812228b7875a41a
7
+ data.tar.gz: 5334c04d22104d0c7e9a4c2c0ff33975100bf44ad5d582ccaca31d17dced23ae840847ddfa404394423759cf664cb976a315477e9e101b52f38a22b9f07cf766
@@ -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
- belongs_to :parent, :class_name => "Authie::Session"
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
 
@@ -1,3 +1,3 @@
1
1
  module Authie
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
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.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: 2015-12-28 00:00:00.000000000 Z
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: