unidom-accession 1.2 → 1.3
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: b0c9247b0118409631053410c1fbc45a94c0abdb
|
4
|
+
data.tar.gz: 02c6c79665d9af4cd34be0dcbca73f411160c5a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb20e68db43cb0ab2cecae4f10a349155072052db7e951d2f282b321a807e0609b35ab1947bde5780a37235b68d34fc2c97808aebf93da43d726a8d0dd21a8ba
|
7
|
+
data.tar.gz: 1accc8ca13f32ea3ead830443db771d73a9ef91dd696d21c02534c6153516ac972d5cc620d017a00d4c2d73d9d5bb94a5af3108067ea4159de48106c63dce8a1
|
data/README.md
CHANGED
@@ -37,11 +37,13 @@ include Unidom::Accession::Concerns::AsPostFulfiller
|
|
37
37
|
```
|
38
38
|
|
39
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'``
|
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
|
+
3. Define the #is_fulfilled_as_post! method as: ``def is_fulfilled_as_post!(by: fulfiller, opened_at: Time.now)``
|
43
44
|
|
44
45
|
### 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'``
|
46
|
+
The As Post Fulfiller concern do the following tasks for the includer automatically:
|
47
|
+
1. Define the has_many :post_fulfillments macro as: ``has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfiller``
|
48
|
+
2. Define the has_many :fulfilled_posts macro as: ``has_many :fulfilled_posts, through: :post_fulfillments, source: :fulfilled, source_type: 'Unidom::Position::Post'``
|
49
|
+
3.
|
@@ -7,9 +7,11 @@ module Unidom::Accession::Concerns::AsPostFulfilled
|
|
7
7
|
has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfilled
|
8
8
|
has_many :fulfiller_people, through: :post_fulfillments, source: :fulfiller, source_type: 'Unidom::Party::Person'
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
def is_fulfilled_as_post!(by: nil, opened_at: Time.now)
|
11
|
+
raise ArgumentError.new('The argument "by" is required.') if by.blank?
|
12
|
+
raise ArgumentError.new('The argument "opened_at" is required.') if opened_at.blank?
|
13
|
+
post_fulfillments.create! fulfiller: by, opened_at: opened_at
|
14
|
+
end
|
13
15
|
|
14
16
|
end
|
15
17
|
|
@@ -7,9 +7,11 @@ module Unidom::Accession::Concerns::AsPostFulfiller
|
|
7
7
|
has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfiller
|
8
8
|
has_many :fulfilled_posts, through: :post_fulfillments, source: :fulfilled, source_type: 'Unidom::Position::Post'
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
def fulfill_post!(post: nil, opened_at: Time.now)
|
11
|
+
raise ArgumentError.new('The argument "post" is required.') if post.blank?
|
12
|
+
raise ArgumentError.new('The argument "opened_at" is required.') if opened_at.blank?
|
13
|
+
post_fulfillments.create! fulfilled: post, opened_at: opened_at
|
14
|
+
end
|
13
15
|
|
14
16
|
end
|
15
17
|
|
metadata
CHANGED
@@ -1,43 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-accession
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.3'
|
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-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.9'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
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
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
24
|
- - ">="
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
26
|
+
version: '0.9'
|
41
27
|
description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
|
42
28
|
The Accession domain model engine includes Post Fullfillment and its relative models.
|
43
29
|
Unidom (统一领域对象模型)是一系列的领域模型引擎。就职领域模型引擎包括岗位履行及其相关的模型。
|