unidom-action 1.16.1 → 1.16.2

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: dceab399647d32266563e5ae17618b064992b22b
4
- data.tar.gz: 509d283d5e7570dc9f5c8944b35e2533edbbe667
3
+ metadata.gz: 59c0dced134d7ff5eb59e43fe6ea819f1f0c0096
4
+ data.tar.gz: 96e93259aa201f14fc7f803ee4f29bc642156a62
5
5
  SHA512:
6
- metadata.gz: 444b15b87e3c2a792dcf971804c220fddfcae9a1cc57d1618202808876f70a25104847b0adb81e39d570dcc9ca0b922c9a77b118577819a4205940d9692b872c
7
- data.tar.gz: 1d6096bd11eaabd0636692fd0a2854ed608a998e7ed57c58da85d2b27bd9c99058d547f1c2ae4ed4d9ae4458eefba0075e242ef4d941c84f30e88513adac6c98
6
+ metadata.gz: a5090806bb0faaf15644ff8117a876cfe910cd0dde6b9f22edc0025bc9f479cfbe1900b927b44e533601b3cdf675283c8b090c0943481bc4f5d2403f8e978124
7
+ data.tar.gz: be444d0e29d7e97384d655b64b41965b508e6cda279aec1200690951507a9110a92719ad41e0389603397dcd516b8c98a4ccf502204cb2b6dae0cba95f72f3e0
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Unidom Action 审计领域模型引擎
2
2
 
3
+ [![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/unidom-action/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-action.svg)](https://badge.fury.io/rb/unidom-action)
5
7
  [![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/unidom-action.svg)](https://gemnasium.com/github.com/topbitdu/unidom-action)
6
8
 
@@ -193,3 +195,19 @@ Unidom::Action::Action::INDEX
193
195
  Unidom::Action::Action::SHOW
194
196
  Unidom::Action::Action::UPDATE
195
197
  ```
198
+
199
+
200
+
201
+ ## Disable the Model & Migration
202
+
203
+ If you only need the app components other than models, the migrations should be neglected, and the models should not be loaded.
204
+ ```ruby
205
+ # config/initializers/unidom.rb
206
+ Unidom::Common.configure do |options|
207
+
208
+ options[:neglected_namespaces] = %w{
209
+ Unidom::Action
210
+ }
211
+
212
+ end
213
+ ```
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application controller 是模块内所有控制器的基类。
3
+
1
4
  class Unidom::Action::ApplicationController < ActionController::Base
2
5
  protect_from_forgery with: :exception
3
6
  end
@@ -1,2 +1,5 @@
1
+ ##
2
+ # Application job 是模块内所有异步任务的基类。
3
+
1
4
  class Unidom::Action::ApplicationJob < ActiveJob::Base
2
5
  end
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application mailer 是模块内所有电子邮件发送类的基类。
3
+
1
4
  class Unidom::Action::ApplicationMailer < ActionMailer::Base
2
5
  default from: 'from@example.com'
3
6
  layout 'mailer'
@@ -27,4 +27,4 @@ class Unidom::Action::Acting < Unidom::Action::ApplicationRecord
27
27
  create! from_value: from, thru_value: thru, actor_visitor: via, actor_party: by, acted: it, reason: due_to, action_code: action_code, opened_at: at
28
28
  end
29
29
 
30
- end
30
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Action::Acting'
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application record 是模块内所有模型的抽象基类。
3
+
1
4
  class Unidom::Action::ApplicationRecord < ActiveRecord::Base
2
5
  self.abstract_class = true
3
6
  end
@@ -27,4 +27,4 @@ class Unidom::Action::Obsolescing < Unidom::Action::ApplicationRecord
27
27
  create! obsolesced: obsolesced, obsolescer_visitor: obsolescer_visitor, obsolescer_party: obsolescer_party, reason: reason, obsolescence_code: obsolescence_code, opened_at: opened_at
28
28
  end
29
29
 
30
- end
30
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Action::Obsolescing'
@@ -10,4 +10,4 @@ class Unidom::Action::Reason < Unidom::Action::ApplicationRecord
10
10
 
11
11
  validates :name, presence: true, length: { in: 2..self.columns_hash['name'].limit }
12
12
 
13
- end
13
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Action::Reason'
@@ -39,4 +39,4 @@ class Unidom::Action::Searching < Unidom::Action::ApplicationRecord
39
39
  shown_count: displaying, found_count: of_total, current_page: on_current_page, total_pages: of_total_page, per_page: per_page
40
40
  end
41
41
 
42
- end
42
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Action::Searching'
@@ -23,4 +23,4 @@ class Unidom::Action::StateTransition < Unidom::Action::ApplicationRecord
23
23
  create! transitor_visitor: transitor_visitor, transitor_party: transitor_party, subject: subject, reason: reason, from_state: from_state, thru_state: thru_state, opened_at: opened_at
24
24
  end
25
25
 
26
- end
26
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Action::StateTransition'
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Action
3
- VERSION = '1.16.1'.freeze
3
+ VERSION = '1.16.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-action
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.1
4
+ version: 1.16.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-09 00:00:00.000000000 Z
11
+ date: 2017-01-26 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.8'
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.8'
26
+ version: '1.9'
27
27
  description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
28
28
  The Action domain model engine includes the Reason, State Transition, Obsolescene,
29
29
  and the Acting models. Unidom (统一领域对象模型)是一系列的领域模型引擎。审计领域模型引擎包括原因、状态迁移、废弃和行为日志的模型。