Codebase list erlang-p1-stun / 72e907a
New upstream version 1.0.44 Philipp Huebner 2 years ago
20 changed file(s) with 68 addition(s) and 39 deletion(s). Raw diff Collapse all Expand all
0 # Version 1.0.44
1
2 * Updating fast_tls to version 1.1.13.
3 * Updating p1_utils to version 1.0.23.
4 * Switch from using Travis to Github Actions as CI
5
6 # Version 1.0.43
7
8 * Updating p1_utils to version 1.0.22.
9 * Updating fast_tls to version 1.1.12.
10 * stun_test: Start up transitive dependencies
11
012 # Version 1.0.42
113
214 * Updating fast_tls to version 1.1.11.
0 REBAR ?= rebar
1
02 all: deps/% src
13
24 deps/%:
3 rebar get-deps
5 $(REBAR) get-deps
46
57 src:
6 rebar compile
8 $(REBAR) compile
79
810 clean:
9 rebar clean
11 $(REBAR) clean
1012
1113 doc:
12 rebar skip_deps=true doc
14 $(REBAR) skip_deps=true doc
1315
1416 test: all
15 rebar -v skip_deps=true eunit
17 $(REBAR) -v skip_deps=true eunit
1618
1719 .PHONY: clean src all doc rebar
00 # STUN
11
2 [![Build Status](https://travis-ci.org/processone/stun.svg?branch=master)](https://travis-ci.org/processone/stun) [![Coverage Status](https://coveralls.io/repos/processone/stun/badge.svg?branch=master&service=github)](https://coveralls.io/github/processone/stun?branch=master) [![Hex version](https://img.shields.io/hexpm/v/stun.svg "Hex version")](https://hex.pm/packages/stun)
2 [![CI](https://github.com/processone/stun/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/processone/stun/actions/workflows/ci.yml)
3 [![Coverage Status](https://coveralls.io/repos/processone/stun/badge.svg?branch=master&service=github)](https://coveralls.io/github/processone/stun?branch=master)
4 [![Hex version](https://img.shields.io/hexpm/v/stun.svg "Hex version")](https://hex.pm/packages/stun)
35
46 STUN and TURN library for Erlang / Elixir.
57
44 %%% Created : 8 Aug 2009 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
55 %%%
66 %%%
7 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
44 %%% Created : 19 Jul 2020 by Holger Weiss <holger@zedat.fu-berlin.de>
55 %%%
66 %%%
7 %%% Copyright (C) 2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2020-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
33 %%% Purpose : Rebar build script. Compliant with rebar and rebar3.
44 %%% Created : 24 Nov 2015 by Mickael Remond <mremond@process-one.net>
55 %%%
6 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
6 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
77 %%%
88 %%% Licensed under the Apache License, Version 2.0 (the "License");
99 %%% you may not use this file except in compliance with the License.
2424 debug_info,
2525 {i, "include"}]}.
2626
27 {deps, [{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.1.11"}}},
28 {p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.21"}}}]}.
27 {deps, [{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.1.13"}}},
28 {p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.23"}}}]}.
2929
3030 {cover_enabled, true}.
3131 {cover_export_enabled, true}.
32 {coveralls_coverdata , "_build/test/cover/eunit.coverdata"}.
33 {coveralls_service_name , "github"}.
3234
3335 {xref_checks, [undefined_function_calls, undefined_functions, deprecated_function_calls, deprecated_functions]}.
3436
33 %%% Purpose : Rebar build script. Compliant with rebar and rebar3.
44 %%% Created : 8 May 2013 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
55 %%%
6 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
6 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
77 %%%
88 %%% Licensed under the Apache License, Version 2.0 (the "License");
99 %%% you may not use this file except in compliance with the License.
2727 undefined ->
2828 lists:keymember(mix, 1, application:loaded_applications())
2929 end,
30
31 JobId = case os:getenv("TRAVIS_JOB_ID") of false -> ""; V -> V end,
3230
3331 ModCfg0 = fun(F, Cfg, [Key|Tail], Op, Default) ->
3432 {OldVal,PartCfg} = case lists:keytake(Key, 1, Cfg) of
9492
9593 code:ensure_loaded(rand),
9694 RandUniform = erlang:function_exported(rand, uniform, 1),
95 GithubConfig = case {os:getenv("GITHUB_ACTIONS"), os:getenv("GITHUB_TOKEN")} of
96 {"true", Token} when is_list(Token) ->
97 CONFIG1 = [{coveralls_repo_token, Token},
98 {coveralls_service_job_id, os:getenv("GITHUB_RUN_ID")},
99 {coveralls_commit_sha, os:getenv("GITHUB_SHA")},
100 {coveralls_service_number, os:getenv("GITHUB_RUN_NUMBER")}],
101 case os:getenv("GITHUB_EVENT_NAME") =:= "pull_request"
102 andalso string:tokens(os:getenv("GITHUB_REF"), "/") of
103 [_, "pull", PRNO, _] ->
104 [{coveralls_service_pull_request, PRNO} | CONFIG1];
105 _ ->
106 CONFIG1
107 end;
108 _ ->
109 []
110 end,
97111
98112 Rules = [
99113 {[deps], IsRebar3,
100114 Rebar3DepsFilter, []},
101 {[plugins], IsRebar3,
102 AppendList([rebar3_hex]), []},
103115 {[erl_opts], RandUniform,
104116 AppendList([{d, 'RAND_UNIFORM'}]), []},
105 {[deps], os:getenv("TRAVIS") == "true",
106 AppendList([{coveralls, ".*", {git, "https://github.com/markusn/coveralls-erl.git", {tag, "v2.0.1"}}}]), []},
107 {[post_hooks], os:getenv("TRAVIS") == "true",
108 AppendList([{eunit, "echo '\n%%! -pa .eunit/ deps/coveralls/ebin\nmain(_)->{ok,F}=file:open(\"erlang.json\",[write]),io:fwrite(F,\"~s\",[coveralls:convert_file(\".eunit/cover.coverdata\", \""++JobId++"\", \"travis-ci\",\"\")]).' > getcover.erl"},
109 {eunit, "escript ./getcover.erl"}]), []},
117 {[plugins], os:getenv("COVERALLS") == "true",
118 AppendList([{coveralls, {git,
119 "https://github.com/processone/coveralls-erl.git",
120 {branch, "addjsonfile"}}} ]), []},
110121 {[deps], os:getenv("USE_GLOBAL_DEPS") /= false,
111122 GlobalDepsFilter, []}
112123 ],
113124
114125
115 Config = FilterConfig(FilterConfig, CONFIG, Rules),
126 Config = FilterConfig(FilterConfig, CONFIG, Rules) ++ GithubConfig,
116127
117128 %io:format("Rules:~n~p~n~nCONFIG:~n~p~n~nConfig:~n~p~n", [Rules, CONFIG, Config]),
118129
44 %%% Created : 4 Apr 2013 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
55 %%%
66 %%%
7 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
2222
2323 {application, stun,
2424 [{description, "STUN and TURN library for Erlang / Elixir"},
25 {vsn, "1.0.42"},
25 {vsn, "1.0.44"},
2626 {modules, []},
2727 {registered, []},
2828 {applications, [kernel, stdlib, fast_tls, p1_utils]},
44 %%% Created : 8 Aug 2009 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
55 %%%
66 %%%
7 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
44 %%% Created : 2 May 2013 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
55 %%%
66 %%%
7 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
44 %%% Created : 7 Aug 2009 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
55 %%%
66 %%%
7 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
44 %%% Created : 9 Jan 2011 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
55 %%%
66 %%%
7 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
44 %%% Created : 19 Jul 2020 by Holger Weiss <holger@zedat.fu-berlin.de>
55 %%%
66 %%%
7 %%% Copyright (C) 2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2020-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
44 %%% Created : 9 Feb 2003 by Alexey Shchepin <alexey@process-one.net>
55 %%%
66 %%%
7 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
44 %%% Created : 2 May 2013 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
55 %%%
66 %%%
7 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
44 %%% Created : 7 Aug 2009 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
55 %%%
66 %%%
7 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
3737 -include("stun.hrl").
3838
3939 init_test() ->
40 ?assertEqual(ok, application:start(fast_tls)),
41 ?assertEqual(ok, application:start(p1_utils)),
42 ?assertEqual(ok, application:start(stun)).
40 ?assertMatch({ok, _}, application:ensure_all_started(p1_utils)),
41 ?assertMatch({ok, _}, application:ensure_all_started(fast_tls)),
42 ?assertMatch({ok, _}, application:ensure_all_started(stun)).
4343
4444 mk_cert_test() ->
4545 ?assertEqual(ok, file:write_file("certfile.pem", get_cert())).
44 %%% Created : 3 May 2014 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
55 %%%
66 %%%
7 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
44 %%% Created : 23 Aug 2009 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
55 %%%
66 %%%
7 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
44 %%% Created : 23 Aug 2009 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
55 %%%
66 %%%
7 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.
44 %%% Created : 3 May 2014 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
55 %%%
66 %%%
7 %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved.
7 %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved.
88 %%%
99 %%% Licensed under the Apache License, Version 2.0 (the "License");
1010 %%% you may not use this file except in compliance with the License.