Skip to content

Commit f38b899

Browse files
authored
Merge branch 'main' into jlledom-unix-endpoint
2 parents a0c8c2f + 60199dc commit f38b899

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

lib/async/redis/endpoint.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def self.parse(string, endpoint = nil, **options)
6969
# @parameter scheme [String, nil] The scheme to use, e.g. "redis" or "rediss". If nil, will auto-detect.
7070
# @parameter hostname [String] The hostname to connect to (or bind to).
7171
# @parameter options [Hash] Additional options, passed to {#initialize}.
72-
def self.for(scheme, host, credentials: nil, port: nil, database: nil, **options)
72+
def self.for(scheme, host, port: nil, database: nil, **options)
7373
# Auto-detect scheme if not provided:
7474
if default_scheme = options.delete(:scheme)
7575
scheme ||= default_scheme
@@ -88,7 +88,6 @@ def self.for(scheme, host, credentials: nil, port: nil, database: nil, **options
8888
self.new(
8989
uri_klass.build(
9090
scheme: scheme,
91-
userinfo: credentials&.join(":"),
9291
host: host,
9392
port: port,
9493
path: path,

releases.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Releases
22

3+
## Unreleased
4+
5+
- Fix password with special characters when using sentinels.
6+
37
## v0.12.0
48

59
- Add agent context.

test/async/redis/endpoint.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@
106106

107107
it "handles credentials correctly" do
108108
endpoint = Async::Redis::Endpoint.for("redis", "localhost", credentials: ["user", "pass"], port: 6380)
109-
expect(endpoint.url.to_s).to be == "redis://user:pass@localhost:6380"
110-
expect(endpoint.url.userinfo).to be == "user:pass"
109+
expect(endpoint.url.to_s).to be == "redis://localhost:6380"
111110
expect(endpoint.credentials).to be == ["user", "pass"]
112111
end
113112

@@ -131,11 +130,10 @@
131130
port: 6380,
132131
database: 3
133132
)
134-
expect(endpoint.url.to_s).to be == "rediss://user:pass@[#{ipv6}]:6380/3"
133+
expect(endpoint.url.to_s).to be == "rediss://[#{ipv6}]:6380/3"
135134
expect(endpoint.url.scheme).to be == "rediss"
136135
expect(endpoint.url.host).to be == "[#{ipv6}]"
137136
expect(endpoint.url.hostname).to be == ipv6
138-
expect(endpoint.url.userinfo).to be == "user:pass"
139137
expect(endpoint.url.port).to be == 6380
140138
expect(endpoint.url.path).to be == "/3"
141139
expect(endpoint).to be(:secure?)

0 commit comments

Comments
 (0)