unidom-party 1.8.5 → 1.9

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: c00041e4709b1e72496ac675a708c75ea097d6aa
4
- data.tar.gz: a41967c222b5018fb1f53c726856a2d66050250e
3
+ metadata.gz: 0656223c31ea8af9d8eeee90a02f6e0f98fabddc
4
+ data.tar.gz: 24714c2c70ef1c865ad6560ae16d4dbda4859304
5
5
  SHA512:
6
- metadata.gz: 0320bf01bce35163034c7e35cb3468c9d02c4549de9fda3cd48bb38054d1ecbb2b58db2974f4a83a1e384046fb9fca834caa44337019f80d3b5a270d7806edb8
7
- data.tar.gz: e45006134c8e36cf34d44b0fb2a0292f2768600dd2e33b7f9918805c5bfbc4df4f8bd079f855e7d4083643ca34f848a94331cbdc70775e560b3bc2d877720266
6
+ metadata.gz: 52674f63fdc94be70182afe5a84eaa2006d4829e1c4c23a682708ea870444ff4d664b184ddc0e813e5c64c6b0d30816469bfbe248f95ba661d88b115cc062010
7
+ data.tar.gz: 6239e0a0f92ccdd42c7ae7ba7ddeed0d052729dcaaaa7bd6669e9dfa3e14df0be1fd89ee72ee36c4abcb3491a11e56fc851725c1ee915fe96116edf11df9cdc1
data/README.md CHANGED
@@ -136,6 +136,12 @@ end
136
136
  ## RSpec examples
137
137
 
138
138
  ```ruby
139
- # spec/unidom_spec.rb
140
- require 'unidom/party/rspec'
139
+ # spec/models/unidom_spec.rb
140
+ require 'unidom/party/models_rspec'
141
+
142
+ # spec/types/unidom_spec.rb
143
+ require 'unidom/party/types_rspec'
144
+
145
+ # spec/validators/unidom_spec.rb
146
+ require 'unidom/party/validators_rspec'
141
147
  ```
@@ -0,0 +1,26 @@
1
+ describe Unidom::Party::Collaborating, 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
+ collaboration_id: SecureRandom.uuid,
13
+ collaboration_type: 'Unidom::Party::Collaboration::Mock',
14
+ collaborator_id: SecureRandom.uuid,
15
+ collaborator_type: 'Unidom::Party::Collaborator::Mock',
16
+ role_code: 'ZZZZ',
17
+ name: 'Attention',
18
+ priority: 3,
19
+ grade: 5
20
+ }
21
+
22
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
23
+
24
+ end
25
+
26
+ end
@@ -0,0 +1,19 @@
1
+ describe Unidom::Party::Company, 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
+ name: 'Tesla'
13
+ }
14
+
15
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
16
+
17
+ end
18
+
19
+ end
@@ -0,0 +1,22 @@
1
+ describe Unidom::Party::GovernmentAgency, 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
+ supervision_region_id: SecureRandom.uuid,
13
+ supervision_region_type: 'Unidom::Party::SupervisionRegion::Mock',
14
+ name: 'WalMart',
15
+ function_code: 'ZZZZ'
16
+ }
17
+
18
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
19
+
20
+ end
21
+
22
+ end
@@ -16,7 +16,7 @@ describe Unidom::Party::PartyRelation, type: :model do
16
16
  source_party_id: Unidom::Common::NULL_UUID,
17
17
  source_party_type: 'Unidom::Party::Person',
18
18
  target_party_id: Unidom::Common::NULL_UUID,
19
- target_party_type: 'Unidom::Party::Person' #,
19
+ target_party_type: 'Unidom::Party::Person'
20
20
  #priority: nil,
21
21
  #grade: nil
22
22
  })
@@ -29,7 +29,9 @@ describe Unidom::Party::Person, type: :model do
29
29
 
30
30
  context do
31
31
 
32
- model_attributes = { name: 'Tim' }
32
+ model_attributes = {
33
+ name: 'Tim'
34
+ }
33
35
 
34
36
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
35
37
  it_behaves_like 'Unidom::Party::Concerns::AsSourceParty', model_attributes
@@ -0,0 +1,19 @@
1
+ describe Unidom::Party::Shop, 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
+ name: 'WalMart'
13
+ }
14
+
15
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
16
+
17
+ end
18
+
19
+ end
@@ -0,0 +1,15 @@
1
+ describe Unidom::Party::Gender, 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: '0', name: 'not_known', localized_name: '未知' },
11
+ { code: '1', name: 'male', localized_name: '男性' },
12
+ { code: '2', name: 'female', localized_name: '女性' },
13
+ { code: '9', name: 'not_applicable', localized_name: '保密' } ]
14
+
15
+ end
@@ -0,0 +1,8 @@
1
+ require 'rspec/models/unidom/party/concerns/as_source_party_shared_examples'
2
+
3
+ require 'rspec/models/unidom/party/party_relation_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::PartyRelation'
4
+ require 'rspec/models/unidom/party/person_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::Person'
5
+ require 'rspec/models/unidom/party/shop_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::Shop'
6
+ require 'rspec/models/unidom/party/company_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::Company'
7
+ require 'rspec/models/unidom/party/government_agency_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::GovernmentAgency'
8
+ require 'rspec/models/unidom/party/collaborating_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::Collaborating'
@@ -0,0 +1 @@
1
+ require 'rspec/types/unidom/party/gender_spec'
File without changes
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Party
3
- VERSION = '1.8.5'.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-party
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.5
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: 2017-01-30 00:00:00.000000000 Z
11
+ date: 2017-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common
@@ -65,13 +65,20 @@ files:
65
65
  - db/migrate/20010104000000_create_unidom_government_agencies.rb
66
66
  - db/migrate/20010105000000_create_unidom_companies.rb
67
67
  - db/migrate/20010111000000_create_unidom_collaboratings.rb
68
+ - lib/rspec/models/unidom/party/collaborating_spec.rb
69
+ - lib/rspec/models/unidom/party/company_spec.rb
68
70
  - lib/rspec/models/unidom/party/concerns/as_source_party_shared_examples.rb
71
+ - lib/rspec/models/unidom/party/government_agency_spec.rb
69
72
  - lib/rspec/models/unidom/party/party_relation_spec.rb
70
73
  - lib/rspec/models/unidom/party/person_spec.rb
74
+ - lib/rspec/models/unidom/party/shop_spec.rb
75
+ - lib/rspec/types/unidom/party/gender_spec.rb
71
76
  - lib/tasks/party_tasks.rake
72
77
  - lib/unidom/party.rb
73
78
  - lib/unidom/party/engine.rb
74
- - lib/unidom/party/rspec.rb
79
+ - lib/unidom/party/models_rspec.rb
80
+ - lib/unidom/party/types_rspec.rb
81
+ - lib/unidom/party/validators_rspec.rb
75
82
  - lib/unidom/party/version.rb
76
83
  homepage: http://github.com/topbitdu/unidom-party
77
84
  licenses:
@@ -1,4 +0,0 @@
1
- require 'rspec/models/unidom/party/concerns/as_source_party_shared_examples'
2
-
3
- require 'rspec/models/unidom/party/party_relation_spec'
4
- require 'rspec/models/unidom/party/person_spec'