From e13752c2904bf71aece4904094e31e2a6c53254c Mon Sep 17 00:00:00 2001 From: Michael Chavez Date: Tue, 3 Nov 2015 21:09:39 -0800 Subject: [PATCH 1/3] Bump ecto from 0.9 to 1.0. --- example_app/mix.exs | 2 +- example_app/mix.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/example_app/mix.exs b/example_app/mix.exs index 586aa55..94186df 100644 --- a/example_app/mix.exs +++ b/example_app/mix.exs @@ -30,7 +30,7 @@ defmodule ExampleApp.Mixfile do # Type `mix help deps` for examples and options defp deps do [{:phoenix, "~> 0.16"}, - {:phoenix_ecto, "~> 0.9"}, + {:phoenix_ecto, "~> 1.0"}, {:postgrex, ">= 0.0.0"}, {:phoenix_html, "~> 2.0"}, {:phoenix_live_reload, "~> 0.6", only: :dev}, diff --git a/example_app/mix.lock b/example_app/mix.lock index bbcf3f7..26b6545 100644 --- a/example_app/mix.lock +++ b/example_app/mix.lock @@ -1,16 +1,16 @@ %{"comeonin": {:hex, :comeonin, "1.1.2"}, - "cowboy": {:hex, :cowboy, "1.0.2"}, + "cowboy": {:hex, :cowboy, "1.0.3"}, "cowlib": {:hex, :cowlib, "1.0.1"}, "decimal": {:hex, :decimal, "1.1.0"}, - "ecto": {:hex, :ecto, "0.16.0"}, + "ecto": {:hex, :ecto, "1.0.6"}, "fs": {:hex, :fs, "0.9.2"}, "mailgun": {:hex, :mailgun, "0.0.2"}, "phoenix": {:hex, :phoenix, "0.16.1"}, - "phoenix_ecto": {:hex, :phoenix_ecto, "0.9.0"}, - "phoenix_html": {:hex, :phoenix_html, "2.1.1"}, + "phoenix_ecto": {:hex, :phoenix_ecto, "1.2.0"}, + "phoenix_html": {:hex, :phoenix_html, "2.2.0"}, "phoenix_live_reload": {:hex, :phoenix_live_reload, "0.6.0"}, - "plug": {:hex, :plug, "1.0.0"}, - "poison": {:hex, :poison, "1.4.0"}, + "plug": {:hex, :plug, "1.0.2"}, + "poison": {:hex, :poison, "1.5.0"}, "poolboy": {:hex, :poolboy, "1.5.1"}, "postgrex": {:hex, :postgrex, "0.9.1"}, "ranch": {:hex, :ranch, "1.1.0"}} From 95ea8267f0eda5b2f9058a8f600046e5348ac38c Mon Sep 17 00:00:00 2001 From: Michael Chavez Date: Tue, 3 Nov 2015 21:28:03 -0800 Subject: [PATCH 2/3] Added halt to lib/addict/interactors/session_interactor.ex. This fixes error 'the response was already sent'. Also comeonin clean and update in example_app/mix.lock. --- example_app/mix.lock | 4 ++-- lib/addict/interactors/session_interactor.ex | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/example_app/mix.lock b/example_app/mix.lock index 26b6545..efc574d 100644 --- a/example_app/mix.lock +++ b/example_app/mix.lock @@ -1,11 +1,11 @@ -%{"comeonin": {:hex, :comeonin, "1.1.2"}, +%{"comeonin": {:hex, :comeonin, "1.3.1"}, "cowboy": {:hex, :cowboy, "1.0.3"}, "cowlib": {:hex, :cowlib, "1.0.1"}, "decimal": {:hex, :decimal, "1.1.0"}, "ecto": {:hex, :ecto, "1.0.6"}, "fs": {:hex, :fs, "0.9.2"}, "mailgun": {:hex, :mailgun, "0.0.2"}, - "phoenix": {:hex, :phoenix, "0.16.1"}, + "phoenix": {:hex, :phoenix, "0.17.1"}, "phoenix_ecto": {:hex, :phoenix_ecto, "1.2.0"}, "phoenix_html": {:hex, :phoenix_html, "2.2.0"}, "phoenix_live_reload": {:hex, :phoenix_live_reload, "0.6.0"}, diff --git a/lib/addict/interactors/session_interactor.ex b/lib/addict/interactors/session_interactor.ex index 3525f23..2375158 100644 --- a/lib/addict/interactors/session_interactor.ex +++ b/lib/addict/interactors/session_interactor.ex @@ -5,6 +5,7 @@ defmodule Addict.SessionInteractor do conn = fetch_session(conn) |> put_status(201) |> create_session(user) + |> halt {conn, %{message: "user created", user: sanitize_user(user)}} end @@ -19,6 +20,7 @@ defmodule Addict.SessionInteractor do conn = fetch_session(conn) |> put_status(200) |> create_session(user) + |> halt {conn, %{message: "logged in", user: sanitize_user(user)}} end @@ -39,6 +41,7 @@ defmodule Addict.SessionInteractor do def password_recover({:ok, _}, conn) do conn = conn |> put_status(200) + |> halt {conn, %{message: "email sent"}} end @@ -51,6 +54,7 @@ defmodule Addict.SessionInteractor do def password_reset({:ok, _}, conn) do conn = conn |> put_status(200) + |> halt {conn, %{message: "password reset"}} end From a83c2a97bd6dcf75eca975130fcb93b84b867d10 Mon Sep 17 00:00:00 2001 From: Michael Chavez Date: Wed, 4 Nov 2015 01:01:52 -0800 Subject: [PATCH 3/3] Phoenix and phoenix_live_reload version bumps. --- example_app/mix.exs | 6 +++--- example_app/mix.lock | 4 ++-- mix.exs | 2 +- mix.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example_app/mix.exs b/example_app/mix.exs index 94186df..0ee24de 100644 --- a/example_app/mix.exs +++ b/example_app/mix.exs @@ -29,11 +29,11 @@ defmodule ExampleApp.Mixfile do # # Type `mix help deps` for examples and options defp deps do - [{:phoenix, "~> 0.16"}, - {:phoenix_ecto, "~> 1.0"}, + [{:phoenix, "~> 1.0.3"}, + {:phoenix_ecto, "~> 1.1"}, {:postgrex, ">= 0.0.0"}, {:phoenix_html, "~> 2.0"}, - {:phoenix_live_reload, "~> 0.6", only: :dev}, + {:phoenix_live_reload, "~> 1.0", only: :dev}, {:cowboy, "~> 1.0"}, {:addict, path: "../"}] end diff --git a/example_app/mix.lock b/example_app/mix.lock index efc574d..69b0b32 100644 --- a/example_app/mix.lock +++ b/example_app/mix.lock @@ -5,10 +5,10 @@ "ecto": {:hex, :ecto, "1.0.6"}, "fs": {:hex, :fs, "0.9.2"}, "mailgun": {:hex, :mailgun, "0.0.2"}, - "phoenix": {:hex, :phoenix, "0.17.1"}, + "phoenix": {:hex, :phoenix, "1.0.3"}, "phoenix_ecto": {:hex, :phoenix_ecto, "1.2.0"}, "phoenix_html": {:hex, :phoenix_html, "2.2.0"}, - "phoenix_live_reload": {:hex, :phoenix_live_reload, "0.6.0"}, + "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.0.1"}, "plug": {:hex, :plug, "1.0.2"}, "poison": {:hex, :poison, "1.5.0"}, "poolboy": {:hex, :poolboy, "1.5.1"}, diff --git a/mix.exs b/mix.exs index 97c4cb0..2a52419 100644 --- a/mix.exs +++ b/mix.exs @@ -25,7 +25,7 @@ defmodule Addict.Mixfile do defp deps do [{:cowboy, "~> 1.0"}, - {:phoenix, ">= 0.15.0"}, + {:phoenix, ">= 1.0.3"}, {:ecto, "~> 1.0"}, {:comeonin, "~> 1.1" }, {:mailgun, "~> 0.0.2"}, diff --git a/mix.lock b/mix.lock index b3dc3b1..7bbaa84 100644 --- a/mix.lock +++ b/mix.lock @@ -1,12 +1,12 @@ -%{"comeonin": {:hex, :comeonin, "1.1.3"}, +%{"comeonin": {:hex, :comeonin, "1.3.1"}, "cowboy": {:hex, :cowboy, "1.0.3"}, "cowlib": {:hex, :cowlib, "1.0.1"}, "decimal": {:hex, :decimal, "1.1.0"}, - "earmark": {:hex, :earmark, "0.1.17"}, - "ecto": {:hex, :ecto, "1.0.3"}, + "earmark": {:hex, :earmark, "0.1.19"}, + "ecto": {:hex, :ecto, "1.0.6"}, "ex_doc": {:hex, :ex_doc, "0.7.3"}, "mailgun": {:hex, :mailgun, "0.0.2"}, - "phoenix": {:hex, :phoenix, "1.0.2"}, + "phoenix": {:hex, :phoenix, "1.0.3"}, "plug": {:hex, :plug, "1.0.2"}, "poison": {:hex, :poison, "1.5.0"}, "poolboy": {:hex, :poolboy, "1.5.1"},