unidom-action 1.17.13 → 1.17.14

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: c538a071370f0477b02a6632a1fd990b1ede3dc7
4
- data.tar.gz: d9fd30627b99860e8428dafec8edac29d6f1ae8e
3
+ metadata.gz: f3f4165951d3986f3775d8e53c320306c2e2ecff
4
+ data.tar.gz: 4c894d4d7295ddb52a4f62e1ad17c4b1a479f396
5
5
  SHA512:
6
- metadata.gz: 0fcf367babbfa792c4070c2ab1a87e05b49ebcb9aaf58634fa04887a899070ca40b9908f22e89e380660e6d418cc6c15e1ffac3b95934716e93cdc108032b2c8
7
- data.tar.gz: a567cde908bbbe79e9cdb319373c7eda6f4493a48e8e396446fc0af88906ff6fb94e811a1faa045b75b81c9a568770040ea721e7e1256234e5192f708e35451c
6
+ metadata.gz: dac4017e523458495eb83f9242a0c6152540bdbcc4d3c24ef13d0070da20cfe74189467ec3bfbdd08063513cb1cc78394b0ff8d81dd03a305e6508352e162a8a
7
+ data.tar.gz: 5a94fc83e258f2b042a01e3612ce58e55de0d18015faf3b42f68c46c6497fc7dd066cdbd918c2ce5c12cc330b00037db5866a67d41f66bcc368af55e095280d2
data/README.md CHANGED
@@ -289,7 +289,7 @@ class YourSearcherParty < ApplicationRecord
289
289
 
290
290
  end
291
291
 
292
- # app/models/your_as_state_subject.rb
292
+ # app/models/your_state_subject.rb
293
293
  class YourStateSubject < ApplicationRecord
294
294
 
295
295
  include Unidom::Common::Concerns::ModelExtension
@@ -297,6 +297,14 @@ class YourStateSubject < ApplicationRecord
297
297
 
298
298
  end
299
299
 
300
+ # app/models/your_state_transitor_party.rb
301
+ class YourStateTransitorParty < ApplicationRecord
302
+
303
+ include Unidom::Common::Concerns::ModelExtension
304
+ include Unidom::Action::Concerns::AsStateTransitorParty
305
+
306
+ end
307
+
300
308
  # spec/support/unidom_rspec_shared_examples.rb
301
309
  require 'unidom/action/rspec_shared_examples'
302
310
 
@@ -365,7 +373,7 @@ describe YourSearcherParty, type: :model do
365
373
  it_behaves_like 'Unidom::Action::Concerns::AsSearcherParty', model_attribtues
366
374
 
367
375
  end
368
- ```
376
+
369
377
  # spec/models/your_state_subject_spec.rb
370
378
  describe YourStateSubject, type: :model do
371
379
 
@@ -375,5 +383,16 @@ describe YourStateSubject, type: :model do
375
383
 
376
384
  it_behaves_like 'Unidom::Action::Concerns::AsStateSubject', model_attribtues
377
385
 
386
+ end
387
+
388
+ # spec/models/your_state_transitor_party_spec.rb
389
+ describe YourAsStateTransitorParty, type: :model do
390
+
391
+ model_attribtues = {
392
+ your_attribute: 'your value'
393
+ }
394
+
395
+ it_behaves_like 'Unidom::Action::Concerns::YourAsStateTransitorParty', model_attribtues
396
+
378
397
  end
379
398
  ```
@@ -0,0 +1,29 @@
1
+ shared_examples 'Unidom::Action::Concerns::AsStateTransitorParty' do |model_attributes|
2
+
3
+ context do
4
+
5
+ state_transition_1_attributes = {
6
+ subject_id: SecureRandom.uuid,
7
+ subject_type: 'Unidom::Action::Subject::Mock',
8
+ transitor_visitor_id: SecureRandom.uuid,
9
+ transitor_visitor_type: 'Unidom::Action::TransitorVisitor::Mock',
10
+ reason_id: SecureRandom.uuid,
11
+ from_state: 'A',
12
+ thru_state: 'B'
13
+ }
14
+
15
+ state_transition_2_attributes = {
16
+ subject_id: SecureRandom.uuid,
17
+ subject_type: 'Unidom::Action::Subject::Mock',
18
+ transitor_visitor_id: SecureRandom.uuid,
19
+ transitor_visitor_type: 'Unidom::Action::TransitorVisitor::Mock',
20
+ reason_id: SecureRandom.uuid,
21
+ from_state: 'C',
22
+ thru_state: 'D'
23
+ }
24
+
25
+ it_behaves_like 'has_many', model_attributes, :transited_state_transitions, Unidom::Action::StateTransition, [ state_transition_1_attributes, state_transition_2_attributes ]
26
+
27
+ end
28
+
29
+ end
@@ -5,3 +5,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
6
  require 'rspec/models/unidom/action/concerns/as_searcher_party_shared_examples'
7
7
  require 'rspec/models/unidom/action/concerns/as_state_subject_shared_examples'
8
+ require 'rspec/models/unidom/action/concerns/as_state_transitor_party_shared_examples'
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Action
3
- VERSION = '1.17.13'.freeze
3
+ VERSION = '1.17.14'.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.13
4
+ version: 1.17.14
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-21 00:00:00.000000000 Z
11
+ date: 2017-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common
@@ -76,6 +76,7 @@ files:
76
76
  - lib/rspec/models/unidom/action/concerns/as_obsolescer_party_shared_examples.rb
77
77
  - lib/rspec/models/unidom/action/concerns/as_searcher_party_shared_examples.rb
78
78
  - lib/rspec/models/unidom/action/concerns/as_state_subject_shared_examples.rb
79
+ - lib/rspec/models/unidom/action/concerns/as_state_transitor_party_shared_examples.rb
79
80
  - lib/rspec/models/unidom/action/obsolescing_spec.rb
80
81
  - lib/rspec/models/unidom/action/reason_spec.rb
81
82
  - lib/rspec/models/unidom/action/searching_spec.rb