activeinteractor 1.0.0.beta.7 → 1.0.0
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 +4 -4
- data/.yardopts +12 -0
- data/CHANGELOG.md +50 -158
- data/README.md +13 -856
- data/lib/active_interactor.rb +61 -4
- data/lib/active_interactor/base.rb +26 -20
- data/lib/active_interactor/config.rb +36 -18
- data/lib/active_interactor/configurable.rb +17 -9
- data/lib/active_interactor/context/attributes.rb +73 -26
- data/lib/active_interactor/context/base.rb +236 -65
- data/lib/active_interactor/context/loader.rb +20 -15
- data/lib/active_interactor/context/status.rb +38 -56
- data/lib/active_interactor/error.rb +15 -7
- data/lib/active_interactor/interactor/callbacks.rb +174 -160
- data/lib/active_interactor/interactor/context.rb +279 -87
- data/lib/active_interactor/interactor/perform.rb +256 -0
- data/lib/active_interactor/interactor/worker.rb +19 -14
- data/lib/active_interactor/models.rb +65 -0
- data/lib/active_interactor/organizer/base.rb +18 -0
- data/lib/active_interactor/organizer/callbacks.rb +153 -0
- data/lib/active_interactor/organizer/interactor_interface.rb +38 -26
- data/lib/active_interactor/organizer/interactor_interface_collection.rb +35 -32
- data/lib/active_interactor/organizer/organize.rb +67 -0
- data/lib/active_interactor/organizer/perform.rb +93 -0
- data/lib/active_interactor/rails.rb +0 -10
- data/lib/active_interactor/rails/orm/active_record.rb +1 -1
- data/lib/active_interactor/rails/railtie.rb +8 -11
- data/lib/active_interactor/version.rb +2 -1
- data/lib/rails/generators/active_interactor.rb +1 -38
- data/lib/rails/generators/active_interactor/application_context_generator.rb +21 -0
- data/lib/rails/generators/active_interactor/application_interactor_generator.rb +5 -15
- data/lib/rails/generators/active_interactor/application_organizer_generator.rb +21 -0
- data/lib/rails/generators/active_interactor/base.rb +29 -0
- data/lib/rails/generators/active_interactor/generator.rb +21 -0
- data/lib/rails/generators/active_interactor/install_generator.rb +2 -9
- data/lib/rails/generators/interactor/context/rspec_generator.rb +3 -10
- data/lib/rails/generators/interactor/context/test_unit_generator.rb +4 -11
- data/lib/rails/generators/interactor/context_generator.rb +7 -10
- data/lib/rails/generators/interactor/generates_context.rb +28 -0
- data/lib/rails/generators/interactor/interactor_generator.rb +8 -10
- data/lib/rails/generators/interactor/organizer_generator.rb +8 -12
- data/lib/rails/generators/interactor/rspec_generator.rb +2 -9
- data/lib/rails/generators/interactor/test_unit_generator.rb +3 -10
- data/lib/rails/generators/{active_interactor/templates/initializer.erb → templates/active_interactor.erb} +3 -11
- data/lib/rails/generators/{active_interactor/templates → templates}/application_context.rb +0 -0
- data/lib/rails/generators/{active_interactor/templates → templates}/application_interactor.rb +0 -0
- data/lib/rails/generators/templates/application_organizer.rb +4 -0
- data/lib/rails/generators/{interactor/templates → templates}/context.erb +0 -0
- data/lib/rails/generators/{interactor/context/templates/rspec.erb → templates/context_spec.erb} +0 -0
- data/lib/rails/generators/{interactor/context/templates/test_unit.erb → templates/context_test_unit.erb} +0 -0
- data/lib/rails/generators/{interactor/templates → templates}/interactor.erb +0 -0
- data/lib/rails/generators/{interactor/templates/rspec.erb → templates/interactor_spec.erb} +0 -0
- data/lib/rails/generators/{interactor/templates/test_unit.erb → templates/interactor_text_unit.erb} +0 -0
- data/lib/rails/generators/{interactor/templates → templates}/organizer.erb +0 -0
- data/spec/active_interactor/base_spec.rb +3 -3
- data/spec/active_interactor/interactor/{perform_options_spec.rb → perform/options_spec.rb} +1 -1
- data/spec/active_interactor/interactor/worker_spec.rb +14 -15
- data/spec/active_interactor/{organizer_spec.rb → organizer/base_spec.rb} +27 -17
- data/spec/integration/a_basic_interactor_spec.rb +106 -0
- data/spec/integration/a_basic_organizer_spec.rb +97 -0
- data/spec/integration/a_failing_interactor_spec.rb +42 -0
- data/spec/integration/active_record_integration_spec.rb +9 -9
- data/spec/integration/an_interactor_with_after_context_validation_callbacks_spec.rb +69 -0
- data/spec/integration/an_interactor_with_after_perform_callbacks_spec.rb +30 -0
- data/spec/integration/an_interactor_with_after_rollback_callbacks_spec.rb +33 -0
- data/spec/integration/an_interactor_with_an_existing_context_class_spec.rb +49 -0
- data/spec/integration/an_interactor_with_around_perform_callbacks_spec.rb +35 -0
- data/spec/integration/an_interactor_with_around_rollback_callbacks_spec.rb +39 -0
- data/spec/integration/an_interactor_with_before_perform_callbacks_spec.rb +30 -0
- data/spec/integration/an_interactor_with_before_rollback_callbacks_spec.rb +33 -0
- data/spec/integration/an_interactor_with_validations_on_called_spec.rb +40 -0
- data/spec/integration/an_interactor_with_validations_on_calling_spec.rb +36 -0
- data/spec/integration/an_interactor_with_validations_spec.rb +93 -0
- data/spec/integration/an_organizer_performing_in_parallel_spec.rb +48 -0
- data/spec/integration/an_organizer_with_after_each_callbacks_spec.rb +34 -0
- data/spec/integration/an_organizer_with_around_each_callbacks_spec.rb +39 -0
- data/spec/integration/an_organizer_with_before_each_callbacks_spec.rb +34 -0
- data/spec/integration/an_organizer_with_conditionally_organized_interactors_spec.rb +314 -0
- data/spec/spec_helper.rb +8 -12
- data/spec/support/coverage.rb +4 -0
- data/spec/support/coverage/reporters.rb +11 -0
- data/spec/support/coverage/reporters/codacy.rb +39 -0
- data/spec/support/coverage/reporters/simple_cov.rb +54 -0
- data/spec/support/coverage/runner.rb +66 -0
- data/spec/support/helpers/factories.rb +1 -1
- data/spec/support/shared_examples/a_class_with_interactor_callback_methods_example.rb +8 -8
- data/spec/support/shared_examples/a_class_with_interactor_context_methods_example.rb +5 -5
- data/spec/support/shared_examples/a_class_with_interactor_methods_example.rb +2 -2
- data/spec/support/shared_examples/a_class_with_organizer_callback_methods_example.rb +3 -3
- metadata +83 -40
- data/lib/active_interactor/interactor.rb +0 -84
- data/lib/active_interactor/interactor/perform_options.rb +0 -29
- data/lib/active_interactor/organizer.rb +0 -269
- data/lib/active_interactor/rails/config.rb +0 -45
- data/lib/active_interactor/rails/models.rb +0 -58
- data/lib/rails/generators/active_interactor/templates/application_organizer.rb +0 -4
- data/spec/active_interactor/rails/config_spec.rb +0 -29
- data/spec/active_interactor/rails_spec.rb +0 -24
- data/spec/integration/basic_callback_integration_spec.rb +0 -355
- data/spec/integration/basic_context_integration_spec.rb +0 -73
- data/spec/integration/basic_integration_spec.rb +0 -570
- data/spec/integration/basic_validations_integration_spec.rb +0 -204
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spec
|
4
|
+
module Coverage
|
5
|
+
module Reporters
|
6
|
+
module SimpleCov
|
7
|
+
class << self
|
8
|
+
def load
|
9
|
+
return EMPTY_LOAD_RESULT unless load_dependencies
|
10
|
+
|
11
|
+
[formatters, initialize_steps, run_steps]
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def load_dependencies
|
17
|
+
require 'simplecov'
|
18
|
+
true
|
19
|
+
rescue LoadError
|
20
|
+
puts 'Skipping SimpleCov reporting...'
|
21
|
+
false
|
22
|
+
end
|
23
|
+
|
24
|
+
def formatters
|
25
|
+
{ simple_cov_html: ::SimpleCov::Formatter::HTMLFormatter }
|
26
|
+
end
|
27
|
+
|
28
|
+
def initialize_steps
|
29
|
+
[setup_formatters]
|
30
|
+
end
|
31
|
+
|
32
|
+
def run_steps
|
33
|
+
[start_simplecov]
|
34
|
+
end
|
35
|
+
|
36
|
+
def setup_formatters
|
37
|
+
lambda do |runner|
|
38
|
+
::SimpleCov.formatter = ::SimpleCov::Formatter::MultiFormatter.new(runner.formatters)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def start_simplecov
|
43
|
+
lambda do |runner|
|
44
|
+
::SimpleCov.start do
|
45
|
+
runner.tracked_files.each { |f| track_files f }
|
46
|
+
runner.filtered_files.each { |f| add_filter f }
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spec
|
4
|
+
module Coverage
|
5
|
+
class Runner
|
6
|
+
attr_accessor :filtered_files, :formatters, :tracked_files
|
7
|
+
|
8
|
+
def self.start(&block)
|
9
|
+
instance = new
|
10
|
+
instance.instance_eval(&block) if block
|
11
|
+
instance.start
|
12
|
+
end
|
13
|
+
|
14
|
+
def initialize(options = {})
|
15
|
+
load_reporters!
|
16
|
+
@formatters = options[:formatters] || []
|
17
|
+
@filtered_files = options[:filtered_files] || []
|
18
|
+
@tracked_files = options[:tracked_files] || []
|
19
|
+
end
|
20
|
+
|
21
|
+
def add_formatter(formatter)
|
22
|
+
formatter_class = reporters[:formatters][formatter.to_sym]
|
23
|
+
formatters << formatter_class if formatter_class
|
24
|
+
self
|
25
|
+
end
|
26
|
+
|
27
|
+
def filter(pattern)
|
28
|
+
filtered_files << pattern
|
29
|
+
self
|
30
|
+
end
|
31
|
+
|
32
|
+
def start
|
33
|
+
initialize_reporters
|
34
|
+
run_reporters
|
35
|
+
end
|
36
|
+
|
37
|
+
def track(pattern)
|
38
|
+
tracked_files << pattern
|
39
|
+
self
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
attr_reader :reporters
|
45
|
+
|
46
|
+
def initialize_reporters
|
47
|
+
reporters[:initialize_steps].each { |step| step.call(self) }
|
48
|
+
end
|
49
|
+
|
50
|
+
def load_reporters!
|
51
|
+
@reporters = { formatters: {}, initialize_steps: [], run_steps: [] }
|
52
|
+
%w[SimpleCov Codacy].each do |dep|
|
53
|
+
reporter = Reporters.const_get(dep)
|
54
|
+
formatters, initialize_steps, run_steps = reporter.load
|
55
|
+
@reporters[:formatters].merge!(formatters)
|
56
|
+
@reporters[:initialize_steps].concat(initialize_steps)
|
57
|
+
@reporters[:run_steps].concat(run_steps)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def run_reporters
|
62
|
+
reporters[:run_steps].each { |step| step.call(self) }
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -5,7 +5,7 @@ RSpec.shared_examples 'a class with interactor callback methods' do
|
|
5
5
|
subject { interactor_class.after_context_validation(*args) }
|
6
6
|
let(:args) { :some_method }
|
7
7
|
|
8
|
-
it '
|
8
|
+
it 'is expected to receive #set_callback with :validation, :after, :some_method, { :prepend => true }' do
|
9
9
|
expect(interactor_class).to receive(:set_callback)
|
10
10
|
.with(:validation, :after, :some_method, prepend: true)
|
11
11
|
.and_return(true)
|
@@ -17,7 +17,7 @@ RSpec.shared_examples 'a class with interactor callback methods' do
|
|
17
17
|
subject { interactor_class.after_perform(*args) }
|
18
18
|
let(:args) { :some_method }
|
19
19
|
|
20
|
-
it '
|
20
|
+
it 'is expected to receive #set_callback with :perform, :after, :some_method' do
|
21
21
|
expect(interactor_class).to receive(:set_callback)
|
22
22
|
.with(:perform, :after, :some_method)
|
23
23
|
.and_return(true)
|
@@ -29,7 +29,7 @@ RSpec.shared_examples 'a class with interactor callback methods' do
|
|
29
29
|
subject { interactor_class.after_rollback(*args) }
|
30
30
|
let(:args) { :some_method }
|
31
31
|
|
32
|
-
it '
|
32
|
+
it 'is expected to receive #set_callback with :rollback, :after, :some_method' do
|
33
33
|
expect(interactor_class).to receive(:set_callback)
|
34
34
|
.with(:rollback, :after, :some_method)
|
35
35
|
.and_return(true)
|
@@ -41,7 +41,7 @@ RSpec.shared_examples 'a class with interactor callback methods' do
|
|
41
41
|
subject { interactor_class.around_perform(*args) }
|
42
42
|
let(:args) { :some_method }
|
43
43
|
|
44
|
-
it '
|
44
|
+
it 'is expected to receive #set_callback with :perform, :around, :some_method' do
|
45
45
|
expect(interactor_class).to receive(:set_callback)
|
46
46
|
.with(:perform, :around, :some_method)
|
47
47
|
.and_return(true)
|
@@ -53,7 +53,7 @@ RSpec.shared_examples 'a class with interactor callback methods' do
|
|
53
53
|
subject { interactor_class.around_rollback(*args) }
|
54
54
|
let(:args) { :some_method }
|
55
55
|
|
56
|
-
it '
|
56
|
+
it 'is expected to receive #set_callback with :rollback, :around, :some_method' do
|
57
57
|
expect(interactor_class).to receive(:set_callback)
|
58
58
|
.with(:rollback, :around, :some_method)
|
59
59
|
.and_return(true)
|
@@ -65,7 +65,7 @@ RSpec.shared_examples 'a class with interactor callback methods' do
|
|
65
65
|
subject { interactor_class.before_context_validation(*args) }
|
66
66
|
let(:args) { :some_method }
|
67
67
|
|
68
|
-
it '
|
68
|
+
it 'is expected to receive #set_callback with :validation, :before, :some_method' do
|
69
69
|
expect(interactor_class).to receive(:set_callback)
|
70
70
|
.with(:validation, :before, :some_method, {})
|
71
71
|
.and_return(true)
|
@@ -77,7 +77,7 @@ RSpec.shared_examples 'a class with interactor callback methods' do
|
|
77
77
|
subject { interactor_class.before_perform(*args) }
|
78
78
|
let(:args) { :some_method }
|
79
79
|
|
80
|
-
it '
|
80
|
+
it 'is expected to receive #set_callback with :perform, :before, :some_method' do
|
81
81
|
expect(interactor_class).to receive(:set_callback)
|
82
82
|
.with(:perform, :before, :some_method)
|
83
83
|
.and_return(true)
|
@@ -89,7 +89,7 @@ RSpec.shared_examples 'a class with interactor callback methods' do
|
|
89
89
|
subject { interactor_class.before_rollback(*args) }
|
90
90
|
let(:args) { :some_method }
|
91
91
|
|
92
|
-
it '
|
92
|
+
it 'is expected to receive #set_callback with :rollback, :before, :some_method' do
|
93
93
|
expect(interactor_class).to receive(:set_callback)
|
94
94
|
.with(:rollback, :before, :some_method)
|
95
95
|
.and_return(true)
|
@@ -5,7 +5,7 @@ RSpec.shared_examples 'a class with interactor context methods' do
|
|
5
5
|
subject { interactor_class.context_attributes(attributes) }
|
6
6
|
let(:attributes) { :some_attribute }
|
7
7
|
|
8
|
-
it '
|
8
|
+
it 'is expected to receive #attributes on .context_class with :some_attribute' do
|
9
9
|
expect(interactor_class.context_class).to receive(:attributes)
|
10
10
|
.with(:some_attribute)
|
11
11
|
.and_return(true)
|
@@ -16,7 +16,7 @@ RSpec.shared_examples 'a class with interactor context methods' do
|
|
16
16
|
describe '#context_fail!' do
|
17
17
|
subject { interactor_class.new.context_fail! }
|
18
18
|
|
19
|
-
it '
|
19
|
+
it 'is expected to receive #fail! on instance of .context_class' do
|
20
20
|
expect_any_instance_of(interactor_class.context_class).to receive(:fail!)
|
21
21
|
.and_return(true)
|
22
22
|
subject
|
@@ -26,7 +26,7 @@ RSpec.shared_examples 'a class with interactor context methods' do
|
|
26
26
|
describe '#context_rollback!' do
|
27
27
|
subject { interactor_class.new.context_rollback! }
|
28
28
|
|
29
|
-
it '
|
29
|
+
it 'is expected to receive #rollback! on instance of .context_class' do
|
30
30
|
expect_any_instance_of(interactor_class.context_class).to receive(:rollback!)
|
31
31
|
.and_return(true)
|
32
32
|
subject
|
@@ -36,7 +36,7 @@ RSpec.shared_examples 'a class with interactor context methods' do
|
|
36
36
|
describe '#context_valid?' do
|
37
37
|
subject { interactor_class.new.context_valid? }
|
38
38
|
|
39
|
-
it '
|
39
|
+
it 'is expected to receive #valid? on instance of .context_class' do
|
40
40
|
expect_any_instance_of(interactor_class.context_class).to receive(:valid?)
|
41
41
|
.and_return(true)
|
42
42
|
subject
|
@@ -47,7 +47,7 @@ RSpec.shared_examples 'a class with interactor context methods' do
|
|
47
47
|
subject { instance.finalize_context! }
|
48
48
|
let(:instance) { interactor_class.new }
|
49
49
|
|
50
|
-
it '
|
50
|
+
it 'is expected to receive #called! on instance of .context_class' do
|
51
51
|
expect_any_instance_of(interactor_class.context_class).to receive(:called!)
|
52
52
|
.with(instance)
|
53
53
|
subject
|
@@ -4,7 +4,7 @@ RSpec.shared_examples 'a class with interactor methods' do
|
|
4
4
|
describe '.perform' do
|
5
5
|
subject { interactor_class.perform }
|
6
6
|
|
7
|
-
it '
|
7
|
+
it 'is expected to receive #execute_perform on a new instance of ActiveInteractor::Interactor::Worker' do
|
8
8
|
expect_any_instance_of(ActiveInteractor::Interactor::Worker).to receive(:execute_perform)
|
9
9
|
subject
|
10
10
|
end
|
@@ -13,7 +13,7 @@ RSpec.shared_examples 'a class with interactor methods' do
|
|
13
13
|
describe '.perform!' do
|
14
14
|
subject { interactor_class.perform! }
|
15
15
|
|
16
|
-
it '
|
16
|
+
it 'is expected to receive #execute_perform! on a new instance of ActiveInteractor::Interactor::Worker' do
|
17
17
|
expect_any_instance_of(ActiveInteractor::Interactor::Worker).to receive(:execute_perform!)
|
18
18
|
subject
|
19
19
|
end
|
@@ -5,7 +5,7 @@ RSpec.shared_examples 'a class with organizer callback methods' do
|
|
5
5
|
subject { interactor_class.after_each_perform(*args) }
|
6
6
|
let(:args) { :some_method }
|
7
7
|
|
8
|
-
it '
|
8
|
+
it 'is expected to receive #set_callback with :each_perform, :after, :some_method' do
|
9
9
|
expect(interactor_class).to receive(:set_callback)
|
10
10
|
.with(:each_perform, :after, :some_method)
|
11
11
|
.and_return(true)
|
@@ -17,7 +17,7 @@ RSpec.shared_examples 'a class with organizer callback methods' do
|
|
17
17
|
subject { interactor_class.around_each_perform(*args) }
|
18
18
|
let(:args) { :some_method }
|
19
19
|
|
20
|
-
it '
|
20
|
+
it 'is expected to receive #set_callback with :each_perform, :around, :some_method' do
|
21
21
|
expect(interactor_class).to receive(:set_callback)
|
22
22
|
.with(:each_perform, :around, :some_method)
|
23
23
|
.and_return(true)
|
@@ -29,7 +29,7 @@ RSpec.shared_examples 'a class with organizer callback methods' do
|
|
29
29
|
subject { interactor_class.before_each_perform(*args) }
|
30
30
|
let(:args) { :some_method }
|
31
31
|
|
32
|
-
it '
|
32
|
+
it 'is expected to receive #set_callback with :each_perform, :before, :some_method' do
|
33
33
|
expect(interactor_class).to receive(:set_callback)
|
34
34
|
.with(:each_perform, :before, :some_method)
|
35
35
|
.and_return(true)
|
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
|
4
|
+
version: 1.0.0
|
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-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -93,7 +93,7 @@ dependencies:
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '3.9'
|
95
95
|
description: |
|
96
|
-
Ruby
|
96
|
+
An implementation of the Command Pattern for Ruby with ActiveModel::Validations based on the interactors gem.
|
97
97
|
Rich support for attributes, callbacks, and validations, and thread safe performance methods.
|
98
98
|
email:
|
99
99
|
- hello@aaronmallen.me
|
@@ -101,6 +101,7 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- ".yardopts"
|
104
105
|
- CHANGELOG.md
|
105
106
|
- LICENSE
|
106
107
|
- README.md
|
@@ -113,59 +114,83 @@ files:
|
|
113
114
|
- lib/active_interactor/context/loader.rb
|
114
115
|
- lib/active_interactor/context/status.rb
|
115
116
|
- lib/active_interactor/error.rb
|
116
|
-
- lib/active_interactor/interactor.rb
|
117
117
|
- lib/active_interactor/interactor/callbacks.rb
|
118
118
|
- lib/active_interactor/interactor/context.rb
|
119
|
-
- lib/active_interactor/interactor/
|
119
|
+
- lib/active_interactor/interactor/perform.rb
|
120
120
|
- lib/active_interactor/interactor/worker.rb
|
121
|
-
- lib/active_interactor/
|
121
|
+
- lib/active_interactor/models.rb
|
122
|
+
- lib/active_interactor/organizer/base.rb
|
123
|
+
- lib/active_interactor/organizer/callbacks.rb
|
122
124
|
- lib/active_interactor/organizer/interactor_interface.rb
|
123
125
|
- lib/active_interactor/organizer/interactor_interface_collection.rb
|
126
|
+
- lib/active_interactor/organizer/organize.rb
|
127
|
+
- lib/active_interactor/organizer/perform.rb
|
124
128
|
- lib/active_interactor/rails.rb
|
125
|
-
- lib/active_interactor/rails/config.rb
|
126
|
-
- lib/active_interactor/rails/models.rb
|
127
129
|
- lib/active_interactor/rails/orm/active_record.rb
|
128
130
|
- lib/active_interactor/rails/railtie.rb
|
129
131
|
- lib/active_interactor/version.rb
|
130
132
|
- lib/rails/generators/active_interactor.rb
|
133
|
+
- lib/rails/generators/active_interactor/application_context_generator.rb
|
131
134
|
- lib/rails/generators/active_interactor/application_interactor_generator.rb
|
135
|
+
- lib/rails/generators/active_interactor/application_organizer_generator.rb
|
136
|
+
- lib/rails/generators/active_interactor/base.rb
|
137
|
+
- lib/rails/generators/active_interactor/generator.rb
|
132
138
|
- lib/rails/generators/active_interactor/install_generator.rb
|
133
|
-
- lib/rails/generators/active_interactor/templates/application_context.rb
|
134
|
-
- lib/rails/generators/active_interactor/templates/application_interactor.rb
|
135
|
-
- lib/rails/generators/active_interactor/templates/application_organizer.rb
|
136
|
-
- lib/rails/generators/active_interactor/templates/initializer.erb
|
137
139
|
- lib/rails/generators/interactor/context/rspec_generator.rb
|
138
|
-
- lib/rails/generators/interactor/context/templates/rspec.erb
|
139
|
-
- lib/rails/generators/interactor/context/templates/test_unit.erb
|
140
140
|
- lib/rails/generators/interactor/context/test_unit_generator.rb
|
141
141
|
- lib/rails/generators/interactor/context_generator.rb
|
142
|
+
- lib/rails/generators/interactor/generates_context.rb
|
142
143
|
- lib/rails/generators/interactor/interactor_generator.rb
|
143
144
|
- lib/rails/generators/interactor/organizer_generator.rb
|
144
145
|
- lib/rails/generators/interactor/rspec_generator.rb
|
145
|
-
- lib/rails/generators/interactor/templates/context.erb
|
146
|
-
- lib/rails/generators/interactor/templates/interactor.erb
|
147
|
-
- lib/rails/generators/interactor/templates/organizer.erb
|
148
|
-
- lib/rails/generators/interactor/templates/rspec.erb
|
149
|
-
- lib/rails/generators/interactor/templates/test_unit.erb
|
150
146
|
- lib/rails/generators/interactor/test_unit_generator.rb
|
147
|
+
- lib/rails/generators/templates/active_interactor.erb
|
148
|
+
- lib/rails/generators/templates/application_context.rb
|
149
|
+
- lib/rails/generators/templates/application_interactor.rb
|
150
|
+
- lib/rails/generators/templates/application_organizer.rb
|
151
|
+
- lib/rails/generators/templates/context.erb
|
152
|
+
- lib/rails/generators/templates/context_spec.erb
|
153
|
+
- lib/rails/generators/templates/context_test_unit.erb
|
154
|
+
- lib/rails/generators/templates/interactor.erb
|
155
|
+
- lib/rails/generators/templates/interactor_spec.erb
|
156
|
+
- lib/rails/generators/templates/interactor_text_unit.erb
|
157
|
+
- lib/rails/generators/templates/organizer.erb
|
151
158
|
- spec/active_interactor/base_spec.rb
|
152
159
|
- spec/active_interactor/config_spec.rb
|
153
160
|
- spec/active_interactor/context/base_spec.rb
|
154
161
|
- spec/active_interactor/error_spec.rb
|
155
|
-
- spec/active_interactor/interactor/
|
162
|
+
- spec/active_interactor/interactor/perform/options_spec.rb
|
156
163
|
- spec/active_interactor/interactor/worker_spec.rb
|
164
|
+
- spec/active_interactor/organizer/base_spec.rb
|
157
165
|
- spec/active_interactor/organizer/interactor_interface_collection_spec.rb
|
158
166
|
- spec/active_interactor/organizer/interactor_interface_spec.rb
|
159
|
-
- spec/active_interactor/organizer_spec.rb
|
160
|
-
- spec/active_interactor/rails/config_spec.rb
|
161
|
-
- spec/active_interactor/rails_spec.rb
|
162
167
|
- spec/active_interactor_spec.rb
|
168
|
+
- spec/integration/a_basic_interactor_spec.rb
|
169
|
+
- spec/integration/a_basic_organizer_spec.rb
|
170
|
+
- spec/integration/a_failing_interactor_spec.rb
|
163
171
|
- spec/integration/active_record_integration_spec.rb
|
164
|
-
- spec/integration/
|
165
|
-
- spec/integration/
|
166
|
-
- spec/integration/
|
167
|
-
- spec/integration/
|
172
|
+
- spec/integration/an_interactor_with_after_context_validation_callbacks_spec.rb
|
173
|
+
- spec/integration/an_interactor_with_after_perform_callbacks_spec.rb
|
174
|
+
- spec/integration/an_interactor_with_after_rollback_callbacks_spec.rb
|
175
|
+
- spec/integration/an_interactor_with_an_existing_context_class_spec.rb
|
176
|
+
- spec/integration/an_interactor_with_around_perform_callbacks_spec.rb
|
177
|
+
- spec/integration/an_interactor_with_around_rollback_callbacks_spec.rb
|
178
|
+
- spec/integration/an_interactor_with_before_perform_callbacks_spec.rb
|
179
|
+
- spec/integration/an_interactor_with_before_rollback_callbacks_spec.rb
|
180
|
+
- spec/integration/an_interactor_with_validations_on_called_spec.rb
|
181
|
+
- spec/integration/an_interactor_with_validations_on_calling_spec.rb
|
182
|
+
- spec/integration/an_interactor_with_validations_spec.rb
|
183
|
+
- spec/integration/an_organizer_performing_in_parallel_spec.rb
|
184
|
+
- spec/integration/an_organizer_with_after_each_callbacks_spec.rb
|
185
|
+
- spec/integration/an_organizer_with_around_each_callbacks_spec.rb
|
186
|
+
- spec/integration/an_organizer_with_before_each_callbacks_spec.rb
|
187
|
+
- spec/integration/an_organizer_with_conditionally_organized_interactors_spec.rb
|
168
188
|
- spec/spec_helper.rb
|
189
|
+
- spec/support/coverage.rb
|
190
|
+
- spec/support/coverage/reporters.rb
|
191
|
+
- spec/support/coverage/reporters/codacy.rb
|
192
|
+
- spec/support/coverage/reporters/simple_cov.rb
|
193
|
+
- spec/support/coverage/runner.rb
|
169
194
|
- spec/support/helpers/factories.rb
|
170
195
|
- spec/support/shared_examples/a_class_with_interactor_callback_methods_example.rb
|
171
196
|
- spec/support/shared_examples/a_class_with_interactor_context_methods_example.rb
|
@@ -177,10 +202,10 @@ licenses:
|
|
177
202
|
- MIT
|
178
203
|
metadata:
|
179
204
|
bug_tracker_uri: https://github.com/aaronmallen/activeinteractor/issues
|
180
|
-
changelog_uri: https://github.com/aaronmallen/activeinteractor/blob/v1.0.0
|
181
|
-
documentation_uri: https://www.rubydoc.info/gems/activeinteractor/1.0.0
|
205
|
+
changelog_uri: https://github.com/aaronmallen/activeinteractor/blob/v1.0.0/CHANGELOG.md
|
206
|
+
documentation_uri: https://www.rubydoc.info/gems/activeinteractor/1.0.0
|
182
207
|
hompage_uri: https://github.com/aaronmallen/activeinteractor
|
183
|
-
source_code_uri: https://github.com/aaronmallen/activeinteractor/tree/v1.0.0
|
208
|
+
source_code_uri: https://github.com/aaronmallen/activeinteractor/tree/v1.0.0
|
184
209
|
wiki_uri: https://github.com/aaronmallen/activeinteractor/wiki
|
185
210
|
post_install_message:
|
186
211
|
rdoc_options: []
|
@@ -193,9 +218,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
193
218
|
version: 2.5.0
|
194
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
220
|
requirements:
|
196
|
-
- - "
|
221
|
+
- - ">="
|
197
222
|
- !ruby/object:Gem::Version
|
198
|
-
version:
|
223
|
+
version: '0'
|
199
224
|
requirements: []
|
200
225
|
rubygems_version: 3.0.3
|
201
226
|
signing_key:
|
@@ -203,26 +228,44 @@ specification_version: 4
|
|
203
228
|
summary: Ruby interactors with ActiveModel::Validations
|
204
229
|
test_files:
|
205
230
|
- spec/active_interactor_spec.rb
|
231
|
+
- spec/integration/a_failing_interactor_spec.rb
|
206
232
|
- spec/integration/active_record_integration_spec.rb
|
207
|
-
- spec/integration/
|
208
|
-
- spec/integration/
|
209
|
-
- spec/integration/
|
210
|
-
- spec/integration/
|
233
|
+
- spec/integration/an_interactor_with_validations_on_called_spec.rb
|
234
|
+
- spec/integration/an_interactor_with_around_perform_callbacks_spec.rb
|
235
|
+
- spec/integration/an_interactor_with_before_rollback_callbacks_spec.rb
|
236
|
+
- spec/integration/a_basic_organizer_spec.rb
|
237
|
+
- spec/integration/an_interactor_with_around_rollback_callbacks_spec.rb
|
238
|
+
- spec/integration/an_organizer_with_after_each_callbacks_spec.rb
|
239
|
+
- spec/integration/an_organizer_performing_in_parallel_spec.rb
|
240
|
+
- spec/integration/an_interactor_with_an_existing_context_class_spec.rb
|
241
|
+
- spec/integration/an_interactor_with_after_rollback_callbacks_spec.rb
|
242
|
+
- spec/integration/an_interactor_with_validations_spec.rb
|
243
|
+
- spec/integration/a_basic_interactor_spec.rb
|
244
|
+
- spec/integration/an_interactor_with_validations_on_calling_spec.rb
|
245
|
+
- spec/integration/an_interactor_with_before_perform_callbacks_spec.rb
|
246
|
+
- spec/integration/an_organizer_with_before_each_callbacks_spec.rb
|
247
|
+
- spec/integration/an_organizer_with_conditionally_organized_interactors_spec.rb
|
248
|
+
- spec/integration/an_organizer_with_around_each_callbacks_spec.rb
|
249
|
+
- spec/integration/an_interactor_with_after_context_validation_callbacks_spec.rb
|
250
|
+
- spec/integration/an_interactor_with_after_perform_callbacks_spec.rb
|
211
251
|
- spec/support/spec_helpers.rb
|
252
|
+
- spec/support/coverage/reporters.rb
|
253
|
+
- spec/support/coverage/reporters/codacy.rb
|
254
|
+
- spec/support/coverage/reporters/simple_cov.rb
|
255
|
+
- spec/support/coverage/runner.rb
|
212
256
|
- spec/support/shared_examples/a_class_with_organizer_callback_methods_example.rb
|
213
257
|
- spec/support/shared_examples/a_class_with_interactor_callback_methods_example.rb
|
214
258
|
- spec/support/shared_examples/a_class_with_interactor_methods_example.rb
|
215
259
|
- spec/support/shared_examples/a_class_with_interactor_context_methods_example.rb
|
216
260
|
- spec/support/helpers/factories.rb
|
261
|
+
- spec/support/coverage.rb
|
217
262
|
- spec/spec_helper.rb
|
218
263
|
- spec/active_interactor/context/base_spec.rb
|
219
264
|
- spec/active_interactor/base_spec.rb
|
220
265
|
- spec/active_interactor/config_spec.rb
|
221
|
-
- spec/active_interactor/
|
266
|
+
- spec/active_interactor/organizer/base_spec.rb
|
222
267
|
- spec/active_interactor/organizer/interactor_interface_spec.rb
|
223
268
|
- spec/active_interactor/organizer/interactor_interface_collection_spec.rb
|
224
|
-
- spec/active_interactor/rails/config_spec.rb
|
225
|
-
- spec/active_interactor/rails_spec.rb
|
226
269
|
- spec/active_interactor/interactor/worker_spec.rb
|
227
|
-
- spec/active_interactor/interactor/
|
270
|
+
- spec/active_interactor/interactor/perform/options_spec.rb
|
228
271
|
- spec/active_interactor/error_spec.rb
|