unidom-standard 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -8
- data/app/controllers/unidom/standard/application_controller.rb +3 -0
- data/app/jobs/unidom/standard/application_job.rb +3 -0
- data/app/mailers/unidom/standard/application_mailer.rb +3 -0
- data/app/models/unidom/standard/application_record.rb +3 -0
- data/app/models/unidom/standard/standard.rb +1 -1
- data/app/models/unidom/standard/standard_associating.rb +1 -1
- data/lib/unidom/standard/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f747bd52df4025823cb5650614dd49f3b997d1c7
|
4
|
+
data.tar.gz: 1ad8efedaa8ee292c6be2a013861bada1b79e359
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5cfcb39c05026075931a8334fe8be5391aa6022bcdc36d85acab1d7d6ff630e216c8ef515e84edfb6621f4248776c4f4d835c8d391eb10f1d02b1935bc2494a
|
7
|
+
data.tar.gz: bb8030080168436661714346a6830bec57b3aa3a04a331c275cb78de2b2af78429418cdab8ef1e4f6f647e4f83282fe095ec89a506aee6389a4b2b569e8ee78e
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Unidom Standard 标准领域模型引擎
|
2
2
|
|
3
|
+
[![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/unidom-standard/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-standard.svg)](https://badge.fury.io/rb/unidom-standard)
|
5
7
|
[![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/unidom-standard.svg)](https://gemnasium.com/github.com/topbitdu/unidom-standard)
|
6
8
|
|
@@ -57,16 +59,32 @@ include Unidom::Standard::Concerns::AsTargetStandard
|
|
57
59
|
|
58
60
|
### As Source Standard concern
|
59
61
|
|
60
|
-
The As Source Standard concern do the following tasks for the includer automatically:
|
61
|
-
1. Define the has_many :target_associatings macro as: ``has_many :target_associatings, class_name: 'Unidom::Standard::StandardAssociating', foreign_key: :source_id``
|
62
|
-
2. Define the has_many :target_standards macro as: ``has_many :target_standards, through: :target_associatings, source: :target``
|
63
|
-
3. Define the #associate! method as: ``associate!(target, due_to: 'REVS', at: Time.now)``
|
62
|
+
The As Source Standard concern do the following tasks for the includer automatically:
|
63
|
+
1. Define the has_many :target_associatings macro as: ``has_many :target_associatings, class_name: 'Unidom::Standard::StandardAssociating', foreign_key: :source_id``
|
64
|
+
2. Define the has_many :target_standards macro as: ``has_many :target_standards, through: :target_associatings, source: :target``
|
65
|
+
3. Define the #associate! method as: ``associate!(target, due_to: 'REVS', at: Time.now)``
|
64
66
|
4. Define the #associate? method as: ``associate?(target, due_to: 'REVS', at: Time.now)``
|
65
67
|
|
66
68
|
### As Target Standard concern
|
67
69
|
|
68
|
-
The As Target Standard concern do the following tasks for the includer automatically:
|
69
|
-
1. Define the has_many :source_associatings macro as: ``has_many :source_associatings, class_name: 'Unidom::Standard::StandardAssociating', foreign_key: :target_id``
|
70
|
-
2. Define the has_many :source_standards macro as: ``has_many :source_standards, through: :source_associatings, source: :source``
|
71
|
-
3. Define the #is_associated! method as: ``is_associated!(source, due_to: 'REVS', at: Time.now)``
|
70
|
+
The As Target Standard concern do the following tasks for the includer automatically:
|
71
|
+
1. Define the has_many :source_associatings macro as: ``has_many :source_associatings, class_name: 'Unidom::Standard::StandardAssociating', foreign_key: :target_id``
|
72
|
+
2. Define the has_many :source_standards macro as: ``has_many :source_standards, through: :source_associatings, source: :source``
|
73
|
+
3. Define the #is_associated! method as: ``is_associated!(source, due_to: 'REVS', at: Time.now)``
|
72
74
|
4. Define the #is_associated? method as: ``is_associated?(source, due_to: 'REVS', at: Time.now)``
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
## Disable the Model & Migration
|
79
|
+
|
80
|
+
If you only need the app components other than models, the migrations should be neglected, and the models should not be loaded.
|
81
|
+
```ruby
|
82
|
+
# config/initializers/unidom.rb
|
83
|
+
Unidom::Common.configure do |options|
|
84
|
+
|
85
|
+
options[:neglected_namespaces] = %w{
|
86
|
+
Unidom::Standard
|
87
|
+
}
|
88
|
+
|
89
|
+
end
|
90
|
+
```
|
@@ -18,4 +18,4 @@ class Unidom::Standard::StandardAssociating < Unidom::Standard::ApplicationRecor
|
|
18
18
|
create! source_id: to_id(source), target_id: to_id(with), association_code: due_to, opened_at: at
|
19
19
|
end
|
20
20
|
|
21
|
-
end
|
21
|
+
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Standard::StandardAssociating'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-standard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
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-
|
11
|
+
date: 2017-01-22 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.
|
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.
|
26
|
+
version: '1.9'
|
27
27
|
description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
|
28
28
|
The Standard domain model engine includes Standard and Standard Association models.
|
29
29
|
Unidom (统一领域对象模型)是一系列的领域模型引擎。标准领域模型引擎包括标准和标准关联的模型。
|