unidom-accession 2.2.4 → 2.2.5

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: 012d8989d22cc1a70396227be823ecdf1640f964
4
- data.tar.gz: af0883228bb847b40e3b3890e62fef0515ae47b7
3
+ metadata.gz: 4880d1744c491d246c467cd4cfee61a8dc29e159
4
+ data.tar.gz: c10093dae73f65ba605f5d327e13d824880bfc28
5
5
  SHA512:
6
- metadata.gz: 66921b1c22723a9148484038ec268622499f5f3b9822aff6972229d94664a8300202a25cd223dd9a66959fd219221ded8aef7dd8820be388f74594d21f00f201
7
- data.tar.gz: 34d2b918e9c4fbfe5a6aaf20627824ad900b87b34e04c12d6cea8a47a70733cb9e2e155692c8495f96903368161715b510dd2c6192c2c36fcacd03f37384a8dd
6
+ metadata.gz: 298602bf713cb6342fb58f6ac1f48799dd66594a8af4bf755a70bfd6563304186d69c8f0a69b5107d9dfc4bdd08cf3576e0f4081abd0f08da1f223a375b62f90
7
+ data.tar.gz: 1e521fd2fa112780573592212f731ab262e7cf614c78d1677df742e03dce0391a0377933de776c57e1330da7c795dab4515f884f4778a49ae205b4d298306487
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Unidom Accession 就职领域模型引擎
2
2
 
3
+ [![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/unidom-accession/frames)
3
4
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)
5
+
4
6
  [![Gem Version](https://badge.fury.io/rb/unidom-accession.svg)](https://badge.fury.io/rb/unidom-accession)
5
7
  [![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/unidom-accession.svg)](https://gemnasium.com/github.com/topbitdu/unidom-accession)
6
8
 
@@ -57,16 +59,40 @@ include Unidom::Accession::Concerns::AsPostFulfiller
57
59
 
58
60
  ### As Post Fulfilled concern
59
61
 
60
- The As Post Fulfilled concern do the following tasks for the includer automatically:
61
- 1. Define the has_many :post_fulfillments macro as: ``has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfilled``
62
- 2. Define the has_many :fulfiller_people macro as: ``has_many :fulfiller_people, through: :post_fulfillments, source: :fulfiller, source_type: 'Unidom::Party::Person'``
63
- 3. Define the #is_fulfilled_as_post! method as: ``def is_fulfilled_as_post!(by: nil, at: Time.now)``
62
+ The As Post Fulfilled concern do the following tasks for the includer automatically:
63
+
64
+ 1. Define the has_many :post_fulfillments macro as: ``has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfilled``
65
+
66
+ 2. Define the has_many :fulfiller_people macro as: ``has_many :fulfiller_people, through: :post_fulfillments, source: :fulfiller, source_type: 'Unidom::Party::Person'``
67
+
68
+ 3. Define the #is_fulfilled_as_post! method as: ``def is_fulfilled_as_post!(by: nil, at: Time.now)``
69
+
64
70
  4. Define the #is_fulfilled_as_post? method as: ``def is_fulfilled_as_post?(by: nil, at: Time.now)``
65
71
 
66
72
  ### As Post Fulfiller concern
67
73
 
68
- The As Post Fulfiller concern do the following tasks for the includer automatically:
69
- 1. Define the has_many :post_fulfillments macro as: ``has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfiller``
70
- 2. Define the has_many :fulfilled_posts macro as: ``has_many :fulfilled_posts, through: :post_fulfillments, source: :fulfilled, source_type: 'Unidom::Position::Post'``
71
- 3. Define the #fulfill_post! method as: ``def fulfill_post!(post, at: Time.now)``
74
+ The As Post Fulfiller concern do the following tasks for the includer automatically:
75
+
76
+ 1. Define the has_many :post_fulfillments macro as: ``has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfiller``
77
+
78
+ 2. Define the has_many :fulfilled_posts macro as: ``has_many :fulfilled_posts, through: :post_fulfillments, source: :fulfilled, source_type: 'Unidom::Position::Post'``
79
+
80
+ 3. Define the #fulfill_post! method as: ``def fulfill_post!(post, at: Time.now)``
81
+
72
82
  4. Define the #fulfill_post? method as: ``def fulfill_post?(post, at: Time.now)``
83
+
84
+
85
+
86
+ ## Disable the Model & Migration
87
+
88
+ If you only need the app components other than models, the migrations should be neglected, and the models should not be loaded.
89
+ ```ruby
90
+ # config/initializers/unidom.rb
91
+ Unidom::Common.configure do |options|
92
+
93
+ options[:neglected_namespaces] = %w{
94
+ Unidom::Accession
95
+ }
96
+
97
+ end
98
+ ```
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application controller 是模块内所有控制器的基类。
3
+
1
4
  class Unidom::Accession::ApplicationController < ActionController::Base
2
5
  protect_from_forgery with: :exception
3
6
  end
@@ -1,2 +1,5 @@
1
+ ##
2
+ # Application job 是模块内所有异步任务的基类。
3
+
1
4
  class Unidom::Accession::ApplicationJob < ActiveJob::Base
2
5
  end
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application mailer 是模块内所有电子邮件发送类的基类。
3
+
1
4
  class Unidom::Accession::ApplicationMailer < ActionMailer::Base
2
5
  default from: 'from@example.com'
3
6
  layout 'mailer'
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application record 是模块内所有模型的抽象基类。
3
+
1
4
  class Unidom::Accession::ApplicationRecord < ActiveRecord::Base
2
5
  self.abstract_class = true
3
6
  end
@@ -23,4 +23,4 @@ class Unidom::Accession::PostFulfillment < Unidom::Accession::ApplicationRecord
23
23
  self.create! fulfiller: fulfiller, fulfilled: fulfilled, opened_at: opened_at
24
24
  end
25
25
 
26
- end
26
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Accession::PostFulfillment'
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Accession
3
- VERSION = '2.2.4'.freeze
3
+ VERSION = '2.2.5'.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: 2.2.4
4
+ version: 2.2.5
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-03 00:00:00.000000000 Z
11
+ date: 2017-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.8'
19
+ version: '1.9'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.8'
26
+ version: '1.9'
27
27
  description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
28
28
  The Accession domain model engine includes Post Fullfillment and its relative models.
29
29
  Unidom (统一领域对象模型)是一系列的领域模型引擎。就职领域模型引擎包括岗位履行及其相关的模型。