unidom-standard 1.3 → 1.3.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: 113814c02dc233f2dbc19941603bdb6e019eb813
4
- data.tar.gz: 1f56fead8bc694f3598b67386e8d882fd7ab3a8b
3
+ metadata.gz: 85f992b53cec373476c703577b2181174cf3ba0c
4
+ data.tar.gz: 7240aa8dede3eb0fecd781f791126259a2b50e90
5
5
  SHA512:
6
- metadata.gz: 54c9fb53ed175c40e27eecc15fa7310de10694ac2a36c265a912b5ee5070f36fec191849582ab309b957df13f22748098ffa38036df9e2ed661093b4a8a7478b
7
- data.tar.gz: 4c16e96fce26a1059e5c944db31af668b3c5f67986196f8aadd158c358cc53765212de49d851f38c9995bc250ca911652d9e910227117986d0215cdaf64b30d4
6
+ metadata.gz: 21c957e2c03fa777b660b692c5976356cbbd8c80f6051125e361a4f6e1a009b0c30c9370c61f259bdb8710963af5ce083e9f58f85cfff2ee10446efb0a646fcd
7
+ data.tar.gz: ffd0a3a77c3b3e47a6bfb85b95f70e076355720383eb64191650a4fc93c8f9940ec332df2474dea01949ddcdcca0759804f596c40b8abfb284494000c1152ee4
data/README.md CHANGED
@@ -2,26 +2,39 @@
2
2
 
