Skip to content

Commit

Permalink
Merge branch 'dr-remove-mochiweb-app'
Browse files Browse the repository at this point in the history
  • Loading branch information
David Reid committed Apr 12, 2011
2 parents 3af91fb + 044e70b commit 195a9bc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 98 deletions.
1 change: 0 additions & 1 deletion src/mochiweb.app.src
Expand Up @@ -4,6 +4,5 @@
{vsn, "2.0.0"},
{modules, []},
{registered, []},
{mod, {mochiweb_app, []}},
{env, []},
{applications, [kernel, stdlib, crypto, inets]}]}.
33 changes: 4 additions & 29 deletions src/mochiweb.erl
Expand Up @@ -6,23 +6,9 @@
-module(mochiweb).
-author('bob@mochimedia.com').

-export([start/0, stop/0]).
-export([new_request/1, new_response/1]).
-export([all_loaded/0, all_loaded/1, reload/0]).

%% @spec start() -> ok
%% @doc Start the MochiWeb server.
start() ->
ensure_started(crypto),
application:start(mochiweb).

%% @spec stop() -> ok
%% @doc Stop the MochiWeb server.
stop() ->
Res = application:stop(mochiweb),
application:stop(crypto),
Res.

reload() ->
[c:l(Module) || Module <- all_loaded()].

Expand Down Expand Up @@ -78,17 +64,6 @@ new_response({Request, Code, Headers}) ->
Code,
mochiweb_headers:make(Headers)).

%% Internal API

ensure_started(App) ->
case application:start(App) of
ok ->
ok;
{error, {already_started, App}} ->
ok
end.


%%
%% Tests
%%
Expand Down Expand Up @@ -138,11 +113,11 @@ multiple_https_GET_test() ->
do_GET(ssl, 3).

hundred_http_GET_test_() -> % note the underscore
{timeout, ?LARGE_TIMEOUT,
{timeout, ?LARGE_TIMEOUT,
fun() -> ?assertEqual(ok, do_GET(plain,100)) end}.

hundred_https_GET_test_() -> % note the underscore
{timeout, ?LARGE_TIMEOUT,
{timeout, ?LARGE_TIMEOUT,
fun() -> ?assertEqual(ok, do_GET(ssl,100)) end}.

single_128_http_POST_test() ->
Expand Down Expand Up @@ -170,11 +145,11 @@ multiple_100K_https_POST_test() ->
do_POST(ssl, 102400, 3).

hundred_128_http_POST_test_() -> % note the underscore
{timeout, ?LARGE_TIMEOUT,
{timeout, ?LARGE_TIMEOUT,
fun() -> ?assertEqual(ok, do_POST(plain, 128, 100)) end}.

hundred_128_https_POST_test_() -> % note the underscore
{timeout, ?LARGE_TIMEOUT,
{timeout, ?LARGE_TIMEOUT,
fun() -> ?assertEqual(ok, do_POST(ssl, 128, 100)) end}.

do_GET(Transport, Times) ->
Expand Down
27 changes: 0 additions & 27 deletions src/mochiweb_app.erl

This file was deleted.

41 changes: 0 additions & 41 deletions src/mochiweb_sup.erl

This file was deleted.

0 comments on commit 195a9bc

Please sign in to comment.