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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ecd9b8161803b5a16814d6b05d200a3107b0febfe13e2a82cd0d4a05e963b81
4
- data.tar.gz: 7e316f28acccbaa9f67dbc49d45cc1e5b47faafc5e2d5dfd4ba92f5be381f8d5
3
+ metadata.gz: 66961ad27a598bec0b93dc0297720eb97d0cdd5199b05e7e1490b731bc098de0
4
+ data.tar.gz: 6432d13df06f22d9f30c8ad4a766b80dc5f3726be2f5a80495efc3edd6b0d444
5
5
  SHA512:
6
- metadata.gz: 8b1eb706406fcbd856c2d23a3f43d19faed8cbed8478ee1a71fcf602ea773f6a259bfbf10ac987efdaaa54fb847d67aca710212706c630fbb655f0c9fc49312b
7
- data.tar.gz: d2676226b5ce8c0605d303a59fd30e3982d9da381d1020b18ffe826fe35fcb637eeef2ce01af9d0ad1945c3c7ed1ee5880c61790f0c8da4de75a38d31624257c
6
+ metadata.gz: 23295d8872c9888924deb8f6937f3030f371a74ecb6c3ee0e5d0d79a7bf2a0419aa590c1705e18b76a731bb1f1bf5893599cd677835c8666b075fb3b86766cd4
7
+ data.tar.gz: ac5eaf844aa979041a8fe09c11336f413310576d9736209083baaf27a617208f5d8cc39be9a7e2ff308d0879488171099afd4e845d4bbb6da804a61e0c62e282
data/interactor.gemspec CHANGED
@@ -2,7 +2,7 @@ require "English"
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "interactor_with_steroids"
5
- spec.version = "1.1.1"
5
+ spec.version = "1.1.2"
6
6
 
7
7
  spec.author = "Collective Idea/Sorare Team"
8
8
  spec.email = "hello@sorare.com"
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
 
@@ -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({}) { context }
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.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.1.6
103
+ rubygems_version: 3.3.3
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Simple interactor implementation