Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
eredis
eredis-1.4.1-git.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File eredis-1.4.1-git.patch of Package eredis
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01c3d82..35611ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,17 +9,17 @@ jobs: ci: strategy: matrix: - include: - - otp-version: 23.1 + include: # See https://www.erlang-solutions.com/downloads/ + - otp-version: 24.3.3 platform: ubuntu-20.04 lsb_release: focal - - otp-version: 22.3.4.9 + - otp-version: 23.3.4.5 platform: ubuntu-20.04 lsb_release: focal - - otp-version: 21.3.8.17 + - otp-version: 22.3.4.9 platform: ubuntu-20.04 lsb_release: focal - - otp-version: 20.3.8.26 + - otp-version: 21.3.8.17 platform: ubuntu-20.04 lsb_release: focal runs-on: ${{ matrix.platform }} @@ -55,7 +55,7 @@ jobs: - name: Install elvis run: | - git clone --depth 1 --branch 0.5.0 https://github.com/inaka/elvis.git + git clone --depth 1 --branch 1.1.0 https://github.com/inaka/elvis.git cd elvis && rebar3 escriptize && sudo cp _build/default/bin/elvis /usr/local/bin/ - name: Install faketime diff --git a/.github/workflows/redis_compability.yml b/.github/workflows/redis_compability.yml index a7b87c3..5713b5a 100644 --- a/.github/workflows/redis_compability.yml +++ b/.github/workflows/redis_compability.yml @@ -1,4 +1,4 @@ -name: Redis compability testing +name: Redis compatibility testing on: pull_request: push: @@ -11,7 +11,9 @@ jobs: fail-fast: false matrix: include: - - redis-version: 6.2-rc1 + - redis-version: 7.0-rc3 + test-target: ct + - redis-version: 6.2.6 test-target: ct - redis-version: 6.0.9 test-target: ct diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7e2423c..beba98b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,7 @@ Normally done by the maintainers. * Update the version in `src/eredis.app.src` and `mix.exs`. * Update CHANGELOG.md and add what's new since the last version. (Use e.g. `git log *PREV_VERSION*..HEAD`). -* Check that documentation is generated and commited using `make edoc`. +* Check that documentation is generated and committed using `make edoc`. * Commit the changes, push and check the build. * Publish to Hex using `make publish` (requires `mix` and a Hex account with rights to publish this project). (This can be done later.) diff --git a/README.md b/README.md index 9ecfbd5..aec0fa1 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ commands you provided. To start the client, use `start_link/1` or one of its variants. `start_link/1` takes the following options (proplist): -* `host`: DNS name or IP adress as string; or unix domain socket as `{local, +* `host`: DNS name or IP address as string; or unix domain socket as `{local, Path}` (available in OTP 19+) * `port`: integer, default is 6379 * `database`: integer or 0 for default database, default: 0 diff --git a/doc/eredis.md b/doc/eredis.md index 4309ea8..4a78154 100644 --- a/doc/eredis.md +++ b/doc/eredis.md @@ -41,7 +41,7 @@ host() = string() | {local, string()} <pre><code> -option() = {host, string() | {local, string()}} | {port, <a href="inet.md#type-port_number">inet:port_number()</a>} | {database, integer() | string()} | {password, string()} | {reconnect_sleep, <a href="#type-reconnect_sleep">reconnect_sleep()</a>} | {connect_timeout, integer()} | {socket_options, list()} | {tls, [<a href="ssl.md#type-tls_client_option">ssl:tls_client_option()</a>]} | {name, <a href="#type-registered_name">registered_name()</a>} +option() = {host, string() | {local, string()}} | {port, <a href="inet.md#type-port_number">inet:port_number()</a>} | {database, integer()} | {password, string()} | {reconnect_sleep, <a href="#type-reconnect_sleep">reconnect_sleep()</a>} | {connect_timeout, integer()} | {socket_options, list()} | {tls, [<a href="ssl.md#type-tls_client_option">ssl:tls_client_option()</a>]} | {name, <a href="#type-registered_name">registered_name()</a>} </code> </pre> @@ -269,8 +269,7 @@ start_link(Options::<a href="#type-options">options()</a>) -> {ok, pid()} | { -<dd>Integer (or string containing a number); - 0 for default database +<dd>Integer; 0 for the default database </dd> @@ -369,7 +368,7 @@ start_link(Host::<a href="#type-host">host()</a>, Port::<a href="inet.md#type-po </code> </pre> -<ul class="definitions"><li><code>OptionsOrDatabase = <a href="#type-options">options()</a> | string()</code></li></ul> +<ul class="definitions"><li><code>OptionsOrDatabase = <a href="#type-options">options()</a> | integer()</code></li></ul> __This function is deprecated:__ Use [`start_link/1`](#start_link-1) instead. @@ -378,7 +377,7 @@ __This function is deprecated:__ Use [`start_link/1`](#start_link-1) instead. ### start_link/4 ### <pre><code> -start_link(Host::<a href="#type-host">host()</a>, Port::<a href="inet.md#type-port_number">inet:port_number()</a>, Database::string(), Password::string()) -> {ok, pid()} | {error, term()} +start_link(Host::<a href="#type-host">host()</a>, Port::<a href="inet.md#type-port_number">inet:port_number()</a>, Database::integer(), Password::string()) -> {ok, pid()} | {error, term()} </code> </pre> @@ -392,7 +391,7 @@ __See also:__ [start_link/1](#start_link-1). ### start_link/5 ### <pre><code> -start_link(Host::<a href="#type-host">host()</a>, Port::<a href="inet.md#type-port_number">inet:port_number()</a>, Database::string(), Password::string(), ReconnectSleep::<a href="#type-reconnect_sleep">reconnect_sleep()</a>) -> {ok, pid()} | {error, term()} +start_link(Host::<a href="#type-host">host()</a>, Port::<a href="inet.md#type-port_number">inet:port_number()</a>, Database::integer(), Password::string(), ReconnectSleep::<a href="#type-reconnect_sleep">reconnect_sleep()</a>) -> {ok, pid()} | {error, term()} </code> </pre> @@ -406,7 +405,7 @@ __See also:__ [start_link/1](#start_link-1). ### start_link/6 ### <pre><code> -start_link(Host::<a href="#type-host">host()</a>, Port::<a href="inet.md#type-port_number">inet:port_number()</a>, Database::string(), Password::string(), ReconnectSleep::<a href="#type-reconnect_sleep">reconnect_sleep()</a>, ConnectTimeout::timeout()) -> {ok, pid()} | {error, term()} +start_link(Host::<a href="#type-host">host()</a>, Port::<a href="inet.md#type-port_number">inet:port_number()</a>, Database::integer(), Password::string(), ReconnectSleep::<a href="#type-reconnect_sleep">reconnect_sleep()</a>, ConnectTimeout::timeout()) -> {ok, pid()} | {error, term()} </code> </pre> @@ -420,7 +419,7 @@ __See also:__ [start_link/1](#start_link-1). ### start_link/7 ### <pre><code> -start_link(Host::<a href="#type-host">host()</a>, Port::<a href="inet.md#type-port_number">inet:port_number()</a>, Database::string(), Password::string(), ReconnectSleep::<a href="#type-reconnect_sleep">reconnect_sleep()</a>, ConnectTimeout::timeout(), SocketOptions::list()) -> {ok, pid()} | {error, term()} +start_link(Host::<a href="#type-host">host()</a>, Port::<a href="inet.md#type-port_number">inet:port_number()</a>, Database::integer(), Password::string(), ReconnectSleep::<a href="#type-reconnect_sleep">reconnect_sleep()</a>, ConnectTimeout::timeout(), SocketOptions::list()) -> {ok, pid()} | {error, term()} </code> </pre> diff --git a/doc/eredis_sub.md b/doc/eredis_sub.md index edc8c22..6bff3e5 100644 --- a/doc/eredis_sub.md +++ b/doc/eredis_sub.md @@ -29,7 +29,7 @@ channel() = binary() <pre><code> -option() = {host, string() | {local, string()}} | {port, <a href="inet.md#type-port_number">inet:port_number()</a>} | {database, integer() | string()} | {password, string()} | {reconnect_sleep, <a href="#type-reconnect_sleep">reconnect_sleep()</a>} | {connect_timeout, integer()} | {socket_options, list()} | {tls, [<a href="ssl.md#type-tls_client_option">ssl:tls_client_option()</a>]} | {name, <a href="#type-registered_name">registered_name()</a>} +option() = {host, string() | {local, string()}} | {port, <a href="inet.md#type-port_number">inet:port_number()</a>} | {database, integer()} | {password, string()} | {reconnect_sleep, <a href="#type-reconnect_sleep">reconnect_sleep()</a>} | {connect_timeout, integer()} | {socket_options, list()} | {tls, [<a href="ssl.md#type-tls_client_option">ssl:tls_client_option()</a>]} | {name, <a href="#type-registered_name">registered_name()</a>} </code> </pre> diff --git a/elvis.config b/elvis.config index f4e0b86..0c205e1 100644 --- a/elvis.config +++ b/elvis.config @@ -2,8 +2,8 @@ [ {config, [ #{dirs => [ "src" ], filter => "*.erl", - rules => [ {elvis_style, no_tabs} - , {elvis_style, no_trailing_whitespace} + rules => [ {elvis_text_style, no_tabs} + , {elvis_text_style, no_trailing_whitespace} , {elvis_style, operator_spaces, #{ rules => [ {right,","} , {right,"+"} @@ -19,7 +19,7 @@ , {elvis_style, no_nested_try_catch} , {elvis_style, used_ignored_variable} , {elvis_style, no_behavior_info} - , {elvis_style, state_record_and_type} + %% , {elvis_style, state_record_and_type} %% , {elvis_style, no_spec_with_records} , {elvis_style, dont_repeat_yourself, #{ min_complexity => 18 @@ -29,8 +29,8 @@ }, #{ dirs => ["test"] , filter => "*.erl" - , rules => [ {elvis_style, no_tabs} - , {elvis_style, no_trailing_whitespace} + , rules => [ {elvis_text_style, no_tabs} + , {elvis_text_style, no_trailing_whitespace} , {elvis_style, operator_spaces, #{ rules => [ {right,","} , {right,"+"} diff --git a/include/eredis.hrl b/include/eredis.hrl index 2d89930..f82783e 100644 --- a/include/eredis.hrl +++ b/include/eredis.hrl @@ -5,7 +5,7 @@ -type option() :: {host, string() | {local, string()}} | {port, inet:port_number()} | - {database, integer() | string()} | + {database, integer()} | {password, string()} | {reconnect_sleep, reconnect_sleep()} | {connect_timeout, integer()} | diff --git a/rebar.config b/rebar.config index c7e972c..491502a 100644 --- a/rebar.config +++ b/rebar.config @@ -47,7 +47,7 @@ {profiles, [{docs, [{deps, [{edown, - {git, "git://github.com/uwiger/edown.git", + {git, "https://github.com/uwiger/edown.git", {branch, "master"}}} ]}] }]}. diff --git a/src/eredis.erl b/src/eredis.erl index 52cc1b2..c9f9af6 100644 --- a/src/eredis.erl +++ b/src/eredis.erl @@ -47,8 +47,7 @@ start_link() -> %% <dt>`{host, Host}'</dt><dd>DNS name or IP address as string; or unix domain %% socket as `{local, Path}' (available in OTP 19+); default `"127.0.0.1"'</dd> %% <dt>`{port, Port}'</dt><dd>Integer, default is 6379</dd> -%% <dt>`{database, Database}'</dt><dd>Integer (or string containing a number); -%% 0 for default database</dd> +%% <dt>`{database, Database}'</dt><dd>Integer; 0 for the default database</dd> %% <dt>`{username, Username}'</dt><dd>String; default: no username</dd> %% <dt>`{password, Password}'</dt><dd>String; default: no password</dd> %% <dt>`{reconnect_sleep, ReconnectSleep}'</dt><dd>Integer of milliseconds to @@ -81,7 +80,7 @@ start_link(Host, Port) -> %% @deprecated Use {@link start_link/1} instead. -spec start_link(Host::host(), Port::inet:port_number(), OptionsOrDatabase) -> {ok, Pid::pid()} | {error, Reason::term()} - when OptionsOrDatabase :: options() | string(). + when OptionsOrDatabase :: options() | integer(). start_link(Host, Port, Options) when Options =:= []; is_tuple(hd(Options)) -> start_link([{host, Host}, {port, Port} | Options]); start_link(Host, Port, Database) -> @@ -89,7 +88,7 @@ start_link(Host, Port, Database) -> %% @deprecated Use {@link start_link/1} instead. %% @see start_link/1 --spec start_link(host(), inet:port_number(), string(), string()) -> +-spec start_link(host(), inet:port_number(), integer(), string()) -> {ok, pid()} | {error, term()}. start_link(Host, Port, Database, Password) -> start_link([{host, Host}, {port, Port}, {database, Database}, @@ -97,7 +96,7 @@ start_link(Host, Port, Database, Password) -> %% @deprecated Use {@link start_link/1} instead. %% @see start_link/1 --spec start_link(host(), inet:port_number(), string(), string(), +-spec start_link(host(), inet:port_number(), integer(), string(), reconnect_sleep()) -> {ok, pid()} | {error, term()}. start_link(Host, Port, Database, Password, ReconnectSleep) -> @@ -106,7 +105,7 @@ start_link(Host, Port, Database, Password, ReconnectSleep) -> %% @deprecated Use {@link start_link/1} instead. %% @see start_link/1 --spec start_link(host(), inet:port_number(), string(), string(), +-spec start_link(host(), inet:port_number(), integer(), string(), reconnect_sleep(), timeout()) -> {ok, pid()} | {error, term()}. start_link(Host, Port, Database, Password, ReconnectSleep, ConnectTimeout) -> @@ -116,7 +115,7 @@ start_link(Host, Port, Database, Password, ReconnectSleep, ConnectTimeout) -> %% @deprecated Use {@link start_link/1} instead. %% @see start_link/1 --spec start_link(host(), inet:port_number(), string(), string(), +-spec start_link(host(), inet:port_number(), integer(), string(), reconnect_sleep(), timeout(), list()) -> {ok, pid()} | {error, term()}. start_link(Host, Port, Database, Password, ReconnectSleep, ConnectTimeout, diff --git a/src/eredis_client.erl b/src/eredis_client.erl index f14a430..389f97d 100644 --- a/src/eredis_client.erl +++ b/src/eredis_client.erl @@ -331,13 +331,13 @@ reply_all(Value, Queue) -> empty -> ok; {value, Item} -> - safe_reply(receipient(Item), Value), + safe_reply(recipient(Item), Value), reply_all(Value, queue:drop(Queue)) end. -receipient({_, From}) -> +recipient({_, From}) -> From; -receipient({_, From, _}) -> +recipient({_, From, _}) -> From. safe_reply(undefined, _Value) -> diff --git a/src/eredis_parser.erl b/src/eredis_parser.erl index 4aec924..426e4ae 100644 --- a/src/eredis_parser.erl +++ b/src/eredis_parser.erl @@ -10,7 +10,7 @@ %% This approach lets us write a "pure" parser that does not depend on %% manipulating the socket, which erldis and redis-erl is %% doing. Instead, we may ask the socket to send us data as fast as -%% possible and parse it continously. The overhead of manipulating the +%% possible and parse it continuously. The overhead of manipulating the %% socket when parsing multibulk responses is killing the performance %% of erldis. %% diff --git a/test/eredis_tcp_SUITE.erl b/test/eredis_tcp_SUITE.erl index 504c83a..696387a 100644 --- a/test/eredis_tcp_SUITE.erl +++ b/test/eredis_tcp_SUITE.erl @@ -485,7 +485,7 @@ t_ignore_old_socket(Config) when is_list(Config) -> %% previously used socket and keeps the current connection open. %% The events are simulated by sending similar messages the %% client process would receive as a socket owner process - %% when these events occure. + %% when these events occurred. {ok, C} = eredis:start_link("127.0.0.1", ?PORT, []), [Socket] = get_tcp_ports(C), C ! {tcp, old_socket, data}, %% Incoming data event diff --git a/test/eredis_test_utils.erl b/test/eredis_test_utils.erl index 410f20b..d2cb439 100644 --- a/test/eredis_test_utils.erl +++ b/test/eredis_test_utils.erl @@ -32,7 +32,7 @@ start_server(Fun) -> Port = receive_from(Pid, 5000), {ok, Pid, Port}. -%% Stop server and close client socket aswell if needed. +%% Stop server and close client socket as well if needed. -spec stop_server(Pid :: pid()) -> ok. stop_server(Pid) -> Pid ! shutdown.
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor