is-async 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/is/async.rb +6 -1
- data/lib/is/async/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e00b0de328c5b262527d1475b49f4fc575b36ebd2db39318047bdd0ac4f5c01
|
4
|
+
data.tar.gz: 8dcbbbc40b273070450f8ba741ab85f2c35d5d5fca10905aacb406d06121175f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: beec719cbe8b2760f31e5e6f696bf746ff8dd5b3a510acb8a83ff2927795ed91a5a500cf16c94b426e4f6475557e0b936003b259714d3f90e2b52d0005c3323a
|
7
|
+
data.tar.gz: b3d9308ac0e8809e0957f813178b94aff1f5058b13934d924e061fc16fd6f7db9542e63492c97040fc8ee0837e276f7c278af8e67e3539a6d9782c847de753a9
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
## v0.1.0
|
2
|
+
|
3
|
+
*unreleased*
|
4
|
+
|
5
|
+
* `chg` [#1](https://github.com/metabahn/isrb/pull/1) Ignore timeout values that are nil or less than 1 ([bryanp](https://github.com/bryanp))
|
6
|
+
|
7
|
+
## [v0.0.1](https://github.com/metabahn/isrb/releases/tag/2020-12-05)
|
8
|
+
|
9
|
+
*released on 2020-12-05*
|
10
|
+
|
11
|
+
* Initial release.
|
12
|
+
|
13
|
+
|
data/lib/is/async.rb
CHANGED
@@ -8,6 +8,7 @@ module Is
|
|
8
8
|
#
|
9
9
|
module Async
|
10
10
|
require_relative "async/timeout"
|
11
|
+
require_relative "async/version"
|
11
12
|
|
12
13
|
# [public] Call asynchronous behavior in a proper async context.
|
13
14
|
#
|
@@ -43,7 +44,11 @@ module Is
|
|
43
44
|
#
|
44
45
|
def timeout(seconds, &block)
|
45
46
|
await do |task|
|
46
|
-
|
47
|
+
if seconds && seconds > 0
|
48
|
+
task.with_timeout(seconds, Timeout) do
|
49
|
+
yield task
|
50
|
+
end
|
51
|
+
else
|
47
52
|
yield task
|
48
53
|
end
|
49
54
|
end
|
data/lib/is/async/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: is-async
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Powell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|
@@ -30,6 +30,7 @@ executables: []
|
|
30
30
|
extensions: []
|
31
31
|
extra_rdoc_files: []
|
32
32
|
files:
|
33
|
+
- CHANGELOG.md
|
33
34
|
- LICENSE
|
34
35
|
- README.md
|
35
36
|
- lib/is/async.rb
|