unidom-action 1.17.11 → 1.17.12

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: de8f2a642094e0e262ff38b71b20a41cabcb9993
4
- data.tar.gz: 1ba43eaf774be29deb1bd42b08aa455f5f429a4c
3
+ metadata.gz: 0b29999f3681ca306b2fe4f69bae7d55e128e0a7
4
+ data.tar.gz: 4413ac91f03d72e32039ad8e6e8f58d6009b92e9
5
5
  SHA512:
6
- metadata.gz: 53aba026e93db688c5984ab019e912154908a1bb6c26e3f45c18f26ece49a177e86539c6cd501cd5e3f6311ec9a6b9a34db7c3c45d8eda26ea0674e12a6ea02d
7
- data.tar.gz: 64d2054ddf594fd5c92720928a0f1c6196fad23003ba55f21cc3a0410127be85ba3f2b6ec350d45ab0873ac6e33c4609fe186a3fa5a521ddd224772f73c4010e
6
+ metadata.gz: 5afbb1c448ec18b487bdc93ad97eba451113276fc810562ba6a96a2f8ab026f96a80c5aa0249c9e6f3491c180e9192202a5123b4f58365b8bb1c93dea5df7187
7
+ data.tar.gz: 2bfa02dc38bb02c6f3c7d2062571f8e18496113ad6fc96f6e0664fd1cc9fa008217cd8f285165c60206a6ec2e8ac4ca9895411df21652e0c58f35eb0663a0775
data/README.md CHANGED
@@ -281,6 +281,14 @@ class YourObsolescerParty < ApplicationRecord
281
281
 
282
282
  end
283
283
 
284
+ # app/models/your_searcher_party.rb
285
+ class YourSearcherParty < ApplicationRecord
286
+
287
+ include Unidom::Common::Concerns::ModelExtension
288
+ include Unidom::Action::Concerns::AsSearcherParty
289
+
290
+ end
291
+
284
292
  # spec/support/unidom_rspec_shared_examples.rb
285
293
  require 'unidom/action/rspec_shared_examples'
286
294
 
@@ -337,5 +345,16 @@ describe YourObsolescerParty, type: :model do
337
345
 
338
346
  it_behaves_like 'Unidom::Action::Concerns::AsObsolescerParty', model_attribtues
339
347
 
348
+ end
349
+
350
+ # spec/models/your_searcher_party_spec.rb
351
+ describe YourSearcherParty, type: :model do
352
+
353
+ model_attribtues = {
354
+ your_attribute: 'your value'
355
+ }
356
+
357
+ it_behaves_like 'Unidom::Action::Concerns::AsSearcherParty', model_attribtues
358
+
340
359
  end
341
360
  ```
@@ -0,0 +1,39 @@
1
+ shared_examples 'Unidom::Action::Concerns::AsSearcherParty' do |model_attributes|
2
+
3
+ context do
4
+
5
+ searching_1_attributes = {
6
+ searcher_visitor_id: SecureRandom.uuid,
7
+ searcher_visitor_type: 'Unidom::Action::SearcherVisitor::Mock',
8
+ reason_id: SecureRandom.uuid,
9
+ resource_name: 'articles',
10
+ platform_name: 'customer',
11
+ platform_version: 1,
12
+ criteria: { keyword: 'Title' },
13
+ found_count: 18,
14
+ shown_count: 10,
15
+ per_page: 10,
16
+ total_pages: 2,
17
+ current_page: 1
18
+ }
19
+
20
+ searching_2_attributes = {
21
+ searcher_visitor_id: SecureRandom.uuid,
22
+ searcher_visitor_type: 'Unidom::Action::SearcherVisitor::Mock',
23
+ reason_id: SecureRandom.uuid,
24
+ resource_name: 'comments',
25
+ platform_name: 'administration',
26
+ platform_version: 2,
27
+ criteria: { keyword: 'Comment' },
28
+ found_count: 28,
29
+ shown_count: 8,
30
+ per_page: 10,
31
+ total_pages: 3,
32
+ current_page: 3
33
+ }
34
+
35
+ it_behaves_like 'has_many', model_attributes, :searched_searchings, Unidom::Action::Searching, [ searching_1_attributes, searching_2_attributes ]
36
+
37
+ end
38
+
39
+ end
@@ -3,3 +3,4 @@ require 'rspec/models/unidom/action/concerns/as_actor_party_shared_examples'
3
3
  require 'rspec/models/unidom/action/concerns/as_caused_shared_examples'
4
4
  require 'rspec/models/unidom/action/concerns/as_obsolesced_shared_examples'
5
5
  require 'rspec/models/unidom/action/concerns/as_obsolescer_party_shared_examples'
6
+ require 'rspec/models/unidom/action/concerns/as_searcher_party_shared_examples'
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Action
3
- VERSION = '1.17.11'.freeze
3
+ VERSION = '1.17.12'.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.17.11
4
+ version: 1.17.12
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-04-14 00:00:00.000000000 Z
11
+ date: 2017-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common
@@ -74,6 +74,7 @@ files:
74
74
  - lib/rspec/models/unidom/action/concerns/as_caused_shared_examples.rb
75
75
  - lib/rspec/models/unidom/action/concerns/as_obsolesced_shared_examples.rb
76
76
  - lib/rspec/models/unidom/action/concerns/as_obsolescer_party_shared_examples.rb
77
+ - lib/rspec/models/unidom/action/concerns/as_searcher_party_shared_examples.rb
77
78
  - lib/rspec/models/unidom/action/obsolescing_spec.rb
78
79
  - lib/rspec/models/unidom/action/reason_spec.rb
79
80
  - lib/rspec/models/unidom/action/searching_spec.rb