activeinteractor 1.0.0.beta.3 → 1.0.0.beta.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -1
- data/README.md +28 -4
- data/lib/active_interactor/interactor.rb +25 -7
- data/lib/active_interactor/interactor/perform_options.rb +5 -21
- data/lib/active_interactor/interactor/worker.rb +33 -42
- data/lib/active_interactor/organizer.rb +58 -28
- data/lib/active_interactor/organizer/interactor_interface.rb +66 -0
- data/lib/active_interactor/organizer/interactor_interface_collection.rb +58 -0
- data/lib/active_interactor/version.rb +1 -1
- data/spec/active_interactor/interactor/perform_options_spec.rb +25 -0
- data/spec/active_interactor/interactor/worker_spec.rb +81 -82
- data/spec/active_interactor/organizer/interactor_interface_collection_spec.rb +76 -0
- data/spec/active_interactor/organizer/interactor_interface_spec.rb +162 -0
- data/spec/active_interactor/organizer_spec.rb +36 -32
- data/spec/integration/basic_integration_spec.rb +311 -12
- data/spec/support/shared_examples/a_class_with_interactor_methods_example.rb +4 -4
- metadata +22 -14
@@ -4,8 +4,8 @@ RSpec.shared_examples 'a class with interactor methods' do
|
|
4
4
|
describe '.perform' do
|
5
5
|
subject { interactor_class.perform }
|
6
6
|
|
7
|
-
it 'calls #execute_perform on a new instance' do
|
8
|
-
expect_any_instance_of(
|
7
|
+
it 'calls #execute_perform on a new instance of ActiveInteractor::Interactor::Worker' do
|
8
|
+
expect_any_instance_of(ActiveInteractor::Interactor::Worker).to receive(:execute_perform)
|
9
9
|
subject
|
10
10
|
end
|
11
11
|
end
|
@@ -13,8 +13,8 @@ RSpec.shared_examples 'a class with interactor methods' do
|
|
13
13
|
describe '.perform!' do
|
14
14
|
subject { interactor_class.perform! }
|
15
15
|
|
16
|
-
it 'calls #execute_perform! on a new instance' do
|
17
|
-
expect_any_instance_of(
|
16
|
+
it 'calls #execute_perform! on a new instance of ActiveInteractor::Interactor::Worker' do
|
17
|
+
expect_any_instance_of(ActiveInteractor::Interactor::Worker).to receive(:execute_perform!)
|
18
18
|
subject
|
19
19
|
end
|
20
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeinteractor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.beta.
|
4
|
+
version: 1.0.0.beta.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Allen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -119,6 +119,8 @@ files:
|
|
119
119
|
- lib/active_interactor/interactor/perform_options.rb
|
120
120
|
- lib/active_interactor/interactor/worker.rb
|
121
121
|
- lib/active_interactor/organizer.rb
|
122
|
+
- lib/active_interactor/organizer/interactor_interface.rb
|
123
|
+
- lib/active_interactor/organizer/interactor_interface_collection.rb
|
122
124
|
- lib/active_interactor/rails.rb
|
123
125
|
- lib/active_interactor/rails/config.rb
|
124
126
|
- lib/active_interactor/railtie.rb
|
@@ -148,7 +150,10 @@ files:
|
|
148
150
|
- spec/active_interactor/config_spec.rb
|
149
151
|
- spec/active_interactor/context/base_spec.rb
|
150
152
|
- spec/active_interactor/error_spec.rb
|
153
|
+
- spec/active_interactor/interactor/perform_options_spec.rb
|
151
154
|
- spec/active_interactor/interactor/worker_spec.rb
|
155
|
+
- spec/active_interactor/organizer/interactor_interface_collection_spec.rb
|
156
|
+
- spec/active_interactor/organizer/interactor_interface_spec.rb
|
152
157
|
- spec/active_interactor/organizer_spec.rb
|
153
158
|
- spec/active_interactor/rails/config_spec.rb
|
154
159
|
- spec/active_interactor_spec.rb
|
@@ -168,10 +173,10 @@ licenses:
|
|
168
173
|
- MIT
|
169
174
|
metadata:
|
170
175
|
bug_tracker_uri: https://github.com/aaronmallen/activeinteractor/issues
|
171
|
-
changelog_uri: https://github.com/aaronmallen/activeinteractor/blob/v1.0.0.beta.
|
172
|
-
documentation_uri: https://www.rubydoc.info/gems/activeinteractor/1.0.0.beta.
|
176
|
+
changelog_uri: https://github.com/aaronmallen/activeinteractor/blob/v1.0.0.beta.4/CHANGELOG.md
|
177
|
+
documentation_uri: https://www.rubydoc.info/gems/activeinteractor/1.0.0.beta.4
|
173
178
|
hompage_uri: https://github.com/aaronmallen/activeinteractor
|
174
|
-
source_code_uri: https://github.com/aaronmallen/activeinteractor/tree/v1.0.0.beta.
|
179
|
+
source_code_uri: https://github.com/aaronmallen/activeinteractor/tree/v1.0.0.beta.4
|
175
180
|
wiki_uri: https://github.com/aaronmallen/activeinteractor/wiki
|
176
181
|
post_install_message:
|
177
182
|
rdoc_options: []
|
@@ -193,22 +198,25 @@ signing_key:
|
|
193
198
|
specification_version: 4
|
194
199
|
summary: Ruby interactors with ActiveModel::Validations
|
195
200
|
test_files:
|
196
|
-
- spec/spec_helper.rb
|
197
201
|
- spec/active_interactor_spec.rb
|
198
|
-
- spec/integration/basic_context_integration_spec.rb
|
199
202
|
- spec/integration/basic_validations_integration_spec.rb
|
200
203
|
- spec/integration/basic_integration_spec.rb
|
201
204
|
- spec/integration/basic_callback_integration_spec.rb
|
202
|
-
- spec/
|
205
|
+
- spec/integration/basic_context_integration_spec.rb
|
203
206
|
- spec/support/spec_helpers.rb
|
204
|
-
- spec/support/shared_examples/a_class_with_interactor_methods_example.rb
|
205
|
-
- spec/support/shared_examples/a_class_with_interactor_context_methods_example.rb
|
206
207
|
- spec/support/shared_examples/a_class_with_organizer_callback_methods_example.rb
|
207
208
|
- spec/support/shared_examples/a_class_with_interactor_callback_methods_example.rb
|
208
|
-
- spec/
|
209
|
-
- spec/
|
209
|
+
- spec/support/shared_examples/a_class_with_interactor_methods_example.rb
|
210
|
+
- spec/support/shared_examples/a_class_with_interactor_context_methods_example.rb
|
211
|
+
- spec/support/helpers/factories.rb
|
212
|
+
- spec/spec_helper.rb
|
210
213
|
- spec/active_interactor/context/base_spec.rb
|
211
|
-
- spec/active_interactor/organizer_spec.rb
|
212
|
-
- spec/active_interactor/interactor/worker_spec.rb
|
213
214
|
- spec/active_interactor/base_spec.rb
|
215
|
+
- spec/active_interactor/config_spec.rb
|
216
|
+
- spec/active_interactor/organizer_spec.rb
|
217
|
+
- spec/active_interactor/organizer/interactor_interface_spec.rb
|
218
|
+
- spec/active_interactor/organizer/interactor_interface_collection_spec.rb
|
214
219
|
- spec/active_interactor/rails/config_spec.rb
|
220
|
+
- spec/active_interactor/interactor/worker_spec.rb
|
221
|
+
- spec/active_interactor/interactor/perform_options_spec.rb
|
222
|
+
- spec/active_interactor/error_spec.rb
|