activeinteractor 0.1.7 → 1.0.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -1
- data/README.md +397 -395
- data/lib/active_interactor.rb +12 -30
- data/lib/active_interactor/base.rb +18 -8
- data/lib/active_interactor/context.rb +4 -181
- data/lib/active_interactor/context/attributes.rb +37 -149
- data/lib/active_interactor/context/base.rb +141 -0
- data/lib/active_interactor/context/loader.rb +45 -0
- data/lib/active_interactor/error.rb +22 -15
- data/lib/active_interactor/interactor.rb +24 -57
- data/lib/active_interactor/interactor/callbacks.rb +64 -76
- data/lib/active_interactor/interactor/context.rb +97 -63
- data/lib/active_interactor/interactor/worker.rb +22 -65
- data/lib/active_interactor/organizer.rb +180 -164
- data/lib/active_interactor/version.rb +2 -3
- data/lib/rails/generators/active_interactor.rb +2 -37
- data/lib/rails/generators/active_interactor/application_interactor_generator.rb +23 -0
- data/lib/rails/generators/active_interactor/install_generator.rb +8 -12
- data/lib/rails/generators/active_interactor/templates/application_context.rb +4 -0
- data/lib/rails/generators/{templates/application_interactor.erb → active_interactor/templates/application_interactor.rb} +0 -0
- data/lib/rails/generators/active_interactor/templates/application_organizer.rb +4 -0
- data/lib/rails/generators/active_interactor/templates/initializer.erb +5 -0
- data/lib/rails/generators/interactor/context/rspec_generator.rb +19 -0
- data/lib/rails/generators/interactor/context/templates/rspec.erb +7 -0
- data/lib/rails/generators/interactor/context/templates/test_unit.erb +9 -0
- data/lib/rails/generators/interactor/context/test_unit_generator.rb +19 -0
- data/lib/rails/generators/interactor/context_generator.rb +19 -0
- data/lib/rails/generators/interactor/interactor_generator.rb +8 -3
- data/lib/rails/generators/interactor/organizer_generator.rb +8 -3
- data/lib/rails/generators/interactor/rspec_generator.rb +4 -3
- data/lib/rails/generators/interactor/templates/context.erb +4 -0
- data/lib/rails/generators/{templates → interactor/templates}/interactor.erb +0 -0
- data/lib/rails/generators/{templates → interactor/templates}/organizer.erb +1 -1
- data/lib/rails/generators/{templates → interactor/templates}/rspec.erb +0 -0
- data/lib/rails/generators/{templates → interactor/templates}/test_unit.erb +0 -0
- data/lib/rails/generators/interactor/test_unit_generator.rb +4 -3
- data/spec/active_interactor/base_spec.rb +51 -0
- data/spec/active_interactor/context/base_spec.rb +229 -0
- data/spec/active_interactor/error_spec.rb +43 -0
- data/spec/active_interactor/interactor/worker_spec.rb +89 -0
- data/spec/active_interactor/organizer_spec.rb +178 -0
- data/spec/active_interactor_spec.rb +26 -0
- data/spec/integration/basic_callback_integration_spec.rb +355 -0
- data/spec/integration/basic_context_integration_spec.rb +73 -0
- data/spec/integration/basic_integration_spec.rb +220 -0
- data/spec/integration/basic_validations_integration_spec.rb +204 -0
- data/spec/spec_helper.rb +44 -0
- data/spec/support/helpers/factories.rb +41 -0
- data/spec/support/shared_examples/a_class_with_interactor_callback_methods_example.rb +99 -0
- data/spec/support/shared_examples/a_class_with_interactor_context_methods_example.rb +58 -0
- data/spec/support/shared_examples/a_class_with_interactor_methods_example.rb +21 -0
- data/spec/support/shared_examples/a_class_with_organizer_callback_methods_example.rb +39 -0
- data/spec/support/spec_helpers.rb +7 -0
- metadata +68 -138
- data/lib/active_interactor/configuration.rb +0 -38
- data/lib/active_interactor/interactor/execution.rb +0 -24
- data/lib/rails/generators/templates/initializer.erb +0 -15
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'codacy-coverage'
|
5
|
+
require 'simplecov'
|
6
|
+
|
7
|
+
Codacy::Reporter.start if ENV['CODACY_PROJECT_TOKEN']
|
8
|
+
SimpleCov.start do
|
9
|
+
track_files '/lib/**/*.rb'
|
10
|
+
add_filter '/spec/'
|
11
|
+
add_filter '/lib/rails/**'
|
12
|
+
end
|
13
|
+
rescue LoadError
|
14
|
+
puts 'Not reporting coverage...'
|
15
|
+
end
|
16
|
+
|
17
|
+
require 'bundler/setup'
|
18
|
+
require 'active_interactor'
|
19
|
+
|
20
|
+
RSpec.configure do |config|
|
21
|
+
# Enable flags like --only-failures and --next-failure
|
22
|
+
config.example_status_persistence_file_path = 'spec/.rspec_status'
|
23
|
+
|
24
|
+
config.before do
|
25
|
+
# suppress logs in test
|
26
|
+
allow(ActiveInteractor.logger).to receive(:error).and_return(true)
|
27
|
+
end
|
28
|
+
|
29
|
+
config.after(:each) do
|
30
|
+
clean_factories!
|
31
|
+
end
|
32
|
+
|
33
|
+
# Disable RSpec exposing methods globally on `Module` and `main`
|
34
|
+
config.disable_monkey_patching!
|
35
|
+
|
36
|
+
config.expect_with :rspec do |c|
|
37
|
+
c.syntax = :expect
|
38
|
+
end
|
39
|
+
|
40
|
+
config.order = :random
|
41
|
+
Kernel.srand config.seed
|
42
|
+
end
|
43
|
+
|
44
|
+
Dir[File.join(__dir__, 'support', '**', '*.rb')].sort.each { |f| require f }
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'active_support/core_ext/string/inflections'
|
4
|
+
|
5
|
+
module Spec
|
6
|
+
module Helpers
|
7
|
+
module FactoryCollection
|
8
|
+
def self.factories
|
9
|
+
@factories ||= []
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
module Factories
|
14
|
+
def build_class(class_name, parent_class = nil, &block)
|
15
|
+
Object.send(:remove_const, class_name.to_sym) if Object.const_defined?(class_name)
|
16
|
+
klass = Object.const_set(class_name, Class.new(parent_class))
|
17
|
+
klass.class_eval(&block) if block
|
18
|
+
FactoryCollection.factories << klass.name.to_sym
|
19
|
+
klass
|
20
|
+
end
|
21
|
+
|
22
|
+
def build_context(class_name = 'TestContext', &block)
|
23
|
+
build_class(class_name, ActiveInteractor::Context::Base, &block)
|
24
|
+
end
|
25
|
+
|
26
|
+
def build_interactor(class_name = 'TestInteractor', &block)
|
27
|
+
build_class(class_name, ActiveInteractor::Base, &block)
|
28
|
+
end
|
29
|
+
|
30
|
+
def build_organizer(class_name = 'TestOrganizer', &block)
|
31
|
+
build_class(class_name, ActiveInteractor::Organizer, &block)
|
32
|
+
end
|
33
|
+
|
34
|
+
def clean_factories!
|
35
|
+
FactoryCollection.factories.each do |factory|
|
36
|
+
Object.send(:remove_const, factory) if Object.const_defined?(factory)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.shared_examples 'a class with interactor callback methods' do
|
4
|
+
describe '.after_context_validation' do
|
5
|
+
subject { interactor_class.after_context_validation(*args) }
|
6
|
+
let(:args) { :some_method }
|
7
|
+
|
8
|
+
it 'sets after validation callback' do
|
9
|
+
expect(interactor_class).to receive(:set_callback)
|
10
|
+
.with(:validation, :after, :some_method, prepend: true)
|
11
|
+
.and_return(true)
|
12
|
+
subject
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '.after_perform' do
|
17
|
+
subject { interactor_class.after_perform(*args) }
|
18
|
+
let(:args) { :some_method }
|
19
|
+
|
20
|
+
it 'sets after perform callback' do
|
21
|
+
expect(interactor_class).to receive(:set_callback)
|
22
|
+
.with(:perform, :after, :some_method)
|
23
|
+
.and_return(true)
|
24
|
+
subject
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe '.after_rollback' do
|
29
|
+
subject { interactor_class.after_rollback(*args) }
|
30
|
+
let(:args) { :some_method }
|
31
|
+
|
32
|
+
it 'sets after rollback callback' do
|
33
|
+
expect(interactor_class).to receive(:set_callback)
|
34
|
+
.with(:rollback, :after, :some_method)
|
35
|
+
.and_return(true)
|
36
|
+
subject
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe '.around_perform' do
|
41
|
+
subject { interactor_class.around_perform(*args) }
|
42
|
+
let(:args) { :some_method }
|
43
|
+
|
44
|
+
it 'sets around perform callback' do
|
45
|
+
expect(interactor_class).to receive(:set_callback)
|
46
|
+
.with(:perform, :around, :some_method)
|
47
|
+
.and_return(true)
|
48
|
+
subject
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe '.around_rollback' do
|
53
|
+
subject { interactor_class.around_rollback(*args) }
|
54
|
+
let(:args) { :some_method }
|
55
|
+
|
56
|
+
it 'sets around rollback callback' do
|
57
|
+
expect(interactor_class).to receive(:set_callback)
|
58
|
+
.with(:rollback, :around, :some_method)
|
59
|
+
.and_return(true)
|
60
|
+
subject
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
describe '.before_context_validation' do
|
65
|
+
subject { interactor_class.before_context_validation(*args) }
|
66
|
+
let(:args) { :some_method }
|
67
|
+
|
68
|
+
it 'sets before validation callback' do
|
69
|
+
expect(interactor_class).to receive(:set_callback)
|
70
|
+
.with(:validation, :before, :some_method, {})
|
71
|
+
.and_return(true)
|
72
|
+
subject
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
describe '.before_perform' do
|
77
|
+
subject { interactor_class.before_perform(*args) }
|
78
|
+
let(:args) { :some_method }
|
79
|
+
|
80
|
+
it 'sets before perform callback' do
|
81
|
+
expect(interactor_class).to receive(:set_callback)
|
82
|
+
.with(:perform, :before, :some_method)
|
83
|
+
.and_return(true)
|
84
|
+
subject
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
describe '.before_rollback' do
|
89
|
+
subject { interactor_class.before_rollback(*args) }
|
90
|
+
let(:args) { :some_method }
|
91
|
+
|
92
|
+
it 'sets before rollback callback' do
|
93
|
+
expect(interactor_class).to receive(:set_callback)
|
94
|
+
.with(:rollback, :before, :some_method)
|
95
|
+
.and_return(true)
|
96
|
+
subject
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.shared_examples 'a class with interactor context methods' do
|
4
|
+
describe '.context_attributes' do
|
5
|
+
subject { interactor_class.context_attributes(attributes) }
|
6
|
+
let(:attributes) { :some_attribute }
|
7
|
+
|
8
|
+
it 'calls .attributes on .context_class' do
|
9
|
+
expect(interactor_class.context_class).to receive(:attributes)
|
10
|
+
.with(:some_attribute)
|
11
|
+
.and_return(true)
|
12
|
+
subject
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '#context_fail!' do
|
17
|
+
subject { interactor_class.new.context_fail! }
|
18
|
+
|
19
|
+
it 'calls #fail! on instance of .context_class' do
|
20
|
+
expect_any_instance_of(interactor_class.context_class).to receive(:fail!)
|
21
|
+
.and_return(true)
|
22
|
+
subject
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe '#context_rollback!' do
|
27
|
+
subject { interactor_class.new.context_rollback! }
|
28
|
+
|
29
|
+
it 'calls #rollback! on instance of .context_class' do
|
30
|
+
expect_any_instance_of(interactor_class.context_class).to receive(:rollback!)
|
31
|
+
.and_return(true)
|
32
|
+
subject
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe '#context_valid?' do
|
37
|
+
subject { interactor_class.new.context_valid? }
|
38
|
+
|
39
|
+
it 'calls #valid? on instance of .context_class' do
|
40
|
+
expect_any_instance_of(interactor_class.context_class).to receive(:valid?)
|
41
|
+
.and_return(true)
|
42
|
+
subject
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe '#finalize_context!' do
|
47
|
+
subject { instance.finalize_context! }
|
48
|
+
let(:instance) { interactor_class.new }
|
49
|
+
|
50
|
+
it 'calls #called! on instance of .context_class' do
|
51
|
+
expect_any_instance_of(interactor_class.context_class).to receive(:called!)
|
52
|
+
.with(instance)
|
53
|
+
subject
|
54
|
+
end
|
55
|
+
|
56
|
+
it { is_expected.to be_an interactor_class.context_class }
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.shared_examples 'a class with interactor methods' do
|
4
|
+
describe '.perform' do
|
5
|
+
subject { interactor_class.perform }
|
6
|
+
|
7
|
+
it 'calls #execute_perform on a new instance' do
|
8
|
+
expect_any_instance_of(interactor_class).to receive(:execute_perform)
|
9
|
+
subject
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '.perform!' do
|
14
|
+
subject { interactor_class.perform! }
|
15
|
+
|
16
|
+
it 'calls #execute_perform! on a new instance' do
|
17
|
+
expect_any_instance_of(interactor_class).to receive(:execute_perform!)
|
18
|
+
subject
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.shared_examples 'a class with organizer callback methods' do
|
4
|
+
describe '.after_each_perform' do
|
5
|
+
subject { interactor_class.after_each_perform(*args) }
|
6
|
+
let(:args) { :some_method }
|
7
|
+
|
8
|
+
it 'sets after each_perform callback' do
|
9
|
+
expect(interactor_class).to receive(:set_callback)
|
10
|
+
.with(:each_perform, :after, :some_method)
|
11
|
+
.and_return(true)
|
12
|
+
subject
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '.around_each_perform' do
|
17
|
+
subject { interactor_class.around_each_perform(*args) }
|
18
|
+
let(:args) { :some_method }
|
19
|
+
|
20
|
+
it 'sets around each_perform callback' do
|
21
|
+
expect(interactor_class).to receive(:set_callback)
|
22
|
+
.with(:each_perform, :around, :some_method)
|
23
|
+
.and_return(true)
|
24
|
+
subject
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe '.before_each_perform' do
|
29
|
+
subject { interactor_class.before_each_perform(*args) }
|
30
|
+
let(:args) { :some_method }
|
31
|
+
|
32
|
+
it 'sets before each_perform callback' do
|
33
|
+
expect(interactor_class).to receive(:set_callback)
|
34
|
+
.with(:each_perform, :before, :some_method)
|
35
|
+
.and_return(true)
|
36
|
+
subject
|
37
|
+
end
|
38
|
+
end
|
39
|
+
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: 0.1
|
4
|
+
version: 1.0.0.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Allen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '4.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '4.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: activesupport
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '4.2'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '7.0'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '4.2'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '7.0'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: bundler
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,146 +64,34 @@ dependencies:
|
|
64
64
|
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '2.0'
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: github-markup
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '3.0'
|
74
|
-
type: :development
|
75
|
-
prerelease: false
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - "~>"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '3.0'
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: mdl
|
83
|
-
requirement: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '0.5'
|
88
|
-
type: :development
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: !ruby/object:Gem::Requirement
|
91
|
-
requirements:
|
92
|
-
- - "~>"
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '0.5'
|
95
67
|
- !ruby/object:Gem::Dependency
|
96
68
|
name: rake
|
97
69
|
requirement: !ruby/object:Gem::Requirement
|
98
70
|
requirements:
|
99
71
|
- - "~>"
|
100
72
|
- !ruby/object:Gem::Version
|
101
|
-
version: '
|
73
|
+
version: '13.0'
|
102
74
|
type: :development
|
103
75
|
prerelease: false
|
104
76
|
version_requirements: !ruby/object:Gem::Requirement
|
105
77
|
requirements:
|
106
78
|
- - "~>"
|
107
79
|
- !ruby/object:Gem::Version
|
108
|
-
version: '
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: redcarpet
|
111
|
-
requirement: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - "~>"
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: '3.4'
|
116
|
-
type: :development
|
117
|
-
prerelease: false
|
118
|
-
version_requirements: !ruby/object:Gem::Requirement
|
119
|
-
requirements:
|
120
|
-
- - "~>"
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: '3.4'
|
80
|
+
version: '13.0'
|
123
81
|
- !ruby/object:Gem::Dependency
|
124
82
|
name: rspec
|
125
83
|
requirement: !ruby/object:Gem::Requirement
|
126
84
|
requirements:
|
127
85
|
- - "~>"
|
128
86
|
- !ruby/object:Gem::Version
|
129
|
-
version: '3.
|
130
|
-
type: :development
|
131
|
-
prerelease: false
|
132
|
-
version_requirements: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - "~>"
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '3.0'
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
name: rspec-collection_matchers
|
139
|
-
requirement: !ruby/object:Gem::Requirement
|
140
|
-
requirements:
|
141
|
-
- - "~>"
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
version: '1.1'
|
87
|
+
version: '3.9'
|
144
88
|
type: :development
|
145
89
|
prerelease: false
|
146
90
|
version_requirements: !ruby/object:Gem::Requirement
|
147
91
|
requirements:
|
148
92
|
- - "~>"
|
149
93
|
- !ruby/object:Gem::Version
|
150
|
-
version: '
|
151
|
-
- !ruby/object:Gem::Dependency
|
152
|
-
name: rubocop
|
153
|
-
requirement: !ruby/object:Gem::Requirement
|
154
|
-
requirements:
|
155
|
-
- - "~>"
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: '0.67'
|
158
|
-
type: :development
|
159
|
-
prerelease: false
|
160
|
-
version_requirements: !ruby/object:Gem::Requirement
|
161
|
-
requirements:
|
162
|
-
- - "~>"
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
version: '0.67'
|
165
|
-
- !ruby/object:Gem::Dependency
|
166
|
-
name: simplecov
|
167
|
-
requirement: !ruby/object:Gem::Requirement
|
168
|
-
requirements:
|
169
|
-
- - "~>"
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
version: '0.16'
|
172
|
-
type: :development
|
173
|
-
prerelease: false
|
174
|
-
version_requirements: !ruby/object:Gem::Requirement
|
175
|
-
requirements:
|
176
|
-
- - "~>"
|
177
|
-
- !ruby/object:Gem::Version
|
178
|
-
version: '0.16'
|
179
|
-
- !ruby/object:Gem::Dependency
|
180
|
-
name: yard
|
181
|
-
requirement: !ruby/object:Gem::Requirement
|
182
|
-
requirements:
|
183
|
-
- - "~>"
|
184
|
-
- !ruby/object:Gem::Version
|
185
|
-
version: '0.9'
|
186
|
-
type: :development
|
187
|
-
prerelease: false
|
188
|
-
version_requirements: !ruby/object:Gem::Requirement
|
189
|
-
requirements:
|
190
|
-
- - "~>"
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: '0.9'
|
193
|
-
- !ruby/object:Gem::Dependency
|
194
|
-
name: yard-activesupport-concern
|
195
|
-
requirement: !ruby/object:Gem::Requirement
|
196
|
-
requirements:
|
197
|
-
- - '='
|
198
|
-
- !ruby/object:Gem::Version
|
199
|
-
version: 0.0.1
|
200
|
-
type: :development
|
201
|
-
prerelease: false
|
202
|
-
version_requirements: !ruby/object:Gem::Requirement
|
203
|
-
requirements:
|
204
|
-
- - '='
|
205
|
-
- !ruby/object:Gem::Version
|
206
|
-
version: 0.0.1
|
94
|
+
version: '3.9'
|
207
95
|
description: |
|
208
96
|
Ruby interactors with ActiveModel::Validations based on the interactors gem.
|
209
97
|
Rich support for attributes, callbacks, and validations, and thread safe performance methods.
|
@@ -218,38 +106,64 @@ files:
|
|
218
106
|
- README.md
|
219
107
|
- lib/active_interactor.rb
|
220
108
|
- lib/active_interactor/base.rb
|
221
|
-
- lib/active_interactor/configuration.rb
|
222
109
|
- lib/active_interactor/context.rb
|
223
110
|
- lib/active_interactor/context/attributes.rb
|
111
|
+
- lib/active_interactor/context/base.rb
|
112
|
+
- lib/active_interactor/context/loader.rb
|
224
113
|
- lib/active_interactor/error.rb
|
225
114
|
- lib/active_interactor/interactor.rb
|
226
115
|
- lib/active_interactor/interactor/callbacks.rb
|
227
116
|
- lib/active_interactor/interactor/context.rb
|
228
|
-
- lib/active_interactor/interactor/execution.rb
|
229
117
|
- lib/active_interactor/interactor/worker.rb
|
230
118
|
- lib/active_interactor/organizer.rb
|
231
119
|
- lib/active_interactor/version.rb
|
232
120
|
- lib/rails/generators/active_interactor.rb
|
121
|
+
- lib/rails/generators/active_interactor/application_interactor_generator.rb
|
233
122
|
- lib/rails/generators/active_interactor/install_generator.rb
|
123
|
+
- lib/rails/generators/active_interactor/templates/application_context.rb
|
124
|
+
- lib/rails/generators/active_interactor/templates/application_interactor.rb
|
125
|
+
- lib/rails/generators/active_interactor/templates/application_organizer.rb
|
126
|
+
- lib/rails/generators/active_interactor/templates/initializer.erb
|
127
|
+
- lib/rails/generators/interactor/context/rspec_generator.rb
|
128
|
+
- lib/rails/generators/interactor/context/templates/rspec.erb
|
129
|
+
- lib/rails/generators/interactor/context/templates/test_unit.erb
|
130
|
+
- lib/rails/generators/interactor/context/test_unit_generator.rb
|
131
|
+
- lib/rails/generators/interactor/context_generator.rb
|
234
132
|
- lib/rails/generators/interactor/interactor_generator.rb
|
235
133
|
- lib/rails/generators/interactor/organizer_generator.rb
|
236
134
|
- lib/rails/generators/interactor/rspec_generator.rb
|
135
|
+
- lib/rails/generators/interactor/templates/context.erb
|
136
|
+
- lib/rails/generators/interactor/templates/interactor.erb
|
137
|
+
- lib/rails/generators/interactor/templates/organizer.erb
|
138
|
+
- lib/rails/generators/interactor/templates/rspec.erb
|
139
|
+
- lib/rails/generators/interactor/templates/test_unit.erb
|
237
140
|
- lib/rails/generators/interactor/test_unit_generator.rb
|
238
|
-
-
|
239
|
-
-
|
240
|
-
-
|
241
|
-
-
|
242
|
-
-
|
243
|
-
-
|
141
|
+
- spec/active_interactor/base_spec.rb
|
142
|
+
- spec/active_interactor/context/base_spec.rb
|
143
|
+
- spec/active_interactor/error_spec.rb
|
144
|
+
- spec/active_interactor/interactor/worker_spec.rb
|
145
|
+
- spec/active_interactor/organizer_spec.rb
|
146
|
+
- spec/active_interactor_spec.rb
|
147
|
+
- spec/integration/basic_callback_integration_spec.rb
|
148
|
+
- spec/integration/basic_context_integration_spec.rb
|
149
|
+
- spec/integration/basic_integration_spec.rb
|
150
|
+
- spec/integration/basic_validations_integration_spec.rb
|
151
|
+
- spec/spec_helper.rb
|
152
|
+
- spec/support/helpers/factories.rb
|
153
|
+
- spec/support/shared_examples/a_class_with_interactor_callback_methods_example.rb
|
154
|
+
- spec/support/shared_examples/a_class_with_interactor_context_methods_example.rb
|
155
|
+
- spec/support/shared_examples/a_class_with_interactor_methods_example.rb
|
156
|
+
- spec/support/shared_examples/a_class_with_organizer_callback_methods_example.rb
|
157
|
+
- spec/support/spec_helpers.rb
|
244
158
|
homepage: https://github.com/aaronmallen/activeinteractor
|
245
159
|
licenses:
|
246
160
|
- MIT
|
247
161
|
metadata:
|
248
162
|
bug_tracker_uri: https://github.com/aaronmallen/activeinteractor/issues
|
249
|
-
changelog_uri: https://github.com/aaronmallen/activeinteractor/blob/
|
250
|
-
documentation_uri: https://www.rubydoc.info/gems/activeinteractor/0.1
|
163
|
+
changelog_uri: https://github.com/aaronmallen/activeinteractor/blob/v1.0.0.beta.1/CHANGELOG.md
|
164
|
+
documentation_uri: https://www.rubydoc.info/gems/activeinteractor/1.0.0.beta.1
|
251
165
|
hompage_uri: https://github.com/aaronmallen/activeinteractor
|
252
|
-
source_code_uri: https://github.com/aaronmallen/activeinteractor/tree/
|
166
|
+
source_code_uri: https://github.com/aaronmallen/activeinteractor/tree/v1.0.0.beta.1
|
253
167
|
wiki_uri: https://github.com/aaronmallen/activeinteractor/wiki
|
254
168
|
post_install_message:
|
255
169
|
rdoc_options: []
|
@@ -262,13 +176,29 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
262
176
|
version: 2.5.0
|
263
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
178
|
requirements:
|
265
|
-
- - "
|
179
|
+
- - ">"
|
266
180
|
- !ruby/object:Gem::Version
|
267
|
-
version:
|
181
|
+
version: 1.3.1
|
268
182
|
requirements: []
|
269
|
-
|
270
|
-
rubygems_version: 2.7.7
|
183
|
+
rubygems_version: 3.0.3
|
271
184
|
signing_key:
|
272
185
|
specification_version: 4
|
273
186
|
summary: Ruby interactors with ActiveModel::Validations
|
274
|
-
test_files:
|
187
|
+
test_files:
|
188
|
+
- spec/active_interactor_spec.rb
|
189
|
+
- spec/spec_helper.rb
|
190
|
+
- spec/integration/basic_validations_integration_spec.rb
|
191
|
+
- spec/integration/basic_context_integration_spec.rb
|
192
|
+
- spec/integration/basic_integration_spec.rb
|
193
|
+
- spec/integration/basic_callback_integration_spec.rb
|
194
|
+
- spec/active_interactor/error_spec.rb
|
195
|
+
- spec/active_interactor/base_spec.rb
|
196
|
+
- spec/active_interactor/context/base_spec.rb
|
197
|
+
- spec/active_interactor/interactor/worker_spec.rb
|
198
|
+
- spec/active_interactor/organizer_spec.rb
|
199
|
+
- spec/support/spec_helpers.rb
|
200
|
+
- spec/support/helpers/factories.rb
|
201
|
+
- spec/support/shared_examples/a_class_with_interactor_methods_example.rb
|
202
|
+
- spec/support/shared_examples/a_class_with_organizer_callback_methods_example.rb
|
203
|
+
- spec/support/shared_examples/a_class_with_interactor_callback_methods_example.rb
|
204
|
+
- spec/support/shared_examples/a_class_with_interactor_context_methods_example.rb
|