Skip to content

Commit

Permalink
apply PR remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
leszke committed Mar 20, 2020
1 parent 89f2e7a commit 6cc9d44
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 24 deletions.
2 changes: 2 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ import_config "#{Mix.env()}.exs"
# it will crash a release.
# For test environment: for now it's not compatible.
config :maru, :test, false

config :phoenix, :json_library, Jason
4 changes: 2 additions & 2 deletions lib/mongoose_push/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ defmodule MongoosePush.Application do
MongoosePush.Telemetry.attach_all()

# Define workers and child supervisors to be supervised
children = children() ++ [MongoosePushWeb.Endpoint]
children = service_children() ++ [MongoosePushWeb.Endpoint]

# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
# for other strategies and supported options
Expand Down Expand Up @@ -70,7 +70,7 @@ defmodule MongoosePush.Application do
]
end

defp children do
defp service_children do
List.foldl(services(), [], fn {service, module}, acc ->
pools_config = pools_config(service)

Expand Down
21 changes: 0 additions & 21 deletions lib/mongoose_push_web/endpoint.ex
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
defmodule MongoosePushWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :mongoose_push

# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
key: "_mongoose_push_key",
signing_salt: "URIBGSwL"
]

# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phx.digest
# when deploying your static files in production.
plug(Plug.Static,
at: "/",
from: :mongoose_push,
gzip: false,
only: ~w(css fonts images js favicon.ico robots.txt)
)

# Code reloading can be explicitly enabled under the
# :code_reloader configuration of your endpoint.
if code_reloading? do
Expand All @@ -38,6 +18,5 @@ defmodule MongoosePushWeb.Endpoint do

plug(Plug.MethodOverride)
plug(Plug.Head)
plug(Plug.Session, @session_options)
plug(MongoosePushWeb.Router)
end
2 changes: 1 addition & 1 deletion test/mongoose_push_web/test_helper.exs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{:ok, _} = Application.ensure_all_started(:mongoose_push)
ExUnit.start()
ExUnit.start(capture: true)

0 comments on commit 6cc9d44

Please sign in to comment.