unidom-visitor 1.13.6 → 1.13.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea4579af975e5dcd34776237b863977e4cacda0a
|
4
|
+
data.tar.gz: a712ee47b545723c2877d7dcf601d64996194a8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad4bbdaceb92a74348e1da5fcd8c6caa9a04e91a8e3ee9e6bcba4d17aa6194b6a471afc5e8daab991bd4e56e0c28eadb706b234091d30547f4acd2c72d192354
|
7
|
+
data.tar.gz: d0775f148c4029d695639823dbace58ee532ee06d04d8d53135bd225bb384a92f63e0cfc4d8fdd31293e1b0186c89f8291fa5d62057ccf67599a67d6800af6e3
|
@@ -26,9 +26,9 @@ class Unidom::Visitor::Authenticating < Unidom::Visitor::ApplicationRecord
|
|
26
26
|
# Unidom::Visitor::Authenticating.authenticate! user, with: password
|
27
27
|
def self.authenticate!(visitor, with: nil, opened_at: Time.now)
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
assert_present! :visitor, visitor
|
30
|
+
assert_present! :with, with
|
31
|
+
assert_present! :opened_at, opened_at
|
32
32
|
|
33
33
|
credential_is(with).visitor_is(visitor).valid_at.alive.first_or_create! opened_at: opened_at
|
34
34
|
|
@@ -31,9 +31,9 @@ describe Unidom::Visitor::Authenticating, type: :model do
|
|
31
31
|
it_behaves_like 'polymorphic scope', model_attributes, :visitor_is, :visitor, [ Unidom::Visitor::User, Unidom::Visitor::Guest ]
|
32
32
|
it_behaves_like 'polymorphic scope', model_attributes, :credential_is, :credential, [ Unidom::Visitor::Password ]
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
visitor = Unidom::Visitor::User.create! user_attributes
|
35
|
+
password = Unidom::Visitor::Password.create! password_attributes
|
36
|
+
it_behaves_like 'assert_present!', described_class, :authenticate!, [ visitor, { with: password, opened_at: Time.now } ], [ { 0 => :visitor }, :with, :opened_at ]
|
37
37
|
|
38
38
|
end
|
39
39
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-visitor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.13.
|
4
|
+
version: 1.13.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|