Permalink
Browse files

Merge pull request #1 from ftrvxmtrx/rebar_friendly

Rebar-friendlify
  • Loading branch information...
2 parents 7cfff8a + bc8981e commit 0666e80dd24543764cbd6078b6260095770139d9 @echopla1 echopla1 committed Aug 27, 2011
Showing with 15 additions and 3 deletions.
  1. +2 −0 .gitignore
  2. +6 −3 src/jn_mavg.erl
  3. +7 −0 src/mavg.app.src
View
@@ -0,0 +1,2 @@
+ebin
+.eunit
View
@@ -19,8 +19,7 @@
get_current/1,
history/1,
new_mavg/1,
- new_mavg/2,
- selftest/0
+ new_mavg/2
]).
% Time/Event moving average representation
@@ -197,7 +196,10 @@ unixtime() -> unixtime(now()).
%% @spec unixtime(now()) -> integer()
unixtime({Mega, Secs, _Msecs}) -> Mega * 1000000 + Secs.
-selftest() ->
+-ifdef(TEST).
+-include_lib("eunit/include/eunit.hrl").
+
+jn_mavg_test() ->
io:format("~p Testing START ~n", [?MODULE]),
[] = updateEventHistory([], 1200, 0, 42),
[{1200, 13}] = updateEventHistory([], 1200, 13, 42),
@@ -261,3 +263,4 @@ selftest() ->
io:format("~p Testing STOP ~n", [?MODULE]).
+-endif.
View
@@ -0,0 +1,7 @@
+{application, mavg,
+ [{description, "Exponential moving average library"},
+ {vsn, "1.0"},
+ {modules, [jn_mavg]},
+ {mod, {mavg,[]}},
+ {start_phases, []}
+ ]}.

0 comments on commit 0666e80

Please sign in to comment.