1IsRebar3 = erlang:function_exported(rebar3, main, 1),
2
3Rebar2Deps0 = [{idna, ".*",
4               {git, "https://github.com/benoitc/erlang-idna",
5                {tag, "5.0.2"}}},
6
7               {mimerl, ".*",
8                {git, "https://github.com/benoitc/mimerl",
9                 {tag, "1.0.2"}}},
10
11               {certifi, ".*",
12                {git, "https://github.com/certifi/erlang-certifi",
13                 {tag, "1.2.1"}}},
14
15               {metrics, ".*",
16                {git, "https://github.com/benoitc/erlang-metrics",
17                 {tag, "1.0.1"}}},
18
19               {ssl_verify_fun, ".*",
20                {git, "https://github.com/deadtrickster/ssl_verify_fun.erl",
21                 {tag, "1.1.1"}}}],
22
23
24Rebar2Deps = case os:getenv("TEST") of
25                 "1" -> [{cowboy, ".*", {git, "https://github.com/ninenines/cowboy.git",
26                                         {tag, "1.0.4"}}} | Rebar2Deps0];
27                 false ->
28                     Rebar2Deps0
29             end,
30
31case IsRebar3 of
32    true ->
33        CONFIG;
34    false ->
35        lists:keyreplace(deps, 1, CONFIG, {deps, Rebar2Deps})
36end.
37