unidom-party 1.8.4 → 1.8.5

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: 1956c99e00b08efad2d2a80ed4e97080ac480bad
4
- data.tar.gz: ffca347fc30b824c8609e8ed764e0484fc0963d7
3
+ metadata.gz: c00041e4709b1e72496ac675a708c75ea097d6aa
4
+ data.tar.gz: a41967c222b5018fb1f53c726856a2d66050250e
5
5
  SHA512:
6
- metadata.gz: ef7a3e183d09c02863740534c6aeef257c2f5acc7c8df93966a993f3ce23fa7342756072fa1dbab8e5339f6c90942f88584abeb4623db139179e59ff5fd7e7da
7
- data.tar.gz: 356234bfb5ca61b2c1261c9913118112d5c20eeaf64d6c56e4049bb70c9346ca751928b7d186d0072b135efac108294755de015a4aa5da7a50a1b7519adf5df3
6
+ metadata.gz: 0320bf01bce35163034c7e35cb3468c9d02c4549de9fda3cd48bb38054d1ecbb2b58db2974f4a83a1e384046fb9fca834caa44337019f80d3b5a270d7806edb8
7
+ data.tar.gz: e45006134c8e36cf34d44b0fb2a0292f2768600dd2e33b7f9918805c5bfbc4df4f8bd079f855e7d4083643ca34f848a94331cbdc70775e560b3bc2d877720266
data/README.md CHANGED
@@ -117,6 +117,22 @@ Unidom::Party::Gender::NOT_APPLICABLE
117
117
 
118
118
 
119
119
 
120
+ ## Disable the Model & Migration
121
+
122
+ If you only need the app components other than models, the migrations should be neglected, and the models should not be loaded.
123
+ ```ruby
124
+ # config/initializers/unidom.rb
125
+ Unidom::Common.configure do |options|
126
+
127
+ options[:neglected_namespaces] = %w{
128
+ Unidom::Party
129
+ }
130
+
131
+ end
132
+ ```
133
+
134
+
135
+
120
136
  ## RSpec examples
121
137
 
122
138
  ```ruby
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application controller 是模块内所有控制器的基类。
3
+
1
4
  class Unidom::Party::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::Party::ApplicationJob < ActiveJob::Base
2
5
  end
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application mailer 是模块内所有电子邮件发送类的基类。
3
+
1
4
  class Unidom::Party::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::Party::ApplicationRecord < ActiveRecord::Base
2
5
  self.abstract_class = true
3
6
  end
@@ -28,4 +28,4 @@ class Unidom::Party::Collaborating < Unidom::Party::ApplicationRecord
28
28
  collaborating
29
29
  end
30
30
 
31
- end
31
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::Collaborating'
@@ -11,4 +11,4 @@ class Unidom::Party::Company < Unidom::Party::ApplicationRecord
11
11
 
12
12
  validates :name, presence: true, length: { in: 2..self.columns_hash['name'].limit }
13
13
 
14
- end
14
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::Company'
@@ -16,4 +16,4 @@ class Unidom::Party::GovernmentAgency < Unidom::Party::ApplicationRecord
16
16
 
17
17
  scope :supervision_region_is, ->(region) { where supervision_region: region }
18
18
 
19
- end
19
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::GovernmentAgency'
@@ -23,4 +23,4 @@ class Unidom::Party::PartyRelation < Unidom::Party::ApplicationRecord
23
23
  relation
24
24
  end
25
25
 
26
- end
26
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::PartyRelation'
@@ -11,4 +11,4 @@ class Unidom::Party::Person < Unidom::Party::ApplicationRecord
11
11
 
12
12
  validates :name, presence: true, length: { in: 2..self.columns_hash['name'].limit }
13
13
 
14
- end
14
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::Person'
@@ -11,4 +11,4 @@ class Unidom::Party::Shop < Unidom::Party::ApplicationRecord
11
11
 
12
12
  validates :name, presence: true, length: { in: 2..self.columns_hash['name'].limit }
13
13
 
14
- end
14
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::Shop'
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Party
3
- VERSION = '1.8.4'.freeze
3
+ VERSION = '1.8.5'.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.4
4
+ version: 1.8.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-19 00:00:00.000000000 Z
11
+ date: 2017-01-30 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 Party domain model engine includes Person, Shop, and Company models. Unidom
29
29
  (统一领域对象模型)是一系列的领域模型引擎。参与者领域模型引擎包括个人、店铺、公司的模型。