unidom-action 1.14 → 1.15

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: 00be38e879790772148ea78cd87211957e1eef86
4
- data.tar.gz: e099cd5f0784bfcb4e96a515063a756c1368def9
3
+ metadata.gz: 83ce4fa8f3da91e3a5afa1ac24ea1ba9e917e641
4
+ data.tar.gz: 12249ab8a10d69d22534ba37cfae48c2d7a5768b
5
5
  SHA512:
6
- metadata.gz: 4a8687323776eb829cf0f80d2b4d9fdf08f84921771e72b01ec16312d3e124fa99221fd28eb80fe2453d1c15a7fba5152df08a354b7e329ae7fd3637e40e2e7f
7
- data.tar.gz: f9c9e0feccb6a50b6e8b6ad2e32c6dd18c704ede04a0c3461ced141324516a88ac3f592a747920b8f2077a68de4fb1915f2014a490a101d59c5134c8eb54e125
6
+ metadata.gz: e7ec58c24e75af51da24113bd7e4653c3c7b60202fd792eec88e429b841dfca0e2a427d39613a3b1b95f0ed1708b21a377a0778cbd0ffe9a9597e77d7026d569
7
+ data.tar.gz: dd8e30c3658b1948a1b0e5ed298a877199808f0c65bdcd8e4be73513423806dce3fb633d4fab96e1cec3a5ac1c06730767d03fa5433fc73393837448d8650ee9
data/README.md CHANGED
@@ -105,49 +105,63 @@ include Unidom::Action::Concerns::AsStateTransitorParty
105
105
 
106
106
  ### As Acted concern
107
107
 
108
- The As Acted concern do the following tasks for the includer automatically:
109
- 1. Define the has_many :actings macro as: ``has_many :actings, class_name: 'Unidom::Action::Acting', as: :acted``
110
- 2. Define the #is_acted! method as: ``is_acted!(from: nil, thru: nil, due_to: nil, by: nil, via: nil, at: Time.now, action_code: 'C')``
108
+ The As Acted concern do the following tasks for the includer automatically:
109
+ 1. Define the has_many :actings macro as: ``has_many :actings, class_name: 'Unidom::Action::Acting', as: :acted``
110
+
111
+ 2. Define the #is_acted! method as: ``is_acted!(from: nil, thru: nil, due_to: nil, by: nil, via: nil, at: Time.now, action_code: 'C')``
112
+
111
113
  3. Define the #is_acted? method as: ``is_acted?(due_to: nil, by: nil, via: nil, at: Time.now, action_code: 'C')``
112
114
 
113
115
  ### As Actor Party concern
114
116
 
115
- The As Actor Party concern do the following tasks for the includer automatically:
116
- 1. Define the has_many :acted_actings macro as: ``has_many :acted_actings, class_name: 'Unidom::Action::Acting', as: :actor_party``
117
- 2. Define the #act! method as: ``act!(on: nil, from: nil, thru: nil, due_to: nil, via: nil, at: Time.now, action_code: 'C')``
117
+ The As Actor Party concern do the following tasks for the includer automatically:
118
+ 1. Define the has_many :acted_actings macro as: ``has_many :acted_actings, class_name: 'Unidom::Action::Acting', as: :actor_party``
119
+
120
+ 2. Define the #act! method as: ``act!(on: nil, from: nil, thru: nil, due_to: nil, via: nil, at: Time.now, action_code: 'C')``
121
+
118
122
  3. Define the #act? method as: ``act?(on: nil, due_to: nil, via: nil, at: Time.now, action_code: 'C')``
119
123
 
120
124
  ### As Obsolesced concern
121
125
 
122
- The As Obsolesced concern do the following tasks for the includer automatically:
123
- 1. Define the has_many :obsolescings macro as: ``has_many :obsolescings, class_name: 'Unidom::Action::Obsolescing', as: :obsolesced``
124
- 2. Define the #is_obsolesced! method as: ``is_obsolesced!(obsolescence_code: 'OBSL', due_to: nil, via: nil, by: nil, at: Time.now)``
126
+ The As Obsolesced concern do the following tasks for the includer automatically:
127
+ 1. Define the has_many :obsolescings macro as: ``has_many :obsolescings, class_name: 'Unidom::Action::Obsolescing', as: :obsolesced``
128
+
129
+ 2. Define the #is_obsolesced! method as: ``is_obsolesced!(obsolescence_code: 'OBSL', due_to: nil, via: nil, by: nil, at: Time.now)``
130
+
125
131
  3. Define the #is_obsolesced? method as: ``is_obsolesced?(obsolescence_code: 'OBSL', due_to: nil, via: nil, by: nil, at: Time.now)``
126
132
 
127
133
  ### As Obsolescer Party concern
128
134
 
