Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix start-dev script and remove gas and sinan

  • Loading branch information...
commit 8580b3601bf9bcdbc2936a24aaac8fa54c964237 1 parent 7bee7d6
Tristan Sloughter authored
View
12 README.md
@@ -1,9 +1,6 @@
A client for Elastic Search in Erlang.
======================================
-* rebar or sinan
-* uses lhttpc http library
-
QUICKSTART with rebar
--------------------
@@ -12,12 +9,3 @@ $ rebar get-deps
$ rebar compile
$ ./start-dev.sh
```
-
-QUICKSTART with sinan
----------------------
-
-```shell
-$ agner install lhttpc
-$ ./sinan build
-$ ./start-dev.sh
-```
View
BIN  rebar
Binary file not shown
View
BIN  sinan
Binary file not shown
View
8 sinan.config
@@ -1,8 +0,0 @@
-{project_name, erlastic_search}.
-{project_vsn, "0.2.0"}.
-
-{build_dir, "_build"}.
-
-{ignore_dirs, ["_", "."]}.
-
-{ignore_apps, []}.
View
2  src/erlastic_search.app.src
@@ -5,6 +5,6 @@
{vsn, "0.2.0"},
{modules, []},
{registered,[]},
- {applications, [kernel, stdlib, sasl, gas, ssl, crypto, lhttpc]},
+ {applications, [kernel, stdlib, sasl, ssl, crypto, lhttpc]},
{start_phases, []}]}.
View
2  src/erlastic_search.erl
@@ -39,7 +39,7 @@ create_index(Params, Index) ->
%% Erlang terms, converts the document to a string and passes to the
%% default server. Elastic Search provides the doc with an id.
%%
-%% @spec index(Index, Type, Doc) -> {ok, Data} | {error, Error}
+%% @spec index(Index, Type, Doc) -> {ok, Data} | {error, Error}v
%% @end
%%--------------------------------------------------------------------
index_doc(Index, Type, Doc) when is_tuple(Doc) ->
View
41 src/erlastic_search_app.erl
@@ -0,0 +1,41 @@
+%%%-------------------------------------------------------------------
+%%% @author Tristan Sloughter <tristan@zinn>
+%%% @copyright (C) 2012, Tristan Sloughter
+%%% @doc
+%%%
+%%% @end
+%%% Created : 31 Aug 2012 by Tristan Sloughter <tristan@zinn>
+%%%-------------------------------------------------------------------
+-module(erlastic_search_app).
+
+-behaviour(application).
+
+%% Application callbacks
+-export([start/0
+ ,start/2
+ ,stop/1]).
+
+-define(APP, erlastic_search).
+
+%%%===================================================================
+%%% Application callbacks
+%%%===================================================================
+
+%%--------------------------------------------------------------------
+start() ->
+ start_deps(?APP, permanent).
+
+start_deps(App, Type) ->
+ case application:start(App, Type) of
+ ok ->
+ ok;
+ {error, {not_started, Dep}} ->
+ start_deps(Dep, Type),
+ start_deps(App, Type)
+ end.
+
+start(_StartType, _StartArgs) ->
+ ok.
+
+stop(_State) ->
+ ok.
View
3  start-dev.sh
@@ -1,4 +1,3 @@
#!/bin/sh
cd `dirname $0`
-exec erl -name erlastic@127.0.0.1 -pa $PWD/ebin $PWD/deps/*/ebin -boot start_sasl -config sys.config -s erlastic_search
-
+exec erl -name erlastic@127.0.0.1 -pa $PWD/ebin $PWD/deps/*/ebin -boot start_sasl -config sys.config -s erlastic_search_app
View
22 sys.config
@@ -7,28 +7,6 @@
{sasl_error_logger, {file, "/tmp/erlastic_search.sasl_log"}}
]
},
-
- %% (G)eneric (A)pplication (S)services config below here. This default config provides
- %% the release with log rotaion and trunctation.
- {gas,
- [
- {mod_specs, [{elwrap, {ewl_elwrap_h, start_link}}]},
-
- {wiring, [
- {elwrap, [
- {wire, sasl, sasl_error_logger, "V:{sasl_error_logger, V}"},
- {err_log, "/tmp/erlastic_search.err_log"},
- {err_log_wrap_info, {{err,5000000,10},{sasl,5000000,10}}},
- {transform_previous, "V:[V]"}
- ]}
- ]
- },
-
- {err_log_tty, true} % Log to the screen
-
- ]
- },
-
{erlastic_search, []}
].
Please sign in to comment.
Something went wrong with that request. Please try again.