interactor_with_steroids 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/interactor.gemspec +1 -1
- data/lib/interactor.rb +1 -1
- data/spec/interactor/context_spec.rb +2 -2
- data/spec/interactor_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66961ad27a598bec0b93dc0297720eb97d0cdd5199b05e7e1490b731bc098de0
|
4
|
+
data.tar.gz: 6432d13df06f22d9f30c8ad4a766b80dc5f3726be2f5a80495efc3edd6b0d444
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23295d8872c9888924deb8f6937f3030f371a74ecb6c3ee0e5d0d79a7bf2a0419aa590c1705e18b76a731bb1f1bf5893599cd677835c8666b075fb3b86766cd4
|
7
|
+
data.tar.gz: ac5eaf844aa979041a8fe09c11336f413310576d9736209083baaf27a617208f5d8cc39be9a7e2ff308d0879488171099afd4e845d4bbb6da804a61e0c62e282
|
data/interactor.gemspec
CHANGED
data/lib/interactor.rb
CHANGED
@@ -92,7 +92,7 @@ module Interactor
|
|
92
92
|
# MyInteractor.new
|
93
93
|
# # => #<MyInteractor @context=#<Interactor::Context>>
|
94
94
|
def initialize(context = {})
|
95
|
-
@context = self.context_class.build(context)
|
95
|
+
@context = self.context_class.build(**context.to_h)
|
96
96
|
end
|
97
97
|
|
98
98
|
# Internal: Invoke an interactor instance along with all defined hooks. The
|
@@ -27,7 +27,7 @@ module Interactor
|
|
27
27
|
|
28
28
|
it "doesn't affect the original hash" do
|
29
29
|
hash = { foo: "bar" }
|
30
|
-
context = interactor.context_class.build(hash)
|
30
|
+
context = interactor.context_class.build(**hash)
|
31
31
|
|
32
32
|
expect(context).to be_a(interactor.context_class)
|
33
33
|
expect {
|
@@ -39,7 +39,7 @@ module Interactor
|
|
39
39
|
|
40
40
|
it "ignores any additional argument" do
|
41
41
|
hash = { foo: 'bar', bar: "baz" }
|
42
|
-
expect { interactor.context_class.build(hash) }.not_to raise_error
|
42
|
+
expect { interactor.context_class.build(**hash) }.not_to raise_error
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
data/spec/interactor_spec.rb
CHANGED
@@ -52,7 +52,7 @@ describe Interactor do
|
|
52
52
|
end
|
53
53
|
|
54
54
|
it "initializes a blank context if none is given" do
|
55
|
-
expect(Interactor::Context).to receive(:build).once.with(
|
55
|
+
expect(Interactor::Context).to receive(:build).once.with(no_args) { context }
|
56
56
|
|
57
57
|
instance = interactor.new
|
58
58
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: interactor_with_steroids
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Collective Idea/Sorare Team
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
|
-
rubygems_version: 3.
|
103
|
+
rubygems_version: 3.3.3
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Simple interactor implementation
|