Skip to content

Commit

Permalink
Release 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
doomspork committed Sep 22, 2016
1 parent d9e2641 commit cc79d8d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

```elixir
def deps do
[{:ueberauth_slack, "~> 0.3"}]
[{:ueberauth_slack, "~> 0.4"}]
end
```

Expand Down
14 changes: 7 additions & 7 deletions lib/ueberauth/strategy/slack.ex
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ defmodule Ueberauth.Strategy.Slack do
def handle_request!(conn) do
scopes = conn.params["scope"] || option(conn, :default_scope)
opts = [ scope: scopes ]
if conn.params["state"], do: opts = Keyword.put(opts, :state, conn.params["state"])
callback_url = callback_url(conn)
opts =
if conn.params["state"], do: Keyword.put(opts, :state, conn.params["state"]), else: opts

team = option(conn, :team)
if team, do: opts = Keyword.put(opts, :team, team)
opts =
if team, do: Keyword.put(opts, :team, team), else: opts

if String.ends_with?(callback_url, "?"), do: callback_url = String.slice(callback_url, 0..-2)
callback_url = callback_url(conn)
callback_url =
if String.ends_with?(callback_url, "?"), do: String.slice(callback_url, 0..-2), else: callback_url

opts = Keyword.put(opts, :redirect_uri, callback_url)
module = option(conn, :oauth2_module)
Expand Down Expand Up @@ -205,9 +208,6 @@ defmodule Ueberauth.Strategy.Slack do
defp fetch_team(%Plug.Conn{ assigns: %{ ueberauth_failure: _fails }} = conn, _), do: conn

defp fetch_team(conn, token) do
auth = conn.private.slack_auth
token = conn.private.slack_token

scopes = (token.other_params["scope"] || "")
|> String.split(",")

Expand Down
18 changes: 9 additions & 9 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
defmodule UeberauthSlack.Mixfile do
use Mix.Project

@version "0.3.0"
@version "0.4.0"

def project do
[app: :ueberauth_slack,
version: @version,
name: "Ueberauth Slack",
package: package,
elixir: "~> 1.1",
package: package(),
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
source_url: "https://github.com/hassox/ueberauth_slack",
homepage_url: "https://github.com/hassox/ueberauth_slack",
description: description,
deps: deps,
docs: docs]
description: description(),
deps: deps(),
docs: docs()]
end

def application do
Expand All @@ -25,11 +25,11 @@ defmodule UeberauthSlack.Mixfile do
defp deps do
[
{:oauth2, "0.6.0"},
{:ueberauth, "~> 0.2"},
{:ueberauth, "~> 0.4"},

# Docs dependencies
{:earmark, "~> 0.1", only: :dev},
{:ex_doc, "~> 0.1", only: :dev},
{:earmark, ">= 0.0.0", only: :dev},
{:ex_doc, ">= 0.0.0", only: :dev},
]
end

Expand Down
5 changes: 3 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"httpoison": {:hex, :httpoison, "0.9.0", "68187a2daddfabbe7ca8f7d75ef227f89f0e1507f7eecb67e4536b3c516faddb", [:mix], [{:hackney, "~> 1.6.0", [hex: :hackney, optional: false]}]},
"idna": {:hex, :idna, "1.2.0", "ac62ee99da068f43c50dc69acf700e03a62a348360126260e87f2b54eced86b2", [:rebar3], []},
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], []},
"mime": {:hex, :mime, "1.0.1", "05c393850524767d13a53627df71beeebb016205eb43bfbd92d14d24ec7a1b51", [:mix], []},
"mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], []},
"mimetype_parser": {:hex, :mimetype_parser, "0.1.2", "221d2d3f727e89d80de5e1610fc2ce444514aa56f873da1b8fc9c033143e5d6a", [:mix], []},
"oauth2": {:hex, :oauth2, "0.6.0", "f3967aba3f358e64fb70046f659f04ea753d7a407ce032046dd048fc2e2e4be3", [:mix], [{:httpoison, "~> 0.7", [hex: :httpoison, optional: false]}, {:mimetype_parser, "~> 0.1", [hex: :mimetype_parser, optional: false]}, {:poison, "~> 1.3 or ~> 2.0", [hex: :poison, optional: false]}]},
"plug": {:hex, :plug, "1.1.3", "2c1b01a51304ab1b88dc4313c0707e69998c8d6d4cdaeef391fa6003b6e31a5a", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, optional: true]}]},
"plug": {:hex, :plug, "1.2.0", "496bef96634a49d7803ab2671482f0c5ce9ce0b7b9bc25bc0ae8e09859dd2004", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, optional: true]}, {:mime, "~> 1.0", [hex: :mime, optional: false]}]},
"poison": {:hex, :poison, "2.2.0", "4763b69a8a77bd77d26f477d196428b741261a761257ff1cf92753a0d4d24a63", [:mix], []},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.0", "edee20847c42e379bf91261db474ffbe373f8acb56e9079acb6038d4e0bf414f", [:rebar, :make], []},
"ssl_verify_hostname": {:hex, :ssl_verify_hostname, "1.0.5", "2e73e068cd6393526f9fa6d399353d7c9477d6886ba005f323b592d389fb47be", [:make], []},
"ueberauth": {:hex, :ueberauth, "0.2.0", "9160c601b468c6692462a56be7ad8890d1a2d84519d7d9c4541da5b07d6495e1", [:mix], [{:plug, "~> 1.0", [hex: :plug, optional: false]}]}}
"ueberauth": {:hex, :ueberauth, "0.4.0", "bc72d5e5a7bdcbfcf28a756e34630816edabc926303bdce7e171f7ac7ffa4f91", [:mix], [{:plug, "~> 1.2", [hex: :plug, optional: false]}]}}

0 comments on commit cc79d8d

Please sign in to comment.