unidom-action 1.2 → 1.3
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f31dd730a139d63444402e390d90935ff2934dd3
|
|
4
|
+
data.tar.gz: 105c820d1fa963af60906abc57b0614d51c44a22
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 86c6bbe0c122902a41fd0fedea688573fe247b3776c1dadf115e41e5ac6fdd0e9e67c3e7600b1670ee61e74dc093095ffd4a0aea9cb270b649b4de7d1c994405
|
|
7
|
+
data.tar.gz: 70c194d39972a46f018bfad14072d82aceb87efe2aeb7493449b98945aace1cb97b6c32a22c8fc620032583860715096a42ae7d6086809a713081f8a096f96e7
|
data/README.md
CHANGED
|
@@ -92,7 +92,8 @@ The As Actor Party concern do the following tasks for the includer automatically
|
|
|
92
92
|
|
|
93
93
|
The As Obsolesced concern do the following tasks for the includer automatically:
|
|
94
94
|
1. Define the has_many :obsolescings macro as: ``has_many :obsolescings, class_name: 'Unidom::Action::Obsolescing', as: :obsolesced``
|
|
95
|
-
2. Define the #is_obsolesced! method as: ``is_obsolesced!(obsolescence_code: 'OBSL', due_to: nil, via: nil, by: nil, at: Time.now)``
|
|
95
|
+
2. Define the #is_obsolesced! method as: ``is_obsolesced!(obsolescence_code: 'OBSL', due_to: nil, via: nil, by: nil, at: Time.now)``
|
|
96
|
+
3. Define the #is_obsolesced? method as: ``is_obsolesced?(obsolescence_code: 'OBSL', due_to: nil, via: nil, by: nil, at: Time.now)``
|
|
96
97
|
|
|
97
98
|
### As Obsolescer Party concern
|
|
98
99
|
|
|
@@ -103,6 +104,8 @@ The As Obsolescer Party concern do the following tasks for the includer automati
|
|
|
103
104
|
|
|
104
105
|
The As State Subject concern do the following tasks for the includer automatically:
|
|
105
106
|
1. Define the has_many :state_transitions macro as: ``has_many :state_transitions, class_name: 'Unidom::Action::StateTransition', as: :subject``
|
|
107
|
+
2. Define the #is_transited! method as: ``is_transited!(from: nil, thru: nil, due_to: nil, via: nil, by: nil, at: Time.now)``
|
|
108
|
+
3. Define the #is_transited? method as: ``is_transited?(from: nil, thru: nil, due_to: nil, via: nil, by: nil, at: Time.now)``
|
|
106
109
|
|
|
107
110
|
### As State Transitor Party concern
|
|
108
111
|
|
|
@@ -10,7 +10,6 @@ module Unidom::Action::Concerns::AsObsolesced
|
|
|
10
10
|
obsolescings.create! obsolescence_code: 'OBSL', obsolescer_visitor: via, obsolescer_party: by, reason: due_to, opened_at: at
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
=begin
|
|
14
13
|
def is_obsolesced?(obsolescence_code: 'OBSL', due_to: nil, via: nil, by: nil, at: Time.now)
|
|
15
14
|
query = obsolescings
|
|
16
15
|
query = query.obsolescence_coded_as obsolescence_code if obsolescence_code.present?
|
|
@@ -20,7 +19,6 @@ module Unidom::Action::Concerns::AsObsolesced
|
|
|
20
19
|
query = query.valid_at now: at if at.present?
|
|
21
20
|
query.exists?
|
|
22
21
|
end
|
|
23
|
-
=end
|
|
24
22
|
|
|
25
23
|
end
|
|
26
24
|
|
|
@@ -10,7 +10,6 @@ module Unidom::Action::Concerns::AsStateSubject
|
|
|
10
10
|
state_transitions.create! from_state: from, thru_state: thru, transitor_visitor: via, transitor_party: by, reason: due_to, opened_at: at
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
=begin
|
|
14
13
|
def is_transited?(from: nil, thru: nil, due_to: nil, via: nil, by: nil, at: Time.now)
|
|
15
14
|
query = state_transitions
|
|
16
15
|
query = query.from_transited_to from if from.present?
|
|
@@ -21,7 +20,6 @@ module Unidom::Action::Concerns::AsStateSubject
|
|
|
21
20
|
query = query.valid_at now: at if at.present?
|
|
22
21
|
query.exists?
|
|
23
22
|
end
|
|
24
|
-
=end
|
|
25
23
|
|
|
26
24
|
end
|
|
27
25
|
|
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.
|
|
4
|
+
version: '1.3'
|
|
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-
|
|
11
|
+
date: 2016-10-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: unidom-common
|