iopromise 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb3b131c886899408dfd81fa4d0fdefca9491df9e1a53ddeb6c684ab6043d4fc
4
- data.tar.gz: f0f42864a1860e8e30f01c2994e85bebf8d47828852a8990d973a74ebbe90410
3
+ metadata.gz: 323b4f0107580d674fa42c4f65644dcae302c822c9d370dd9e3effbf5b4c13eb
4
+ data.tar.gz: dc8b3937fea0505e598c0855ccc695b98dc837e221b8959a61acfbf18838c3b5
5
5
  SHA512:
6
- metadata.gz: 6a68af080d98407fd8b6b1764e589dff42f6597e6c5118ca62c4d61387bd1cd475c01f5fe09ef3702d287da9c440c8811f22ff44379381e6477503400e0cf9b3
7
- data.tar.gz: a07492017391dae8dba06b5b76b1bcb738845fc5e5d87a8a5a44f397bb9d1d2f8ee3586ed31a3fc35b7633bee45616744324dbd0133cd96b08521602a0e61c29
6
+ metadata.gz: 8737b6c9a1e1ee2376f586ceca83a074679d6e0b53e073e07df8817f3f14fe261b606f5398618bcd984f2441b288b89fb9d660f499428d60c93cf35e7b561f7e
7
+ data.tar.gz: c82ed8d1da207ce2bfa766b8a1fd88aa4ba803565b749f4c77e0cb90a5b8f9c0289f60111260daf4acc5b7ddaae43b0ddcadd91212201778516b1637f9db2cb6
data/lib/iopromise.rb CHANGED
@@ -36,18 +36,18 @@ module IOPromise
36
36
  @started_executing
37
37
  end
38
38
 
39
- def notify_completion
40
- @instrument_end.each { |cb| cb.call(self) }
39
+ def notify_completion(value: nil, reason: nil)
40
+ @instrument_end.each { |cb| cb.call(self, value: value, reason: reason) }
41
41
  @instrument_end = []
42
42
  end
43
43
 
44
44
  def fulfill(value)
45
- notify_completion
45
+ notify_completion(value: value)
46
46
  super(value)
47
47
  end
48
48
 
49
49
  def reject(reason)
50
- notify_completion
50
+ notify_completion(reason: reason)
51
51
  super(reason)
52
52
  end
53
53
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IOPromise
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iopromise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Theo Julienne