Skip to content

Commit

Permalink
Appease rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Apr 29, 2024
1 parent c4e6dcc commit bdb8341
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.0
4 changes: 2 additions & 2 deletions lib/redis/commands/hashes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def hgetall(key)
# - `:count => Integer`: return count keys at most per iteration
#
# @return [String, Array<[String, String]>] the next cursor and all found keys
#
#
# See the [Redis Server HSCAN documentation](https://redis.io/docs/latest/commands/hscan/) for further details
def hscan(key, cursor, **options)
_scan(:hscan, cursor, [key], **options) do |reply|
Expand All @@ -241,7 +241,7 @@ def hscan(key, cursor, **options)
# - `:count => Integer`: return count keys at most per iteration
#
# @return [Enumerator] an enumerator for all found keys
#
#
# See the [Redis Server HSCAN documentation](https://redis.io/docs/latest/commands/hscan/) for further details
def hscan_each(key, **options, &block)
return to_enum(:hscan_each, key, **options) unless block_given?
Expand Down
6 changes: 3 additions & 3 deletions lib/redis/commands/keys.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Keys
# - `:type => String`: return keys only of the given type
#
# @return [String, Array<String>] the next cursor and all found keys
#
#
# See the [Redis Server SCAN documentation](https://redis.io/docs/latest/commands/scan/) for further details
def scan(cursor, **options)
_scan(:scan, cursor, [], **options)
Expand All @@ -48,7 +48,7 @@ def scan(cursor, **options)
# - `:type => String`: return keys only of the given type
#
# @return [Enumerator] an enumerator for all found keys
#
#
# See the [Redis Server SCAN documentation](https://redis.io/docs/latest/commands/scan/) for further details
def scan_each(**options, &block)
return to_enum(:scan_each, **options) unless block_given?
Expand Down Expand Up @@ -286,7 +286,7 @@ def exists?(*keys)
#
# @param [String] pattern
# @return [Array<String>]
#
#
# See the [Redis Server KEYS documentation](https://redis.io/docs/latest/commands/keys/) for further details
def keys(pattern = "*")
send_command([:keys, pattern]) do |reply|
Expand Down
9 changes: 6 additions & 3 deletions lib/redis/commands/pubsub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,23 @@ def unsubscribe(*channels)
end

# Listen for messages published to channels matching the given patterns.
# See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/) for further details
# See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/)
# for further details
def psubscribe(*channels, &block)
_subscription(:psubscribe, 0, channels, block)
end

# Listen for messages published to channels matching the given patterns.
# Throw a timeout error if there is no messages for a timeout period.
# See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/) for further details
# See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/)
# for further details
def psubscribe_with_timeout(timeout, *channels, &block)
_subscription(:psubscribe_with_timeout, timeout, channels, block)
end

# Stop listening for messages posted to channels matching the given patterns.
# See the [Redis Server PUNSUBSCRIBE documentation](https://redis.io/docs/latest/commands/punsubscribe/) for further details
# See the [Redis Server PUNSUBSCRIBE documentation](https://redis.io/docs/latest/commands/punsubscribe/)
# for further details
def punsubscribe(*channels)
_subscription(:punsubscribe, 0, channels, nil)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/redis/commands/sorted_sets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ def zscan(key, cursor, **options)
# - `:count => Integer`: return count keys at most per iteration
#
# @return [Enumerator] an enumerator for all found scores and members
#
#
# See the [Redis Server ZSCAN documentation](https://redis.io/docs/latest/commands/zscan/) for further details
def zscan_each(key, **options, &block)
return to_enum(:zscan_each, key, **options) unless block_given?
Expand Down
6 changes: 4 additions & 2 deletions lib/redis/distributed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -948,14 +948,16 @@ def unsubscribe(*channels)
end

# Listen for messages published to channels matching the given patterns.
# See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/) for further details
# See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/)
# for further details
def psubscribe(*channels, &block)
raise NotImplementedError
end

# Stop listening for messages posted to channels matching the given
# patterns.
# See the [Redis Server PUNSUBSCRIBE documentation](https://redis.io/docs/latest/commands/punsubscribe/) for further details
# See the [Redis Server PUNSUBSCRIBE documentation](https://redis.io/docs/latest/commands/punsubscribe/)
# for further details
def punsubscribe(*channels)
raise NotImplementedError
end
Expand Down

0 comments on commit bdb8341

Please sign in to comment.