activeinteractor 1.2.2 → 2.0.0.alpha.1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/LICENSE +1 -1
- data/README.md +4 -64
- data/lib/active_interactor/base.rb +77 -29
- data/lib/active_interactor/errors.rb +12 -0
- data/lib/active_interactor/result.rb +73 -0
- data/lib/active_interactor.rb +3 -101
- data/sig/active_interactor.rbs +3 -0
- metadata +23 -86
- data/.yardopts +0 -12
- data/lib/active_interactor/config.rb +0 -60
- data/lib/active_interactor/configurable.rb +0 -53
- data/lib/active_interactor/context/attributes.rb +0 -179
- data/lib/active_interactor/context/base.rb +0 -333
- data/lib/active_interactor/context/errors.rb +0 -57
- data/lib/active_interactor/context/loader.rb +0 -50
- data/lib/active_interactor/context/status.rb +0 -106
- data/lib/active_interactor/error.rb +0 -46
- data/lib/active_interactor/interactor/callbacks.rb +0 -293
- data/lib/active_interactor/interactor/context.rb +0 -378
- data/lib/active_interactor/interactor/perform.rb +0 -260
- data/lib/active_interactor/interactor/worker.rb +0 -120
- data/lib/active_interactor/models.rb +0 -50
- data/lib/active_interactor/organizer/base.rb +0 -18
- data/lib/active_interactor/organizer/callbacks.rb +0 -275
- data/lib/active_interactor/organizer/interactor_interface.rb +0 -127
- data/lib/active_interactor/organizer/interactor_interface_collection.rb +0 -62
- data/lib/active_interactor/organizer/organize.rb +0 -67
- data/lib/active_interactor/organizer/perform.rb +0 -112
- data/lib/active_interactor/rails/orm/active_record.rb +0 -5
- data/lib/active_interactor/rails/orm/dynamoid.rb +0 -5
- data/lib/active_interactor/rails/orm/mongoid.rb +0 -5
- data/lib/active_interactor/rails/railtie.rb +0 -21
- data/lib/active_interactor/rails.rb +0 -4
- data/lib/active_interactor/version.rb +0 -45
- data/lib/rails/generators/active_interactor/application_context_generator.rb +0 -21
- data/lib/rails/generators/active_interactor/application_interactor_generator.rb +0 -21
- data/lib/rails/generators/active_interactor/application_organizer_generator.rb +0 -21
- data/lib/rails/generators/active_interactor/base.rb +0 -29
- data/lib/rails/generators/active_interactor/generator.rb +0 -21
- data/lib/rails/generators/active_interactor/install_generator.rb +0 -16
- data/lib/rails/generators/active_interactor.rb +0 -5
- data/lib/rails/generators/interactor/context/rspec_generator.rb +0 -17
- data/lib/rails/generators/interactor/context/test_unit_generator.rb +0 -17
- data/lib/rails/generators/interactor/context_generator.rb +0 -22
- data/lib/rails/generators/interactor/generates_context.rb +0 -28
- data/lib/rails/generators/interactor/interactor_generator.rb +0 -25
- data/lib/rails/generators/interactor/organizer_generator.rb +0 -39
- data/lib/rails/generators/interactor/rspec_generator.rb +0 -15
- data/lib/rails/generators/interactor/test_unit_generator.rb +0 -15
- data/lib/rails/generators/templates/active_interactor.erb +0 -17
- data/lib/rails/generators/templates/application_context.rb +0 -4
- data/lib/rails/generators/templates/application_interactor.rb +0 -4
- data/lib/rails/generators/templates/application_organizer.rb +0 -4
- data/lib/rails/generators/templates/context.erb +0 -7
- data/lib/rails/generators/templates/context_spec.erb +0 -7
- data/lib/rails/generators/templates/context_test_unit.erb +0 -9
- data/lib/rails/generators/templates/interactor.erb +0 -15
- data/lib/rails/generators/templates/interactor_spec.erb +0 -7
- data/lib/rails/generators/templates/interactor_test_unit.erb +0 -9
- data/lib/rails/generators/templates/organizer.erb +0 -13
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class <%= class_name %> < ApplicationInteractor
|
4
|
-
<%- if skip_context? && !context_attributes.empty? -%>
|
5
|
-
context_attributes <%= context_attributes.map { |a| ":#{a}" }.join(', ') %>
|
6
|
-
|
7
|
-
<%- end -%>
|
8
|
-
def perform
|
9
|
-
# TODO implement <%= class_name %> call
|
10
|
-
end
|
11
|
-
|
12
|
-
def rollback
|
13
|
-
# TODO implement <%= class_name %> rollback
|
14
|
-
end
|
15
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class <%= class_name %> < ApplicationOrganizer
|
4
|
-
<%- if skip_context? && !context_attributes.empty? -%>
|
5
|
-
context_attributes <%= context_attributes.map { |a| ":#{a}" }.join(', ') %>
|
6
|
-
|
7
|
-
<%- end -%>
|
8
|
-
<%- if interactors.any? -%>
|
9
|
-
organize <%= interactors.join(", ") %>
|
10
|
-
<%- else -%>
|
11
|
-
# organize :interactor_1, :interactor_2
|
12
|
-
<%- end -%>
|
13
|
-
end
|