Elixir/Phoenixでウェブサービスを作っている2

今日の進捗:

プルリクの内容は、PhoenixのparamsがMapかつkeyがStringなのに対して、OAuth2のparamsはKeyword listかつkeyがAtomを想定しているのでエラーが起こるというものです。

プルリクが取り込まれるまで、または、取り込まれない時のワークアラウンド

  def get_token!(params \\ [], headers \\ [], options \\ []) do
    kl_params = Enum.map(params, fn {k,v} -> {String.to_atom(k), v} end)
    OAuth2.Client.get_token!(client(), kl_params, headers, options)
  end

イシューの方は、昨日の日記に書いたmix test時のエラーの件です。

Programming Phoenix: Productive; Reliable; Fast

Programming Phoenix: Productive; Reliable; Fast