unidom-product 1.6 → 1.6.1

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: 907a1161756dc77c80828a924bf38c303c5e18dd
4
- data.tar.gz: 20d56aa708474959d89263c746314a04c67fced8
3
+ metadata.gz: 81cb043231dc5c3956a561a22b3374789286db29
4
+ data.tar.gz: 233a86eca6fe4b792a100f093670acd764c4b873
5
5
  SHA512:
6
- metadata.gz: ed42995d06c3c6472553a16c4768fe7a514aa7f4ef1c383331cfb06b8c894aa6ee6916c314cd1ff5e543721be494474bd6521ca1cb1144ae8dfc53d523b90834
7
- data.tar.gz: 714e0bc0d208d271a8a5c511aec0cfe4451494a420f09e8f38d6739658a773c83544d883634f42b594c7d14afe1378c4d48a18cd8155559fcd98f62454fb3362
6
+ metadata.gz: ac4e1b8e4b16387e074f6196ba162607bb19a6d1a9817074e421e85a88bd9bdf3cd666ebb157e613b68d75945d8235988c78cc75766d0e6edba9598b7269ed6e
7
+ data.tar.gz: 5078529aa0f3c1708b580b01d1a0ab3b010958275cc7cd91ddb6ac583ee9d41bf0bf17e0aa8a8a74a95030fdd5ecd18a0130da5fafad9ec4efea8f913e892596
data/README.md CHANGED
@@ -84,6 +84,15 @@ The As Target Product concern do the following tasks for the includer automatica
84
84
 
85
85
  ## Enum codes
86
86
 
87
+ ### Product Association enum code
88
+
89
+ ```ruby
90
+ Unidom::Product::ProductAssociation::COMPLEMENT # 补充
91
+ Unidom::Product::ProductAssociation::INCOMPATIBILITY # 不兼容
92
+ Unidom::Product::ProductAssociation::OBSOLESCENCE # 废弃
93
+ Unidom::Product::ProductAssociation::SUBSTITUTE # 替代
94
+ ```
95
+
87
96
  ### Formset enum code
88
97
 
89
98
  ```ruby
@@ -1,3 +1,6 @@
1
+ ##
2
+ # As Source Product 是产品关联的源产品的领域逻辑关注点。
3
+
1
4
  module Unidom::Product::Concerns::AsSourceProduct
2
5
 
3
6
  extend ActiveSupport::Concern
@@ -1,3 +1,6 @@
1
+ ##
2
+ # As Source Product Associating 是产品关联的源关系的领域逻辑关注点。
3
+
1
4
  module Unidom::Product::Concerns::AsSourceProductAssociating
2
5
 
3
6
  extend ActiveSupport::Concern
@@ -1,3 +1,6 @@
1
+ ##
2
+ # As Target Product 是产品关联的目的产品的领域逻辑关注点。
3
+
1
4
  module Unidom::Product::Concerns::AsTargetProduct
2
5
 
3
6
  extend ActiveSupport::Concern
@@ -1,3 +1,6 @@
1
+ ##
2
+ # As Target Product Associating 是产品关联的目的关系的领域逻辑关注点。
3
+
1
4
  module Unidom::Product::Concerns::AsTargetProductAssociating
2
5
 
3
6
  extend ActiveSupport::Concern
@@ -1,3 +1,4 @@
1
+ ##
1
2
  # Product 是产品。
2
3
 
3
4
  class Unidom::Product::Product < Unidom::Product::ApplicationRecord
@@ -1,3 +1,4 @@
1
+ ##
1
2
  # Product Associating 表示产品之间的关联。常见的关联包括销售包装、产品换代等。
2
3
  # source 是来源产品。如组合后的产品、被换代的产品、不兼容产品中的主产品。
3
4
  # target 是目标产品。如参与组合的产品、替换其它产品的新产品、不兼容产品中的次要产品。
@@ -8,7 +9,7 @@
8
9
  # PCKG 是销售包装(行销组件) package: quantity, usage
9
10
  # SBST 是产品替代 substitute: from, thru, quantity, comments
10
11
  # 构成: from, thru, quantity, usage, comments
11
- #
12
+ #
12
13
 
13
14
  class Unidom::Product::ProductAssociating < Unidom::Product::ApplicationRecord
14
15
 
@@ -1,19 +1,13 @@
1
- require 'unidom/common/yaml_helper'
2
-
3
1
  module Unidom
4
2
  module Product
5
3
 
6
4
  class Engine < ::Rails::Engine
7
5
 
8
- isolate_namespace ::Unidom::Product
6
+ include Unidom::Common::EngineExtension
9
7
 
10
- initializer :load_config_initializers do |app|
11
- Unidom::Common::YamlHelper.load_enum config: app.config, root: config.root
12
- end
8
+ isolate_namespace ::Unidom::Product
13
9
 
14
- initializer :append_migrations do |app|
15
- config.paths['db/migrate'].expanded.each { |expanded_path| app.config.paths['db/migrate'] << expanded_path } unless app.root.to_s.match root.to_s
16
- end
10
+ enable_initializer enum_enabled: true, migration_enabled: true
17
11
 
18
12
  end
19
13
 
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Product
3
- VERSION = '1.6'.freeze
3
+ VERSION = '1.6.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-product
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.6'
4
+ version: 1.6.1
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-12-23 00:00:00.000000000 Z
11
+ date: 2017-01-09 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
- version: 1.7.1
19
+ version: '1.8'
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.7.1
26
+ version: '1.8'
27
27
  description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
28
28
  The Product domain model engine includes Product and its relative models. Unidom
29
29
  (统一领域对象模型)是一系列的领域模型引擎。产品领域模型引擎包括产品及其相关的模型。