Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 9, 2021. It is now read-only.

Commit 37a322a

Browse files
committed
Run mix format across all files
1 parent 5cf0ea4 commit 37a322a

File tree

10 files changed

+28
-12
lines changed

10 files changed

+28
-12
lines changed

‎lib/platform_web/controllers/player_api_controller.ex‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ defmodule PlatformWeb.PlayerApiController do
3535

3636
def delete(conn, %{"id" => id}) do
3737
player = Accounts.get_player!(id)
38+
3839
with {:ok, %Player{}} <- Accounts.delete_player(player) do
3940
send_resp(conn, :no_content, "")
4041
end

‎lib/platform_web/controllers/player_controller.ex‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ defmodule PlatformWeb.PlayerController do
6464
end
6565

6666
defp authorize(conn, _opts) do
67-
if Mix.env == :test do
67+
if Mix.env() == :test do
6868
conn
6969
else
7070
current_player_id = conn.assigns.current_user().id

‎lib/platform_web/views/game_view.ex‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ defmodule PlatformWeb.GameView do
1111
end
1212

1313
def render("game.json", %{game: game}) do
14-
%{id: game.id,
14+
%{
15+
id: game.id,
1516
description: game.description,
1617
featured: game.featured,
1718
thumbnail: game.thumbnail,
18-
title: game.title}
19+
title: game.title
20+
}
1921
end
2022
end

‎lib/platform_web/views/gameplay_view.ex‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ defmodule PlatformWeb.GameplayView do
1111
end
1212

1313
def render("gameplay.json", %{gameplay: gameplay}) do
14-
%{id: gameplay.id,
15-
player_score: gameplay.player_score}
14+
%{id: gameplay.id, player_score: gameplay.player_score}
1615
end
1716
end

‎lib/platform_web/views/player_api_view.ex‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ defmodule PlatformWeb.PlayerApiView do
1212
end
1313

1414
def render("player.json", %{player_api: player_api}) do
15-
%{id: player_api.id,
15+
%{
16+
id: player_api.id,
1617
username: player_api.username,
1718
display_name: player_api.display_name,
18-
score: player_api.score}
19+
score: player_api.score
20+
}
1921
end
2022
end

‎priv/repo/migrations/20181211130948_create_players.exs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ defmodule Platform.Repo.Migrations.CreatePlayers do
88

99
timestamps()
1010
end
11-
1211
end
1312
end

‎priv/repo/migrations/20181212131945_create_games.exs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ defmodule Platform.Repo.Migrations.CreateGames do
1010

1111
timestamps()
1212
end
13-
1413
end
1514
end

‎test/platform/products/products_test.exs‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,18 @@ defmodule Platform.ProductsTest do
66
describe "games" do
77
alias Platform.Products.Game
88

9-
@valid_attrs %{description: "some description", featured: true, thumbnail: "some thumbnail", title: "some title"}
10-
@update_attrs %{description: "some updated description", featured: false, thumbnail: "some updated thumbnail", title: "some updated title"}
9+
@valid_attrs %{
10+
description: "some description",
11+
featured: true,
12+
thumbnail: "some thumbnail",
13+
title: "some title"
14+
}
15+
@update_attrs %{
16+
description: "some updated description",
17+
featured: false,
18+
thumbnail: "some updated thumbnail",
19+
title: "some updated title"
20+
}
1121
@invalid_attrs %{description: nil, featured: nil, thumbnail: nil, title: nil}
1222

1323
def game_fixture(attrs \\ %{}) do

‎test/platform_web/controllers/gameplay_controller_test.exs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ defmodule PlatformWeb.GameplayControllerTest do
5050
describe "update gameplay" do
5151
setup [:create_gameplay]
5252

53-
test "renders gameplay when data is valid", %{conn: conn, gameplay: %Gameplay{id: id} = gameplay} do
53+
test "renders gameplay when data is valid", %{
54+
conn: conn,
55+
gameplay: %Gameplay{id: id} = gameplay
56+
} do
5457
conn = put(conn, Routes.gameplay_path(conn, :update, gameplay), gameplay: @update_attrs)
5558
assert %{"id" => ^id} = json_response(conn, 200)["data"]
5659

‎test/platform_web/controllers/player_controller_test.exs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ defmodule PlatformWeb.PlayerControllerTest do
8080
test "deletes chosen player", %{conn: conn, player: player} do
8181
conn = delete(conn, Routes.player_path(conn, :delete, player))
8282
assert redirected_to(conn) == Routes.player_path(conn, :index)
83+
8384
assert_error_sent 404, fn ->
8485
get(conn, Routes.player_path(conn, :show, player))
8586
end

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /