unidom-requirement 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1502e1268b14aefee840e3db2a0fb8e30c290fb5
4
- data.tar.gz: 8376d0cc0ae3015d6951f9d7af3cf3da7d3f84e8
3
+ metadata.gz: 2a9357973b9e051311d66a533e69590d4f99722b
4
+ data.tar.gz: de9c9680ff51ece680bd412a57d8ba78855f848e
5
5
  SHA512:
6
- metadata.gz: 1277304d683448fcda5f60134b10dd5e7fb10a4a1af988109eaa9843dd52b58cfe7da0a27cec65ea8c7dab84606c91f35bb5d226926ec3c1d711e728de06aa06
7
- data.tar.gz: 000210ff098eb185116a3c4197bf6f206ec21ed8c14b9bab555eaa09beeb03f7ef8bec278c7f890a76bcb3df1cdd3ddd2b1cc9a10379e7cf4a36c93238622747
6
+ metadata.gz: ff0f7b8731861dee8f338962f4c4815b9429c4d9ffe42845e9690d5674a0f5edef4df376478513a2558922cd53d0a7eb2401eb199a3ba1a36651407d60236237
7
+ data.tar.gz: 140034e7dbc688a28f2fd0edacaf6f5ebe4eecdf002936f9bb6809dd55e06ad106598029ad0f6fad3a58d64bbf65d94c8cf072fb2af7425b03268d9f2c010bc3
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Unidom Requirement 需求领域模型引擎
2
2
 
3
+ [![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/unidom-requirement/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-requirement.svg)](https://badge.fury.io/rb/unidom-requirement)
5
7
  [![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/unidom-requirement.svg)](https://gemnasium.com/github.com/topbitdu/unidom-requirement)
6
8
 
@@ -39,3 +41,19 @@ The migration versions start with 200211.
39
41
  requirement = Unidom::Requirement::Requirement.create! superior_requirement: nil, requirer: person, facility: room, reason: reason, estimated_budget: 100, quantity: 10, required_on: Date.current
40
42
  # The #facility attribute could be nil.
41
43
  ```
44
+
45
+
46
+
47
+ ## Disable the Model & Migration
48
+
49
+ If you only need the app components other than models, the migrations should be neglected, and the models should not be loaded.
50
+ ```ruby
51
+ # config/initializers/unidom.rb
52
+ Unidom::Common.configure do |options|
53
+
54
+ options[:neglected_namespaces] = %w{
55
+ Unidom::Requirement
56
+ }
57
+
58
+ end
59
+ ```
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application controller 是模块内所有控制器的基类。
3
+
1
4
  class Unidom::Requirement::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::Requirement::ApplicationJob < ActiveJob::Base
2
5
  end
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application mailer 是模块内所有电子邮件发送类的基类。
3
+
1
4
  class Unidom::Requirement::ApplicationMailer < ActionMailer::Base
2
5
  default from: 'from@example.com'
3
6
  layout 'mailer'
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application record 是模块内所有模型的抽象基类。
3
+
1
4
  class Unidom::Requirement::ApplicationRecord < ActiveRecord::Base
2
5
  self.abstract_class = true
3
6
  end
@@ -23,4 +23,4 @@ class Unidom::Requirement::Requirement < Unidom::Requirement::ApplicationRecord
23
23
  scope :facility_is, ->(facility) { where facility: facility }
24
24
  scope :caused_by, ->(reason) { where reason: reason }
25
25
 
26
- end
26
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Requirement::Requirement'
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Requirement
3
- VERSION = '0.2.1'.freeze
3
+ VERSION = '0.2.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-requirement
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
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-05 00:00:00.000000000 Z
11
+ date: 2017-01-22 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 Requirement domain model engine includes the Requirement and the Order Requirement
29
29
  Commitment model. Unidom (统一领域对象模型)是一系列的领域模型引擎。需求领域模型引擎包括需求和订单需求委托的模型。