Skip to content
Permalink
Browse files
Merge pull request #118 from davisp/feature-add-rebar3-support
Add support for rebar3
  • Loading branch information
davisp committed Oct 10, 2016
2 parents 4c0bfbc + c7756da commit a7db72493d2288533afbb417d5c2e6f11db84639
Showing 11 changed files with 297 additions and 241 deletions.
@@ -1,10 +1,15 @@
.eunit
.rebar
.jiffy.dev
*.app
*.beam
*.d
*.o
*.so
_build
compile_commands.json
deps
erln8.config
hexer.config
rebar.lock
TEST-*.xml
@@ -3,17 +3,15 @@ notifications:
email: paul.joseph.davis@gmail.com
script: make check
otp_release:
- 19.1
- 19.0
- 18.3
- 18.2
- 17.5
- 17.4
- 17.3
- 17.1
- 17.0
- R16B03-1
- R16B02
- R16B01
- R15B03
- R15B02
- R15B01
- R14B04
- R14B03
- R14B02
@@ -15,17 +15,7 @@ distclean: clean
git clean -fxd


devmarker:
@touch .jiffy.dev


depends: devmarker
@if test ! -d ./deps/proper; then \
$(REBAR) get-deps; \
fi


build: depends
build:
$(REBAR) compile


BIN +22.7 KB enc
Binary file not shown.
@@ -33,13 +33,8 @@
]}.

{eunit_opts, [
verbose,
{report, {
eunit_surefire, [{dir,"."}]
}}
]}.

{plugins, [
rebar_gdb_plugin
verbose
]}.

{pre_hooks, [{"", compile, "./enc compile"}]}.
{post_hooks, [{"", clean, "./enc clean"}]}.
@@ -1,37 +1,18 @@
% This file is part of Jiffy released under the MIT license.
% See the LICENSE file for more information.

% Only include PropEr as a dependency when the JIFFY_DEV
% environment variable is defined. This allows downstream
% applications to avoid requiring PropEr.
%
% This script is based on the example provided with Rebar.

ErlOpts = [{d, 'JIFFY_DEV'}],
% Only run the EQC checks when EQC is present.

Proper = [
{proper, ".*", {git, "git://github.com/manopapad/proper.git", "master"}}
],
HaveEQC = code:which(eqc) =/= non_existing,

ConfigPath = filename:dirname(SCRIPT),
DevMarker = filename:join([ConfigPath, ".jiffy.dev"]),
ErlOpts = if not HaveEQC -> []; true ->
[{d, 'HAVE_EQC'}]
end,

case filelib:is_file(DevMarker) of
true ->
% Don't override existing dependencies
Config0 = case lists:keyfind(deps, 1, CONFIG) of
false ->
CONFIG ++ [{deps, Proper}];
{deps, DepsList} ->
lists:keyreplace(deps, 1, CONFIG, {deps, DepsList ++ Proper})
end,
Config1 = case lists:keyfind(erl_opts, 1, Config0) of
false ->
Config0 ++ [{erl_opts, ErlOpts}];
{erl_opts, Opts} ->
NewOpts = {erl_opts, Opts ++ ErlOpts},
lists:keyreplace(erl_opts, 1, Config0, NewOpts)
end;
case lists:keyfind(erl_opts, 1, CONFIG) of
{erl_opts, Opts} ->
NewOpts = {erl_opts, Opts ++ ErlOpts},
lists:keyreplace(erl_opts, 1, CONFIG, NewOpts);
false ->
CONFIG
CONFIG ++ [{erl_opts, ErlOpts}]
end.
@@ -5,6 +5,7 @@


-include_lib("eunit/include/eunit.hrl").
-include("jiffy_util.hrl").


yajl_test_() ->
@@ -19,7 +20,7 @@ gen({Name, Json, Erl}) ->


read_cases() ->
CasesPath = filename:join(["..", "test", "cases", "*.json"]),
CasesPath = cases_path("*.json"),
FileNames = lists:sort(filelib:wildcard(CasesPath)),
lists:map(fun(F) -> make_pair(F) end, FileNames).

@@ -8,7 +8,8 @@
-include("jiffy_util.hrl").


filename() -> "../test/cases/short-doubles.txt".
filename() ->
cases_path("short-doubles.txt").


short_double_test_() ->

This file was deleted.

0 comments on commit a7db724

Please sign in to comment.