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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 445e9997824e9ef7857a31e626e2a6de981d466fd4f5187299cff86533596b13
4
- data.tar.gz: 9b31fad0bf017b2a9ee1b4d4f0660376945db76970c65e61ecadeccf706425b6
3
+ metadata.gz: 1326301c772aaee4b63feaba7e29b385c274d4f6b256a3b413d3b7c094654db8
4
+ data.tar.gz: 8a3973b17c1ded234abcc76937de9225a0099dd4445aefd313a7ade0d9ecb843
5
5
  SHA512:
6
- metadata.gz: 9b82a54b4e6f721aa2c752d9f7d0503f5b621174826a76594ef9c91a1b943b881c1e377c8ef7c7d4c57d810a4f9be82ac17bad21c12f65570ebf3daba5c51c7d
7
- data.tar.gz: 95436d3b317c43d08a6630ad5e4dba1494cdbcae2f3e98ffccfb9cecf896a8ad2f8a02861d987c0288c1cb04b29e7fb1d490bdf37821b7858b472cdb82e6092b
6
+ metadata.gz: 7d8462bc60d93b6cbbd4729a14fdf84fb9abd18f9b3ce539dc110784cc56f5a9fe2bd107eb370a9caff1e229200a6b345ca3e73ac95a98013a618923e963c8fc
7
+ data.tar.gz: ad2d89319ba89786e0e2befc3449bb9d1211d0555419a9118df5ba42aa1744ad617b4b27686928fb1fc6ac9f0368a93247d4208beb1b9fab7881322779e11616
@@ -40,16 +40,9 @@ jobs:
40
40
  strategy:
41
41
  matrix:
42
42
  ruby:
43
- # - '2.6'
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
@@ -6,4 +6,5 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
- Gemfile.lock
9
+ Gemfile.lock
10
+ .ruby-version
data/.standard.yml ADDED
@@ -0,0 +1 @@
1
+ ruby_version: 2.7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.4.1] - 2024-02-11
2
+
3
+ - Make sure Pecorino works on Ruby 2.7 as well by removing 3.x-exclusive syntax
4
+
1
5
  ## [0.4.0] - 2024-01-22
2
6
 
3
7
  - Use Bucket#connditional_fillup inside Throttle and throttle only when the capacity _would_ be exceeded, as opposed
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pecorino
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
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.0
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-01-22 00:00:00.000000000 Z
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
- - ".ruby-version"
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.4.10
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