unidom-dictionary 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -1
- data/app/controllers/unidom/dictionary/application_controller.rb +3 -0
- data/app/jobs/unidom/dictionary/application_job.rb +3 -0
- data/app/mailers/unidom/dictionary/application_mailer.rb +3 -0
- data/app/models/unidom/dictionary/application_record.rb +3 -0
- data/app/models/unidom/dictionary/dictionary_item.rb +1 -1
- data/lib/unidom/dictionary/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: 78e95e4693a58be14dc8bea5e10037440e60b892
|
4
|
+
data.tar.gz: 3c4b6151219850d5df4a2c6970ceaa0bf8f14d67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fb5cf4defcd72fb4e030bb8444507e20ca96c50e03eb95e5983dbda3fce5ec646269ec7e01f938b3673a82c3370fe377c107da792965f8cd71bdce1a97b6459
|
7
|
+
data.tar.gz: d82bd5c408dd189cb52ddafb08935819d3c6c5dab992301c06e49d0601f840febca18ceae45bc717cd50a525d0fa75152afe5149a561a2b82cb62086ccbad3ea
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Unidom Dictionary 字典领域模型引擎
|
2
2
|
|
3
|
+
[![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/unidom-dictionary/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-dictionary.svg)](https://badge.fury.io/rb/unidom-dictionary)
|
5
7
|
[![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/unidom-dictionary.svg)](https://gemnasium.com/github.com/topbitdu/unidom-dictionary)
|
6
8
|
|
@@ -45,5 +47,21 @@ social = Unidom::Dictionary::DictionaryItem.create! attributes.merge({
|
|
45
47
|
intellectual = Unidom::Dictionary::DictionaryItem.create! attributes.merge({ code: 'INTL', value: 'Intellectual' })
|
46
48
|
spiritual = Unidom::Dictionary::DictionaryItem.create! attributes.merge({ code: 'SPRT', value: 'Spiritual' })
|
47
49
|
emotional = Unidom::Dictionary::DictionaryItem.create! attributes.merge({ code: 'EMTN', value: 'Emotional' })
|
48
|
-
# The #code attribtue could be nil.
|
50
|
+
# The #code attribtue could be nil.
|
51
|
+
```
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
## Disable the Model & Migration
|
56
|
+
|
57
|
+
If you only need the app components other than models, the migrations should be neglected, and the models should not be loaded.
|
58
|
+
```ruby
|
59
|
+
# config/initializers/unidom.rb
|
60
|
+
Unidom::Common.configure do |options|
|
61
|
+
|
62
|
+
options[:neglected_namespaces] = %w{
|
63
|
+
Unidom::Dictionary
|
64
|
+
}
|
65
|
+
|
66
|
+
end
|
49
67
|
```
|
@@ -10,4 +10,4 @@ class Unidom::Dictionary::DictionaryItem < Unidom::Dictionary::ApplicationRecord
|
|
10
10
|
validates :code, allow_blank: true, length: { in: 1..self.columns_hash['code'].limit }
|
11
11
|
validates :value, presence: true, length: { in: 2..self.columns_hash['value'].limit }
|
12
12
|
|
13
|
-
end
|
13
|
+
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Dictionary::DictionaryItem'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-dictionary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.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: 2017-01-
|
11
|
+
date: 2017-01-20 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 Dictionary domain model engine includes the Dictionary Item model and its relative
|
29
29
|
models. Unidom (统一领域对象模型)是一系列的领域模型引擎。字典领域模型引擎包括字典项和与其相关的模型。
|