diff --git a/.gitignore b/.gitignore index 7699760..2e99a93 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,9 @@ ebin/ priv/easton_index +.idea +_build +idx +*.d +*.lock +.DS_Store diff --git a/rebar.config b/rebar.config index de99f76..5a765ad 100644 --- a/rebar.config +++ b/rebar.config @@ -1,4 +1,3 @@ - {port_specs, [ {"priv/easton_index", [ "c_src/easton_index/*.cc" @@ -9,13 +8,20 @@ {"CXXFLAGS", "$CXXFLAGS -std=c++0x -g -Wall -Werror"}, {"EXE_LDFLAGS", "$EXE_LDFLAGS -lCsMap -lspatialindex -lspatialindex_c -lgeos -lgeos_c -lleveldb"}, - {"EXE_LINK_TEMPLATE", - "$CXX $PORT_IN_FILES $LDFLAGS $EXE_LDFLAGS -o $PORT_OUT_FILE"}, - {"darwin", "EXE_CFLAGS", "$EXE_CFLAGS -I/usr/local/include"}, + {"EXE_LINK_TEMPLATE", "$CXX $PORT_IN_FILES $LDFLAGS $EXE_LDFLAGS -o $PORT_OUT_FILE"}, + {"darwin", "EXE_CFLAGS", "$EXE_CFLAGS -I/usr/local/include"}, {"darwin", "EXE_LDFLAGS", "$EXE_LDFLAGS -L/usr/local/lib"} ]}. -{eunit_opts, [ - verbose -]}. +{eunit_opts, [verbose]}. +{plugins, [{pc, "~> 1.0"}]}. +{artifacts, [ + "priv/easton_index" +]}. +{provider_hooks, [ + {post, [ + {compile, {pc, compile}}, + {clean, {pc, clean}} + ]} +]}. diff --git a/test/easton_05_search_tests.erl b/test/easton_05_search_tests.erl index 3fe093d..c7c5260 100644 --- a/test/easton_05_search_tests.erl +++ b/test/easton_05_search_tests.erl @@ -285,8 +285,8 @@ gen_point(inner) -> % Inner square is easy square. The % slightly-less than 1 and 2 numbers % are to avoid edge effects for queries. - X = 1.999 * random:uniform() - 0.999, - Y = 1.999 * random:uniform() - 0.999, + X = 1.999 * rand:uniform() - 0.999, + Y = 1.999 * rand:uniform() - 0.999, {X, Y}; gen_point(outer) -> % Outer square is harder square. @@ -294,9 +294,9 @@ gen_point(outer) -> % in a unit square and then transposing it % randomly to one of the twelve possible unit % squares that make up the outer ring. - X = random:uniform(), - Y = random:uniform(), - S = random:uniform(12), + X = rand:uniform(), + Y = rand:uniform(), + S = rand:uniform(12), % This numbering starts in the top left % and runs clockwise. {OffX, OffY} = case S of diff --git a/test/easton_06_temporal_tests.erl b/test/easton_06_temporal_tests.erl index b87f918..2f312d0 100644 --- a/test/easton_06_temporal_tests.erl +++ b/test/easton_06_temporal_tests.erl @@ -84,7 +84,7 @@ moving_shape_test(Idx) -> NumShapes = length(Triples), ?assertEqual({ok, NumShapes}, easton_index:doc_count(Idx)), - lists:foreach(fun({Name, Shape, MovingShape}) -> + lists:foreach(fun({Name, _Shape, _MovingShape}) -> ?assertEqual(ok, easton_index:remove(Idx, Name)) end, Triples), diff --git a/test/easton_07_mvr_tests.erl b/test/easton_07_mvr_tests.erl index 415ce31..e2ef2b7 100644 --- a/test/easton_07_mvr_tests.erl +++ b/test/easton_07_mvr_tests.erl @@ -86,7 +86,7 @@ historical_shape_test(Idx) -> NumShapes = length(Triples), ?assertEqual({ok, NumShapes}, easton_index:doc_count(Idx)), - lists:foreach(fun({Name, Shape, HistoricalShape}) -> + lists:foreach(fun({Name, _Shape, _HistoricalShape}) -> ?assertEqual(ok, easton_index:remove(Idx, Name)) end, Triples),