unidom-party 1.7.2 → 1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -0
- data/app/types/unidom/party/gender.rb +7 -0
- data/config/enum.yml +13 -0
- data/config/locales/enum.zh-CN.yml +10 -0
- data/lib/unidom/party/engine.rb +6 -0
- data/lib/unidom/party/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f97dc47c14f77777321e2d260be44647f441b5e
|
4
|
+
data.tar.gz: d9d74b9229ad412ffb94fe2752fce6dae223bd0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e48cd2709b2f595b3ccb2952be27841919ce0376fc8e83d1f9bad457deab9327001854e885e12afa5e969c5fb3d1801b762de222c5f74a53c6a1831f3d5de05b
|
7
|
+
data.tar.gz: d4ef7f2652c482d565bb58a1222e4c3b845bf39f646fe3706ea76a7aae6986f7363dc06f1042862bb9b56d7380d43c42773c5b50bf39fdbb6c29db036c324a7f
|
data/README.md
CHANGED
@@ -97,3 +97,18 @@ The As Collaborator concern do the following tasks for the includer automaticall
|
|
97
97
|
1. Define the has_many :collaboratings macro as: ``has_many :collaboratings, class_name: 'Unidom::Party::Collaborating', as: :collaborator``
|
98
98
|
2. Define the #collaborate! method as: ``collaborate!(on: nil, as: nil, at: Time.now, name: nil, priority: 0, grade: 0)``
|
99
99
|
3. Define the #collaborate? method as: ``collaborate?(on: nil, as: nil, at: Time.now, priority: 0, grade: 0)``
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
## Enum codes
|
104
|
+
|
105
|
+
### Gender enum code
|
106
|
+
|
107
|
+
```ruby
|
108
|
+
# http://en.wikipedia.org/wiki/ISO/IEC_5218
|
109
|
+
# ISO 5218, GB/T 2261-1980
|
110
|
+
Unidom::Party::Gender::NOT_KNOWN
|
111
|
+
Unidom::Party::Gender::MALE
|
112
|
+
Unidom::Party::Gender::FEMALE
|
113
|
+
Unidom::Party::Gender::NOT_APPLICABLE
|
114
|
+
```
|
data/config/enum.yml
ADDED
data/lib/unidom/party/engine.rb
CHANGED
@@ -1,9 +1,15 @@
|
|
1
|
+
require 'unidom/common/yaml_helper'
|
2
|
+
|
1
3
|
module Unidom
|
2
4
|
module Party
|
3
5
|
class Engine < ::Rails::Engine
|
4
6
|
|
5
7
|
isolate_namespace ::Unidom::Party
|
6
8
|
|
9
|
+
initializer :load_config_initializers do |app|
|
10
|
+
Unidom::Common::YamlHelper.load_enum config: app.config, root: config.root
|
11
|
+
end
|
12
|
+
|
7
13
|
initializer :append_migrations do |app|
|
8
14
|
config.paths['db/migrate'].expanded.each { |expanded_path| app.config.paths['db/migrate'] << expanded_path } unless app.root.to_s.match root.to_s
|
9
15
|
end
|
data/lib/unidom/party/version.rb
CHANGED
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.
|
4
|
+
version: '1.8'
|
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-11-
|
11
|
+
date: 2016-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
@@ -54,7 +54,10 @@ files:
|
|
54
54
|
- app/models/unidom/party/party_relation.rb
|
55
55
|
- app/models/unidom/party/person.rb
|
56
56
|
- app/models/unidom/party/shop.rb
|
57
|
+
- app/types/unidom/party/gender.rb
|
57
58
|
- app/views/layouts/unidom/party/application.html.erb
|
59
|
+
- config/enum.yml
|
60
|
+
- config/locales/enum.zh-CN.yml
|
58
61
|
- config/routes.rb
|
59
62
|
- db/migrate/20010101000000_create_unidom_party_relations.rb
|
60
63
|
- db/migrate/20010102000000_create_unidom_people.rb
|