Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks for OTP 18.0 support and dependency updates #60

Merged
merged 2 commits into from Sep 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,3 +1,5 @@
ebin
.eunit
deps
.rebar
*.plt
5 changes: 5 additions & 0 deletions .travis.yml
@@ -1,5 +1,10 @@
language: erlang
otp_release:
- 18.0
- 17.5
- 17.4
- 17.3
- 17.1
- 17.0
- R16B03-1
- R16B03
Expand Down
Binary file modified rebar
Binary file not shown.
5 changes: 4 additions & 1 deletion rebar.config
Expand Up @@ -24,4 +24,7 @@
%%
%% ----------------------------------------------------------------------------

{erl_opts, [ {platform_define, "^R", pre17} ]}.
{erl_opts, [
{platform_define, "^R", pre17},
{platform_define, "^(R|17)", pre18}
]}.
7 changes: 4 additions & 3 deletions rebar.test.config
Expand Up @@ -26,7 +26,7 @@

{lib_dirs, ["deps"]}.
{deps_dir, ["deps"]}.
{require_otp_vsn, "R1[456]|17"}.
{require_min_otp_vsn, "R14"}.
{erl_opts, [ debug_info
, warn_format
, warn_export_all
Expand All @@ -36,6 +36,7 @@
, nowarn_shadow_vars
, warnings_as_errors
, {platform_define, "^R", pre17}
, {platform_define, "^(R|17)", pre18}
]}.
{xref_warnings, false}.
{xref_checks, [undefined_function_calls]}.
Expand All @@ -52,6 +53,6 @@


{deps,
[ {meck, ".*", {git, "https://github.com/eproxus/meck.git", {tag, "0.8.2"}}}
, {proper, ".*", {git, "https://github.com/manopapad/proper.git", {tag, "v1.1"}}}
[ {meck, ".*", {git, "https://github.com/eproxus/meck.git", {tag, "0.8.3"}}}
, {proper, ".*", {git, "https://github.com/manopapad/proper.git", {tag, "20e62bc32f9bd43fe2ff52944a4ef99eb71d1399"}}}
] }.
4 changes: 4 additions & 0 deletions src/oauth2_response.erl
Expand Up @@ -171,7 +171,11 @@ to_proplist(Response) ->
response_foldr(Response, fun(Key, Value, Acc) -> [{Key, Value} | Acc] end, []).

-ifndef(pre17).
-ifdef(pre18).
-spec to_map(response()) -> map(binary(), any()).
-else.
-spec to_map(response()) -> #{binary() => any()}.
-endif.
to_map(Response) ->
response_foldr(Response, fun(Key, Value, Acc) -> maps:put(Key, Value, Acc) end, maps:new()).
-endif.
Expand Down