async 1.26.0 → 1.26.1

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: d546f73c635b8f801dce53795cd008b1c77012c036ffc36f625ad070a0fad6da
4
- data.tar.gz: b1314aaf0f5c0390c1a6a4db03f97a0372fcf7ecee7e7e8faf44092164741c65
3
+ metadata.gz: af5004e8d05722b3187b65bad44d03c64514cef04b3ea84f604f2491b04c9441
4
+ data.tar.gz: 3e00948623889a9a584767a5678b55d474b4015603da9031eea4ab420bea80e0
5
5
  SHA512:
6
- metadata.gz: 5e72558025db19f21d522ea75dd0d9ba020df444b813612acc6a8648e23a95fb59319a0fbf8bf4185bd808ccd86a3f5d8070ad27eb74231c72c5bfb2f580ab21
7
- data.tar.gz: ba5c752376b8edd1e6bd8b7c9862ce5b5943529a1b9945e8a7c797ca72e22ed23fde6049999defb15b08dbd5b3aa68177bac5a627d077109002ba0efc7ad3853
6
+ metadata.gz: eb57c398f8f778ded45849d98412106133bd68294eeee34e734144b1792b63c1c7f4da9087cf36ed14d385efacd730a4e461f029ba22503a89efa56debd7dc5c
7
+ data.tar.gz: d81812db0ca0f6ad8d81d6582ce82d6b1e210b437a6614d825ad0bc1be4cb200f2f3c930df51f6fc963b82e0c98bfc757fe339646a9227d6dacfab06e70b469e
@@ -50,10 +50,10 @@ module Async
50
50
 
51
51
  return reactor.async(*arguments, **options, &block)
52
52
  else
53
- reactor = self.new(**options)
53
+ reactor = self.new
54
54
 
55
55
  begin
56
- return reactor.run(*arguments, &block)
56
+ return reactor.run(*arguments, **options, &block)
57
57
  ensure
58
58
  reactor.close
59
59
  end
@@ -223,10 +223,10 @@ module Async
223
223
  end
224
224
 
225
225
  # Run the reactor until all tasks are finished. Proxies arguments to {#async} immediately before entering the loop, if a block is provided.
226
- def run(*arguments, &block)
226
+ def run(*arguments, **options, &block)
227
227
  raise RuntimeError, 'Reactor has been closed' if @selector.nil?
228
228
 
229
- initial_task = self.async(*arguments, &block) if block_given?
229
+ initial_task = self.async(*arguments, **options, &block) if block_given?
230
230
 
231
231
  while self.run_once
232
232
  # Round and round we go!
@@ -21,5 +21,5 @@
21
21
  # THE SOFTWARE.
22
22
 
23
23
  module Async
24
- VERSION = "1.26.0"
24
+ VERSION = "1.26.1"
25
25
  end
@@ -29,5 +29,11 @@ RSpec.describe Async do
29
29
  expect(task).to be_a Async::Task
30
30
  end
31
31
  end
32
+
33
+ it "passes options through to initial task" do
34
+ Async(transient: true) do |task|
35
+ expect(task).to be_transient
36
+ end
37
+ end
32
38
  end
33
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.26.0
4
+ version: 1.26.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-05 00:00:00.000000000 Z
11
+ date: 2020-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nio4r