authie 1.2.1 → 1.2.2

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: 02aad27995ef7b72c5e400072e2dc4bd1f46100f
4
- data.tar.gz: eb5c3b0da684e757052e9700d7d5f9a6e8759107
3
+ metadata.gz: 721f8e38c433954e5ba8db0482bd99a1d22bc5be
4
+ data.tar.gz: bce1c42caec7d276d0a54a4aae9a447e92ad8dd4
5
5
  SHA512:
6
- metadata.gz: 6a6fb1e5e7b20b149ad836dc5655134e9db4c6b37666bb163facba4c267124f722627ea30659941562a56c993ce3229f36cfe10f233dbd7e38da737463f0ca57
7
- data.tar.gz: 31b900b794395c39dae597363b72f15fd757ccee2d2d877bbdf45256ec008cb85443afd946dcb556da5be4004b66cd642c9efccb580353dde6525d56d9d8a232
6
+ metadata.gz: de1b61f6d168f52317cc248cafac501364af37cff355e3ca258cb33c70b1565b8093a5a2b89c81435920167e15be7e81ac1e7aa54a37ebf26539ec99cd092c0e
7
+ data.tar.gz: 427175384881e617289b231c63f629710cd3c7c53a54f9c3d971e3f4ec2ed2bb2640c03c614ba46948ca1f4e363ce7c4d2686e82b1c918d1d8e3ac7c6817812e
@@ -16,6 +16,10 @@ module Authie
16
16
  end
17
17
  attr_writer :sudo_session_timeout
18
18
 
19
+ def user_relationship_options
20
+ @user_relationship_options ||= {}
21
+ end
22
+
19
23
  end
20
24
 
21
25
  def self.config
@@ -5,7 +5,8 @@ module Authie
5
5
 
6
6
  def self.included(base)
7
7
  base.helper_method :logged_in?, :current_user, :auth_session
8
- base.before_filter :set_browser_id, :touch_auth_session
8
+ before_action_method = base.respond_to?(:before_action) ? :before_action : :before_filter
9
+ base.public_send(before_action_method, :set_browser_id, :touch_auth_session)
9
10
  end
10
11
 
11
12
  private
@@ -11,7 +11,7 @@ module Authie
11
11
  self.table_name = "authie_sessions"
12
12
 
13
13
  # Relationships
14
- belongs_to :user, :polymorphic => true
14
+ belongs_to :user, {:polymorphic => true}.merge(Authie.config.user_relationship_options)
15
15
  belongs_to :parent, :class_name => "Authie::Session"
16
16
 
17
17
  # Scopes
@@ -1,3 +1,3 @@
1
1
  module Authie
2
- VERSION = '1.2.1'
2
+ VERSION = '1.2.2'
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: 1.2.1
4
+ version: 1.2.2
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-03-12 00:00:00.000000000 Z
11
+ date: 2015-07-16 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:
@@ -50,9 +50,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
50
50
  version: '0'
51
51
  requirements: []
52
52
  rubyforge_project:
53
- rubygems_version: 2.2.2
53
+ rubygems_version: 2.4.5
54
54
  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: