-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from gliderlabs/master
release 0.3.9
- Loading branch information
Showing
30 changed files
with
216 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v73 | ||
v75 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://github.com/heroku/heroku-buildpack-erlang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fa17af9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: erl -pa ebin deps/*/ebin -noshell -boot start_sasl -s reloader -s erlang_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
%%-*- mode: erlang -*- | ||
{[], erlang_test_resource, []}. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
%%-*- mode: erlang -*- | ||
|
||
{deps, [{webmachine, "1.10.*", {git, "git://github.com/basho/webmachine", "HEAD"}}]}. |
18 changes: 18 additions & 0 deletions
18
buildpacks/buildpack-erlang/tests/erlang/src/erlang_test.app.src
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
%%-*- mode: erlang -*- | ||
{application, erlang_test, | ||
[ | ||
{description, "erlang_test"}, | ||
{vsn, "1"}, | ||
{modules, []}, | ||
{registered, []}, | ||
{applications, [ | ||
kernel, | ||
stdlib, | ||
inets, | ||
crypto, | ||
mochiweb, | ||
webmachine | ||
]}, | ||
{mod, { erlang_test_app, []}}, | ||
{env, []} | ||
]}. |
29 changes: 29 additions & 0 deletions
29
buildpacks/buildpack-erlang/tests/erlang/src/erlang_test.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
%% @author author <[email protected]> | ||
%% @copyright YYYY author. | ||
|
||
%% @doc erlang_test startup code | ||
|
||
-module(erlang_test). | ||
-author('author <[email protected]>'). | ||
-export([start/0, start_link/0, stop/0]). | ||
|
||
%% @spec start_link() -> {ok,Pid::pid()} | ||
%% @doc Starts the app for inclusion in a supervisor tree | ||
start_link() -> | ||
application:set_env(webmachine, webmachine_logger_module, | ||
webmachine_logger), | ||
application:ensure_all_started(webmachine), | ||
erlang_test_sup:start_link(). | ||
|
||
%% @spec start() -> ok | ||
%% @doc Start the erlang_test server. | ||
start() -> | ||
application:set_env(webmachine, webmachine_logger_module, | ||
webmachine_logger), | ||
application:ensure_all_started(webmachine), | ||
application:start(erlang_test). | ||
|
||
%% @spec stop() -> ok | ||
%% @doc Stop the erlang_test server. | ||
stop() -> | ||
application:stop(erlang_test). |
21 changes: 21 additions & 0 deletions
21
buildpacks/buildpack-erlang/tests/erlang/src/erlang_test_app.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
%% @author author <[email protected]> | ||
%% @copyright YYYY author. | ||
|
||
%% @doc Callbacks for the erlang_test application. | ||
|
||
-module(erlang_test_app). | ||
-author('author <[email protected]>'). | ||
|
||
-behaviour(application). | ||
-export([start/2,stop/1]). | ||
|
||
|
||
%% @spec start(_Type, _StartArgs) -> ServerRet | ||
%% @doc application start callback for erlang_test. | ||
start(_Type, _StartArgs) -> | ||
erlang_test_sup:start_link(). | ||
|
||
%% @spec stop(_State) -> ServerRet | ||
%% @doc application stop callback for erlang_test. | ||
stop(_State) -> | ||
ok. |
13 changes: 13 additions & 0 deletions
13
buildpacks/buildpack-erlang/tests/erlang/src/erlang_test_resource.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
%% @author author <[email protected]> | ||
%% @copyright YYYY author. | ||
%% @doc Example webmachine_resource. | ||
|
||
-module(erlang_test_resource). | ||
-export([init/1, to_html/2]). | ||
|
||
-include_lib("webmachine/include/webmachine.hrl"). | ||
|
||
init([]) -> {ok, undefined}. | ||
|
||
to_html(ReqData, State) -> | ||
{"erlang", ReqData, State}. |
57 changes: 57 additions & 0 deletions
57
buildpacks/buildpack-erlang/tests/erlang/src/erlang_test_sup.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
%% @author author <[email protected]> | ||
%% @copyright YYYY author. | ||
|
||
%% @doc Supervisor for the erlang_test application. | ||
|
||
-module(erlang_test_sup). | ||
-author('author <[email protected]>'). | ||
|
||
-behaviour(supervisor). | ||
|
||
%% External exports | ||
-export([start_link/0, upgrade/0]). | ||
|
||
%% supervisor callbacks | ||
-export([init/1]). | ||
|
||
%% @spec start_link() -> ServerRet | ||
%% @doc API for starting the supervisor. | ||
start_link() -> | ||
supervisor:start_link({local, ?MODULE}, ?MODULE, []). | ||
|
||
%% @spec upgrade() -> ok | ||
%% @doc Add processes if necessary. | ||
upgrade() -> | ||
{ok, {_, Specs}} = init([]), | ||
|
||
Old = sets:from_list( | ||
[Name || {Name, _, _, _} <- supervisor:which_children(?MODULE)]), | ||
New = sets:from_list([Name || {Name, _, _, _, _, _} <- Specs]), | ||
Kill = sets:subtract(Old, New), | ||
|
||
sets:fold(fun (Id, ok) -> | ||
supervisor:terminate_child(?MODULE, Id), | ||
supervisor:delete_child(?MODULE, Id), | ||
ok | ||
end, ok, Kill), | ||
|
||
[supervisor:start_child(?MODULE, Spec) || Spec <- Specs], | ||
ok. | ||
|
||
%% @spec init([]) -> SupervisorTree | ||
%% @doc supervisor callback. | ||
init([]) -> | ||
Ip = case os:getenv("WEBMACHINE_IP") of false -> "0.0.0.0"; Any -> Any end, | ||
{ok, Dispatch} = file:consult(filename:join( | ||
[filename:dirname(code:which(?MODULE)), | ||
"..", "priv", "dispatch.conf"])), | ||
Port = list_to_integer(os:getenv("PORT")), | ||
WebConfig = [ | ||
{ip, Ip}, | ||
{port, Port}, | ||
{dispatch, Dispatch}], | ||
Web = {webmachine_mochiweb, | ||
{webmachine_mochiweb, start, [WebConfig]}, | ||
permanent, 5000, worker, [mochiweb_socket_server]}, | ||
Processes = [Web], | ||
{ok, { {one_for_one, 10, 10}, Processes} }. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
source "$(dirname $BASH_SOURCE)/../../../test" | ||
app-test "$(basename $(dirname $BASH_SOURCE))" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v22 | ||
v31 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v19 | ||
v20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v42 | ||
v44 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v87 | ||
v88 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v90 | ||
v95 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v24 | ||
v26 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v74 | ||
v77 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v141 | ||
v145 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v64 | ||
v66 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters