async-await 0.4.0 → 0.5.0

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: a6bd51107b67f26bed6fd124f44569ebc65722f1511155e0ea47d7771fb3ef26
4
- data.tar.gz: dfd1c275e5cdc7d2f8cc6d072fb1ff4435fc80b73cf8f149f91c198225897b24
3
+ metadata.gz: 982110e1afe4ee24f5931671df9df8036170b4b2b3cb4dcc8bc1e924739c2099
4
+ data.tar.gz: d6fd5e852edadf8a2b48090847225ac1df2e372ac37c4fbd126b0dc6970c9637
5
5
  SHA512:
6
- metadata.gz: 59cc0fa94b7bd1d9dad30dc5c0ce6753964e5582bd3d73b37288c69bc6f510993c786fdb999872d9f823eab5e1ae5b6ef21087ec4e94fe9da251f8c377b7eb3d
7
- data.tar.gz: f36524a212b64167b92e4133e6d82f78d375c5954a2601476ce3eae30f9efeea781a3b7d2d412a83bd8545f8011e9c423ad220f8d4a5f63a1e4f4b904e3dea86
6
+ metadata.gz: f05e45a97e6cac339a4f6a1bba1e59d2a78ebe7f8f0741adb95525f9c376b5c358685d7a3b68ef3df98ece474f269903fd205bc74d7002b0c6a77183f0cd943f
7
+ data.tar.gz: 0c43a301fb491a90611d14717885913c6934c943f2616d744e23e360bc86b43cb33cd6752dddd7edbcbff370220bbd916f23fa994d302d938f9b9f7719921e89
@@ -7,6 +7,7 @@ matrix:
7
7
  - rvm: 2.4
8
8
  - rvm: 2.5
9
9
  - rvm: 2.6
10
+ - rvm: 2.7
10
11
  - rvm: 2.6
11
12
  env: COVERAGE=BriefSummary,Coveralls
12
13
  - rvm: ruby-head
@@ -15,10 +15,12 @@ Gem::Specification.new do |spec|
15
15
  end
16
16
 
17
17
  spec.require_paths = ["lib"]
18
-
18
+
19
19
  spec.add_dependency "async", "~> 1.3"
20
20
  spec.add_development_dependency "async-rspec", "~> 1.1"
21
-
21
+
22
+ spec.add_dependency "ruby2_keywords"
23
+
22
24
  spec.add_development_dependency "covered"
23
25
  spec.add_development_dependency "bundler"
24
26
  spec.add_development_dependency "rake", "~> 10.0"
@@ -21,6 +21,8 @@
21
21
  require_relative 'await/version'
22
22
  require_relative 'await/methods'
23
23
 
24
+ require 'ruby2_keywords'
25
+
24
26
  module Async
25
27
  module Await
26
28
  def self.included(klass)
@@ -33,15 +35,17 @@ module Async
33
35
 
34
36
  remove_method(name)
35
37
 
36
- define_method(name) do |*args|
38
+ define_method(name) do |*arguments, &block|
37
39
  if task = Task.current?
38
- original_method.bind(self).call(*args)
40
+ original_method.bind(self).call(*arguments, &block)
39
41
  else
40
42
  Async::Reactor.run do
41
- original_method.bind(self).call(*args)
43
+ original_method.bind(self).call(*arguments, &block)
42
44
  end.wait
43
45
  end
44
46
  end
47
+
48
+ ruby2_keywords(name)
45
49
  end
46
50
 
47
51
  def async(name)
@@ -49,11 +53,13 @@ module Async
49
53
 
50
54
  remove_method(name)
51
55
 
52
- define_method(name) do |*args|
56
+ define_method(name) do |*arguments, &block|
53
57
  Async::Reactor.run do |task|
54
- original_method.bind(self).call(*args)
58
+ original_method.bind(self).call(*arguments, &block)
55
59
  end
56
60
  end
61
+
62
+ ruby2_keywords(name)
57
63
  end
58
64
  end
59
65
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module Await
23
- VERSION = "0.4.0"
23
+ VERSION = "0.5.0"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-await
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
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-01-04 00:00:00.000000000 Z
11
+ date: 2020-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: ruby2_keywords
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: covered
43
57
  requirement: !ruby/object:Gem::Requirement