dwyl / elixir-auth-github

:octocat: Minimalist GitHub OAuth Authentication for Elixir Apps. Tested, Documented & Maintained. Setup in 5 mins. 🚀
GNU General Public License v2.0
38 stars 4 forks source link

Update HTTPoison + Publish New Version #52

Closed nelsonic closed 2 years ago

nelsonic commented 2 years ago

While updating to Phoenix 1.6 and Elixir 1.12.3 as part of https://github.com/dwyl/elixir-auth-github-demo/issues/17 we spotted an issue with HTTPoison.Base:

image

My hypothesis is that simply updating to the latest version of the package will resolve this issue.

Todo

Happy for anyone else to do this update. Should only take 5 mins to update the mix.exs file and create the PR. 💭

nelsonic commented 2 years ago

Annoyingly when HTTPoison is update, one of the tests fails:

Generated excoveralls app
==> httpoison
Compiling 3 files (.ex)
Generated httpoison app
==> elixir_auth_github
Compiling 2 files (.ex)
Generated elixir_auth_github app

  1) test login_url/0 returns authorize URL with client_id appended (ElixirAuthGithubTest)
     test/elixir_auth_github_test.exs:13
     ** (ArgumentError) errors were found at the given arguments:

       * 1st argument: not a bitstring

     code: "https://github.com/login/oauth/authorize?client_id=" <> client_id()
     stacktrace:
       :erlang.byte_size(nil)
       test/elixir_auth_github_test.exs:15: (test)

........

Finished in 0.06 seconds (0.00s async, 0.06s sync)
9 tests, 1 failure

Randomized with seed 416996
nelsonic commented 2 years ago

PEBKAC ... I had to source .env before running the tests. Then they all pass.

nelsonic commented 2 years ago

PR: #53 Package published to https://hex.pm/packages/elixir_auth_github/1.5.0