unidom-visitor 1.12.4 → 1.13

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: 11c45fb8f48e47ced170d411d5340609f6e8e50a
4
- data.tar.gz: a40ac60d84c5995be8bc47d33a3af648f2753dc6
3
+ metadata.gz: c0b71f31b70c576cbac3a818087a3e8fc11167cb
4
+ data.tar.gz: 9e117c82270f65cdd0ee725b2ded78e634cd3de2
5
5
  SHA512:
6
- metadata.gz: f39fef87984dc8d517eb859e9540a0bbd983fe048d463e26f134affb9aacacdfc8d0915c0084293435ace4d2ae8b86def6cea2616b0740511824cca31b27e3e2
7
- data.tar.gz: b625dce0ac7a1b79651974a57b14f81044984cb0a5521b43d53d556133e737c8bbf0b6eafb5f2db3009f572a231e3fc559d02c727e5095e6be544a5d80052bd6
6
+ metadata.gz: 0cf99de934c780bd8c556a7385609904f91978de150f890b2fef521b8856382ba6bcb41f8ff5ce0011958a1a411409b315245c3749e99920ebcc4b8da8bba5ad
7
+ data.tar.gz: f3983f25c5a3732f1b177ecef716d4f5abfc6f3bdbd9d3d1f5b9f3bf355768b74146179f6dd03332223eee70c908e14d78dd61e5c5118ddeb6d0976e19c76eec
data/README.md CHANGED
@@ -155,3 +155,18 @@ Unidom::Common.configure do |options|
155
155
 
156
156
  end
