New upstream version 1.0.44
Philipp Huebner
2 years ago
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 | ||
0 | 12 | # Version 1.0.42 |
1 | 13 | |
2 | 14 | * Updating fast_tls to version 1.1.11. |
0 | REBAR ?= rebar | |
1 | ||
0 | 2 | all: deps/% src |
1 | 3 | |
2 | 4 | deps/%: |
3 | rebar get-deps | |
5 | $(REBAR) get-deps | |
4 | 6 | |
5 | 7 | src: |
6 | rebar compile | |
8 | $(REBAR) compile | |
7 | 9 | |
8 | 10 | clean: |
9 | rebar clean | |
11 | $(REBAR) clean | |
10 | 12 | |
11 | 13 | doc: |
12 | rebar skip_deps=true doc | |
14 | $(REBAR) skip_deps=true doc | |
13 | 15 | |
14 | 16 | test: all |
15 | rebar -v skip_deps=true eunit | |
17 | $(REBAR) -v skip_deps=true eunit | |
16 | 18 | |
17 | 19 | .PHONY: clean src all doc rebar |
0 | 0 | # STUN |
1 | 1 | |
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) | |
3 | 5 | |
4 | 6 | STUN and TURN library for Erlang / Elixir. |
5 | 7 |
4 | 4 | %%% Created : 8 Aug 2009 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
4 | 4 | %%% Created : 19 Jul 2020 by Holger Weiss <holger@zedat.fu-berlin.de> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2020-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
3 | 3 | %%% Purpose : Rebar build script. Compliant with rebar and rebar3. |
4 | 4 | %%% Created : 24 Nov 2015 by Mickael Remond <mremond@process-one.net> |
5 | 5 | %%% |
6 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
6 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
7 | 7 | %%% |
8 | 8 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
9 | 9 | %%% you may not use this file except in compliance with the License. |
24 | 24 | debug_info, |
25 | 25 | {i, "include"}]}. |
26 | 26 | |
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"}}}]}. | |
29 | 29 | |
30 | 30 | {cover_enabled, true}. |
31 | 31 | {cover_export_enabled, true}. |
32 | {coveralls_coverdata , "_build/test/cover/eunit.coverdata"}. | |
33 | {coveralls_service_name , "github"}. | |
32 | 34 | |
33 | 35 | {xref_checks, [undefined_function_calls, undefined_functions, deprecated_function_calls, deprecated_functions]}. |
34 | 36 |
3 | 3 | %%% Purpose : Rebar build script. Compliant with rebar and rebar3. |
4 | 4 | %%% Created : 8 May 2013 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
5 | 5 | %%% |
6 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
6 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
7 | 7 | %%% |
8 | 8 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
9 | 9 | %%% you may not use this file except in compliance with the License. |
27 | 27 | undefined -> |
28 | 28 | lists:keymember(mix, 1, application:loaded_applications()) |
29 | 29 | end, |
30 | ||
31 | JobId = case os:getenv("TRAVIS_JOB_ID") of false -> ""; V -> V end, | |
32 | 30 | |
33 | 31 | ModCfg0 = fun(F, Cfg, [Key|Tail], Op, Default) -> |
34 | 32 | {OldVal,PartCfg} = case lists:keytake(Key, 1, Cfg) of |
94 | 92 | |
95 | 93 | code:ensure_loaded(rand), |
96 | 94 | 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, | |
97 | 111 | |
98 | 112 | Rules = [ |
99 | 113 | {[deps], IsRebar3, |
100 | 114 | Rebar3DepsFilter, []}, |
101 | {[plugins], IsRebar3, | |
102 | AppendList([rebar3_hex]), []}, | |
103 | 115 | {[erl_opts], RandUniform, |
104 | 116 | 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"}}} ]), []}, | |
110 | 121 | {[deps], os:getenv("USE_GLOBAL_DEPS") /= false, |
111 | 122 | GlobalDepsFilter, []} |
112 | 123 | ], |
113 | 124 | |
114 | 125 | |
115 | Config = FilterConfig(FilterConfig, CONFIG, Rules), | |
126 | Config = FilterConfig(FilterConfig, CONFIG, Rules) ++ GithubConfig, | |
116 | 127 | |
117 | 128 | %io:format("Rules:~n~p~n~nCONFIG:~n~p~n~nConfig:~n~p~n", [Rules, CONFIG, Config]), |
118 | 129 |
4 | 4 | %%% Created : 4 Apr 2013 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
22 | 22 | |
23 | 23 | {application, stun, |
24 | 24 | [{description, "STUN and TURN library for Erlang / Elixir"}, |
25 | {vsn, "1.0.42"}, | |
25 | {vsn, "1.0.44"}, | |
26 | 26 | {modules, []}, |
27 | 27 | {registered, []}, |
28 | 28 | {applications, [kernel, stdlib, fast_tls, p1_utils]}, |
4 | 4 | %%% Created : 8 Aug 2009 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
4 | 4 | %%% Created : 2 May 2013 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
4 | 4 | %%% Created : 7 Aug 2009 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
4 | 4 | %%% Created : 9 Jan 2011 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
4 | 4 | %%% Created : 19 Jul 2020 by Holger Weiss <holger@zedat.fu-berlin.de> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2020-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
4 | 4 | %%% Created : 9 Feb 2003 by Alexey Shchepin <alexey@process-one.net> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
4 | 4 | %%% Created : 2 May 2013 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
4 | 4 | %%% Created : 7 Aug 2009 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
37 | 37 | -include("stun.hrl"). |
38 | 38 | |
39 | 39 | 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)). | |
43 | 43 | |
44 | 44 | mk_cert_test() -> |
45 | 45 | ?assertEqual(ok, file:write_file("certfile.pem", get_cert())). |
4 | 4 | %%% Created : 3 May 2014 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
4 | 4 | %%% Created : 23 Aug 2009 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
4 | 4 | %%% Created : 23 Aug 2009 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |
4 | 4 | %%% Created : 3 May 2014 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
5 | 5 | %%% |
6 | 6 | %%% |
7 | %%% Copyright (C) 2002-2020 ProcessOne, SARL. All Rights Reserved. | |
7 | %%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. | |
8 | 8 | %%% |
9 | 9 | %%% Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | %%% you may not use this file except in compliance with the License. |