Merge remote-tracking branch 'github/pr/14'
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..236bcb5
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,34 @@
+language: erlang
+
+otp_release:
+  - 18.1
+  - 17.5
+  - R16B03-1
+
+matrix:
+  allow_failures:
+    - otp_release: R16B03-1
+
+sudo: false
+
+addons:
+  apt:
+    packages:
+      - libmozjs185-dev
+
+before_install:
+  - git clone https://github.com/apache/couchdb
+
+before_script:
+  - cd couchdb
+  - ./configure --disable-docs --disable-fauxton
+  - cp -r ../!(couchdb) ./src/couch_epi
+  - make
+
+script:
+  - ./bin/rebar setup_eunit
+  - BUILDDIR=`pwd` ./bin/rebar -r eunit apps=couch_epi skip_deps=couch_log
+  - ./bin/rebar -r build-plt apps=couch_epi skip_deps=couch_log
+  - ./bin/rebar -r dialyze apps=couch_epi skip_deps=couch_log
+
+cache: apt
diff --git a/src/couch_epi.erl b/src/couch_epi.erl
index 2754261..69f72a2 100644
--- a/src/couch_epi.erl
+++ b/src/couch_epi.erl
@@ -37,7 +37,8 @@
     key/0,
     handle/0,
     plugin_id/0,
-    data_spec/0
+    data_spec/0,
+    apply_opts/0
 ]).
 
 -type app() :: atom().
@@ -128,7 +129,7 @@
     couch_epi_data_gen:subscribers(Handle).
 
 -spec apply(Handle :: handle(), ServiceId :: atom(), Function :: atom(),
-    Args :: [term()], Opts :: apply_opts()) -> ok.
+    Args :: [term()], Opts :: apply_opts()) -> [any()].
 
 apply(Handle, ServiceId, Function, Args, Opts) when Handle /= undefined ->
     couch_epi_functions_gen:apply(Handle, ServiceId, Function, Args, Opts).
diff --git a/src/couch_epi_functions_gen.erl b/src/couch_epi_functions_gen.erl
index 4990b60..311dd62 100644
--- a/src/couch_epi_functions_gen.erl
+++ b/src/couch_epi_functions_gen.erl
@@ -44,7 +44,7 @@
     apply(get_handle(ServiceId), ServiceId, Function, Args, Opts).
 
 -spec apply(Handle :: atom(), ServiceId :: atom(), Function :: atom(),
-    Args :: [term()], Opts :: couch_epi:apply_opts()) -> ok.
+    Args :: [term()], Opts :: couch_epi:apply_opts()) -> [any()].
 
 apply(Handle, _ServiceId, Function, Args, Opts) ->
     DispatchOpts = parse_opts(Opts),