Skip to content

Commit 52f83bc

Browse files
committed
Modernize gem.
1 parent 63d2ef0 commit 52f83bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+183
-172
lines changed

.github/workflows/test-coverage.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ jobs:
4444
timeout-minutes: 5
4545
run: bundle exec bake test
4646

47-
- uses: actions/upload-artifact@v3
47+
- uses: actions/upload-artifact@v4
4848
with:
49+
include-hidden-files: true
50+
if-no-files-found: error
4951
name: coverage-${{matrix.os}}-${{matrix.ruby}}
5052
path: .covered.db
5153

@@ -77,6 +79,8 @@ jobs:
7779

7880
- uses: actions/upload-artifact@v3
7981
with:
82+
include-hidden-files: true
83+
if-no-files-found: error
8084
name: coverage-${{matrix.os}}-${{matrix.ruby}}
8185
path: .covered.db
8286

@@ -108,6 +112,8 @@ jobs:
108112

109113
- uses: actions/upload-artifact@v3
110114
with:
115+
include-hidden-files: true
116+
if-no-files-found: error
111117
name: coverage-${{matrix.os}}-${{matrix.ruby}}
112118
path: .covered.db
113119

@@ -125,7 +131,7 @@ jobs:
125131
ruby-version: "3.3"
126132
bundler-cache: true
127133

128-
- uses: actions/download-artifact@v3
134+
- uses: actions/download-artifact@v4
129135

130136
- name: Validate coverage
131137
timeout-minutes: 5

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,7 @@ Layout/EmptyLinesAroundModuleBody:
4747

4848
Style/FrozenStringLiteralComment:
4949
Enabled: true
50+
51+
Style/StringLiterals:
52+
Enabled: true
53+
EnforcedStyle: double_quotes

async-redis.gemspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ Gem::Specification.new do |spec|
77
spec.version = Async::Redis::VERSION
88

99
spec.summary = "A Redis client library."
10-
spec.authors = ["Samuel Williams", "Huba Nagy", "David Ortiz", "Gleb Sinyavskiy", "Mikael Henriksson", "Troex Nevelin", "Alex Matchneer", "Jeremy Jung", "Olle Jonsson", "Pierre Montelle", "Salim Semaoune", "Tim Willard"]
10+
spec.authors = ["Samuel Williams", "Huba Nagy", "David Ortiz", "Gleb Sinyavskiy", "Mikael Henriksson", "Troex Nevelin", "Alex Matchneer", "Jeremy Jung", "Joan Lledó", "Olle Jonsson", "Pierre Montelle", "Salim Semaoune", "Tim Willard"]
1111
spec.license = "MIT"
1212

13-
spec.cert_chain = ['release.cert']
14-
spec.signing_key = File.expand_path('~/.gem/release.pem')
13+
spec.cert_chain = ["release.cert"]
14+
spec.signing_key = File.expand_path("~/.gem/release.pem")
1515

1616
spec.homepage = "https://github.com/socketry/async-redis"
1717

@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
2020
"source_code_uri" => "https://github.com/socketry/async-redis.git",
2121
}
2222

23-
spec.files = Dir.glob(['{lib}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__)
23+
spec.files = Dir.glob(["{lib}/**/*", "*.md"], File::FNM_DOTMATCH, base: __dir__)
2424

2525
spec.required_ruby_version = ">= 3.1"
2626

bake.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# Copyright, 2018-2023, by Samuel Williams.
55

66
def client
7-
require 'irb'
8-
require 'async/redis/client'
7+
require "irb"
8+
require "async/redis/client"
99

1010
endpoint = Async::Redis.local_endpoint
1111
client = Async::Redis::Client.new(endpoint)

benchmark/performance.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
# Copyright, 2019-2024, by Samuel Williams.
66
# Copyright, 2019, by David Ortiz.
77

8-
require 'async/redis'
8+
require "async/redis"
99

10-
require 'redis'
11-
require 'redis/connection/hiredis'
10+
require "redis"
11+
require "redis/connection/hiredis"
1212

13-
require 'benchmark'
14-
require 'benchmark/ips'
13+
require "benchmark"
14+
require "benchmark/ips"
1515

1616
keys = ["X","Y","Z"].freeze
1717
endpoint = Async::Redis.local_endpoint

cluster/test/async/redis/cluster_client.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# Released under the MIT License.
44
# Copyright, 2024, by Samuel Williams.
55

6-
require 'async/redis/cluster_client'
7-
require 'sus/fixtures/async'
8-
require 'securerandom'
6+
require "async/redis/cluster_client"
7+
require "sus/fixtures/async"
8+
require "securerandom"
99

1010
describe Async::Redis::ClusterClient do
1111
include Sus::Fixtures::Async::ReactorContext

config/sus.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# Released under the MIT License.
44
# Copyright, 2023, by Samuel Williams.
55

6-
require 'covered/sus'
6+
require "covered/sus"
77
include Covered::Sus

examples/auth/protocol.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Released under the MIT License.
44
# Copyright, 2021-2023, by Samuel Williams.
55

6-
require_relative '../../lib/async/redis'
6+
require_relative "../../lib/async/redis"
77

88
class AuthenticatedRESP2
99
def initialize(credentials, protocol: Async::Redis::Protocol::RESP2)

examples/auth/wrapper.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Copyright, 2021, by Troex Nevelin.
55
# Copyright, 2023-2024, by Samuel Williams.
66

7-
require_relative '../../lib/async/redis'
7+
require_relative "../../lib/async/redis"
88

99
# Friendly client wrapper that supports SSL, AUTH and db SELECT
1010
class AsyncRedisClientWrapper
@@ -13,7 +13,7 @@ class << self
1313
# @param ssl_params [Hash] passed to OpenSSL::SSL::SSLContext
1414
# @param options [Hash] passed to Async::Redis::Client.new
1515
# @return [Async::Redis::Client]
16-
def call(url = 'redis://localhost:6379', ssl_params: nil, **options)
16+
def call(url = "redis://localhost:6379", ssl_params: nil, **options)
1717
uri = URI(url)
1818

1919
endpoint = prepare_endpoint(uri, ssl_params)
@@ -36,9 +36,9 @@ def call(url = 'redis://localhost:6379', ssl_params: nil, **options)
3636
def prepare_endpoint(uri, ssl_params = nil)
3737
tcp_endpoint = ::IO::Endpoint.tcp(uri.hostname, uri.port)
3838
case uri.scheme
39-
when 'redis'
39+
when "redis"
4040
tcp_endpoint
41-
when 'rediss'
41+
when "rediss"
4242
ssl_context = OpenSSL::SSL::SSLContext.new
4343
ssl_context.set_params(ssl_params) if ssl_params
4444
::IO::SSLEndpoint.new(tcp_endpoint, ssl_context: ssl_context)

examples/redis/pop.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# Released under the MIT License.
55
# Copyright, 2022-2023, by Samuel Williams.
66

7-
require 'async'
8-
require 'async/barrier'
9-
require 'redis'
7+
require "async"
8+
require "async/barrier"
9+
require "redis"
1010

1111
Async do |parent|
1212
child = Async do |task|

0 commit comments

Comments
 (0)