unidom-category 1.5 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -11
- data/Rakefile +2 -2
- data/app/assets/config/unidom-category_manifest.js +2 -0
- data/app/assets/javascripts/unidom/category/application.js +1 -1
- data/app/assets/stylesheets/unidom/category/application.css +3 -3
- data/app/controllers/unidom/category/application_controller.rb +1 -0
- data/app/jobs/unidom/category/application_job.rb +2 -0
- data/app/mailers/unidom/category/application_mailer.rb +4 -0
- data/app/models/unidom/category/application_record.rb +3 -0
- data/app/models/unidom/category/categorizing.rb +1 -1
- data/app/models/unidom/category/category.rb +1 -1
- data/app/models/unidom/category/category_rollup.rb +1 -1
- data/app/models/unidom/category/category_scheme.rb +1 -1
- data/lib/unidom/category/version.rb +1 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 724d14777c030b6744562d1f1d9c8c9bf9a28392
|
4
|
+
data.tar.gz: 6738437a213e249009fe38cf456f5bd3e9103b4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1039c54b97bb552af895c039945ceba870f709f433cf0e38274f48e59fb5b4219261963453c5d1aad07a2f31dc716ae3b08b4d60405333cff4b0bf7b39070387
|
7
|
+
data.tar.gz: a882182a4d6145184746d072089ffd135fe69b626772e5742ab8f5c1ed43c29691a1b562c3b4d2d54838b27f14191f620a58c30334369e1b5efea38f4482ec3d
|
data/README.md
CHANGED
@@ -59,30 +59,30 @@ include Unidom::Category::Concerns::AsDescendantCategory
|
|
59
59
|
### As Category concern
|
60
60
|
|
61
61
|
The As Category concern do the following tasks for the includer automatically:
|
62
|
-
1. Define the has_many :categorizings macro as: ``has_many :categorizings, class_name: 'Category::Categorizing'``
|
63
|
-
2. Define the #categorize! method as: ``categorize!(categorized, at: Time.now, primary: true)``
|
62
|
+
1. Define the has_many :categorizings macro as: ``has_many :categorizings, class_name: 'Category::Categorizing'``
|
63
|
+
2. Define the #categorize! method as: ``categorize!(categorized, at: Time.now, primary: true)``
|
64
64
|
3. Define the #categorize? method as: ``categorize?(categorized, at: Time.now, primary: true)``
|
65
65
|
|
66
66
|
### As Categorized concern
|
67
67
|
|
68
68
|
The As Categorized concern do the following tasks for the includer automatically:
|
69
|
-
1. Define the has_many :categorizings macro as: ``has_many :categorizings, class_name: 'Unidom::Category::Categorizing', as: :categorized``
|
70
|
-
2. Define the has_many :categories macro as: ``has_many :categories, through: :categorizings, source: :category``
|
71
|
-
3. Define the #is_categorized! method as: ``is_categorized!(into: nil, at: Time.now, primary: true)``
|
69
|
+
1. Define the has_many :categorizings macro as: ``has_many :categorizings, class_name: 'Unidom::Category::Categorizing', as: :categorized``
|
70
|
+
2. Define the has_many :categories macro as: ``has_many :categories, through: :categorizings, source: :category``
|
71
|
+
3. Define the #is_categorized! method as: ``is_categorized!(into: nil, at: Time.now, primary: true)``
|
72
72
|
4. Define the #is_categorized? method as: ``is_categorized?(into: nil, at: Time.now, primary: true)``
|
73
73
|
|
74
74
|
### As Ancestor Category concern
|
75
75
|
|
76
76
|
The As Ancestor Category concern do the following tasks for the includer automatically:
|
77
|
-
1. Define the has_many :descendant_category_rollups macro as: ``has_many :descendant_category_rollups, class_name: 'Unidom::Category::CategoryRollup', foreign_key: :ancestor_category_id, source: :ancestor_category``
|
78
|
-
2. Define the has_many :descendant_categories macro as: ``has_many :descendant_categories, class_name: 'Unidom::Category::Category', through: :descendant_category_rollups``
|
79
|
-
3. Define the #roll_up! method as: ``roll_up!(it, at: Time.now, primary: true)``
|
77
|
+
1. Define the has_many :descendant_category_rollups macro as: ``has_many :descendant_category_rollups, class_name: 'Unidom::Category::CategoryRollup', foreign_key: :ancestor_category_id, source: :ancestor_category``
|
78
|
+
2. Define the has_many :descendant_categories macro as: ``has_many :descendant_categories, class_name: 'Unidom::Category::Category', through: :descendant_category_rollups``
|
79
|
+
3. Define the #roll_up! method as: ``roll_up!(it, at: Time.now, primary: true)``
|
80
80
|
4. Define the #roll_up? method as: ``roll_up?(it, at: Time.now, primary: true)``
|
81
81
|
|
82
82
|
### As Descendant Category concern
|
83
83
|
|
84
84
|
The As Descendant Category concern do the following tasks for the includer automatically:
|
85
|
-
1. Define the has_many :ancestor_category_rollups macro as: ``has_many :ancestor_category_rollups, class_name: 'Unidom::Category::CategoryRollup', foreign_key: :descendant_category_id, source: :descendant_category``
|
86
|
-
2. Define the has_many :ancestor_categories macro as: ``has_many :ancestor_categories, class_name: 'Unidom::Category::Category', through: :ancestor_category_rollups``
|
87
|
-
3. Define the #is_rolled_up! as: ``is_rolled_up!(it, at: Time.now, primary: true)``
|
85
|
+
1. Define the has_many :ancestor_category_rollups macro as: ``has_many :ancestor_category_rollups, class_name: 'Unidom::Category::CategoryRollup', foreign_key: :descendant_category_id, source: :descendant_category``
|
86
|
+
2. Define the has_many :ancestor_categories macro as: ``has_many :ancestor_categories, class_name: 'Unidom::Category::Category', through: :ancestor_category_rollups``
|
87
|
+
3. Define the #is_rolled_up! as: ``is_rolled_up!(it, at: Time.now, primary: true)``
|
88
88
|
4. Define the #is_rolled_up? as: ``is_rolled_up?(it, at: Time.now, primary: true)``
|
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
10
10
|
rdoc.rdoc_dir = 'rdoc'
|
11
11
|
rdoc.title = 'Unidom Category'
|
12
12
|
rdoc.options << '--line-numbers'
|
13
|
-
rdoc.rdoc_files.include('README.
|
13
|
+
rdoc.rdoc_files.include('README.md')
|
14
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
15
|
end
|
16
16
|
|
@@ -20,5 +20,5 @@ load 'rails/tasks/statistics.rake'
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
-
|
23
|
+
require 'bundler/gem_tasks'
|
24
24
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
6
|
//
|
7
7
|
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
8
|
+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
9
9
|
//
|
10
10
|
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
11
|
// about supported directives.
|
@@ -6,9 +6,9 @@
|
|
6
6
|
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
7
|
*
|
8
8
|
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any
|
10
|
-
*
|
11
|
-
* file per style scope.
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
+
* It is generally better to create a new file per style scope.
|
12
12
|
*
|
13
13
|
*= require_self
|
14
14
|
*/
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Category Scheme 是分类体系。
|
2
2
|
# 所有者(owner)可以是系统(System)、标准(Standard)、或者某个参与者(Party,如:Person、Shop、Company)。
|
3
3
|
|
4
|
-
class Unidom::Category::CategoryScheme <
|
4
|
+
class Unidom::Category::CategoryScheme < Unidom::Category::ApplicationRecord
|
5
5
|
|
6
6
|
self.table_name = 'unidom_category_schemes'
|
7
7
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-category
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.5.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-
|
11
|
+
date: 2016-11-03 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.6'
|
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.6'
|
27
27
|
description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
|
28
28
|
The Category domain model engine includes Category and its relative models. Unidom
|
29
29
|
(统一领域对象模型)是一系列的领域模型引擎。类别领域模型引擎包括类别及其相关的模型。
|
@@ -36,10 +36,14 @@ files:
|
|
36
36
|
- MIT-LICENSE
|
37
37
|
- README.md
|
38
38
|
- Rakefile
|
39
|
+
- app/assets/config/unidom-category_manifest.js
|
39
40
|
- app/assets/javascripts/unidom/category/application.js
|
40
41
|
- app/assets/stylesheets/unidom/category/application.css
|
41
42
|
- app/controllers/unidom/category/application_controller.rb
|
42
43
|
- app/helpers/unidom/category/application_helper.rb
|
44
|
+
- app/jobs/unidom/category/application_job.rb
|
45
|
+
- app/mailers/unidom/category/application_mailer.rb
|
46
|
+
- app/models/unidom/category/application_record.rb
|
43
47
|
- app/models/unidom/category/categorizing.rb
|
44
48
|
- app/models/unidom/category/category.rb
|
45
49
|
- app/models/unidom/category/category_rollup.rb
|