summaryrefslogtreecommitdiff
path: root/src/rebar_resource.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2014-10-30 20:35:15 -0500
committerTristan Sloughter <t@crashfast.com>2014-10-30 20:35:15 -0500
commitef1df1222dbed3d219159efdb2d7abfb5974d344 (patch)
tree481593caacc2cf7794dab6cd2cd354449fa80d7a /src/rebar_resource.erl
parenta3ec3a3424dd47e9687d0d2960ef2d3cba6a8f5c (diff)
create rebar_resource behaviour and create git resource
Diffstat (limited to 'src/rebar_resource.erl')
-rw-r--r--src/rebar_resource.erl25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/rebar_resource.erl b/src/rebar_resource.erl
new file mode 100644
index 0000000..7e79356
--- /dev/null
+++ b/src/rebar_resource.erl
@@ -0,0 +1,25 @@
+%% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ts=4 sw=4 et
+-module(rebar_resource).
+
+-export([]).
+
+-ifdef(have_callback_support).
+
+%% In the case where R14 or lower is being used to compile the system
+%% we need to export a behaviour info
+-export([behaviour_info/1]).
+
+-spec behaviour_info(atom()) -> [{atom(), arity()}] | undefined.
+behaviour_info(callbacks) ->
+ [{lock, 2},
+ {download, 2}];
+behaviour_info(_) ->
+ undefined.
+
+-else.
+
+-callback lock(string(), tuple()) -> ok.
+-callback download(string(), tuple()) -> ok.
+
+-endif.