157
157
  ```
158
+
159
+
160
+
161
+ ## RSpec examples
162
+
163
+ ```ruby
164
+ # spec/models/unidom_spec.rb
165
+ require 'unidom/visitor/models_rspec'
166
+
167
+ # spec/types/unidom_spec.rb
168
+ require 'unidom/visitor/types_rspec'
169
+
170
+ # spec/validators/unidom_spec.rb
171
+ require 'unidom/visitor/validators_rspec'
172
+ ```
@@ -0,0 +1,23 @@
1
+ describe Unidom::Visitor::Authenticating, type: :model do
2
+
3
+ before :each do
4
+ end
5
+
6
+ after :each do
7
+ end
8
+
9
+ context do
10
+
11
+ model_attributes = {
12
+ visitor_id: SecureRandom.uuid,
13
+ visitor_type: 'Unidom::Visitor::Visitor::Mock',
14
+ credential_id: SecureRandom.uuid,
15
+ credential_type: 'Unidom::Visitor::Credential::Mock',
16
+ flag_code: Unidom::Visitor::Flag::REQUIRED.code
17
+ }
18
+
19
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
20
+
21
+ end
22
+
23
+ end
@@ -0,0 +1,20 @@
1
+ describe Unidom::Visitor::Guest, type: :model do
2
+
3
+ before :each do
4
+ end
5
+
6
+ after :each do
7
+ end
8
+
9
+ context do
10
+
11
+ model_attributes = {
12
+ platform_code: 'SITE',
13
+ platform_specific_identification: '123456789012'
14
+ }
15
+
16
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
17
+
18
+ end
19
+
20
+ end
@@ -0,0 +1,22 @@
1
+ describe Unidom::Visitor::Identificating, type: :model do
2
+
3
+ before :each do
4
+ end
5
+
6
+ after :each do
7
+ end
8
+
9
+ context do
10
+
11
+ model_attributes = {
12
+ visitor_id: SecureRandom.uuid,
13
+ visitor_type: 'Unidom::Visitor::Visitor::Mock',
14
+ identity_id: SecureRandom.uuid,
15
+ identity_type: 'Unidom::Visitor::Identity::Mock'
16
+ }
17
+
18
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
19
+
20
+ end
21
+
22
+ end
@@ -0,0 +1,19 @@
1
+ describe Unidom::Visitor::Password, type: :model do
2
+
3
+ before :each do
4
+ end
5
+
6
+ after :each do
7
+ end
8
+
9
+ context do
10
+
11
+ model_attributes = {
12
+ clear_text: 'password'
13
+ }
14
+
15
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
16
+
17
+ end
18
+
19
+ end
@@ -0,0 +1,23 @@
1
+ describe Unidom::Visitor::Recognization, type: :model do
2
+
3
+ before :each do
4
+ end
5
+
6
+ after :each do
7
+ end
8
+
9
+ context do
10
+
11
+ model_attributes = {
12
+ visitor_id: SecureRandom.uuid,
13
+ visitor_type: 'Unidom::Visitor::Visitor::Mock',
14
+ party_id: SecureRandom.uuid,
15
+ party_type: 'Unidom::Visitor::Party::Mock',
16
+ elemental: true
17
+ }
18
+
19
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
20
+
21
+ end
22
+
23
+ end
@@ -0,0 +1,18 @@
1
+ describe Unidom::Visitor::User, type: :model do
2
+
3
+ before :each do
4
+ end
5
+
6
+ after :each do
7
+ end
8
+
9
+ context do
10
+
11
+ model_attributes = {
12
+ }
13
+
14
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
15
+
16
+ end
17
+
18
+ end
@@ -0,0 +1,15 @@
1
+ describe Unidom::Visitor::Flag, type: :type do
2
+
3
+ before :each do
4
+ end
5
+
6
+ after :each do
7
+ end
8
+
9
+ it_behaves_like 'ProgneTapera::EnumConfig', 4, [
10
+ { code: 'RQRD', name: 'required', localized_name: '必须的' },
11
+ { code: 'SFCT', name: 'sufficient', localized_name: '必要的' },
12
+ { code: 'RQST', name: 'requisite', localized_name: '足够的' },
13
+ { code: 'OPTN', name: 'optional', localized_name: '可选的' } ]
14
+
15
+ end
@@ -0,0 +1,6 @@
1
+ require 'rspec/models/unidom/visitor/authenticating_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Visitor::Authenticating'
2
+ require 'rspec/models/unidom/visitor/guest_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Visitor::Guest'
3
+ require 'rspec/models/unidom/visitor/identificating_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Visitor::Identificating'
4
+ require 'rspec/models/unidom/visitor/password_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Visitor::Password'
5
+ require 'rspec/models/unidom/visitor/recognization_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Visitor::Recognization'
6
+ require 'rspec/models/unidom/visitor/user_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Visitor::User'
@@ -0,0 +1 @@
1
+ require 'rspec/types/unidom/visitor/flag_spec'
File without changes
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Visitor
3
- VERSION = '1.12.4'.freeze
3
+ VERSION = '1.13'.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.12.4
4
+ version: '1.13'
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-01-28 00:00:00.000000000 Z
11
+ date: 2017-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common
@@ -65,9 +65,19 @@ files:
65
65
  - db/migrate/20000210000000_create_unidom_guests.rb
66
66
  - db/migrate/20000211000000_create_unidom_users.rb
67
67
  - db/migrate/20000220000000_create_unidom_passwords.rb
68
+ - lib/rspec/models/unidom/visitor/authenticating_spec.rb
69
+ - lib/rspec/models/unidom/visitor/guest_spec.rb
70
+ - lib/rspec/models/unidom/visitor/identificating_spec.rb
71
+ - lib/rspec/models/unidom/visitor/password_spec.rb
72
+ - lib/rspec/models/unidom/visitor/recognization_spec.rb
73
+ - lib/rspec/models/unidom/visitor/user_spec.rb
74
+ - lib/rspec/types/unidom/visitor/flag_spec.rb
68
75
  - lib/tasks/visitor_tasks.rake
69
76
  - lib/unidom/visitor.rb
70
77
  - lib/unidom/visitor/engine.rb
78
+ - lib/unidom/visitor/models_rspec.rb
79
+ - lib/unidom/visitor/types_rspec.rb
80
+ - lib/unidom/visitor/validators_rspec.rb
71
81
  - lib/unidom/visitor/version.rb
72
82
  homepage: https://github.com/topbitdu/unidom-visitor
73
83
  licenses: