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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e616b1c45ec60ec69bbd13ec315c19cf3ecc2a10
4
- data.tar.gz: af7eb47899e2707782119ed136cae02fd3c6846e
3
+ metadata.gz: 724d14777c030b6744562d1f1d9c8c9bf9a28392
4
+ data.tar.gz: 6738437a213e249009fe38cf456f5bd3e9103b4e
5
5
  SHA512:
6
- metadata.gz: 319e5f50d915c6f165c1ccc970f0917b36115d24b6280b21db8310204e5e60d9d288c6e9e0ae19660cda951d46bab16f19a35452fe16d438d8fdd4654da37d47
7
- data.tar.gz: 2f2113742c8131fc318940ab3ea341cdef83162bcccc8c61aa87ca3dcc585e7d03c5f267a07d81fdc0763b21936b52759dff6594e1883a7c09c2c89f00e696db
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.rdoc')
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
- Bundler::GemHelper.install_tasks
23
+ require 'bundler/gem_tasks'
24
24
 
@@ -0,0 +1,2 @@
1
+ //= link_directory ../javascripts/unidom/category .js
2
+ //= link_directory ../stylesheets/unidom/category .css
@@ -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 styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
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,2 +1,3 @@
1
1
  class Unidom::Category::ApplicationController < ActionController::Base
2
+ protect_from_forgery with: :exception
2
3
  end
@@ -0,0 +1,2 @@
1
+ class Unidom::Category::ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class Unidom::Category::ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class Unidom::Category::ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -1,6 +1,6 @@
1
1
  # Categorizing 是分类(category)和被分类项(categorized)之间的关联关系。
2
2
 
3
- class Unidom::Category::Categorizing < ActiveRecord::Base
3
+ class Unidom::Category::Categorizing < Unidom::Category::ApplicationRecord
4
4
 
5
5
  self.table_name = 'unidom_categorizings'
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Category 是分类。
2
2
 
3
- class Unidom::Category::Category < ActiveRecord::Base
3
+ class Unidom::Category::Category < Unidom::Category::ApplicationRecord
4
4
 
5
5
  self.table_name = 'unidom_categories'
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Category Rollup 是分类的层级关系。
2
2
 
3
- class Unidom::Category::CategoryRollup < ActiveRecord::Base
3
+ class Unidom::Category::CategoryRollup < Unidom::Category::ApplicationRecord
4
4
 
5
5
  self.table_name = 'unidom_category_rollups'
6
6
 
@@ -1,7 +1,7 @@
1
1
  # Category Scheme 是分类体系。
2
2
  # 所有者(owner)可以是系统(System)、标准(Standard)、或者某个参与者(Party,如:Person、Shop、Company)。
3
3
 
4
- class Unidom::Category::CategoryScheme < ActiveRecord::Base
4
+ class Unidom::Category::CategoryScheme < Unidom::Category::ApplicationRecord
5
5
 
6
6
  self.table_name = 'unidom_category_schemes'
7
7
 
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Category
3
- VERSION = '1.5'.freeze
3
+ VERSION = '1.5.1'.freeze
4
4
  end
5
5
  end
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: '1.5'
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-10-10 00:00:00.000000000 Z
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.0'
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.0'
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