unidom-visitor 1.8 → 1.9

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: 1039cdfc9483bce1ae792b1927c290dd1bb1a4fe
4
- data.tar.gz: db3e19bc847504447ca25bfdee0099c28d6bc725
3
+ metadata.gz: 105f9f4e2a13ac8e4fcda62ef51e9f36708bc354
4
+ data.tar.gz: 7250c4dbaece12276775a782b09a5caa93651150
5
5
  SHA512:
6
- metadata.gz: 37e8ce876225bec3bc119d9f999c9f63f5af41725d5a7788aaaacd7857abd9425639eacc92d298c4c5ec27f9710e42221e971bc4daa3dc372f8f468179d0ffc6
7
- data.tar.gz: 05e70ecd150bee453e44dee1198aeb1a9b7d99027af72a78ba6432293fcf53f4cbb4d79d91dafe9da4d6fe1ba5447c52d05364a78fafff3b47fe399ed6ebb2d1
6
+ metadata.gz: cb53e279dfdb8d1495531310bf0db92212dff42a4c2b947f40bdfd18dfd52952762ec0626a2905e53deb956a68858be7f898b577df21e401974ca1e83ae379a9
7
+ data.tar.gz: 1748b031ad272ace90521782b23a936a093c6c116d70608a060e0cdac5e635c40c520183094ae9b69159a52e21553f570cd22387dad10c8945be7299ef02873a
data/README.md CHANGED
@@ -96,15 +96,17 @@ The As Visitor concern do the following tasks for the includer automatically:
96
96
  4. Define the .identified_by scope as: ``scope :identified_by, ->(identity) { joins(:identificatings).merge(Unidom::Visitor::Identificating.identity_is identity) }``
97
97
  5. Define the .sign_up method as: ``sign_up(identity, password: nil, opened_at: Time.now)``
98
98
  6. Define the #is_identificated! method as: ``is_identificated!(as: nil, at: Time.now)``
99
- 7. Define the #is_authenticated! method as: ``is_authenticated!(through: nil, at: Time.now, flag_code: 'RQRD')``
100
- 8. Define the #cognize! method as: ``cognize!(it, at: Time.now, primary: true)``
101
- 9. Define the .sign_up! method as: ``sign_up!(it, as: nil, through: nil, at: Time.now, flag_code: 'RQRD', primary: true)``
99
+ 7. Define the #is_identificated? method as: ``is_identificated?(as: nil, at: Time.now)``
100
+ 8. Define the #is_authenticated! method as: ``is_authenticated!(through: nil, at: Time.now, flag_code: 'RQRD')``
101
+ 9. Define the #cognize! method as: ``cognize!(it, at: Time.now, primary: true)``
102
+ 10. Define the .sign_up! method as: ``sign_up!(it, as: nil, through: nil, at: Time.now, flag_code: 'RQRD', primary: true)``
102
103
 
103
104
  ### As Identity concern
104
105
 
105
106
  The As Identity concern do the following tasks for the includer automatically:
106
107
  1. Define the has_many :identificatings macro as: ``has_many :identificatings, class_name: 'Unidom::Visitor::Identificating', as: :identity``
107
- 2. Define the #identificate! method as: ``identificate!(it, at: Time.now)``
108
+ 2. Define the #identificate! method as: ``identificate!(it, at: Time.now)``
109
+ 3. Define the #identificate? method as: ``identificate?(it, at: Time.now)``
108
110
 
109
111
  ### As Credential concern
110
112
 
@@ -10,14 +10,12 @@ module Unidom::Visitor::Concerns::AsIdentity
10
10
  identificatings.create! visitor: it, opened_at: at
11
11
  end
12
12
 
13
- =begin
14
13
  def identificate?(it, at: Time.now)
15
14
  query = identificatings
16
15
  query = query.visitor_is it if it.present?
17
16
  query = query.valid_at now: at if at.present?
18
17
  query.alive.exists?
19
18
  end
20
- =end
21
19
 
22
20
  end
23
21
 
@@ -16,14 +16,12 @@ module Unidom::Visitor::Concerns::AsVisitor
16
16
  identificatings.create! identity: as, opened_at: at
17
17
  end
18
18
 
19
- =begin
20
19
  def is_identificated?(as: nil, at: Time.now)
21
20
  query = identificatings
22
21
  query = query.identity_is as if as.present?
23
22
  query = query.valid_at now: at if at.present?
24
23
  query.alive.exists?
25
24
  end
26
- =end
27
25
 
28
26
  def is_authenticated!(through: nil, at: Time.now, flag_code: 'RQRD')
29
27
  if through.authenticating.present?
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Visitor
3
- VERSION = '1.8'.freeze
3
+ VERSION = '1.9'.freeze
4
4
  end
5
5
  end
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.8'
4
+ version: '1.9'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-14 00:00:00.000000000 Z
11
+ date: 2016-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common