Skip to content

Commit

Permalink
support 1.5 and 2.x poison
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Seay authored Sep 7, 2016
1 parent a35e5f8 commit 8b77a3c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/_build
erl_crash.dump
/deps
/doc
2 changes: 1 addition & 1 deletion lib/recaptcha.ex
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ defmodule Recaptcha do
{:error, Enum.map(errors, fn(error) -> atomise_api_error(error) end)}
{:ok, %{"success" => true, "challenge_ts" => timestamp, "hostname" => host}} ->
{:ok, %Recaptcha.Response{challenge_ts: timestamp, hostname: host}}
{:ok, %{"success" => false, "challenge_ts" => timestamp, "hostname" => host}} ->
{:ok, %{"success" => false, "challenge_ts" => _timestamp, "hostname" => _host}} ->
{:error, [:challenge_failed]}
end
end
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Recaptcha.Mixfile do

def project do
[app: :recaptcha,
version: "2.0.0",
version: "2.0.1",
elixir: "~> 1.2",
description: description,
deps: deps,
Expand All @@ -24,7 +24,7 @@ defmodule Recaptcha.Mixfile do
defp deps do
[
{:httpoison, "~> 0.9.0"},
{:poison, "~> 2.0"},
{:poison, "~> 1.5 or ~> 2.0"},
{:credo, "~> 0.4", only: [:dev, :test]},
{:ex_doc, ">= 0.0.0", only: :dev}
]
Expand Down

0 comments on commit 8b77a3c

Please sign in to comment.