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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19f67ad0711e198e5da6571d2ad32db3d3417e8dcb82b9a376caf578f321026d
4
- data.tar.gz: 7648b1c8e53701268a2da0c9c7f9280a8fffd80a4fc28e92e7bf24e306fd60b2
3
+ metadata.gz: 6e00b0de328c5b262527d1475b49f4fc575b36ebd2db39318047bdd0ac4f5c01
4
+ data.tar.gz: 8dcbbbc40b273070450f8ba741ab85f2c35d5d5fca10905aacb406d06121175f
5
5
  SHA512:
6
- metadata.gz: 957787122b0386804fc2623a28f8f2696c2cd8d711affac950175f8b61eb09386fda78e67a5f083da8ba98899e97ca5a8a00bcb099ebd887099bf61d338df4d5
7
- data.tar.gz: 2bc911244ce1636f79281c1e2017fc431f86eb86ad0ee3d9774a99dababd90db7044fe1b638a471c82ef35e6040055a9e052ad2d8c1f29dea720501d8ae5fd37
6
+ metadata.gz: beec719cbe8b2760f31e5e6f696bf746ff8dd5b3a510acb8a83ff2927795ed91a5a500cf16c94b426e4f6475557e0b936003b259714d3f90e2b52d0005c3323a
7
+ data.tar.gz: b3d9308ac0e8809e0957f813178b94aff1f5058b13934d924e061fc16fd6f7db9542e63492c97040fc8ee0837e276f7c278af8e67e3539a6d9782c847de753a9
@@ -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
+
@@ -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
- task.with_timeout(seconds, Timeout) do
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Is
4
4
  module Async
5
- VERSION = "0.0.1"
5
+ VERSION = "0.1.0"
6
6
 
7
7
  def self.version
8
8
  VERSION
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.1
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-06 00:00:00.000000000 Z
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