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

やったこと:

  • mix phoenix.new
  • mix_test_watchの導入
  • excoverallsの導入
  • power_assert_exの導入
  • extwitterの導入
    • Sign-In with Twitterボタンでのサインイン
    • Userモデル作成
  • Authenticationモデル作成
    • oauth_token/secretを可逆的に暗号化

Phoenix 1.0 と 1.1 で大分違う。特にEcto.Modelがafter_loadやbefore_insertなどのコールバックをdeprecatedにしたのに対応したのがめちゃめちゃ疲れた。リリースノートにチェンジセットとスキーマシリアライザ―で頑張れって書いてあった。

Qiitaも書いた: - Phoenixフレームワークの1.0と1.1でassignsの挙動が変わった

あと、mix test を走らせたらこういうエラーが出たり出なかったりするんですが誰か対処わかりませんか?

22:03:05.793 [error] GenServer Phoenix.Supervisor terminating
** (FunctionClauseError) no function clause matching in :supervisor.handle_cast/2
    (stdlib) supervisor.erl:576: :supervisor.handle_cast({:remote_dispatch, ExUnit.Case, :runtime}, {:state, {:local, Phoenix.Supervisor}, :one_for_one, [{:child, #PID<0.185.0>, Phoenix.Transports.LongPoll.Supervisor, {Phoenix.Transports.LongPoll.Supervisor, :start_link, []}, :permanent, :infinity, :supervisor, [Phoenix.Transports.LongPoll.Supervisor]}], :undefined, 3, 5, [], Phoenix.Supervisor, []})
    (stdlib) gen_server.erl:615: :gen_server.try_dispatch/4
    (stdlib) gen_server.erl:681: :gen_server.handle_msg/5
    (stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3

Programming Phoenix: Productive; Reliable; Fast

Programming Phoenix: Productive; Reliable; Fast