129
- The As Obsolescer Party concern do the following tasks for the includer automatically:
130
- 1. Define the has_many :obsolesced_obsolescings macro as: ``has_many :obsolesced_obsolescings, class_name: 'Unidom::Action::Obsolescing', as: :obsolescer_party``
131
- 2. Define the #obsolesce! method as: ``obsolesce!(it, obsolescence_code: 'OBSL', due_to: nil, via: nil, at: Time.now)``
135
+ The As Obsolescer Party concern do the following tasks for the includer automatically:
136
+ 1. Define the has_many :obsolesced_obsolescings macro as: ``has_many :obsolesced_obsolescings, class_name: 'Unidom::Action::Obsolescing', as: :obsolescer_party``
137
+
138
+ 2. Define the #obsolesce! method as: ``obsolesce!(it, obsolescence_code: 'OBSL', due_to: nil, via: nil, at: Time.now)``
139
+
132
140
  3. Define the #obsolesce? method as: ``obsolesce?(it, obsolescence_code: 'OBSL', due_to: nil, via: nil, at: Time.now)``
133
141
 
134
142
  ### As Searcher Party concern
135
143
 
136
- The As Searcher Party concern do the following tasks for the includer automatically:
137
- 1. Define the has_many :searched_searchings macro as: ``has_many :searched_searchings, class_name: 'Unidom::Action::Searching', as: :searcher_party``
144
+ The As Searcher Party concern do the following tasks for the includer automatically:
145
+ 1. Define the has_many :searched_searchings macro as: ``has_many :searched_searchings, class_name: 'Unidom::Action::Searching', as: :searcher_party``
146
+
147
+ 2. Define the #search! method as: ``search!(it, on: '', version: '1', per: {}, due_to: nil, via: nil, at: Time.now, displaying: 0, of_total: 0, on_current_page: 0, of_total_page: 0, per_page: 0)``
138
148
 
139
149
  ### As State Subject concern
140
150
 
141
- The As State Subject concern do the following tasks for the includer automatically:
142
- 1. Define the has_many :state_transitions macro as: ``has_many :state_transitions, class_name: 'Unidom::Action::StateTransition', as: :subject``
143
- 2. Define the #is_transited! method as: ``is_transited!(from: nil, thru: nil, due_to: nil, via: nil, by: nil, at: Time.now)``
151
+ The As State Subject concern do the following tasks for the includer automatically:
152
+ 1. Define the has_many :state_transitions macro as: ``has_many :state_transitions, class_name: 'Unidom::Action::StateTransition', as: :subject``
153
+
154
+ 2. Define the #is_transited! method as: ``is_transited!(from: nil, thru: nil, due_to: nil, via: nil, by: nil, at: Time.now)``
155
+
144
156
  3. Define the #is_transited? method as: ``is_transited?(from: nil, thru: nil, due_to: nil, via: nil, by: nil, at: Time.now)``
145
157
 
146
158
  ### As State Transitor Party concern
147
159
 
148
- The As State Transitor Party concern do the following tasks for the includer automatically:
149
- 1. Define the has_many :transited_state_transitions macro as: ``has_many :transited_state_transitions, class_name: 'Unidom::Action::StateTransition', as: :transitor_party``
150
- 2. Define the #transit! method as: ``transit!(it, from: nil, thru: nil, due_to: nil, via: nil, at: Time.now)``
160
+ The As State Transitor Party concern do the following tasks for the includer automatically:
161
+ 1. Define the has_many :transited_state_transitions macro as: ``has_many :transited_state_transitions, class_name: 'Unidom::Action::StateTransition', as: :transitor_party``
162
+
163
+ 2. Define the #transit! method as: ``transit!(it, from: nil, thru: nil, due_to: nil, via: nil, at: Time.now)``
164
+
151
165
  3. Define the #transit? method as: ``transit?(it, from: nil, thru: nil, due_to: nil, via: nil, at: Time.now)``
152
166
 
153
167
 
@@ -6,6 +6,24 @@ module Unidom::Action::Concerns::AsSearcherParty
6
6
 
7
7
  has_many :searched_searchings, class_name: 'Unidom::Action::Searching', as: :searcher_party
8
8
 
9
+ def search!(it, on: '', version: '1', per: {}, due_to: nil, via: nil, at: Time.now, displaying: 0, of_total: 0, on_current_page: 0, of_total_page: 0, per_page: 0)
10
+ searched_searchings.create! resource_name: it, platform_name: on, platform_version: version, criteria: per,
11
+ reason: due_to, searcher_visitor: via, opened_at: at,
12
+ shown_count: displaying, found_count: of_total, current_page: on_current_page, total_pages: of_total_page, per_page: per_page
13
+ end
14
+
15
+ =begin
16
+ def search?(it, on: '', version: '1', due_to: nil, at: Time.now)
17
+ query = searched_searchings
18
+ query = query.resource_name_is it if it.present?
19
+ query = query.platform_name_is on if on.present?
20
+ query = query.platform_version_is version if version.present?
21
+ query = query.caused_by due_to if due_to.present?
22
+ query = query.valid_at now: at if at.present?
23
+ query.alive.exists?
24
+ end
25
+ =end
26
+
9
27
  end
10
28
 
11
29
  module ClassMethods
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Action
3
- VERSION = '1.14'.freeze
3
+ VERSION = '1.15'.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.14'
4
+ version: '1.15'
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-12-24 00:00:00.000000000 Z
11
+ date: 2016-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common