sorcery-couchbase 0.1.2 → 0.1.3

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: 6f3b9d5e47193b20f9b3cdc4093f754c0563a61f
4
- data.tar.gz: 3ab8f65c1f69a380745bb834d59fee3be5c0106e
3
+ metadata.gz: 93acc883ecfa4599f5867dc12b7efba0c3784c48
4
+ data.tar.gz: 69e11dd6860b963602ab248d8eeef1f6c83397c6
5
5
  SHA512:
6
- metadata.gz: 1e8cfa41309973f1ffc1891cc850345228c6ebdf33825ff7f1cb03431063416c2ce13bb5628f1db6026d83d6305370c0016c59a7c7d58029c58af280bad9d9e7
7
- data.tar.gz: 133ff1e595824ef4b3f5f018154d8079671a54c3efc33cef05aee9ab7eb13be676bd9b04795577485b845a22dec61154f0dd8a90fa4f68cc30f42a9e53360970
6
+ metadata.gz: ff8c75a170fc6ce541360b262f704781b56511ca0b07eba8097ec0a9edbd956f852ca2dacbe0bb224fbadf785e60c15a186e1c2c40b0955ea594fc6686ec5fa6
7
+ data.tar.gz: 41d369101c770a6c8a38ef72d2e51178aaf8758849cb87929dc4004c463254b8be064f8d6bd85f872f5044dd12ea1ec3b574d55993f4bf0cd557b182a921e859
@@ -21,12 +21,17 @@ module Sorcery
21
21
  attribute sorcery_config.email_attribute_name unless sorcery_config.username_attribute_names.include?(sorcery_config.email_attribute_name)
22
22
  attribute sorcery_config.crypted_password_attribute_name
23
23
  attribute sorcery_config.salt_attribute_name
24
- attribute sorcery_config.activation_token_attribute_name if sorcery_config.respond_to? :activation_token_attribute_name
25
- attribute sorcery_config.activation_state_attribute_name if sorcery_config.respond_to? :activation_token_attribute_name
26
- attribute sorcery_config.remember_me_token_attribute_name if sorcery_config.respond_to? :remember_me_token_attribute_name
24
+
25
+ if sorcery_config.respond_to? :activation_token_attribute_name
26
+ attribute sorcery_config.activation_token_attribute_name
27
+ attribute sorcery_config.activation_state_attribute_name
28
+ attribute sorcery_config.activation_token_expires_at_attribute_name
29
+ end
27
30
 
28
31
  if sorcery_config.respond_to? :remember_me_token_expires_at_attribute_name
32
+ attribute sorcery_config.remember_me_token_attribute_name
29
33
  attribute sorcery_config.remember_me_token_expires_at_attribute_name
34
+
30
35
  define_method sorcery_config.remember_me_token_expires_at_attribute_name do
31
36
  time = read_attribute(sorcery_config.remember_me_token_expires_at_attribute_name)
32
37
  case time
@@ -57,9 +57,8 @@ module Sorcery
57
57
  find_by_credentials(username)
58
58
  end
59
59
 
60
-
61
60
  def find_by_sorcery_token(token_attr_name, token)
62
- where(token_attr_name => token).first
61
+ sorcery_view(token_attr_name).fetch(key: token, stale: false).first
63
62
  end
64
63
 
65
64
  def find_by_email(email)
@@ -1,3 +1,3 @@
1
1
  module SorceryCouchbase
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorcery-couchbase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-09 00:00:00.000000000 Z
11
+ date: 2014-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorcery