aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rebar.config4
-rw-r--r--src/gun.erl2
-rw-r--r--test/twitter_SUITE.erl2
3 files changed, 7 insertions, 1 deletions
diff --git a/rebar.config b/rebar.config
new file mode 100644
index 0000000..fddb57f
--- /dev/null
+++ b/rebar.config
@@ -0,0 +1,4 @@
+{deps, [
+ {cowlib, ".*", {git, "git://github.com/extend/cowlib.git", "master"}},
+ {ranch, ".*", {git, "git://github.com/extend/ranch.git", "master"}}
+]}.
diff --git a/src/gun.erl b/src/gun.erl
index b761359..85cedb3 100644
--- a/src/gun.erl
+++ b/src/gun.erl
@@ -111,7 +111,7 @@ open(Host, Port) ->
-spec open(inet:hostname(), inet:port_number(), opts())
-> {ok, pid()} | {error, any()}.
-open(Host, Port, Opts) ->
+open(Host, Port, Opts) when is_list(Host); is_atom(Host) ->
case open_opts(Opts) of
ok ->
supervisor:start_child(gun_sup, [self(), Host, Port, Opts]);
diff --git a/test/twitter_SUITE.erl b/test/twitter_SUITE.erl
index 865a2aa..17086e6 100644
--- a/test/twitter_SUITE.erl
+++ b/test/twitter_SUITE.erl
@@ -32,6 +32,7 @@ all() ->
init_per_suite(Config) ->
ok = application:start(ranch),
ok = application:start(crypto),
+ ok = application:start(cowlib),
ok = application:start(asn1),
ok = application:start(public_key),
ok = application:start(ssl),
@@ -43,6 +44,7 @@ end_per_suite(_) ->
ok = application:stop(ssl),
ok = application:stop(public_key),
ok = application:stop(asn1),
+ ok = application:stop(cowlib),
ok = application:stop(crypto),
ok = application:stop(ranch),
ok.