From 1b36831b6db29ed3fff462a989f2b1c65b766a83 Mon Sep 17 00:00:00 2001 From: Sean Callan Date: Mon, 1 Jul 2019 07:12:00 -0600 Subject: [PATCH] Remove unused captures, update ExDoc --- lib/ueberauth/strategy/slack.ex | 4 ++-- lib/ueberauth/strategy/slack/oauth.ex | 2 +- mix.exs | 2 +- mix.lock | 7 +++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/ueberauth/strategy/slack.ex b/lib/ueberauth/strategy/slack.ex index 2a99a7b..363a233 100644 --- a/lib/ueberauth/strategy/slack.ex +++ b/lib/ueberauth/strategy/slack.ex @@ -182,7 +182,7 @@ defmodule Ueberauth.Strategy.Slack do scopes = String.split(scope_string, ",") case Ueberauth.Strategy.Slack.OAuth.get(token, "/auth.test") do - {:ok, %OAuth2.Response{status_code: 401, body: body}} -> + {:ok, %OAuth2.Response{status_code: 401, body: _body}} -> set_errors!(conn, [error("token", "unauthorized")]) {:ok, %OAuth2.Response{status_code: status_code, body: auth}} when status_code in 200..399 -> cond do @@ -211,7 +211,7 @@ defmodule Ueberauth.Strategy.Slack do false -> conn true -> case Ueberauth.Strategy.Slack.OAuth.get(token, "/users.identity") do - {:ok, %OAuth2.Response{status_code: 401, body: body}} -> + {:ok, %OAuth2.Response{status_code: 401, body: _body}} -> set_errors!(conn, [error("token", "unauthorized")]) {:ok, %OAuth2.Response{status_code: status_code, body: identity}} when status_code in 200..399 -> if identity["ok"] do diff --git a/lib/ueberauth/strategy/slack/oauth.ex b/lib/ueberauth/strategy/slack/oauth.ex index 76558b9..da02e14 100644 --- a/lib/ueberauth/strategy/slack/oauth.ex +++ b/lib/ueberauth/strategy/slack/oauth.ex @@ -63,7 +63,7 @@ defmodule Ueberauth.Strategy.Slack.OAuth do defp endpoint("/" <> _path = endpoint, client), do: client.site <> endpoint defp endpoint(endpoint, _client), do: endpoint - defp to_url(client, endpoint, params \\ nil) do + defp to_url(client, endpoint, params) do client_endpoint = client |> Map.get(endpoint, endpoint) diff --git a/mix.exs b/mix.exs index 7791fd2..2ff2a6a 100644 --- a/mix.exs +++ b/mix.exs @@ -33,7 +33,7 @@ defmodule UeberauthSlack.Mixfile do # dev/test dependencies {:credo, "~> 0.5", only: [:dev, :test]}, {:earmark, ">= 0.0.0", only: :dev}, - {:ex_doc, ">= 0.0.0", only: :dev} + {:ex_doc, "~> 0.19", only: :dev} ] end diff --git a/mix.lock b/mix.lock index 9ce9cc7..2d12a6a 100644 --- a/mix.lock +++ b/mix.lock @@ -2,16 +2,19 @@ "bunt": {:hex, :bunt, "0.1.6", "5d95a6882f73f3b9969fdfd1953798046664e6f77ec4e486e6fafc7caad97c6f", [:mix], []}, "certifi": {:hex, :certifi, "2.5.1", "867ce347f7c7d78563450a18a6a28a8090331e77fa02380b4a21962a65d36ee5", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm"}, "credo": {:hex, :credo, "0.5.3", "0c405b36e7651245a8ed63c09e2d52c2e2b89b6d02b1570c4d611e0fcbecf4a2", [:mix], [{:bunt, "~> 0.1.6", [hex: :bunt, optional: false]}]}, - "earmark": {:hex, :earmark, "0.1.19", "ffec54f520a11b711532c23d8a52b75a74c09697062d10613fa2dbdf8a9db36e", [:mix], []}, - "ex_doc": {:hex, :ex_doc, "0.10.0", "f49c237250b829df986486b38f043e6f8e19d19b41101987f7214543f75947ec", [:mix], [{:earmark, "~> 0.1.17 or ~> 0.2", [hex: :earmark, optional: true]}]}, + "earmark": {:hex, :earmark, "1.3.2", "b840562ea3d67795ffbb5bd88940b1bed0ed9fa32834915125ea7d02e35888a5", [:mix], [], "hexpm"}, + "ex_doc": {:hex, :ex_doc, "0.20.2", "1bd0dfb0304bade58beb77f20f21ee3558cc3c753743ae0ddbb0fd7ba2912331", [:mix], [{:earmark, "~> 1.3", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.10", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"}, "hackney": {:hex, :hackney, "1.15.1", "9f8f471c844b8ce395f7b6d8398139e26ddca9ebc171a8b91342ee15a19963f4", [:rebar3], [{:certifi, "2.5.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "6.0.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.4", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"}, "httpoison": {:hex, :httpoison, "0.9.0", "68187a2daddfabbe7ca8f7d75ef227f89f0e1507f7eecb67e4536b3c516faddb", [:mix], [{:hackney, "~> 1.6.0", [hex: :hackney, optional: false]}]}, "idna": {:hex, :idna, "6.0.0", "689c46cbcdf3524c44d5f3dde8001f364cd7608a99556d8fbd8239a5798d4c10", [:rebar3], [{:unicode_util_compat, "0.4.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"}, "jason": {:hex, :jason, "1.1.2", "b03dedea67a99223a2eaf9f1264ce37154564de899fd3d8b9a21b1a6fd64afe7", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"}, + "makeup": {:hex, :makeup, "0.8.0", "9cf32aea71c7fe0a4b2e9246c2c4978f9070257e5c9ce6d4a28ec450a839b55f", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.13.0", "be7a477997dcac2e48a9d695ec730b2d22418292675c75aa2d34ba0909dcdeda", [:mix], [{:makeup, "~> 0.8", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], []}, "mime": {:hex, :mime, "1.3.1", "30ce04ab3175b6ad0bdce0035cba77bba68b813d523d1aac73d9781b4d193cf8", [:mix], [], "hexpm"}, "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm"}, "mimetype_parser": {:hex, :mimetype_parser, "0.1.2", "221d2d3f727e89d80de5e1610fc2ce444514aa56f873da1b8fc9c033143e5d6a", [:mix], []}, + "nimble_parsec": {:hex, :nimble_parsec, "0.5.0", "90e2eca3d0266e5c53f8fbe0079694740b9c91b6747f2b7e3c5d21966bba8300", [:mix], [], "hexpm"}, "oauth2": {:hex, :oauth2, "1.0.1", "2a116de7863d4b5a8a265d77e62b17a6f54e0c01a5bbbf02210783cb861e49ac", [:mix], [{:hackney, "~> 1.13", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm"}, "parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm"}, "plug": {:hex, :plug, "1.8.2", "0bcce1daa420f189a6491f3940cc77ea7fb1919761175c9c3b59800d897440fc", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm"},