pecorino 0.4.0 → 0.4.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 +4 -4
- data/.github/workflows/ci.yml +1 -8
- data/.gitignore +2 -1
- data/.standard.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/lib/pecorino/throttle.rb +2 -2
- data/lib/pecorino/version.rb +1 -1
- metadata +4 -4
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1326301c772aaee4b63feaba7e29b385c274d4f6b256a3b413d3b7c094654db8
|
|
4
|
+
data.tar.gz: 8a3973b17c1ded234abcc76937de9225a0099dd4445aefd313a7ade0d9ecb843
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d8462bc60d93b6cbbd4729a14fdf84fb9abd18f9b3ce539dc110784cc56f5a9fe2bd107eb370a9caff1e229200a6b345ca3e73ac95a98013a618923e963c8fc
|
|
7
|
+
data.tar.gz: ad2d89319ba89786e0e2befc3449bb9d1211d0555419a9118df5ba42aa1744ad617b4b27686928fb1fc6ac9f0368a93247d4208beb1b9fab7881322779e11616
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -40,16 +40,9 @@ jobs:
|
|
|
40
40
|
strategy:
|
|
41
41
|
matrix:
|
|
42
42
|
ruby:
|
|
43
|
-
|
|
43
|
+
- '2.7'
|
|
44
44
|
- '3.2'
|
|
45
45
|
services:
|
|
46
|
-
# mysql:
|
|
47
|
-
# image: mysql:5.7
|
|
48
|
-
# env:
|
|
49
|
-
# MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
|
50
|
-
# ports:
|
|
51
|
-
# - 3306:3306
|
|
52
|
-
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
53
46
|
postgres:
|
|
54
47
|
image: postgres
|
|
55
48
|
env:
|
data/.gitignore
CHANGED
data/.standard.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby_version: 2.7
|
data/CHANGELOG.md
CHANGED
data/lib/pecorino/throttle.rb
CHANGED
|
@@ -54,8 +54,8 @@ class Pecorino::Throttle
|
|
|
54
54
|
# the bucket to leak out to the level of 0
|
|
55
55
|
# @param leaky_bucket_options Options for `Pecorino::LeakyBucket.new`
|
|
56
56
|
# @see PecorinoLeakyBucket.new
|
|
57
|
-
def initialize(key:, block_for: nil, **)
|
|
58
|
-
@bucket = Pecorino::LeakyBucket.new(key
|
|
57
|
+
def initialize(key:, block_for: nil, **leaky_bucket_options)
|
|
58
|
+
@bucket = Pecorino::LeakyBucket.new(key: key, **leaky_bucket_options)
|
|
59
59
|
@key = key.to_s
|
|
60
60
|
@block_for = block_for ? block_for.to_f : (@bucket.capacity / @bucket.leak_rate)
|
|
61
61
|
end
|
data/lib/pecorino/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pecorino
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Julik Tarkhanov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-02-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -146,7 +146,7 @@ extra_rdoc_files: []
|
|
|
146
146
|
files:
|
|
147
147
|
- ".github/workflows/ci.yml"
|
|
148
148
|
- ".gitignore"
|
|
149
|
-
- ".
|
|
149
|
+
- ".standard.yml"
|
|
150
150
|
- CHANGELOG.md
|
|
151
151
|
- CODE_OF_CONDUCT.md
|
|
152
152
|
- Gemfile
|
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
185
185
|
- !ruby/object:Gem::Version
|
|
186
186
|
version: '0'
|
|
187
187
|
requirements: []
|
|
188
|
-
rubygems_version: 3.
|
|
188
|
+
rubygems_version: 3.3.7
|
|
189
189
|
signing_key:
|
|
190
190
|
specification_version: 4
|
|
191
191
|
summary: Database-based rate limiter using leaky buckets
|
data/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.2.2
|