Skip to content

Commit

Permalink
Start on rebar3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum committed May 6, 2022
1 parent 53114ba commit 3b3478c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
*.beam
*.dump
rebar.lock
/_build
/rebar3.crashdump
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Version 3.0.0 released 2022-XX-XX

* rebar3 is now the preferred build tool (finally)
https://github.com/mochi/mochiweb/pull/241
* Minimum OTP version is now 18, which
allows us to remove a number of backwards
compatibility hacks while still supporting
Expand All @@ -14,6 +16,7 @@ Version 3.0.0 released 2022-XX-XX
that expression might have to be updated to
handle the `{shutdown, Error}` error reason.
https://github.com/mochi/mochiweb/pull/238
https://github.com/mochi/mochiweb/pull/242

Version 2.22.0 released 2021-08-23

Expand Down
10 changes: 7 additions & 3 deletions src/mochiweb_multipart.erl
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,13 @@ find_boundary(Prefix, Data) ->
-include_lib("eunit/include/eunit.hrl").

ssl_cert_opts() ->
EbinDir = filename:dirname(code:which(?MODULE)),
CertDir = filename:join([EbinDir, "..", "support",
"test-materials"]),
{ok, Cwd} = file:get_cwd(),
CertDir = filename:join(
case filename:basename(Cwd) of
%% rebar2 compatibility
".eunit" -> [".."];
_ -> []
end ++ ["support", "test-materials"]),
CertFile = filename:join(CertDir, "test_ssl_cert.pem"),
KeyFile = filename:join(CertDir, "test_ssl_key.pem"),
[{certfile, CertFile}, {keyfile, KeyFile}].
Expand Down
9 changes: 7 additions & 2 deletions test/mochiweb_test_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
-include_lib("eunit/include/eunit.hrl").

ssl_cert_opts() ->
EbinDir = filename:dirname(code:which(?MODULE)),
CertDir = filename:join([EbinDir, "..", "support", "test-materials"]),
{ok, Cwd} = file:get_cwd(),
CertDir = filename:join(
case filename:basename(Cwd) of
%% rebar2 compatibility
".eunit" -> [".."];
_ -> []
end ++ ["support", "test-materials"]),
CertFile = filename:join(CertDir, "test_ssl_cert.pem"),
KeyFile = filename:join(CertDir, "test_ssl_key.pem"),
[{certfile, CertFile}, {keyfile, KeyFile}].
Expand Down

0 comments on commit 3b3478c

Please sign in to comment.