Skip to content

Commit

Permalink
Merge pull request #245 from esl/deps/update
Browse files Browse the repository at this point in the history
Update gun and rebar3_codecov
  • Loading branch information
NelsonVides authored Aug 11, 2021
2 parents 370d57b + 5d5c14a commit 6179bde
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ dialyzer
.eunit
test/*.beam
_build/
rebar3
7 changes: 3 additions & 4 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@
{deps, [
{exml, "3.0.5", {pkg, hexml}},
{base16, "2.0.0"},
{fusco, "0.1.1"},
{meck, "0.9.2"},
{bbmustache, "1.12.1"},
{uuid, "2.0.2", {pkg, uuid_erl}},
{gun, "1.3.3"},
{gun, "2.0.0-rc.2"},
{worker_pool, "4.0.3"},
{fast_tls, "1.1.12"},
{fast_tls, "1.1.13"},
{fast_scram, "0.4.1"}
]}.

%% To override the plugin as installed by worker_pool
{plugins,
[{rebar3_codecov, {git, "https://github.com/esl/rebar3_codecov.git", {ref, "6bd31cc"}}}]}.
[{rebar3_codecov, "0.2.0"}]}.

{relx, [{release, {escalus, "0.0.1"},
[escalus]},
Expand Down
21 changes: 9 additions & 12 deletions rebar.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
{<<"exml">>,{pkg,<<"hexml">>,<<"3.0.5">>},0},
{<<"fast_pbkdf2">>,{pkg,<<"fast_pbkdf2">>,<<"1.0.1">>},1},
{<<"fast_scram">>,{pkg,<<"fast_scram">>,<<"0.4.1">>},0},
{<<"fast_tls">>,{pkg,<<"fast_tls">>,<<"1.1.12">>},0},
{<<"fusco">>,{pkg,<<"fusco">>,<<"0.1.1">>},0},
{<<"gun">>,{pkg,<<"gun">>,<<"1.3.3">>},0},
{<<"fast_tls">>,{pkg,<<"fast_tls">>,<<"1.1.13">>},0},
{<<"gun">>,{pkg,<<"gun">>,<<"2.0.0-rc.2">>},0},
{<<"meck">>,{pkg,<<"meck">>,<<"0.9.2">>},0},
{<<"p1_utils">>,{pkg,<<"p1_utils">>,<<"1.0.22">>},1},
{<<"p1_utils">>,{pkg,<<"p1_utils">>,<<"1.0.23">>},1},
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"2.0.2">>},1},
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"2.0.2">>},0},
{<<"worker_pool">>,{pkg,<<"worker_pool">>,<<"4.0.3">>},0}]}.
Expand All @@ -21,11 +20,10 @@
{<<"exml">>, <<"2A79262A744A9B100A9A27A8E76EADCF146F17653DABA2A88A74C8CF5B06ADF3">>},
{<<"fast_pbkdf2">>, <<"E63454F7FAA6D6E43751DD44EB7C287EB3509DA92CE7F4AE00661AC580A96100">>},
{<<"fast_scram">>, <<"592E7943028EE86284EAAE5EA868545ACEB4A5CC7EF77829E2E54F19F57FAD7E">>},
{<<"fast_tls">>, <<"B11997D96D4306ABCD4CDB9FFA77CCFC0F826F64BED77ECACEB48B2DC46B9202">>},
{<<"fusco">>, <<"3DD6A90151DFEF30EA1937CC44E9A59177C0094918388D9BCAA2F2DC5E2AE4AA">>},
{<<"gun">>, <<"CF8B51BEB36C22B9C8DF1921E3F2BC4D2B1F68B49AD4FBC64E91875AA14E16B4">>},
{<<"fast_tls">>, <<"828CDC75E1E8FCE8158846D2B971D8B4FE2B2DDCC75B759E88D751079BF78AFD">>},
{<<"gun">>, <<"7C489A32DEDCCB77B6E82D1F3C5A7DADFBFA004EC14E322CDB5E579C438632D2">>},
{<<"meck">>, <<"85CCBAB053F1DB86C7CA240E9FC718170EE5BDA03810A6292B5306BF31BAE5F5">>},
{<<"p1_utils">>, <<"10A70FAA665D1F8F6995FA100D068B4D910EE2A0111FA3567E9D6232CBB86F21">>},
{<<"p1_utils">>, <<"7F94466ADA69BD982EA7BB80FBCA18E7053E7D0B82C9D9E37621FA508587069B">>},
{<<"quickrand">>, <<"1D73FAA52E0C149FCBC72A63C26135FF68BE8FA7870675C73645896788A7540C">>},
{<<"uuid">>, <<"0D1CA9D94CA3B058467BCE20B7706CC816A2BDBBE0574DD008936AE97EA4EBE7">>},
{<<"worker_pool">>, <<"729D98AF0EEF31D10A6027C5AF2EDD4EA7D6CF91E96B03C189BB47F6FDE9667C">>}]},
Expand All @@ -36,11 +34,10 @@
{<<"exml">>, <<"426B50FA455C95760BA4F7C75ED76F90A58837742CBE38A86C6A75BEFA383907">>},
{<<"fast_pbkdf2">>, <<"CF834AB70270C628C8A37E9BFA4D7282AD6FF0C5DE6C8EB6A2F88C09F890857B">>},
{<<"fast_scram">>, <<"7948D5B2D09C30463620F52AEA5865BE954E3AD0230E267DE2D34C5C3F110291">>},
{<<"fast_tls">>, <<"C3D80828F5D985CBA4C93660FFBF2C9B9CD831303382B97832DD66429FB16F8A">>},
{<<"fusco">>, <<"6343551BD1E824F2A6CA85E1158C5B37C320FD449FBFEC7450A73F192AAF9022">>},
{<<"gun">>, <<"3106CE167F9C9723F849E4FB54EA4A4D814E3996AE243A1C828B256E749041E0">>},
{<<"fast_tls">>, <<"D1F422AF40C7777FE534496F508EE86515CB929AD10F7D1D56AA94CE899B44A0">>},
{<<"gun">>, <<"6B9D1EAE146410D727140DBF8B404B9631302ECC2066D1D12F22097AD7D254FC">>},
{<<"meck">>, <<"81344F561357DC40A8344AFA53767C32669153355B626EA9FCBC8DA6B3045826">>},
{<<"p1_utils">>, <<"0E49FF5586515E3C44901D6FB06B1473BDA492D749F0B1705CBF9D96D4CD5A38">>},
{<<"p1_utils">>, <<"47F21618694EEEE5006AF1C88731AD86B757161E7823C29B6F73921B571C8502">>},
{<<"quickrand">>, <<"E21C6C7F29CA995468662085CA54D7D09E861C180A9DFEC2CF4A2E75364A16D6">>},
{<<"uuid">>, <<"4866CA7B3BD0265BC371590DCD0FE2832FC08588A071B72D07E09E23F163D0D6">>},
{<<"worker_pool">>, <<"2F2ABFD3F64931B8DF345D7EFE80A357EDC785848C39319225CA328F44BC7192">>}]}
Expand Down
1 change: 0 additions & 1 deletion src/escalus.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
stdlib,
ssl,
exml,
fusco,
base16,
gun,
meck,
Expand Down
2 changes: 1 addition & 1 deletion src/escalus_bosh_gun.erl
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ gun_options(Args) ->
case proplists:get_value(ssl, Args, false) of
true ->
#{transport => tls,
transport_opts => SSLOpts};
tls_opts => SSLOpts};
_ ->
#{}
end.
Expand Down
13 changes: 7 additions & 6 deletions src/escalus_ws.erl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
-define(SERVER, ?MODULE).

-record(state, {owner, socket, parser, legacy_ws, compress = false,
event_client, filter_pred}).
event_client, filter_pred, stream_ref}).
-type state() :: #state{}.

%%%===================================================================
Expand Down Expand Up @@ -170,7 +170,7 @@ init([Args, Owner]) ->
TransportOpts = case SSL of
true ->
#{transport => tls, protocols => [http],
transport_opts => SSLOpts};
tls_opts => SSLOpts};
_ ->
#{transport => tcp, protocols => [http]}
end,
Expand All @@ -190,7 +190,8 @@ init([Args, Owner]) ->
socket = ConnPid,
parser = Parser,
legacy_ws = LegacyWS,
event_client = EventClient}}.
event_client = EventClient,
stream_ref = StreamRef}}.

wait_for_ws_upgrade(ConnPid, StreamRef, Timeout) ->
receive
Expand Down Expand Up @@ -219,9 +220,9 @@ handle_call({set_filter_pred, Pred}, _From, State) ->
{reply, ok, State#state{filter_pred = Pred}};
handle_call(kill_connection, _, S) ->
{stop, normal, ok, S};
handle_call(stop, _From, #state{socket = ConnPid} = State) ->
handle_call(stop, _From, #state{socket = ConnPid, stream_ref = StreamRef} = State) ->
close_compression_streams(State#state.compress),
gun:ws_send(ConnPid, close),
gun:ws_send(ConnPid, StreamRef, close),
{stop, normal, ok, State}.

-spec handle_cast(term(), state()) -> {noreply, state()}.
Expand All @@ -230,7 +231,7 @@ handle_cast({send, Elem}, State) ->
{zlib, {_, Zout}} -> zlib:deflate(Zout, exml:to_iolist(Elem), sync);
false -> exml:to_iolist(Elem)
end,
gun:ws_send(State#state.socket, {text, Data}),
gun:ws_send(State#state.socket, State#state.stream_ref, {text, Data}),
{noreply, State};
handle_cast(reset_parser, #state{parser = Parser} = State) ->
{ok, NewParser} = exml_stream:reset_parser(Parser),
Expand Down

0 comments on commit 6179bde

Please sign in to comment.