unidom-certificate 1.1 → 1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 59c1801b6a03f0ee8e7c04ea2bd1c58a11072674
4
- data.tar.gz: 5b1b47d9ee6303419b3a2161e46ed0d8429c19b2
3
+ metadata.gz: 6a66c87b266ff68c954c9773ec874d8893120a2c
4
+ data.tar.gz: 9679fbe27af91457f36f6af391fe6e266db526f4
5
5
  SHA512:
6
- metadata.gz: 5b8e65abb0589b461667a4a91a0470c00179a98111af544e73bb8d72d0ad705ef5122f12b5c1e48c7b6b20d8b82212df2964bcb220f3fd9f2028889bd52e1ed9
7
- data.tar.gz: 28fa725945612250691713e0cde253e0694989edddff01b34f2e6642ef86c7578cbb1f27ff65a52bd42a3590152b32d0289ff8192205be5ecdd12f0242ee52e5
6
+ metadata.gz: fdee54e471b085e050ac7aa6f06ec143e5570be45430bdfd798937926b69c1257f5c81cf192ad669c91917ab74aca8bb09ee3caaeb7f149eb5066af50451ea91
7
+ data.tar.gz: 8e3cd407411f64f8109f5183108d7909ea0527e2995cf5fc8106e7cd0d794fa7d65b1ce2c6adaa68c8090635fb7300c17580531b58856f2fd745089215379984
data/README.md CHANGED
@@ -38,7 +38,9 @@ include Unidom::Certificate::Concerns::AsCertification
38
38
  ### As Certificated concern
39
39
  The As Certificated concern do the following tasks for the includer automatically:
40
40
  1. Define the has_many :certificatings macro as: ``has_many :certificatings, class_name: 'Unidom::Certificate::Certificating', as: :certificated``
41
+ 2. Define the #is_certificated! method as: ``def is_certificated!(certification, by: nil, at: Time.now)``
41
42
 
42
43
  ### As Certification concern
43
44
  The As Certification concern do the following tasks for the includer automatically:
44
45
  1. Define the has_many :certificatings macro as: ``has_many :certificatings, class_name: 'Unidom::Certificate::Certificating', as: :certification``
46
+ 2. Define the #certificate! method as: ``def certificate!(certificated, by: nil, at: Time.now)``
@@ -6,6 +6,10 @@ module Unidom::Certificate::Concerns::AsCertificated
6
6
 
7
7
  has_many :certificatings, class_name: 'Unidom::Certificate::Certificating', as: :certificated
8
8
 
9
+ def is_certificated!(certification, by: nil, at: Time.now)
10
+ certificatings.create! certification: certification, certificator: by, opened_at: at
11
+ end
12
+
9
13
  end
10
14
 
11
15
  end
@@ -6,6 +6,10 @@ module Unidom::Certificate::Concerns::AsCertification
6
6
 
7
7
  has_many :certificatings, class_name: 'Unidom::Certificate::Certificating', as: :certification
8
8
 
9
+ def certificate!(certificated, by: nil, at: Time.now)
10
+ certificatings.create! certificated: certificated, certificator: by, opened_at: at
11
+ end
12
+
9
13
  end
10
14
 
11
15
  end
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Certificate
3
- VERSION = '1.1'.freeze
3
+ VERSION = '1.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-certificate
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.1'
4
+ version: '1.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: 2016-07-21 00:00:00.000000000 Z
11
+ date: 2016-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.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
26
  version: '0.9'
27
27
  description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.