inst-jobs 2.4.1 → 2.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/delayed/message_sending.rb +1 -1
- data/lib/delayed/version.rb +1 -1
- data/spec/delayed/message_sending_spec.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01775da114eba627cb910bdfeb9856bedc03ea0dabca5b66c4fe841022f9102e
|
4
|
+
data.tar.gz: 0dfd89d95cec1fd67f37df9fafee7ba7bb880c3f60483467cbb2af8a3e9978e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69268ba783f682b4e228eb9f26203e5f82b1584e77bd6c3d31a1a9bec17bda5aa3b7804516e09bf30fbba225d55c19b1d31bf4e848f03021e6fd87e76f16dfd2
|
7
|
+
data.tar.gz: 418042945e1c4c92f534e0c287e2207ff63f748556b87a1039364e044a3923e00a3b9294a9033d5d2ddc386086ae002f4aa8dc26c855aad8b89a9bbfa3b17b00
|
@@ -39,7 +39,7 @@ module Delayed
|
|
39
39
|
|
40
40
|
return @object.public_send(method, *args) if kwargs.empty?
|
41
41
|
|
42
|
-
@object.public_send(method, *args, **kwargs)
|
42
|
+
return @object.public_send(method, *args, **kwargs)
|
43
43
|
end
|
44
44
|
|
45
45
|
ignore_transaction = @enqueue_args.delete(:ignore_transaction)
|
data/lib/delayed/version.rb
CHANGED
@@ -20,6 +20,10 @@ RSpec.describe Delayed::MessageSending do
|
|
20
20
|
other.delay(**enqueue_args).protected_method
|
21
21
|
end
|
22
22
|
|
23
|
+
def call_public(**_kwargs)
|
24
|
+
42
|
25
|
+
end
|
26
|
+
|
23
27
|
private
|
24
28
|
|
25
29
|
def private_method; end
|
@@ -74,6 +78,10 @@ RSpec.describe Delayed::MessageSending do
|
|
74
78
|
klass.new.call_protected(synchronous: true)
|
75
79
|
end
|
76
80
|
|
81
|
+
it "directly calls a public method on an object with kwargs" do
|
82
|
+
expect(klass.new.delay(synchronous: true).call_public(kwarg: 10)).to eq 42
|
83
|
+
end
|
84
|
+
|
77
85
|
it "warns about directly sending a protected message asynchronously" do
|
78
86
|
expect { klass.new.delay.protected_method }.to raise_error(NoMethodError)
|
79
87
|
end
|