async-limiter 1.3.0 → 1.3.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: 0f0332a099a13957c6de625c09512af704eeaa2c513b5460bcf213315e21e120
4
- data.tar.gz: 6c3b884613ff5128c7443bd376ba6885c6d6b408c2be8e5e87a669ae1b232f5e
3
+ metadata.gz: 5b8fe52d0adb39187c467e5a9195df3fc974cdad0c66e20ca4fbb8f2331e108a
4
+ data.tar.gz: 65aee35742f72694b2a1c1e4d34b41ee0d6e03eedc0f82029dbac31d042a1ad1
5
5
  SHA512:
6
- metadata.gz: 87d13bfea8dabd356cf7662dc79011c0e78584fb5f0e917a79669fecc1c1c23851978508eb431cf7dcac55edcabcfc781ddefbc3cc2ea85cf37b0edeffa23757
7
- data.tar.gz: 50789debe4ebef773acbacf47c76ae799ac418fe0ea69695a250fed60027fdc119c0c6c895b205a70edb3c950571a9fc07ea11ba1a0691f50b62f6141d6bd5cb
6
+ metadata.gz: 575d83be39d544535c060e113934f147e94a81f97423b3207036610edc7b8e5a230dd46301e7e20253cbd477cf1ef2ba8ead19dc610a465665c10238c5357090
7
+ data.tar.gz: 033f5f5b7063c908fb250198789e053c02b512e9c04e1d56fe8ac01486c93030df7dc7046cf4923cdb2f3282c8f1ad066f97ed8319f6061ba9f1a5a275b9abda
@@ -1,5 +1,5 @@
1
1
  module Async
2
2
  module Limiter
3
- VERSION = "1.3.0"
3
+ VERSION = "1.3.1"
4
4
  end
5
5
  end
@@ -4,14 +4,15 @@ module Async
4
4
  module Limiter
5
5
  class Window
6
6
  class Continuous < Window
7
- def initialize(limit = 1, window: 1, parent: nil, lock: true)
7
+ def initialize(limit = 1, window: 1, parent: nil, lock: true, queue: [])
8
8
  super(
9
9
  limit,
10
10
  type: :sliding, # type doesn't matter, but sliding is less work
11
11
  burstable: false,
12
12
  window: window,
13
13
  parent: parent,
14
- lock: lock
14
+ lock: lock,
15
+ queue: queue
15
16
  )
16
17
  end
17
18
  end
@@ -4,14 +4,15 @@ module Async
4
4
  module Limiter
5
5
  class Window
6
6
  class Fixed < Window
7
- def initialize(limit = 1, window: 1, parent: nil, lock: true)
7
+ def initialize(limit = 1, window: 1, parent: nil, lock: true, queue: [])
8
8
  super(
9
9
  limit,
10
10
  type: :fixed,
11
11
  burstable: true,
12
12
  window: window,
13
13
  parent: parent,
14
- lock: lock
14
+ lock: lock,
15
+ queue: queue
15
16
  )
16
17
  end
17
18
  end
@@ -4,14 +4,15 @@ module Async
4
4
  module Limiter
5
5
  class Window
6
6
  class Sliding < Window
7
- def initialize(limit = 1, window: 1, parent: nil, lock: true)
7
+ def initialize(limit = 1, window: 1, parent: nil, lock: true, queue: [])
8
8
  super(
9
9
  limit,
10
10
  type: :sliding,
11
11
  burstable: true,
12
12
  window: window,
13
13
  parent: parent,
14
- lock: lock
14
+ lock: lock,
15
+ queue: queue
15
16
  )
16
17
  end
17
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-limiter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Sutic