Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.8.0

* Remove `redis.replicate_commands()` from Lua scripts for Redis 7.2+ compatibility.
This call was required for Redis < 5.0 and has been removed in Redis 7.2.
* Require `redis` gem >= 4 (previously >= 2). Versions 2.x and 3.x are no longer maintained.

# 0.7.1

* Fix use of a ConnectionPool as `redis:` argument which was broken in 0.7.0
Expand Down
3 changes: 0 additions & 3 deletions lib/prorate/leaky_bucket.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
-- args: key_base, leak_rate, bucket_ttl, fillup. To just verify the state of the bucket leak_rate of 0 may be passed.
-- returns: the leve of the bucket in number of tokens

-- this is required to be able to use TIME and writes; basically it lifts the script into IO
redis.replicate_commands()

-- Redis documentation recommends passing the keys separately so that Redis
-- can - in the future - verify that they live on the same shard of a cluster, and
-- raise an error if they are not. As far as can be understood this functionality is not
Expand Down
2 changes: 0 additions & 2 deletions lib/prorate/rate_limit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
-- if the block time is nonzero, the second integer is always zero. If the block time is zero,
-- the second integer indicates the level of the bucket

-- this is required to be able to use TIME and writes; basically it lifts the script into IO
redis.replicate_commands()
-- make some nicer looking variable names:
local retval = nil

Expand Down
2 changes: 1 addition & 1 deletion lib/prorate/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Prorate
VERSION = "0.7.3"
VERSION = "0.8.0"
end
2 changes: 1 addition & 1 deletion prorate.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "redis", ">= 2"
spec.add_dependency "redis", ">= 4"
spec.add_development_dependency "connection_pool", "~> 2"
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake", "~> 13.0"
Expand Down