Commits

justin  committed f5e6171

fix up deps and app config

  • Participants
  • Parent commits cbcdf48

Comments (0)

Files changed (4)

File ebin/luwak.app

 {application, luwak,
  [
-  {description, ""},
-  {vsn, "1"},
+  {description, "luwak"},
+  {vsn, "1.0"},
   {modules, [
              luwak_app,
-             luwak_sup,
              luwak_io,
              luwak_block,
              luwak_file,
   {applications, [
                   kernel,
                   stdlib,
-                  riak_core,
-                  riak_kv,
-                  skerl
+                  skerl,
+                  webmachine,
+                  riak_kv
                  ]},
   {mod, { luwak_app, []}},
   {env, []}

File rebar.config

+{erl_opts, [{i, ".."}]}.
+
+{sub_dirs, ["rel"]}.
+
 {lib_dirs, ["deps"]}.
 
 {deps, [{skerl, "0\.1",
-         {hg, "ssh://hg@bitbucket.org/basho/skerl", "1233b8462076"}},
-        {webmachine, "1.7.1",
-         {hg, "http://bitbucket.org/basho/webmachine", "f103deda4daf"}},
-        {riak_kv, "0.12.0",
-         {hg, "http://bitbucket.org/basho/riak_kv", "92b956595db4"}}]}.
-
+         {hg, "http://bitbucket.org/basho/skerl", "tip"}},
+        {riak_kv, "0.13.*",
+         {hg, "http://bitbucket.org/basho/riak_kv", "tip"}}
+        ]}.

File src/luwak_app.erl

 %% ===================================================================
 
 start(_StartType, _StartArgs) ->
-    luwak_sup:start_link().
+    riak_core_util:start_app_deps(luwak),
+    add_webmachine_routes(),
+    {ok,self()}.
 
 stop(_State) ->
     ok.
+
+add_webmachine_routes() ->
+    Name = app_helper:get_env(luwak, prefix, "luwak"),
+    Props = [{prefix, Name}],
+    [ webmachine_router:add_route(R)
+      || R <- [{[Name, key], luwak_wm_file, Props},
+               {[Name],      luwak_wm_file, Props}] ].

File src/luwak_sup.erl

-%%%-------------------------------------------------------------------
-%%% File    : luwak_sup.erl
-%%% Author  : Bryan Fink <bryan@mashtun-2.local>
-%%% Description : Basic supervisor for luwak app
-%%%
-%%% Created :  5 Jul 2010 by Bryan Fink <bryan@mashtun-2.local>
-%%%-------------------------------------------------------------------
--module(luwak_sup).
-
--behaviour(supervisor).
-
-%% API
--export([start_link/0]).
-
-%% Supervisor callbacks
--export([init/1]).
-
--define(SERVER, ?MODULE).
-
-%%====================================================================
-%% API functions
-%%====================================================================
-%%--------------------------------------------------------------------
-%% Function: start_link() -> {ok,Pid} | ignore | {error,Error}
-%% Description: Starts the supervisor
-%%--------------------------------------------------------------------
-start_link() ->
-    supervisor:start_link({local, ?SERVER}, ?MODULE, []).
-
-%%====================================================================
-%% Supervisor callbacks
-%%====================================================================
-%%--------------------------------------------------------------------
-%% Func: init(Args) -> {ok,  {SupFlags,  [ChildSpec]}} |
-%%                     ignore                          |
-%%                     {error, Reason}
-%% Description: Whenever a supervisor is started using 
-%% supervisor:start_link/[2,3], this function is called by the new process 
-%% to find out about restart strategy, maximum restart frequency and child 
-%% specifications.
-%%--------------------------------------------------------------------
-init([]) ->
-    add_webmachine_routes(),
-    {ok,{{one_for_all,0,1}, []}}.
-
-%%====================================================================
-%% Internal functions
-%%====================================================================
-add_webmachine_routes() ->
-    Name = app_helper:get_env(luwak, prefix, "luwak"),
-    Props = [{prefix, Name}],
-    [ webmachine_router:add_route(R)
-      || R <- [{[Name, key], luwak_wm_file, Props},
-               {[Name],      luwak_wm_file, Props}] ].