Skip to content

Commit fec03d0

Browse files
committed
Version 2.0.0.
1 parent 70a579e commit fec03d0

10 files changed

+32
-30
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
language: erlang
22
otp_release:
3-
- 22.1
4-
- 21.3
5-
- 20.3
3+
- 23.0.1
4+
- 22.3.4
5+
- 21.3.8.1
6+
- 20.3.8.5
67
- 19.3
78
before_script:
89
- rebar get-deps

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2009-2019 Michael Truog <mjtruog at protonmail dot com>
3+
Copyright (c) 2009-2020 Michael Truog <mjtruog at protonmail dot com>
44

55
Permission is hereby granted, free of charge, to any person obtaining a
66
copy of this software and associated documentation files (the "Software"),

doc/cloudi_http_cowboy1_handler.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
<h1>Module cloudi_http_cowboy1_handler</h1>
1313
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>
1414
<h3><a name="Cowboy_CloudI_HTTP_Handler">Cowboy CloudI HTTP Handler</a></h3>.
15-
<p>Copyright © 2012-2018 Michael Truog</p>
15+
<p>Copyright © 2012-2020 Michael Truog</p>
1616

17-
<p><b>Version:</b> 1.7.5 Nov 28 2019 14:47:13
17+
<p><b>Version:</b> 1.8.1 Jun 3 2020 20:11:50
1818
------------------------------------------------------------------------</p>
1919
<p><b>Authors:</b> Michael Truog (<a href="mailto:mjtruog at protonmail dot com"><tt>mjtruog at protonmail dot com</tt></a>).</p>
2020

doc/cloudi_service_http_cowboy1.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
<h1>Module cloudi_service_http_cowboy1</h1>
1313
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>
1414
<h3><a name="CloudI_HTTP_Integration">CloudI HTTP Integration</a></h3>
15-
Uses the cowboy Erlang HTTP Server.
15+
Uses the cowboy1 Erlang HTTP Server.
1616
<p>Copyright © 2012-2019 Michael Truog</p>
1717

18-
<p><b>Version:</b> 1.8.0 Nov 28 2019 14:47:13
18+
<p><b>Version:</b> 1.8.0 Jun 3 2020 20:11:50
1919
------------------------------------------------------------------------</p>
2020
<p><b>Behaviours:</b> <a href="deps/cloudi_core/doc/cloudi_service.html"><tt>cloudi_service</tt></a>.</p>
2121
<p><b>Authors:</b> Michael Truog (<a href="mailto:mjtruog at protonmail dot com"><tt>mjtruog at protonmail dot com</tt></a>).</p>
2222

2323
<h2><a name="description">Description</a></h2>
2424
<h3><a name="CloudI_HTTP_Integration">CloudI HTTP Integration</a></h3>
25-
Uses the cowboy Erlang HTTP Server.
25+
Uses the cowboy1 Erlang HTTP Server.
2626
<h2><a name="index">Function Index</a></h2>
2727
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#close-1">close/1</a></td><td>
2828
<h4><a name="Close_a_cowboy1_websocket_connection.">Close a cowboy1 websocket connection.</a></h4>

mix.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defmodule CloudIServiceHttpCowboy do
66

77
def project do
88
[app: :cloudi_service_http_cowboy1,
9-
version: "1.8.0",
9+
version: "2.0.0",
1010
language: :erlang,
1111
erlc_options: [
1212
:debug_info,
@@ -30,7 +30,7 @@ defmodule CloudIServiceHttpCowboy do
3030

3131
defp deps do
3232
[{:cowboy, "~> 1.1.2"},
33-
{:cloudi_core, "~> 1.8.0"}]
33+
{:cloudi_core, "~> 2.0.0"}]
3434
end
3535

3636
defp description do

rebar.config

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@
44
{deps,
55
[{cloudi_core, ".*",
66
{git, "https://github.com/CloudI/cloudi_core.git",
7-
{branch, "master"}}},
7+
{tag, "v2.0.0"}}},
88
{cowboy, ".*",
99
{git, "https://github.com/ninenines/cowboy.git",
1010
{tag, "1.1.2"}}},
1111
{uuid, ".*",
1212
{git, "https://github.com/okeuday/uuid.git",
13-
{branch, "master"}}},
13+
{tag, "v2.0.0"}}},
1414
{trie, ".*",
1515
{git, "https://github.com/okeuday/trie.git",
16-
{branch, "master"}}}]}.
16+
{tag, "v2.0.0"}}}]}.
1717

