Skip to content

Commit

Permalink
Separate rebar confs, add backwards compat cb
Browse files Browse the repository at this point in the history
Also, added slightly new rebar
  • Loading branch information
choptastic committed Mar 22, 2013
1 parent 11935b9 commit 104bca5
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,6 +1,7 @@
erl_crash.dump
*~
.*.sw?
*.beam
.eunit/
/deps/*
test/logs/*
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Expand Up @@ -9,5 +9,7 @@ compile: get-deps
clean:
./rebar clean

test: compile
./rebar ct
test: clean
./rebar --config "rebar.test.config" get-deps
./rebar --config "rebar.test.config" compile
./rebar --config "rebar.test.config" skip_deps=true ct
Binary file modified rebar
Binary file not shown.
4 changes: 1 addition & 3 deletions rebar.config
Expand Up @@ -9,7 +9,5 @@

{deps, [
{mimetypes, ".*", {git, "git://github.com/spawngrid/mimetypes.git", "HEAD"}},
{pmod_transform, ".*", {git, "git://github.com/choptastic/pmod_transform.git", "HEAD"}},
{ranch, ".*", {git, "git://github.com/extend/ranch.git", "HEAD"}},
{cowboy, ".*", {git, "git://github.com/extend/cowboy", "HEAD"}}
{pmod_transform, ".*", {git, "git://github.com/choptastic/pmod_transform.git", "HEAD"}}
]}.
18 changes: 18 additions & 0 deletions rebar.test.config
@@ -0,0 +1,18 @@
% -*- Erlang -*-
%% vim: ts=4 sw=4 et ft=erlang

{lib_dirs,["deps"]}.
{src_dirs, ["src", "test"]}.
{erl_opts, [debug_info, fail_on_warning]}.
{cover_enabled, true}.
{xref_checks, [undefined_function_calls]}.

{deps, [
{mimetypes, ".*", {git, "git://github.com/spawngrid/mimetypes.git", "HEAD"}},
{pmod_transform, ".*", {git, "git://github.com/choptastic/pmod_transform.git", "HEAD"}},
{ranch, ".*", {git, "git://github.com/extend/ranch.git", "HEAD"}},
{cowboy, ".*", {git, "git://github.com/extend/cowboy", "HEAD"}},

{proper, ".*", {git, "https://github.com/manopapad/proper.git", {branch, "master"}}}
%{proper_stdlib, ".*", {git, "https://github.com/spawngrid/proper_stdlib.git", {branch, "master"}}}
]}.
3 changes: 3 additions & 0 deletions src/cowboy_bridge_modules/cowboy_request_bridge.erl
Expand Up @@ -23,6 +23,9 @@
recv_from_socket/3
]).

init({Req, _DocRoot}) ->
%% This two-tuple version is deprecated but maintained for backwards compatibility
init(Req);
init(Req) ->
ReqKey = new_key(),
put_key(ReqKey, #request_cache{body = not_loaded, request = Req}),
Expand Down

0 comments on commit 104bca5

Please sign in to comment.