3
3
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)
4
4
  [![Gem Version](https://badge.fury.io/rb/unidom-standard.svg)](https://badge.fury.io/rb/unidom-standard)
5
+ [![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/unidom-standard.svg)](https://gemnasium.com/github.com/topbitdu/unidom-standard)
5
6
 
6
7
  Unidom (UNIfied Domain Object Model) is a series of domain model engines. The Standard domain model engine includes the Standard and Standard Association models.
7
8
  Unidom (统一领域对象模型)是一系列的领域模型引擎。标准领域模型引擎包括标准和标准关联的模型。
8
9
 
10
+
11
+
9
12
  ## Recent Update
13
+
10
14
  Check out the [Road Map](ROADMAP.md) to find out what's the next.
11
15
  Check out the [Change Log](CHANGELOG.md) to find out what's new.
12
16
 
17
+
18
+
13
19
  ## Usage in Gemfile
20
+
14
21
  ```ruby
15
22
  gem 'unidom-standard'
16
23
  ```
17
24
 
25
+
26
+
18
27
  ## Run the Database Migration
28
+
19
29
  ```shell
20
30
  rake db:migrate
21
31
  ```
22
32
  The migration versions start with 200006.
23
33
 
34
+
35
+
24
36
  ## Call the Model
37
+
25
38
  ```ruby
26
39
  gbk = Unidom::Standard::Standard.number_is('GBK').first
27
40
  gbk.source_standards.merge(Unidom::Standard::StandardAssociating.association_coded_as('REVS').valid_at.alive).valid_at.alive
@@ -36,21 +49,24 @@ Unidom::Standard::StandardAssociating.associate! gbk, with: gb2312, due_to: 'REV
36
49
 
37
50
 
38
51
  ## Inlcude the Concerns
52
+
39
53
  ```ruby
40
54
  include Unidom::Standard::Concerns::AsSourceStandard
41
55
  include Unidom::Standard::Concerns::AsTargetStandard
42
56
  ```
43
57
 
44
58
  ### As Source Standard concern
59
+
45
60
  The As Source Standard concern do the following tasks for the includer automatically:
46
- 1. Define the has_many :target_associatings macro as: ``has_many :target_associatings, class_name: 'Unidom::Standard::StandardAssociating', foreign_key: :source_id``
47
- 2. Define the has_many :target_standards macro as: ``has_many :target_standards, through: :target_associatings, source: :target``
48
- 3. Define the #associate! method as: ``associate!(target, due_to: 'REVS', at: Time.now)``
61
+ 1. Define the has_many :target_associatings macro as: ``has_many :target_associatings, class_name: 'Unidom::Standard::StandardAssociating', foreign_key: :source_id``
62
+ 2. Define the has_many :target_standards macro as: ``has_many :target_standards, through: :target_associatings, source: :target``
63
+ 3. Define the #associate! method as: ``associate!(target, due_to: 'REVS', at: Time.now)``
49
64
  4. Define the #associate? method as: ``associate?(target, due_to: 'REVS', at: Time.now)``
50
65
 
51
66
  ### As Target Standard concern
67
+
52
68
  The As Target Standard concern do the following tasks for the includer automatically:
53
- 1. Define the has_many :source_associatings macro as: ``has_many :source_associatings, class_name: 'Unidom::Standard::StandardAssociating', foreign_key: :target_id``
54
- 2. Define the has_many :source_standards macro as: ``has_many :source_standards, through: :source_associatings, source: :source``
55
- 3. Define the #is_associated! method as: ``is_associated!(source, due_to: 'REVS', at: Time.now)``
69
+ 1. Define the has_many :source_associatings macro as: ``has_many :source_associatings, class_name: 'Unidom::Standard::StandardAssociating', foreign_key: :target_id``
70
+ 2. Define the has_many :source_standards macro as: ``has_many :source_standards, through: :source_associatings, source: :source``
71
+ 3. Define the #is_associated! method as: ``is_associated!(source, due_to: 'REVS', at: Time.now)``
56
72
  4. Define the #is_associated? method as: ``is_associated?(source, due_to: 'REVS', at: Time.now)``
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
10
10
  rdoc.rdoc_dir = 'rdoc'
11
11
  rdoc.title = 'Unidom Standard'
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/standard .js
2
+ //= link_directory ../stylesheets/unidom/standard .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::Standard::ApplicationController < ActionController::Base
2
+ protect_from_forgery with: :exception
2
3
  end
@@ -0,0 +1,2 @@
1
+ class Unidom::Standard::ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class Unidom::Standard::ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class Unidom::Standard::ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -7,7 +7,7 @@
7
7
  # Revised by: ISO/NP 9004
8
8
  # Revises: ISO 9004:2000
9
9
 
10
- class Unidom::Standard::Standard < ActiveRecord::Base
10
+ class Unidom::Standard::Standard < Unidom::Standard::ApplicationRecord
11
11
 
12
12
  self.table_name = 'unidom_standards'
13
13
 
@@ -1,6 +1,6 @@
1
1
  # Standard Association 是标准之间的关联关系。
2
2
  # association_code: REVS 修订,RFRC 引用。
3
- class Unidom::Standard::StandardAssociating < ActiveRecord::Base
3
+ class Unidom::Standard::StandardAssociating < Unidom::Standard::ApplicationRecord
4
4
 
5
5
  self.table_name = 'unidom_standard_associatings'
6
6
 
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Standard
3
- VERSION = '1.3'.freeze
3
+ VERSION = '1.3.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-standard
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.3'
4
+ version: 1.3.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-09-26 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 Standard domain model engine includes Standard and Standard Association models.
29
29
  Unidom (统一领域对象模型)是一系列的领域模型引擎。标准领域模型引擎包括标准和标准关联的模型。
@@ -36,10 +36,14 @@ files:
36
36
  - MIT-LICENSE
37
37
  - README.md
38
38
  - Rakefile
39
+ - app/assets/config/unidom-standard_manifest.js
39
40
  - app/assets/javascripts/unidom/standard/application.js
40
41
  - app/assets/stylesheets/unidom/standard/application.css
41
42
  - app/controllers/unidom/standard/application_controller.rb
42
43
  - app/helpers/unidom/standard/application_helper.rb
44
+ - app/jobs/unidom/standard/application_job.rb
45
+ - app/mailers/unidom/standard/application_mailer.rb
46
+ - app/models/unidom/standard/application_record.rb
43
47
  - app/models/unidom/standard/concerns/as_source_standard.rb
44
48
  - app/models/unidom/standard/concerns/as_target_standard.rb
45
49
  - app/models/unidom/standard/standard.rb