1818
{erl_opts,
1919
[debug_info,
2020
warnings_as_errors,
2121
strict_validation,
2222
warn_bif_clash,
23+
nowarn_removed,
2324
nowarn_deprecated_function,
2425
warn_export_all,
2526
warn_export_vars,

src/cloudi_http_cowboy1_handler.erl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@
3636
-module(cloudi_http_cowboy1_handler).
3737
-author('mjtruog at protonmail dot com').
3838

39-
%-behaviour(cowboy_http_handler).
40-
%-behaviour(cowboy_websocket_handler).
39+
%-behaviour(cowboy1_http_handler).
40+
%-behaviour(cowboy1_websocket_handler).
4141

4242
%% external interface
4343

44-
%% cowboy_http_handler callbacks
44+
%% cowboy1_http_handler callbacks
4545
-export([init/3,
4646
handle/2,
4747
info/3,
4848
terminate/3]).
4949

50-
%% cowboy_websocket_handler callbacks
50+
%% cowboy1_websocket_handler callbacks
5151
-export([websocket_init/3,
5252
websocket_handle/3,
5353
websocket_info/3,
@@ -77,7 +77,7 @@
7777
:: undefined | #{cloudi:trans_id() := reference()},
7878
queued
7979
:: undefined |
80-
cloudi_x_pqueue4:cloudi_x_pqueue4(
80+
pqueue4:pqueue4(
8181
cloudi:message_service_request())
8282
}).
8383

@@ -86,7 +86,7 @@
8686
%%%------------------------------------------------------------------------
8787

8888
%%%------------------------------------------------------------------------
89-
%%% Callback functions from cowboy_http_handler
89+
%%% Callback functions from cowboy1_http_handler
9090
%%%------------------------------------------------------------------------
9191

9292
init(_Transport, Req0,
@@ -403,7 +403,7 @@ websocket_init(_Transport, Req0,
403403
end,
404404
Queued = if
405405
WebSocketProtocol =:= undefined ->
406-
cloudi_x_pqueue4:new();
406+
pqueue4:new();
407407
true ->
408408
undefined
409409
end,
@@ -412,7 +412,7 @@ websocket_init(_Transport, Req0,
412412
% initiate an asynchronous close if the websocket must be unique
413413
OldConnectionMonitors = if
414414
WebSocketNameUnique =:= true ->
415-
case cloudi_x_cpg:get_members(Scope, NameWebSocket,
415+
case cpg:get_members(Scope, NameWebSocket,
416416
infinity) of
417417
{ok, _, OldConnections} ->
418418
lists:map(fun(OldConnection) ->
@@ -427,7 +427,7 @@ websocket_init(_Transport, Req0,
427427
end,
428428
% service requests are only received if they relate to
429429
% the service's prefix
430-
ok = cloudi_x_cpg:join(Scope, NameWebSocket, self(), infinity),
430+
ok = cpg:join(Scope, NameWebSocket, self(), infinity),
431431
% block on the websocket close if the connection must be unique
432432
if
433433
WebSocketNameUnique =:= true ->
@@ -722,7 +722,7 @@ websocket_info({Type, _, _, _, Request,
722722
erlang:send_after(Timeout, self(),
723723
{'cloudi_service_recv_timeout', Priority, TransId}),
724724
RecvTimeouts),
725-
queued = cloudi_x_pqueue4:in(T, Priority, Queue)}
725+
queued = pqueue4:in(T, Priority, Queue)}
726726
}};
727727

728728
websocket_info({Type, Name, _, _, _,
@@ -751,7 +751,7 @@ websocket_info({'cloudi_service_recv_timeout', Priority, TransId}, Req,
751751
} = WebSocketState
752752
} = State) ->
753753
F = fun({_, {_, _, _, _, _, _, _, Id, _}}) -> Id == TransId end,
754-
{_, NewQueue} = cloudi_x_pqueue4:remove_unique(F, Priority, Queue),
754+
{_, NewQueue} = pqueue4:remove_unique(F, Priority, Queue),
755755
{ok, Req,
756756
State#cowboy1_state{
757757
websocket_state = WebSocketState#websocket_state{
@@ -1428,7 +1428,7 @@ websocket_subscriptions([], _, _) ->
14281428
websocket_subscriptions([F | Functions], Parameters, Scope) ->
14291429
case F(Parameters) of
14301430
{ok, NameWebSocket} ->
1431-
ok = cloudi_x_cpg:join(Scope, NameWebSocket, self(), infinity);
1431+
ok = cpg:join(Scope, NameWebSocket, self(), infinity);
14321432
{error, _} ->
14331433
ok
14341434
end,
@@ -1491,7 +1491,7 @@ websocket_process_queue(Req,
14911491
response_pending = false,
14921492
recv_timeouts = RecvTimeouts,
14931493
queued = Queue} = WebSocketState} = State) ->
1494-
case cloudi_x_pqueue4:out(Queue) of
1494+
case pqueue4:out(Queue) of
14951495
{empty, NewQueue} ->
14961496
{ok, Req,
14971497
State#cowboy1_state{websocket_state =

src/cloudi_http_cowboy1_handler.hrl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
%%%
2828
%%%------------------------------------------------------------------------
2929

30-
%% cowboy handler state
30+
%% cowboy1 handler state
3131
-record(cowboy1_state,
3232
{
3333
dispatcher :: cloudi_service:dispatcher(),

src/cloudi_service_http_cowboy1.app.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{application, cloudi_service_http_cowboy1,
55
[{description, "cowboy1 HTTP CloudI Service"},
6-
{vsn, "1.8.0"},
6+
{vsn, "2.0.0"},
77
{modules, [
88
cloudi_http_cowboy1_handler,
99
cloudi_service_http_cowboy1

src/cloudi_service_http_cowboy1.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
%%%------------------------------------------------------------------------
55
%%% @doc
66
%%% ==CloudI HTTP Integration==
7-
%%% Uses the cowboy Erlang HTTP Server.
7+
%%% Uses the cowboy1 Erlang HTTP Server.
88
%%% @end
99
%%%
1010
%%% MIT License

0 commit comments

Comments
 (0)