Bladeren bron

Make PropEr a soft dependency

This prevents applications that depend on Jiffy from requiring PropEr as
a dependency just to run Jiffy's full test suite. If you want to run the
full test suite you'll have to run Jiffy's Makefile directly which
creates a `.jiffy.dev` marker that enables the full test suite.
pull/30/merge 0.6.0
Paul J. Davis 12 jaren geleden
bovenliggende
commit
6468ae8314
6 gewijzigde bestanden met toevoegingen van 35 en 7 verwijderingen
  1. +1
    -0
      .gitignore
  2. +5
    -3
      Makefile
  3. BIN
      rebar
  4. +0
    -4
      rebar.config
  5. +26
    -0
      rebar.config.script
  6. +3
    -0
      test/jiffy_tests.erl

+ 1
- 0
.gitignore Bestand weergeven

@ -1,3 +1,4 @@
.jiffy.dev
*.app
*.beam
*.o

+ 5
- 3
Makefile Bestand weergeven

@ -15,11 +15,13 @@ distclean: clean
git clean -fxd
depends:
devmarker:
touch .jiffy.dev
depends: devmarker
@if test ! -d ./deps; then \
$(REBAR) get-deps; \
else \
$(REBAR) update-deps; \
fi

BIN
rebar Bestand weergeven


+ 0
- 4
rebar.config Bestand weergeven

@ -1,7 +1,3 @@
{deps, [
{proper, ".*", {git, "git://github.com/manopapad/proper.git", "master"}}
]}.
{port_specs, [{"priv/jiffy.so", ["c_src/*.c"]}]}.
{port_env, [

+ 26
- 0
rebar.config.script Bestand weergeven

@ -0,0 +1,26 @@
% 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 = {erl_opts, [
{d, 'JIFFY_DEV'}
]},
Deps = {deps, [
{proper, ".*", {git, "git://github.com/manopapad/proper.git", "master"}}
]},
ConfigPath = filename:dirname(SCRIPT),
DevMarker = filename:join([ConfigPath, ".jiffy.dev"]),
case filelib:is_file(DevMarker) of
true ->
CONFIG ++ [ErlOpts, Deps];
false ->
CONFIG
end.

+ 3
- 0
test/jiffy_tests.erl Bestand weergeven

@ -3,6 +3,8 @@
-module(jiffy_tests).
-ifdef(JIFFY_DEV).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
@ -130,3 +132,4 @@ escaped_char() ->
end
).
-endif.

Laden…
Annuleren
Opslaan