unidom-accession 1.1 → 1.2

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: d334d2ec2065736811d935126687a0a5bae269da
4
- data.tar.gz: 03ca6d5a9afada376c8a15c287e44be144a48905
3
+ metadata.gz: 79db48b2b27167c6a317d34048dd7b657ef3b322
4
+ data.tar.gz: e7ea244dbbca98b5427d596e40c0cb3d1bc802a7
5
5
  SHA512:
6
- metadata.gz: 7554202d27191ce47f2536c57b2100f5ac77b11d7ea83997643d272f90145f446f83d0c34d88775dd606a3bb803b005b2dc482e05f8b0af59faac53b7adf5aa7
7
- data.tar.gz: d6583faac6fb8a4385be9391e24a622895fa953dba9e5431f43bdbdf379a2202062e4fa975382afd76b9096ca6308533f84218c97ba71ad1d6f3d7a32688afda
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: :fulfilled
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: :fulfiller
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
 
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Accession
3
- VERSION = '1.1'.freeze
3
+ VERSION = '1.2'.freeze
4
4
  end
5
5
  end
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.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-07 00:00:00.000000000 Z
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 (统一领域对象模型)是一系列的领域模型引擎。就职领域模型引擎包括岗位履行及其相关的模型。