Skip to content

Commit

Permalink
Merge pull request #102 from zven21/feat/phx-1.5-upgrade
Browse files Browse the repository at this point in the history
Feat/phx 1.5 upgrade
  • Loading branch information
zven21 committed Sep 10, 2020
2 parents bf0fbab + 8ec6f2d commit fd7f130
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 52 deletions.
8 changes: 6 additions & 2 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ config :mipha, MiphaWeb.Endpoint,
url: [host: "localhost"],
secret_key_base: "Gbwl1EqAtjdYfG5movSWszQHvrppYxDbg/7xegRJSakWiTTl6ypdMpNgNct3LiDx",
render_errors: [view: MiphaWeb.ErrorView, accepts: ~w(html json)],
pubsub: [name: Mipha.PubSub,
adapter: Phoenix.PubSub.PG2]
pubsub_server: Mipha.PubSub
# pubsub: [name: Mipha.PubSub,
# adapter: Phoenix.PubSub.PG2]

# Configures Elixir's Logger
config :logger, :console,
Expand Down Expand Up @@ -50,6 +51,9 @@ config :sentry,
config :turbo_ecto, Turbo.Ecto,
repo: Mipha.Repo


config :phoenix, :json_library, Jason

config :gettext, :default_locale, "zh"

# Import environment specific config. This must remain at the bottom
Expand Down
1 change: 1 addition & 0 deletions lib/mipha/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ defmodule Mipha.Application do
children = [
# Start the Ecto repository
supervisor(Mipha.Repo, []),
{Phoenix.PubSub, name: Mipha.PubSub},
# Start the endpoint when the application starts
supervisor(MiphaWeb.Endpoint, []),
supervisor(MiphaWeb.Presence, []),
Expand Down
2 changes: 1 addition & 1 deletion lib/mipha_web/templates/layout/admin.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="container">
<%= render "_flash.html", assigns %>
<main role="main">
<%= render @view_module, @view_template, assigns %>
<%= @inner_content %>
</main>
</div>
<script src="<%= static_path(@conn, "/js/admin.js") %>"></script>
Expand Down
2 changes: 1 addition & 1 deletion lib/mipha_web/templates/layout/app.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<% end %>
<%= render "_flash.html", assigns %>
<div id="main" class="main-container container">
<%= render @view_module, @view_template, assigns %>
<%= @inner_content %>
</div>
<%= render "_footer.html", assigns %>

Expand Down
4 changes: 2 additions & 2 deletions lib/mipha_web/templates/layout/email.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<head>
</head>
<body>
<%= render @view_module, @view_template, assigns %>
<%= @inner_content %>
</body>
</html>
</html>
10 changes: 5 additions & 5 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,25 @@ defmodule Mipha.Mixfile do
# Type `mix help deps` for examples and options.
defp deps do
[
{:phoenix, "~> 1.4.6"},
{:phoenix_pubsub, "~> 1.1"},
{:phoenix, "~> 1.5.1"},
{:phoenix_pubsub, "~> 2.0"},
{:phoenix_ecto, "~> 4.0"},
{:ecto_sql, "~> 3.0"},
{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 2.10"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:jason, "~> 1.1"},
{:plug_cowboy, "~> 2.0"},
{:plug, "~> 1.7"},
{:credo, "~> 0.10.2", only: [:dev, :test], runtime: false},
{:credo, "~> 1.0"},
{:comeonin, "~> 4.1"},
{:bcrypt_elixir, "~> 1.0"},
{:ueberauth, "~> 0.5.0"},
{:ueberauth_identity, "~> 0.2.3"},
{:ueberauth_github, "~> 0.7.0"},
{:faker, "~> 0.10.0"},
{:earmark, "~> 1.3.0"},
{:earmark, "~> 1.2.6"},
{:html_sanitize_ex, "~> 1.3"},
{:timex, "~> 3.3"},
{:ecto_enum, "~> 1.1"},
Expand All @@ -66,7 +67,6 @@ defmodule Mipha.Mixfile do
{:bamboo, "~> 1.0"},
{:bamboo_smtp, "~> 1.5"},
{:cachex, "~> 3.3.0"},
{:jason, "~> 1.1"},
{:poison, "~> 4.0", override: true},
{:captcha, github: "zven21/elixir-captcha"},
{:turbo_ecto, github: "zven21/turbo_ecto"},
Expand Down
81 changes: 41 additions & 40 deletions mix.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion test/support/conn_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ defmodule MiphaWeb.ConnCase do
using do
quote do
# Import conveniences for testing with connections
use Phoenix.ConnTest
import Plug.Conn
import Phoenix.ConnTest

alias Mipha.Repo
import Ecto
Expand Down

0 comments on commit fd7f130

Please sign in to comment.