unidom-accession 1.1 → 1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79db48b2b27167c6a317d34048dd7b657ef3b322
|
4
|
+
data.tar.gz: e7ea244dbbca98b5427d596e40c0cb3d1bc802a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b63730969612337646df343859d67d38e278f58fde0cd269d7126a8ab0194715cfdf0d7a8c26fec41b9bc0b52e6afc2119f5ae79e727be6b3f75cfa07df46e33
|
7
|
+
data.tar.gz: 01c4bc741b0ea71de9efe7155d08d9a880910efe094c3d68da520073715aa2e20270e699964af8f523a2d9aa19bb16ec5bd8865964e20cc76d3664e35f2d216b
|
data/README.md
CHANGED
@@ -29,3 +29,19 @@ post_fulfillment = Unidom::Accession::PostFulfillment.fulfill! fulfiller: fulfil
|
|
29
29
|
# or like the following source codes, which opened_at is optional
|
30
30
|
post_fulfillment = Unidom::Accession::PostFulfillment.fulfill! fulfiller: fulfiller, fulfilled: post
|
31
31
|
```
|
32
|
+
|
33
|
+
## Include the Concern
|
34
|
+
```ruby
|
35
|
+
include Unidom::Accession::Concerns::AsPostFulfilled
|
36
|
+
include Unidom::Accession::Concerns::AsPostFulfiller
|
37
|
+
```
|
38
|
+
|
39
|
+
### As Post Fulfilled concern
|
40
|
+
The As Post Fulfilled concern do the following tasks for the includer automatically:
|
41
|
+
1. Define the has_many :post_fulfillments macro as: ``has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfilled``
|
42
|
+
2. Define the has_many :fulfiller_people macro as: ``has_many :fulfiller_people, through: :post_fulfillments, source: :fulfiller, source_type: 'Unidom::Party::Person'``
|
43
|
+
|
44
|
+
### As Post Fulfiller concern
|
45
|
+
The As Post Fulfiller concern do the following tasks for the includer automatically:
|
46
|
+
1. Define the has_many :post_fulfillments macro as: ``has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfiller``
|
47
|
+
2. Define the has_many :fulfilled_posts macro as: ``has_many :fulfilled_posts, through: :post_fulfillments, source: :fulfilled, source_type: 'Unidom::Position::Post'``
|
@@ -4,7 +4,12 @@ module Unidom::Accession::Concerns::AsPostFulfilled
|
|
4
4
|
|
5
5
|
self.included do |includer|
|
6
6
|
|
7
|
-
has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as:
|
7
|
+
has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfilled
|
8
|
+
has_many :fulfiller_people, through: :post_fulfillments, source: :fulfiller, source_type: 'Unidom::Party::Person'
|
9
|
+
|
10
|
+
#def is_fulfilled_as_post!(fulfiller, opened_at: Time.now)
|
11
|
+
# post_fulfillments.create! fulfiller: fulfiller, opened_at: opened_at
|
12
|
+
#end
|
8
13
|
|
9
14
|
end
|
10
15
|
|
@@ -4,7 +4,12 @@ module Unidom::Accession::Concerns::AsPostFulfiller
|
|
4
4
|
|
5
5
|
self.included do |includer|
|
6
6
|
|
7
|
-
has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as:
|
7
|
+
has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfiller
|
8
|
+
has_many :fulfilled_posts, through: :post_fulfillments, source: :fulfilled, source_type: 'Unidom::Position::Post'
|
9
|
+
|
10
|
+
#def fulfill_post!(fulfilled, opened_at: Time.now)
|
11
|
+
# post_fulfillments.create! fulfilled: fulfilled, opened_at: opened_at
|
12
|
+
#end
|
8
13
|
|
9
14
|
end
|
10
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-accession
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.2'
|
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-07-
|
11
|
+
date: 2016-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.9'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.4'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.4'
|
27
41
|
description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
|
28
42
|
The Accession domain model engine includes Post Fullfillment and its relative models.
|
29
43
|
Unidom (统一领域对象模型)是一系列的领域模型引擎。就职领域模型引擎包括岗位履行及其相关的模型。
|