From 06bb435494a4d1c079c1353c8cd563536e147379 Mon Sep 17 00:00:00 2001
From: Dairon Medina Caro
Date: Tue, 7 Dec 2021 23:18:05 -0700
Subject: [PATCH 01/11] Update Elixir version
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 1f1287b..b00b8b7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM elixir:1.11-alpine as build
+FROM elixir:1.12-alpine as build
# Install deps
RUN set -xe; \
From 82ba3efeae62c2c5f493f8ace30373686743ed74 Mon Sep 17 00:00:00 2001
From: Dairon Medina Caro
Date: Tue, 7 Dec 2021 23:18:38 -0700
Subject: [PATCH 02/11] Remove ex_aws
---
config/config.exs | 4 ----
config/prod.exs | 2 --
2 files changed, 6 deletions(-)
diff --git a/config/config.exs b/config/config.exs
index 4d092b4..00da458 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -37,10 +37,6 @@ config :phoenix, :json_library, Jason
config :recognizer, :message_queues, []
-config :ex_aws,
- enabled: false,
- json_codec: Jason
-
config :recognizer, ExOauth2Provider,
repo: Recognizer.Repo,
resource_owner: Recognizer.Accounts.User,
diff --git a/config/prod.exs b/config/prod.exs
index b5fec7a..1794240 100644
--- a/config/prod.exs
+++ b/config/prod.exs
@@ -14,5 +14,3 @@ config :logger,
config :recognizer, Recognizer.Repo, log: false
config :phoenix, :logger, false
-
-config :ex_aws, enabled: true
From 42ee88cac20ca6d2dd4149be039f27ec7ed50179 Mon Sep 17 00:00:00 2001
From: Dairon Medina Caro
Date: Tue, 7 Dec 2021 23:18:59 -0700
Subject: [PATCH 03/11] Upgrade dependencies
---
.tool-versions | 1 +
mix.exs | 45 +++++++++++-------------
mix.lock | 95 ++++++++++++++++++++++++--------------------------
3 files changed, 66 insertions(+), 75 deletions(-)
create mode 100644 .tool-versions
diff --git a/.tool-versions b/.tool-versions
new file mode 100644
index 0000000..958a1f8
--- /dev/null
+++ b/.tool-versions
@@ -0,0 +1 @@
+elixir 1.12.3-otp-23
diff --git a/mix.exs b/mix.exs
index f2b76d7..e4dbe78 100644
--- a/mix.exs
+++ b/mix.exs
@@ -34,41 +34,36 @@ defmodule Recognizer.MixProject do
defp deps do
[
{:argon2_elixir, "~> 2.0"},
- {:bottle, github: "system76/bottle", ref: "b3b78b6"},
+ {:bottle, github: "system76/bottle", ref: "30ab619"},
{:cors_plug, "~> 2.0"},
- {:cowboy, "~> 2.8", override: true},
{:cowlib, "~> 2.9.1", override: true},
- {:credo, "~> 1.5", only: [:dev, :test], runtime: false},
+ {:credo, "~> 1.6.1", only: [:dev, :test], runtime: false},
{:decorator, "~> 1.2"},
{:ecto_enum, "~> 1.4"},
- {:ecto_sql, "~> 3.4"},
- {:eqrcode, "~> 0.1.7"},
- {:ex_machina, "~> 2.4", only: :test},
- {:ex_aws_sqs, "~> 3.2"},
- {:ex_aws, "~> 2.0"},
+ {:ecto_sql, "~> 3.7"},
+ {:eqrcode, "~> 0.1.10"},
+ {:ex_machina, "~> 2.7", only: :test},
{:ex_oauth2_provider, "~> 0.5.6"},
- {:gettext, "~> 0.11"},
- {:guardian, "~> 2.0"},
+ {:gettext, "~> 0.18"},
+ {:guardian, "~> 2.2.1"},
{:guardian_db, "~> 2.1"},
- {:httpoison, "~> 0.13"},
- {:jason, "~> 1.0"},
- {:logger_json, github: "Nebo15/logger_json", ref: "8e4290a"},
+ {:httpoison, "~> 1.8"},
+ {:jason, "~> 1.2"},
+ {:logger_json, "~> 4.3"},
{:myxql, ">= 0.0.0"},
{:redix, ">= 0.0.0"},
- {:phoenix_ecto, "~> 4.1"},
- {:phoenix_html, "~> 2.11"},
- {:phoenix_live_reload, "~> 1.2", only: :dev},
- {:phoenix, "~> 1.5.7"},
- {:phx_gen_auth, "~> 0.6", only: [:dev], runtime: false},
- {:plug_cowboy, "~> 2.4"},
+ {:phoenix_ecto, "~> 4.4"},
+ {:phoenix_html, "~> 3.1"},
+ {:phoenix_live_reload, "~> 1.3", only: :dev},
+ {:phoenix, "~> 1.6.2"},
+ {:plug_cowboy, "~> 2.5"},
{:pot, "~> 1.0"},
- {:saxy, "~> 1.1"},
- {:spandex, "~> 3.0.3"},
- {:spandex_datadog, "~> 1.1.0"},
+ {:spandex, "~> 3.1.0"},
+ {:spandex_datadog, "~> 1.2.0"},
{:spandex_ecto, "~> 0.6.2"},
- {:spandex_phoenix, "~> 1.0.5"},
- {:telemetry_metrics, "~> 0.4"},
- {:telemetry_poller, "~> 0.4"},
+ {:spandex_phoenix, "~> 1.0.6"},
+ {:telemetry_metrics, "~> 0.6"},
+ {:telemetry_poller, "~> 1.0"},
{:ueberauth_github, "~> 0.8"},
{:ueberauth_google, "~> 0.10"},
{:mox, "~> 1.0", only: :test}
diff --git a/mix.lock b/mix.lock
index e88fc5e..18717fb 100644
--- a/mix.lock
+++ b/mix.lock
@@ -1,81 +1,76 @@
%{
- "amqp": {:hex, :amqp, "2.1.1", "ad8dec713ba885afffffcb81feb619fe7cfcbcabe9377ab65ab7a110bd4f43a0", [:mix], [{:amqp_client, "~> 3.8.0", [hex: :amqp_client, repo: "hexpm", optional: false]}], "hexpm", "b6d926770e4508e30e3e9e476c57b6c8aeda44f7715663bdc38935620ce5be6f"},
- "amqp_client": {:hex, :amqp_client, "3.8.14", "7569517aefb47e0d1c41bca2f4768dc8a2d88487daf7819fecca0d78943f293c", [:make, :rebar3], [{:rabbit_common, "3.8.14", [hex: :rabbit_common, repo: "hexpm", optional: false]}], "hexpm", "e5ba3ac18abbe34a1d990a6bcac25633dc7061ab8f8d101c7dcff97f49f4c523"},
+ "amqp": {:hex, :amqp, "3.0.0", "66e8e17561f19ba85bff7df4f77560e8de8ddd53958c5c15ccb2583bb937564f", [:mix], [{:amqp_client, "~> 3.9.1", [hex: :amqp_client, repo: "hexpm", optional: false]}], "hexpm", "2b0b27223196a511d5dd5a7291ba48366ccb405a0b5ea1b966bf9f80fd17f1b1"},
+ "amqp_client": {:hex, :amqp_client, "3.9.11", "4ebe8040be3ee195e42bb483d37cd64faf3c306201dc22a3f5cce2a91a9e562e", [:make, :rebar3], [{:rabbit_common, "3.9.11", [hex: :rabbit_common, repo: "hexpm", optional: false]}], "hexpm", "cdd74bc8e9d5e8610975009dcae1293bdf7198ee6d8315a1ffb5055467010520"},
"argon2_elixir": {:hex, :argon2_elixir, "2.4.0", "2a22ea06e979f524c53b42b598fc6ba38cdcbc977a155e33e057732cfb1fb311", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "4ea82e183cf8e7f66dab1f767fedcfe6a195e140357ef2b0423146b72e0a551d"},
- "bottle": {:git, "https://github.com/system76/bottle.git", "b3b78b654de1b59222b377ed368118214c3657d4", [ref: "b3b78b6"]},
+ "bottle": {:git, "https://github.com/system76/bottle.git", "30ab619735dd3c1957f2022e448ece6bf27e3d36", [ref: "30ab619"]},
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"},
- "certifi": {:hex, :certifi, "2.6.1", "dbab8e5e155a0763eea978c913ca280a6b544bfa115633fa20249c3d396d9493", [:rebar3], [], "hexpm", "524c97b4991b3849dd5c17a631223896272c6b0af446778ba4675a1dff53bb7e"},
+ "certifi": {:hex, :certifi, "2.8.0", "d4fb0a6bb20b7c9c3643e22507e42f356ac090a1dcea9ab99e27e0376d695eba", [:rebar3], [], "hexpm", "6ac7efc1c6f8600b08d625292d4bbf584e14847ce1b6b5c44d983d273e1097ea"},
"comeonin": {:hex, :comeonin, "5.3.2", "5c2f893d05c56ae3f5e24c1b983c2d5dfb88c6d979c9287a76a7feb1e1d8d646", [:mix], [], "hexpm", "d0993402844c49539aeadb3fe46a3c9bd190f1ecf86b6f9ebd71957534c95f04"},
"connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"},
"cors_plug": {:hex, :cors_plug, "2.0.3", "316f806d10316e6d10f09473f19052d20ba0a0ce2a1d910ddf57d663dac402ae", [:mix], [{:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "ee4ae1418e6ce117fc42c2ba3e6cbdca4e95ecd2fe59a05ec6884ca16d469aea"},
- "cowboy": {:hex, :cowboy, "2.8.0", "f3dc62e35797ecd9ac1b50db74611193c29815401e53bac9a5c0577bd7bc667d", [:rebar3], [{:cowlib, "~> 2.9.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "4643e4fba74ac96d4d152c75803de6fad0b3fa5df354c71afdd6cbeeb15fac8a"},
- "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"},
+ "cowboy": {:hex, :cowboy, "2.9.0", "865dd8b6607e14cf03282e10e934023a1bd8be6f6bacf921a7e2a96d800cd452", [:make, :rebar3], [{:cowlib, "2.11.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "2c729f934b4e1aa149aff882f57c6372c15399a20d54f65c8d67bef583021bde"},
+ "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"},
"cowlib": {:hex, :cowlib, "2.9.1", "61a6c7c50cf07fdd24b2f45b89500bb93b6686579b069a89f88cb211e1125c78", [:rebar3], [], "hexpm", "e4175dc240a70d996156160891e1c62238ede1729e45740bdd38064dad476170"},
"credentials_obfuscation": {:hex, :credentials_obfuscation, "2.4.0", "9fb57683b84899ca3546b384e59ab5d3054a9f334eba50d74c82cd0ae82dd6ca", [:rebar3], [], "hexpm", "d28a89830e30698b075de9a4dbe683a20685c6bed1e3b7df744a0c06e6ff200a"},
- "credo": {:hex, :credo, "1.5.5", "e8f422026f553bc3bebb81c8e8bf1932f498ca03339856c7fec63d3faac8424b", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "dd8623ab7091956a855dc9f3062486add9c52d310dfd62748779c4315d8247de"},
- "db_connection": {:hex, :db_connection, "2.3.1", "4c9f3ed1ef37471cbdd2762d6655be11e38193904d9c5c1c9389f1b891a3088e", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm", "abaab61780dde30301d840417890bd9f74131041afd02174cf4e10635b3a63f5"},
+ "credo": {:hex, :credo, "1.6.1", "7dc76dcdb764a4316c1596804c48eada9fff44bd4b733a91ccbf0c0f368be61e", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "698607fb5993720c7e93d2d8e76f2175bba024de964e160e2f7151ef3ab82ac5"},
+ "db_connection": {:hex, :db_connection, "2.4.1", "6411f6e23f1a8b68a82fa3a36366d4881f21f47fc79a9efb8c615e62050219da", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ea36d226ec5999781a9a8ad64e5d8c4454ecedc7a4d643e4832bf08efca01f00"},
"decimal": {:hex, :decimal, "2.0.0", "a78296e617b0f5dd4c6caf57c714431347912ffb1d0842e998e9792b5642d697", [:mix], [], "hexpm", "34666e9c55dea81013e77d9d87370fe6cb6291d1ef32f46a1600230b1d44f577"},
"decorator": {:hex, :decorator, "1.4.0", "a57ac32c823ea7e4e67f5af56412d12b33274661bb7640ec7fc882f8d23ac419", [:mix], [], "hexpm", "0a07cedd9083da875c7418dea95b78361197cf2bf3211d743f6f7ce39656597f"},
- "ecto": {:hex, :ecto, "3.5.8", "8ebf12be6016cb99313348ba7bb4612f4114b9a506d6da79a2adc7ef449340bc", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ea0be182ea8922eb7742e3ae8e71b67ee00ae177de1bf76210299a5f16ba4c77"},
+ "ecto": {:hex, :ecto, "3.7.1", "a20598862351b29f80f285b21ec5297da1181c0442687f9b8329f0445d228892", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d36e5b39fc479e654cffd4dbe1865d9716e4a9b6311faff799b6f90ab81b8638"},
"ecto_enum": {:hex, :ecto_enum, "1.4.0", "d14b00e04b974afc69c251632d1e49594d899067ee2b376277efd8233027aec8", [:mix], [{:ecto, ">= 3.0.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "> 3.0.0", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:mariaex, ">= 0.0.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:postgrex, ">= 0.0.0", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm", "8fb55c087181c2b15eee406519dc22578fa60dd82c088be376d0010172764ee4"},
- "ecto_sql": {:hex, :ecto_sql, "3.5.4", "a9e292c40bd79fff88885f95f1ecd7b2516e09aa99c7dd0201aa84c54d2358e4", [:mix], [{:db_connection, "~> 2.2", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.5.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.3.0 or ~> 0.4.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.15.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "1fff1a28a898d7bbef263f1f3ea425b04ba9f33816d843238c84eff883347343"},
- "elixir_make": {:hex, :elixir_make, "0.6.2", "7dffacd77dec4c37b39af867cedaabb0b59f6a871f89722c25b28fcd4bd70530", [:mix], [], "hexpm", "03e49eadda22526a7e5279d53321d1cced6552f344ba4e03e619063de75348d9"},
- "eqrcode": {:hex, :eqrcode, "0.1.7", "2c6674e0c22854355b0adc2e6c987a3a973c31eeb49870e72a1e463317d59014", [:mix], [], "hexpm", "391c7945e8a079e9b4aef3f98d601575213ae4d78a3098542d6f39358627100f"},
- "ex_aws": {:hex, :ex_aws, "2.1.8", "0282181da3278aa8105952fb25ae39a2ea96d633766cd9aca16dceb2762547a2", [:mix], [{:configparser_ex, "~> 4.0", [hex: :configparser_ex, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:jsx, "~> 2.8", [hex: :jsx, repo: "hexpm", optional: true]}, {:sweet_xml, "~> 0.6", [hex: :sweet_xml, repo: "hexpm", optional: true]}], "hexpm", "3c1ed19970cccbfe4dc6e2da68fa66375c4de5322e13199997f41659ec71b639"},
- "ex_aws_sqs": {:hex, :ex_aws_sqs, "3.3.0", "c19f87cd66c80737025006717b789ca7deaf9e7b13f925ee3fb74f6ffe594d64", [:mix], [{:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: false]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:saxy, "~> 1.1", [hex: :saxy, repo: "hexpm", optional: true]}, {:sweet_xml, ">= 0.0.0", [hex: :sweet_xml, repo: "hexpm", optional: true]}], "hexpm", "ea8731a16609d24086ef7335d1f9206370b61aaf783b3e3f3afcd923ee515ddd"},
+ "ecto_sql": {:hex, :ecto_sql, "3.7.1", "8de624ef50b2a8540252d8c60506379fbbc2707be1606853df371cf53df5d053", [:mix], [{:db_connection, "~> 2.2", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.7.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.4.0 or ~> 0.5.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.15.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "2b42a32e2ce92f64aba5c88617891ab3b0ba34f3f3a503fa20009eae1a401c81"},
+ "elixir_make": {:hex, :elixir_make, "0.6.3", "bc07d53221216838d79e03a8019d0839786703129599e9619f4ab74c8c096eac", [:mix], [], "hexpm", "f5cbd651c5678bcaabdbb7857658ee106b12509cd976c2c2fca99688e1daf716"},
+ "eqrcode": {:hex, :eqrcode, "0.1.10", "6294fece9d68ad64eef1c3c92cf111cfd6469f4fbf230a2d4cc905a682178f3f", [:mix], [], "hexpm", "da30e373c36a0fd37ab6f58664b16029919896d6c45a68a95cc4d713e81076f1"},
"ex_machina": {:hex, :ex_machina, "2.7.0", "b792cc3127fd0680fecdb6299235b4727a4944a09ff0fa904cc639272cd92dc7", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}], "hexpm", "419aa7a39bde11894c87a615c4ecaa52d8f107bbdd81d810465186f783245bf8"},
"ex_oauth2_provider": {:hex, :ex_oauth2_provider, "0.5.6", "e1d5130c9062d3a24c5106e7a556b3335aaa7150801c89f6f5494c5f9ad8a2ba", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:plug, ">= 1.5.0 and < 2.0.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "0288475aa3a6224b70c990e61c89375dcb7c0b2669ba9a1114e94238cae615cf"},
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
"gettext": {:hex, :gettext, "0.18.2", "7df3ea191bb56c0309c00a783334b288d08a879f53a7014341284635850a6e55", [:mix], [], "hexpm", "f9f537b13d4fdd30f3039d33cb80144c3aa1f8d9698e47d7bcbcc8df93b1f5c5"},
- "goldrush": {:hex, :goldrush, "0.1.9", "f06e5d5f1277da5c413e84d5a2924174182fb108dabb39d5ec548b27424cd106", [:rebar3], [], "hexpm", "99cb4128cffcb3227581e5d4d803d5413fa643f4eb96523f77d9e6937d994ceb"},
- "google_protos": {:hex, :google_protos, "0.1.0", "c6b9e12092d17571b093d4156d004494ca143b65dbbcbfc3ffff463ea03467c0", [:mix], [{:protobuf, "~> 0.5", [hex: :protobuf, repo: "hexpm", optional: false]}], "hexpm", "ff5564525f89d2638a4cfa9fb4d31e9ee9d9d7cb937b3e8a95f558440c039e1b"},
- "grpc": {:hex, :grpc, "0.5.0-beta.1", "7d43f52e138fe261f5b4981f1ada515dfc2e1bfa9dc92c7022e8f41e7e49b571", [:mix], [{:cowboy, "~> 2.7.0", [hex: :cowboy, repo: "hexpm", optional: false]}, {:gun, "~> 2.0.0", [hex: :grpc_gun, repo: "hexpm", optional: false]}, {:protobuf, "~> 0.5", [hex: :protobuf, repo: "hexpm", optional: false]}], "hexpm", "fbbf8872935c295b7575435fe4128372c23c6ded89c2ef8058af3c6167bb3f65"},
- "guardian": {:hex, :guardian, "2.1.1", "1f02b349f6ba765647cc834036a8d76fa4bd65605342fe3a031df3c99d0d411a", [:mix], [{:jose, "~> 1.8", [hex: :jose, repo: "hexpm", optional: false]}, {:plug, "~> 1.3.3 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "189b87ba7ce6b40d6ba029138098b96ffc4ae78f229f5b39539b9141af8bf0f8"},
+ "google_protos": {:hex, :google_protos, "0.2.0", "7c6280e288d7f04a58448444b12d937ddc8cc40dc3d1e4f61c69936ef71d4739", [:mix], [{:protobuf, "~> 0.8", [hex: :protobuf, repo: "hexpm", optional: false]}], "hexpm", "5de24802e89867cea544d0ee8cbd36f6c9c1ebd4a9fcc55276d6eeadeedcc1f5"},
+ "grpc": {:git, "https://github.com/elixir-grpc/grpc.git", "eff8a8828d27ddd7f63a3c1dd5aae86246df215e", []},
+ "guardian": {:hex, :guardian, "2.2.1", "5a4a949fd46eac79ef37f074ada7d1ef82e274bc99e335c286e042f5383f4f80", [:mix], [{:jose, "~> 1.8", [hex: :jose, repo: "hexpm", optional: false]}, {:plug, "~> 1.3.3 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "09b5c4d08f18524bd33ffe49617003cbca9f617237e23b5f42223cda61c5f052"},
"guardian_db": {:hex, :guardian_db, "2.1.0", "ec95a9d99cdd1e550555d09a7bb4a340d8887aad0697f594590c2fd74be02426", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.1", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:guardian, "~> 1.0 or ~> 2.0", [hex: :guardian, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.13", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm", "f8e7d543ac92c395f3a7fd5acbe6829faeade57d688f7562e2f0fca8f94a0d70"},
"gun": {:hex, :grpc_gun, "2.0.0", "f99678a2ab975e74372a756c86ec30a8384d3ac8a8b86c7ed6243ef4e61d2729", [:rebar3], [{:cowlib, "~> 2.8.0", [hex: :cowlib, repo: "hexpm", optional: false]}], "hexpm", "03dbbca1a9c604a0267a40ea1d69986225091acb822de0b2dbea21d5815e410b"},
- "hackney": {:hex, :hackney, "1.17.4", "99da4674592504d3fb0cfef0db84c3ba02b4508bae2dff8c0108baa0d6e0977c", [:rebar3], [{:certifi, "~>2.6.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "de16ff4996556c8548d512f4dbe22dd58a587bf3332e7fd362430a7ef3986b16"},
- "httpoison": {:hex, :httpoison, "0.13.0", "bfaf44d9f133a6599886720f3937a7699466d23bb0cd7a88b6ba011f53c6f562", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "4846958172d6401c4f34ecc5c2c4607b5b0d90b8eec8f6df137ca4907942ed0f"},
+ "hackney": {:hex, :hackney, "1.18.0", "c4443d960bb9fba6d01161d01cd81173089686717d9490e5d3606644c48d121f", [:rebar3], [{:certifi, "~>2.8.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "9afcda620704d720db8c6a3123e9848d09c87586dc1c10479c42627b905b5c5e"},
+ "httpoison": {:hex, :httpoison, "1.8.0", "6b85dea15820b7804ef607ff78406ab449dd78bed923a49c7160e1886e987a3d", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "28089eaa98cf90c66265b6b5ad87c59a3729bea2e74e9d08f9b51eb9729b3c3a"},
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
"jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"},
- "jose": {:hex, :jose, "1.11.1", "59da64010c69aad6cde2f5b9248b896b84472e99bd18f246085b7b9fe435dcdb", [:mix, :rebar3], [], "hexpm", "078f6c9fb3cd2f4cfafc972c814261a7d1e8d2b3685c0a76eb87e158efff1ac5"},
- "jsx": {:hex, :jsx, "2.11.0", "08154624050333919b4ac1b789667d5f4db166dc50e190c4d778d1587f102ee0", [:rebar3], [], "hexpm", "eed26a0d04d217f9eecefffb89714452556cf90eb38f290a27a4d45b9988f8c0"},
- "lager": {:hex, :lager, "3.8.2", "b180b814fd8b7082b6ca8aaf287e55a908d304cfc7a240d32f4db2d07092b7d0", [:rebar3], [{:goldrush, "0.1.9", [hex: :goldrush, repo: "hexpm", optional: false]}], "hexpm", "73329ce700410b423f64aafc5f94583073904899098e4461f3558ed2980462ab"},
- "logger_json": {:git, "https://github.com/Nebo15/logger_json.git", "8e4290a7377a3624b3eaab9db1889d7e9c537bb7", [ref: "8e4290a"]},
+ "jose": {:hex, :jose, "1.11.2", "f4c018ccf4fdce22c71e44d471f15f723cb3efab5d909ab2ba202b5bf35557b3", [:mix, :rebar3], [], "hexpm", "98143fbc48d55f3a18daba82d34fe48959d44538e9697c08f34200fa5f0947d2"},
+ "jsx": {:hex, :jsx, "3.1.0", "d12516baa0bb23a59bb35dccaf02a1bd08243fcbb9efe24f2d9d056ccff71268", [:rebar3], [], "hexpm", "0c5cc8fdc11b53cc25cf65ac6705ad39e54ecc56d1c22e4adb8f5a53fb9427f3"},
+ "logger_json": {:hex, :logger_json, "4.3.0", "41aaaab2c2e1c071bfddbcc5a3f567884fdf312d222c7f1a7e3de6ab667774f7", [:mix], [{:ecto, "~> 2.1 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "001bbc34d7c451cfeed298c8384cb3aab10b364db2eb095c466c7a1a28bee6e0"},
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"},
- "mime": {:hex, :mime, "1.5.0", "203ef35ef3389aae6d361918bf3f952fa17a09e8e43b5aa592b93eba05d0fb8d", [:mix], [], "hexpm", "55a94c0f552249fc1a3dd9cd2d3ab9de9d3c89b559c2bd01121f824834f24746"},
+ "mime": {:hex, :mime, "2.0.2", "0b9e1a4c840eafb68d820b0e2158ef5c49385d17fb36855ac6e7e087d4b1dcc5", [:mix], [], "hexpm", "e6a3f76b4c277739e36c2e21a2c640778ba4c3846189d5ab19f97f126df5f9b7"},
"mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"},
- "mox": {:hex, :mox, "1.0.0", "4b3c7005173f47ff30641ba044eb0fe67287743eec9bd9545e37f3002b0a9f8b", [:mix], [], "hexpm", "201b0a20b7abdaaab083e9cf97884950f8a30a1350a1da403b3145e213c6f4df"},
- "msgpax": {:hex, :msgpax, "2.2.4", "7b3790ef684089076b63c0f08c2f4b079c6311daeb006b69e4ed2bf67518291e", [:mix], [{:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "b351b6d992d79624a8430a99d21a41b36b1b90edf84326a294e9f4a2de11f089"},
- "myxql": {:hex, :myxql, "0.4.5", "49784e6a3e4fc33088cc9004948ef255ee698b0d7b533fb1fa453cc99a3f9972", [:mix], [{:db_connection, "~> 2.0", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:geo, "~> 3.3", [hex: :geo, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "40a6166ab0a54f44a6e2c437aed6360ce51ce7f779557ae30d1cc4c4b4e7ad13"},
+ "mox": {:hex, :mox, "1.0.1", "b651bf0113265cda0ba3a827fcb691f848b683c373b77e7d7439910a8d754d6e", [:mix], [], "hexpm", "35bc0dea5499d18db4ef7fe4360067a59b06c74376eb6ab3bd67e6295b133469"},
+ "msgpax": {:hex, :msgpax, "2.3.0", "14f52ad249a3f77b5e2d59f6143e6c18a6e74f34666989e22bac0a465f9835cc", [:mix], [{:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "65c36846a62ed5615baf7d7d47babb6541313a6c0b6d2ff19354bd518f52df7e"},
+ "myxql": {:hex, :myxql, "0.5.1", "42cc502f9f373eeebfe6753266c0b601c01a6a96e4d861d429a4952ffb396689", [:mix], [{:db_connection, "~> 2.0", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:geo, "~> 3.3", [hex: :geo, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "73c6b684ae119ef9707a755f185f1410ec611ee748e54b9b1b1ff4aab4bc48d7"},
"oauth2": {:hex, :oauth2, "2.0.0", "338382079fe16c514420fa218b0903f8ad2d4bfc0ad0c9f988867dfa246731b0", [:mix], [{:hackney, "~> 1.13", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "881b8364ac7385f9fddc7949379cbe3f7081da37233a1aa7aab844670a91e7e7"},
"optimal": {:hex, :optimal, "0.3.6", "46bbf52fbbbd238cda81e02560caa84f93a53c75620f1fe19e81e4ae7b07d1dd", [:mix], [], "hexpm", "1a06ea6a653120226b35b283a1cd10039550f2c566edcdec22b29316d73640fd"},
"parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"},
- "phoenix": {:hex, :phoenix, "1.5.8", "71cfa7a9bb9a37af4df98939790642f210e35f696b935ca6d9d9c55a884621a4", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "35ded0a32f4836168c7ab6c33b88822eccd201bcd9492125a9bea4c54332d955"},
- "phoenix_ecto": {:hex, :phoenix_ecto, "4.2.1", "13f124cf0a3ce0f1948cf24654c7b9f2347169ff75c1123f44674afee6af3b03", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 2.15", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "478a1bae899cac0a6e02be1deec7e2944b7754c04e7d4107fc5a517f877743c0"},
- "phoenix_html": {:hex, :phoenix_html, "2.14.3", "51f720d0d543e4e157ff06b65de38e13303d5778a7919bcc696599e5934271b8", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "efd697a7fff35a13eeeb6b43db884705cba353a1a41d127d118fda5f90c8e80f"},
- "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.3.0", "f35f61c3f959c9a01b36defaa1f0624edd55b87e236b606664a556d6f72fd2e7", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "02c1007ae393f2b76ec61c1a869b1e617179877984678babde131d716f95b582"},
+ "phoenix": {:hex, :phoenix, "1.6.2", "6cbd5c8ed7a797f25a919a37fafbc2fb1634c9cdb12a4448d7a5d0b26926f005", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 1.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7bbee475acae0c3abc229b7f189e210ea788e63bd168e585f60c299a4b2f9133"},
+ "phoenix_ecto": {:hex, :phoenix_ecto, "4.4.0", "0672ed4e4808b3fbed494dded89958e22fb882de47a97634c0b13e7b0b5f7720", [:mix], [{:ecto, "~> 3.3", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "09864e558ed31ee00bd48fcc1d4fc58ae9678c9e81649075431e69dbabb43cc1"},
+ "phoenix_html": {:hex, :phoenix_html, "3.1.0", "0b499df05aad27160d697a9362f0e89fa0e24d3c7a9065c2bd9d38b4d1416c09", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "0c0a98a2cefa63433657983a2a594c7dee5927e4391e0f1bfd3a151d1def33fc"},
+ "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.3.3", "3a53772a6118d5679bf50fc1670505a290e32a1d195df9e069d8c53ab040c054", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "766796676e5f558dbae5d1bdb066849673e956005e3730dfd5affd7a6da4abac"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.0.0", "a1ae76717bb168cdeb10ec9d92d1480fec99e3080f011402c0a2d68d47395ffb", [:mix], [], "hexpm", "c52d948c4f261577b9c6fa804be91884b381a7f8f18450c5045975435350f771"},
- "phx_gen_auth": {:hex, :phx_gen_auth, "0.7.0", "2e10e9527b6b71abbfbb4601c7dc4aa4fb9f2db6f9a6be457c468b7f2b0f6319", [:mix], [{:phoenix, "~> 1.5.2", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "b9dc3e3b866e67c5db8f00f4a2adb28fc8636e794f78600e35aba0e55bdac209"},
- "plug": {:hex, :plug, "1.11.1", "f2992bac66fdae679453c9e86134a4201f6f43a687d8ff1cd1b2862d53c80259", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "23524e4fefbb587c11f0833b3910bfb414bf2e2534d61928e920f54e3a1b881f"},
- "plug_cowboy": {:hex, :plug_cowboy, "2.4.1", "779ba386c0915027f22e14a48919a9545714f849505fa15af2631a0d298abf0f", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d72113b6dff7b37a7d9b2a5b68892808e3a9a752f2bf7e503240945385b70507"},
+ "phoenix_view": {:hex, :phoenix_view, "1.0.0", "fea71ecaaed71178b26dd65c401607de5ec22e2e9ef141389c721b3f3d4d8011", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "82be3e2516f5633220246e2e58181282c71640dab7afc04f70ad94253025db0c"},
+ "plug": {:hex, :plug, "1.12.1", "645678c800601d8d9f27ad1aebba1fdb9ce5b2623ddb961a074da0b96c35187d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d57e799a777bc20494b784966dc5fbda91eb4a09f571f76545b72a634ce0d30b"},
+ "plug_cowboy": {:hex, :plug_cowboy, "2.5.2", "62894ccd601cf9597e2c23911ff12798a8a18d237e9739f58a6b04e4988899fe", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "ea6e87f774c8608d60c8d34022a7d073bd7680a0a013f049fc62bf35efea1044"},
"plug_crypto": {:hex, :plug_crypto, "1.2.2", "05654514ac717ff3a1843204b424477d9e60c143406aa94daf2274fdd280794d", [:mix], [], "hexpm", "87631c7ad914a5a445f0a3809f99b079113ae4ed4b867348dd9eec288cecb6db"},
- "pot": {:hex, :pot, "1.0.1", "81b511b1fa7c3123171c265cb7065a1528cebd7277b0cbc94257c50a8b2e4c17", [:rebar3], [], "hexpm", "ed87f5976531d91528452faa1138a5328db7f9f20d8feaae15f5051f79bcfb6d"},
- "protobuf": {:hex, :protobuf, "0.7.1", "7d1b9f7d9ecb32eccd96b0c58572de4d1c09e9e3bc414e4cb15c2dce7013f195", [:mix], [], "hexpm", "6eff7a5287963719521c82e5d5b4583fd1d7cdd89ad129f0ea7d503a50a4d13f"},
- "rabbit_common": {:hex, :rabbit_common, "3.8.14", "cc1604891295cd82f34597f1526ac611ea7b6a0e57b3dd79b41cb4224bcc6ec5", [:make, :rebar3], [{:credentials_obfuscation, "2.4.0", [hex: :credentials_obfuscation, repo: "hexpm", optional: false]}, {:jsx, "2.11.0", [hex: :jsx, repo: "hexpm", optional: false]}, {:lager, "3.8.2", [hex: :lager, repo: "hexpm", optional: false]}, {:recon, "2.5.1", [hex: :recon, repo: "hexpm", optional: false]}], "hexpm", "27409e425413cdd3fc2c077cf08226c4a307d56b1467883f26ab3789b2e106d0"},
- "ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm", "451d8527787df716d99dc36162fca05934915db0b6141bbdac2ea8d3c7afc7d7"},
+ "pot": {:hex, :pot, "1.0.2", "13abb849139fdc04ab8154986abbcb63bdee5de6ed2ba7e1713527e33df923dd", [:rebar3], [], "hexpm", "78fe127f5a4f5f919d6ea5a2a671827bd53eb9d37e5b4128c0ad3df99856c2e0"},
+ "protobuf": {:hex, :protobuf, "0.8.0", "61b27d6fd50e7b1b2eb0ee17c1f639906121f4ef965ae0994644eb4c68d4647d", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "3644ed846fd6f5e3b5c2cd617aa8344641e230edf812a45365fee7622bccd25a"},
+ "rabbit_common": {:hex, :rabbit_common, "3.9.11", "25df900b1aec7357c90253cc4528b43c5ff064f27c8c627707b747ae986ebf77", [:make, :rebar3], [{:credentials_obfuscation, "2.4.0", [hex: :credentials_obfuscation, repo: "hexpm", optional: false]}, {:jsx, "3.1.0", [hex: :jsx, repo: "hexpm", optional: false]}, {:recon, "2.5.1", [hex: :recon, repo: "hexpm", optional: false]}], "hexpm", "1bcac63760a0bf0e55d7d3c2ff36ed2310e0b560bd110a5a2d602d76d9c08e1a"},
+ "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"},
"recon": {:hex, :recon, "2.5.1", "430ffa60685ac1efdfb1fe4c97b8767c92d0d92e6e7c3e8621559ba77598678a", [:mix, :rebar3], [], "hexpm", "5721c6b6d50122d8f68cccac712caa1231f97894bab779eff5ff0f886cb44648"},
- "redix": {:hex, :redix, "1.0.0", "4f310341744ffceab3031394450a4e603d4d1001a697c3f18ae57ae776cbd3fb", [:mix], [{:castore, "~> 0.1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "8c8d9b33b5491737adcd5bb9e0f43b85212a384ac0042f64c156113518266ecb"},
- "saxy": {:hex, :saxy, "1.3.0", "61b52697a3235be68ce6f8ecc2c7032f3c01184b14d142a7d09270019e32fbf9", [:mix], [], "hexpm", "c9770a08c168be95c8d8249a9051dd5522641941ec1d9cb843e7d12dc101b6d2"},
- "spandex": {:hex, :spandex, "3.0.3", "91aa318f3de696bb4d931adf65f7ebdbe5df25cccce1fe8fd376a44c46bcf69b", [:mix], [{:decorator, "~> 1.2", [hex: :decorator, repo: "hexpm", optional: true]}, {:optimal, "~> 0.3.3", [hex: :optimal, repo: "hexpm", optional: false]}, {:plug, ">= 1.0.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "e3e6c319d0ab478ddc9a39102a727a410c962b4d51c0932c72279b86d3b17044"},
- "spandex_datadog": {:hex, :spandex_datadog, "1.1.0", "8c84e2f6c4067edc2e920dd79242f7bb0d6403652a7e9bc42109007f76b9be25", [:mix], [{:msgpax, "~> 2.2.1", [hex: :msgpax, repo: "hexpm", optional: false]}, {:spandex, "~> 3.0", [hex: :spandex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f4c20d3e601cad869705d9789f17a9242f245ce0bf2579fc835e96a6834663e2"},
+ "redix": {:hex, :redix, "1.1.5", "6fc460d66a5c2287e83e6d73dddc8d527ff59cb4d4f298b41e03a4db8c3b2bd5", [:mix], [{:castore, "~> 0.1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "679afdd4c14502fe9c11387ff1cdcb33065a1cf511097da1eee407f17c7a418b"},
+ "spandex": {:hex, :spandex, "3.1.0", "e43df29af70f6f0c13ddd07a5e68650e13dd2a76c6215977c651e64412e8ebee", [:mix], [{:decorator, "~> 1.2", [hex: :decorator, repo: "hexpm", optional: true]}, {:optimal, "~> 0.3.3", [hex: :optimal, repo: "hexpm", optional: false]}, {:plug, ">= 1.0.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "6b053ab307856e34237f06a5ea931eeadf78bdd6f00a49bbfb4103e004a3d3c7"},
+ "spandex_datadog": {:hex, :spandex_datadog, "1.2.0", "007600250cfa17535138d1e56a4948222285150dfeb0e7a92e55fcf11d5f82f3", [:mix], [{:msgpax, "~> 2.2.1 or ~> 2.3", [hex: :msgpax, repo: "hexpm", optional: false]}, {:spandex, "~> 3.0", [hex: :spandex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f11cd7c2d9ef6c2958b055c5ac00541435144e8ff9594860b40dbada7702a656"},
"spandex_ecto": {:hex, :spandex_ecto, "0.6.2", "845e0e0a115e84c218015e8a13cca7adb38e8b0a1b45010a51451a8c9961c551", [:mix], [{:spandex, "~> 2.2 or ~> 3.0", [hex: :spandex, repo: "hexpm", optional: false]}], "hexpm", "ddeb5c279ca850a38eee6decc8f91b3f4929c76f141b3329293793be54d0c1c7"},
- "spandex_phoenix": {:hex, :spandex_phoenix, "1.0.5", "6bb632d3b8157bbbdac97e03aca6dc3b2afd115b6d015fc8206b009685cd3b27", [:mix], [{:plug, "~> 1.3", [hex: :plug, repo: "hexpm", optional: false]}, {:spandex, "~> 2.2 or ~> 3.0", [hex: :spandex, repo: "hexpm", optional: false]}], "hexpm", "f7bcd063fed9eb140373603f8a7340b71e219e3f62824c2c7571036f47e2ac3c"},
+ "spandex_phoenix": {:hex, :spandex_phoenix, "1.0.6", "b2caf99cd37cf5c501c89de6099b07a8efab31747dbd63ed2fff802bb02c6937", [:mix], [{:optimal, "~> 0.3", [hex: :optimal, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.0", [hex: :phoenix, repo: "hexpm", optional: true]}, {:plug, "~> 1.3", [hex: :plug, repo: "hexpm", optional: false]}, {:spandex, "~> 2.2 or ~> 3.0", [hex: :spandex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "e286d4bfe6917ecddf56b47553322b55bdc328326b7d86a6c35b4835679e9784"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"},
- "telemetry": {:hex, :telemetry, "0.4.2", "2808c992455e08d6177322f14d3bdb6b625fbcfd233a73505870d8738a2f4599", [:rebar3], [], "hexpm", "2d1419bd9dda6a206d7b5852179511722e2b18812310d304620c7bd92a13fcef"},
- "telemetry_metrics": {:hex, :telemetry_metrics, "0.6.0", "da9d49ee7e6bb1c259d36ce6539cd45ae14d81247a2b0c90edf55e2b50507f7b", [:mix], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "5cfe67ad464b243835512aa44321cee91faed6ea868d7fb761d7016e02915c3d"},
- "telemetry_poller": {:hex, :telemetry_poller, "0.5.1", "21071cc2e536810bac5628b935521ff3e28f0303e770951158c73eaaa01e962a", [:rebar3], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4cab72069210bc6e7a080cec9afffad1b33370149ed5d379b81c7c5f0c663fd4"},
- "ueberauth": {:hex, :ueberauth, "0.6.3", "d42ace28b870e8072cf30e32e385579c57b9cc96ec74fa1f30f30da9c14f3cc0", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "afc293d8a1140d6591b53e3eaf415ca92842cb1d32fad3c450c6f045f7f91b60"},
- "ueberauth_github": {:hex, :ueberauth_github, "0.8.0", "2216c8cdacee0de6245b422fb397921b64a29416526985304e345dab6a799d17", [:mix], [{:oauth2, "~> 1.0 or ~> 2.0", [hex: :oauth2, repo: "hexpm", optional: false]}, {:ueberauth, "~> 0.6.0", [hex: :ueberauth, repo: "hexpm", optional: false]}], "hexpm", "b65ccc001a7b0719ba069452f3333d68891f4613ae787a340cce31e2a43307a3"},
- "ueberauth_google": {:hex, :ueberauth_google, "0.10.0", "ae00e7228207be977d5cdd0a562e39961851cea74f513aab6446cb51468f283c", [:mix], [{:oauth2, "~> 1.0 or ~> 2.0", [hex: :oauth2, repo: "hexpm", optional: false]}, {:ueberauth, "~> 0.6.3", [hex: :ueberauth, repo: "hexpm", optional: false]}], "hexpm", "148e2575fd24a29b8bcaa44f9d3d1a38550a74ceed645f5059d4516b93992650"},
+ "telemetry": {:hex, :telemetry, "1.0.0", "0f453a102cdf13d506b7c0ab158324c337c41f1cc7548f0bc0e130bbf0ae9452", [:rebar3], [], "hexpm", "73bc09fa59b4a0284efb4624335583c528e07ec9ae76aca96ea0673850aec57a"},
+ "telemetry_metrics": {:hex, :telemetry_metrics, "0.6.1", "315d9163a1d4660aedc3fee73f33f1d355dcc76c5c3ab3d59e76e3edf80eef1f", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7be9e0871c41732c233be71e4be11b96e56177bf15dde64a8ac9ce72ac9834c6"},
+ "telemetry_poller": {:hex, :telemetry_poller, "1.0.0", "db91bb424e07f2bb6e73926fcafbfcbcb295f0193e0a00e825e589a0a47e8453", [:rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "b3a24eafd66c3f42da30fc3ca7dda1e9d546c12250a2d60d7b81d264fbec4f6e"},
+ "ueberauth": {:hex, :ueberauth, "0.7.0", "9c44f41798b5fa27f872561b6f7d2bb0f10f03fdd22b90f454232d7b087f4b75", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "2efad9022e949834f16cc52cd935165049d81fa9e925690f91035c2e4b58d905"},
+ "ueberauth_github": {:hex, :ueberauth_github, "0.8.1", "0be487b5afc29bc805fa5e31636f37c8f09d5159ef73fc08c4c7a98c9cfe2c18", [:mix], [{:oauth2, "~> 1.0 or ~> 2.0", [hex: :oauth2, repo: "hexpm", optional: false]}, {:ueberauth, "~> 0.7.0", [hex: :ueberauth, repo: "hexpm", optional: false]}], "hexpm", "143d6130b945ea9bdbd0ef94987f40788f1d7e8090decbfc0722773155e7a74a"},
+ "ueberauth_google": {:hex, :ueberauth_google, "0.10.1", "db7bd2d99d2ff38e7449042a08d9560741b0dcaf1c31191729b97188b025465e", [:mix], [{:oauth2, "~> 1.0 or ~> 2.0", [hex: :oauth2, repo: "hexpm", optional: false]}, {:ueberauth, "~> 0.7.0", [hex: :ueberauth, repo: "hexpm", optional: false]}], "hexpm", "b799f547d279bb836e1f7039fc9fbb3a9d008a695e2a25bd06bffe591a168ba1"},
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
}
From f6bba24d98acb8ceb4bd5f107a171b48575b22e0 Mon Sep 17 00:00:00 2001
From: Dairon Medina Caro
Date: Tue, 7 Dec 2021 23:19:20 -0700
Subject: [PATCH 04/11] Fix code block with warnings
---
.../templates/oauth_provider/authorize/new.html.eex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/recognizer_web/templates/oauth_provider/authorize/new.html.eex b/lib/recognizer_web/templates/oauth_provider/authorize/new.html.eex
index dbc67a9..5981e80 100644
--- a/lib/recognizer_web/templates/oauth_provider/authorize/new.html.eex
+++ b/lib/recognizer_web/templates/oauth_provider/authorize/new.html.eex
@@ -6,7 +6,7 @@
System76 account?
- <% if @scopes do %>
+ <%= if @scopes do %>
This will allow <%= @client.name %> to do:
From 68d216cd7881b9a9e19854ce2701dd4017ec5444 Mon Sep 17 00:00:00 2001
From: Dairon Medina Caro
Date: Tue, 7 Dec 2021 23:19:29 -0700
Subject: [PATCH 05/11] Fix migrations
---
.../migrations/20201205222922_create_users_auth_tables.exs | 4 ++--
priv/repo/migrations/20201210193836_create_oauth_tables.exs | 6 +++---
priv/repo/migrations/20210215195133_add_user_oauths.exs | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/priv/repo/migrations/20201205222922_create_users_auth_tables.exs b/priv/repo/migrations/20201205222922_create_users_auth_tables.exs
index 18c51fb..ad9d64e 100644
--- a/priv/repo/migrations/20201205222922_create_users_auth_tables.exs
+++ b/priv/repo/migrations/20201205222922_create_users_auth_tables.exs
@@ -35,7 +35,7 @@ defmodule Recognizer.Repo.Migrations.CreateUsersAuthTables do
def change do
create table(:users, primary_key: false) do
- add :id, :"int(11) unsigned not null auto_increment", primary_key: true
+ add :id, :"int(11) unsigned auto_increment", null: false, primary_key: true
add :first_name, :string, null: false
add :last_name, :string, null: false
add :username, :string, null: false
@@ -48,7 +48,7 @@ defmodule Recognizer.Repo.Migrations.CreateUsersAuthTables do
create unique_index(:users, [:email])
create table(:users_tokens) do
- add :user_id, references(:users, type: "int(11) unsigned", on_delete: :delete_all),
+ add :user_id, references(:users, type: :"int(11) unsigned", on_delete: :delete_all),
null: false
add :token, :binary, null: false, size: 32
diff --git a/priv/repo/migrations/20201210193836_create_oauth_tables.exs b/priv/repo/migrations/20201210193836_create_oauth_tables.exs
index 3d95650..42a8122 100644
--- a/priv/repo/migrations/20201210193836_create_oauth_tables.exs
+++ b/priv/repo/migrations/20201210193836_create_oauth_tables.exs
@@ -10,7 +10,7 @@ defmodule Recognizer.Repo.Migrations.CreateOauthTables do
add :scopes, :string, null: false, default: ""
add :privileged, :boolean, null: false, default: false
- add :owner_id, references(:users, type: "int(11) unsigned", on_delete: :nothing)
+ add :owner_id, references(:users, type: :"int(11) unsigned", on_delete: :nothing)
timestamps()
end
@@ -22,7 +22,7 @@ defmodule Recognizer.Repo.Migrations.CreateOauthTables do
add :redirect_uri, :string, null: false
add :scopes, :string
- add :resource_owner_id, references(:users, type: "int(11) unsigned", on_delete: :nothing)
+ add :resource_owner_id, references(:users, type: :"int(11) unsigned", on_delete: :nothing)
add :application_id, references(:oauth_applications, on_delete: :nothing)
add :expires_in, :integer, null: false
@@ -38,7 +38,7 @@ defmodule Recognizer.Repo.Migrations.CreateOauthTables do
add :scopes, :string
add :previous_refresh_token, :string, null: false, default: ""
- add :resource_owner_id, references(:users, type: "int(11) unsigned", on_delete: :nothing)
+ add :resource_owner_id, references(:users, type: :"int(11) unsigned", on_delete: :nothing)
add :application_id, references(:oauth_applications, on_delete: :nothing)
add :expires_in, :integer
diff --git a/priv/repo/migrations/20210215195133_add_user_oauths.exs b/priv/repo/migrations/20210215195133_add_user_oauths.exs
index 90cdd22..f59a4d8 100644
--- a/priv/repo/migrations/20210215195133_add_user_oauths.exs
+++ b/priv/repo/migrations/20210215195133_add_user_oauths.exs
@@ -14,7 +14,7 @@ defmodule Recognizer.Repo.Migrations.AddUserOauths do
add :service, :"enum('facebook','github','google')"
add :service_guid, :string
- add :user_id, references(:users, type: "int(11) unsigned", on_delete: :nothing)
+ add :user_id, references(:users, type: :"int(11) unsigned", on_delete: :nothing)
end
end
end
From c104c0da255c48a26232932f6b5792ada6c2cda8 Mon Sep 17 00:00:00 2001
From: Dairon Medina Caro
Date: Tue, 7 Dec 2021 23:21:50 -0700
Subject: [PATCH 06/11] Use new Elixir in CI
---
.github/workflows/ci.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 62cba73..3fc583e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
container:
- image: elixir:1.11-alpine
+ image: elixir:1.12-alpine
services:
redis: redis:alpine
@@ -73,7 +73,7 @@ jobs:
runs-on: ubuntu-latest
container:
- image: elixir:1.10-alpine
+ image: elixir:1.12-alpine
steps:
- name: Checkout
@@ -97,7 +97,7 @@ jobs:
runs-on: ubuntu-latest
container:
- image: elixir:1.11-alpine
+ image: elixir:1.12-alpine
steps:
- name: Checkout
From 9db6f61986beae413ed110f95f395ed586aceb2c Mon Sep 17 00:00:00 2001
From: Dairon Medina Caro
Date: Wed, 8 Dec 2021 00:12:23 -0700
Subject: [PATCH 07/11] Update Elixir version and make credo strict
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3fc583e..4e0b708 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -131,4 +131,4 @@ jobs:
run: mix deps.get
- name: Credo
- run: mix credo
+ run: mix credo --strict
From 85b636c0173aed9f302c71fb695f4e1ede9715f0 Mon Sep 17 00:00:00 2001
From: Dairon Medina Caro
Date: Wed, 8 Dec 2021 00:12:34 -0700
Subject: [PATCH 08/11] Fix credo warnings
---
config/config.exs | 2 ++
config/prod.exs | 2 ++
lib/recognizer/accounts.ex | 28 +++++++++++--------
lib/recognizer/accounts/role.ex | 2 +-
lib/recognizer/guardian.ex | 9 +++---
lib/recognizer/notifications/account.ex | 6 ++--
lib/recognizer_web/authentication.ex | 9 +++---
.../api/user_registration_controller.ex | 2 +-
.../views/accounts/user_settings_view.ex | 8 ++++--
test/support/conn_case.ex | 12 ++++----
10 files changed, 47 insertions(+), 33 deletions(-)
diff --git a/config/config.exs b/config/config.exs
index 00da458..92b8430 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -23,6 +23,8 @@ config :recognizer, RecognizerWeb.Endpoint,
live_view: [signing_salt: "YzwhzV25"],
gzip: false
+config :recognizer, Recognizer.Notifications.Account, bullhorn_enabled: false
+
config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id, :user_id, :trace_id, :span_id]
diff --git a/config/prod.exs b/config/prod.exs
index 1794240..72b705b 100644
--- a/config/prod.exs
+++ b/config/prod.exs
@@ -13,4 +13,6 @@ config :logger,
config :recognizer, Recognizer.Repo, log: false
+config :recognizer, Recognizer.Notifications.Account, bullhorn_enabled: true
+
config :phoenix, :logger, false
diff --git a/lib/recognizer/accounts.ex b/lib/recognizer/accounts.ex
index 05a17b2..b87b9bf 100644
--- a/lib/recognizer/accounts.ex
+++ b/lib/recognizer/accounts.ex
@@ -7,9 +7,13 @@ defmodule Recognizer.Accounts do
import Ecto.Query, warn: false
- alias Recognizer.Accounts.{User, OAuth, RecoveryCode}
+ alias Ecto.Multi
+ alias Recognizer.Accounts.OAuth
+ alias Recognizer.Accounts.RecoveryCode
+ alias Recognizer.Accounts.User
+ alias Recognizer.Guardian
alias Recognizer.Notifications.Account, as: Notification
- alias Recognizer.{Guardian, Repo}
+ alias Recognizer.Repo
alias RecognizerWeb.Authentication
## Database getters
@@ -284,10 +288,10 @@ defmodule Recognizer.Accounts do
|> User.password_changeset(attrs)
|> User.validate_current_password(password)
- Ecto.Multi.new()
- |> Ecto.Multi.update(:user, changeset)
- |> Ecto.Multi.delete_all(:oauth, user_and_oauth_access_query(user))
- |> Ecto.Multi.delete_all(:tokens, user_and_contexts_query(user, :all))
+ Multi.new()
+ |> Multi.update(:user, changeset)
+ |> Multi.delete_all(:oauth, user_and_oauth_access_query(user))
+ |> Multi.delete_all(:tokens, user_and_contexts_query(user, :all))
|> Repo.transaction()
|> case do
{:ok, %{user: user}} ->
@@ -445,10 +449,10 @@ defmodule Recognizer.Accounts do
"""
def reset_user_password(user, attrs) do
- Ecto.Multi.new()
- |> Ecto.Multi.update(:user, User.password_changeset(user, attrs))
- |> Ecto.Multi.delete_all(:oauth, user_and_oauth_access_query(user))
- |> Ecto.Multi.delete_all(:tokens, user_and_contexts_query(user, :all))
+ Multi.new()
+ |> Multi.update(:user, User.password_changeset(user, attrs))
+ |> Multi.delete_all(:oauth, user_and_oauth_access_query(user))
+ |> Multi.delete_all(:tokens, user_and_contexts_query(user, :all))
|> Repo.transaction()
|> case do
{:ok, %{user: user}} -> {:ok, user}
@@ -503,8 +507,8 @@ defmodule Recognizer.Accounts do
def update_user_two_factor(user, attrs) do
user_changeset = change_user_two_factor(user, attrs)
- Ecto.Multi.new()
- |> Ecto.Multi.update(:user, user_changeset)
+ Multi.new()
+ |> Multi.update(:user, user_changeset)
|> Repo.transaction()
|> case do
{:ok, %{user: user}} ->
diff --git a/lib/recognizer/accounts/role.ex b/lib/recognizer/accounts/role.ex
index a78cda5..ffdffa9 100644
--- a/lib/recognizer/accounts/role.ex
+++ b/lib/recognizer/accounts/role.ex
@@ -28,7 +28,7 @@ defmodule Recognizer.Accounts.Role do
|> validate_required([:user_id, :role_id])
end
- def default_role_changeset() do
+ def default_role_changeset do
[
%{role_id: @login_role_id}
]
diff --git a/lib/recognizer/guardian.ex b/lib/recognizer/guardian.ex
index 6d6c0e1..0e19f23 100644
--- a/lib/recognizer/guardian.ex
+++ b/lib/recognizer/guardian.ex
@@ -5,6 +5,7 @@ defmodule Recognizer.Guardian do
use Guardian, otp_app: :recognizer
+ alias Guardian.DB
alias Recognizer.Accounts
def subject_for_token(%Recognizer.Accounts.User{id: id}, _claims) do
@@ -39,25 +40,25 @@ defmodule Recognizer.Guardian do
end
def after_encode_and_sign(resource, claims, token, _options) do
- with {:ok, _} <- Guardian.DB.after_encode_and_sign(resource, claims["typ"], claims, token) do
+ with {:ok, _} <- DB.after_encode_and_sign(resource, claims["typ"], claims, token) do
{:ok, token}
end
end
def on_verify(claims, token, _options) do
- with {:ok, _} <- Guardian.DB.on_verify(claims, token) do
+ with {:ok, _} <- DB.on_verify(claims, token) do
{:ok, claims}
end
end
def on_refresh({old_token, old_claims}, {new_token, new_claims}, _options) do
- with {:ok, _, _} <- Guardian.DB.on_refresh({old_token, old_claims}, {new_token, new_claims}) do
+ with {:ok, _, _} <- DB.on_refresh({old_token, old_claims}, {new_token, new_claims}) do
{:ok, {old_token, old_claims}, {new_token, new_claims}}
end
end
def on_revoke(claims, token, _options) do
- with {:ok, _} <- Guardian.DB.on_revoke(claims, token) do
+ with {:ok, _} <- DB.on_revoke(claims, token) do
{:ok, claims}
end
end
diff --git a/lib/recognizer/notifications/account.ex b/lib/recognizer/notifications/account.ex
index 4e0fd38..cef6295 100644
--- a/lib/recognizer/notifications/account.ex
+++ b/lib/recognizer/notifications/account.ex
@@ -84,11 +84,11 @@ defmodule Recognizer.Notifications.Account do
|> send_message()
end
- defp create_message(user, type, args \\ []) do
- apply(type, :new, [Keyword.merge([user: user], args)])
+ defp create_message(user, notification_module, args \\ []) do
+ notification_module.new(Keyword.merge([user: user], args))
end
- if Application.compile_env(:ex_aws, :enabled) do
+ if Application.compile_env(:recognizer, [__MODULE__, :bullhorn_enabled]) do
use Spandex.Decorators
@decorate span(service: :bullhorn, type: :function)
diff --git a/lib/recognizer_web/authentication.ex b/lib/recognizer_web/authentication.ex
index 3d01fed..bc275d8 100644
--- a/lib/recognizer_web/authentication.ex
+++ b/lib/recognizer_web/authentication.ex
@@ -7,8 +7,9 @@ defmodule RecognizerWeb.Authentication do
import Phoenix.Controller
alias Guardian.DB, as: GuardianDB
- alias RecognizerWeb.Router.Helpers, as: Routes
alias Recognizer.Guardian
+ alias Recognizer.Guardian.Plug, as: GuardianPlug
+ alias RecognizerWeb.Router.Helpers, as: Routes
@doc """
Logs the user in.
@@ -30,7 +31,7 @@ defmodule RecognizerWeb.Authentication do
conn
|> clear_session()
- |> Guardian.Plug.sign_in(user, params)
+ |> GuardianPlug.sign_in(user, params)
|> redirect(redirect_opts)
end
end
@@ -51,7 +52,7 @@ defmodule RecognizerWeb.Authentication do
redirect_opts = logout_redirect(conn)
conn
- |> Guardian.Plug.sign_out()
+ |> GuardianPlug.sign_out()
|> clear_session()
|> redirect(redirect_opts)
end
@@ -70,7 +71,7 @@ defmodule RecognizerWeb.Authentication do
and remember me token.
"""
def fetch_current_user(conn) do
- Guardian.Plug.current_resource(conn)
+ GuardianPlug.current_resource(conn)
end
@doc """
diff --git a/lib/recognizer_web/controllers/accounts/api/user_registration_controller.ex b/lib/recognizer_web/controllers/accounts/api/user_registration_controller.ex
index 48de25e..6da3c43 100644
--- a/lib/recognizer_web/controllers/accounts/api/user_registration_controller.ex
+++ b/lib/recognizer_web/controllers/accounts/api/user_registration_controller.ex
@@ -1,8 +1,8 @@
defmodule RecognizerWeb.Accounts.Api.UserRegistrationController do
use RecognizerWeb, :controller
- alias Recognizer.Accounts.Role
alias Recognizer.Accounts
+ alias Recognizer.Accounts.Role
alias RecognizerWeb.FallbackController
def create(conn, %{"user" => user_params}) do
diff --git a/lib/recognizer_web/views/accounts/user_settings_view.ex b/lib/recognizer_web/views/accounts/user_settings_view.ex
index f7cf821..d1d66b7 100644
--- a/lib/recognizer_web/views/accounts/user_settings_view.ex
+++ b/lib/recognizer_web/views/accounts/user_settings_view.ex
@@ -1,20 +1,22 @@
defmodule RecognizerWeb.Accounts.UserSettingsView do
use RecognizerWeb, :view
+ alias Ecto.Changeset
+
def business_type_class(changeset) do
- case Ecto.Changeset.get_field(changeset, :type) do
+ case Changeset.get_field(changeset, :type) do
:individual -> "none"
:business -> "block"
end
end
def two_factor_enabled?(changeset) do
- Ecto.Changeset.get_field(changeset, :two_factor_enabled)
+ Changeset.get_field(changeset, :two_factor_enabled)
end
def two_factor_method(changeset) do
changeset
- |> Ecto.Changeset.get_field(:notification_preference)
+ |> Changeset.get_field(:notification_preference)
|> Map.get(:two_factor)
end
end
diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex
index 935bbcb..26f4641 100644
--- a/test/support/conn_case.ex
+++ b/test/support/conn_case.ex
@@ -17,6 +17,8 @@ defmodule RecognizerWeb.ConnCase do
use ExUnit.CaseTemplate
+ alias Recognizer.AccountFactory
+
using do
quote do
# Import conveniences for testing with connections
@@ -50,19 +52,19 @@ defmodule RecognizerWeb.ConnCase do
test context.
"""
def register_and_log_in_admin(%{conn: conn}) do
- user = Recognizer.AccountFactory.insert(:user)
- Recognizer.AccountFactory.insert(:role, user_id: user.id, role_id: 2)
+ user = AccountFactory.insert(:user)
+ AccountFactory.insert(:role, user_id: user.id, role_id: 2)
%{conn: log_in_user(conn, user), user: user}
end
def register_and_log_in_user(%{conn: conn}) do
- user = Recognizer.AccountFactory.insert(:user)
+ user = AccountFactory.insert(:user)
%{conn: log_in_user(conn, user), user: user}
end
def register_and_log_in_oauth_user(%{conn: conn}) do
- user = Recognizer.AccountFactory.insert(:user)
- oauth = Recognizer.AccountFactory.insert(:oauth, user: user)
+ user = AccountFactory.insert(:user)
+ oauth = AccountFactory.insert(:oauth, user: user)
user = Recognizer.Accounts.get_user!(user.id)
%{conn: log_in_user(conn, user), user: user, oauth: oauth}
end
From b2bec7b651868e5f77929f2b3cccae758a04115b Mon Sep 17 00:00:00 2001
From: Dairon Medina Caro
Date: Wed, 8 Dec 2021 10:44:23 -0700
Subject: [PATCH 09/11] Upgrade packages and add live dashboard
---
lib/recognizer_web/router.ex | 16 ++++++++++++++++
mix.exs | 7 ++++---
mix.lock | 2 ++
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/lib/recognizer_web/router.ex b/lib/recognizer_web/router.ex
index bc360d4..a55d39c 100644
--- a/lib/recognizer_web/router.ex
+++ b/lib/recognizer_web/router.ex
@@ -103,4 +103,20 @@ defmodule RecognizerWeb.Router do
get "/settings/two-factor", UserSettingsController, :two_factor
post "/settings/two-factor", UserSettingsController, :two_factor_confirm
end
+
+ # Enables LiveDashboard only for development
+ #
+ # If you want to use the LiveDashboard in production, you should put
+ # it behind authentication and allow only admins to access it.
+ # If your application does not have an admins-only section yet,
+ # you can use Plug.BasicAuth to set up some basic authentication
+ # as long as you are also using SSL (which you should anyway).
+ if Mix.env() in [:dev, :test] do
+ import Phoenix.LiveDashboard.Router
+
+ scope "/" do
+ pipe_through [:fetch_session, :protect_from_forgery]
+ live_dashboard "/dashboard", metrics: AppWeb.Telemetry
+ end
+ end
end
diff --git a/mix.exs b/mix.exs
index e4dbe78..5b43622 100644
--- a/mix.exs
+++ b/mix.exs
@@ -5,9 +5,9 @@ defmodule Recognizer.MixProject do
[
app: :recognizer,
version: "0.1.0",
- elixir: "~> 1.9",
+ elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
- compilers: [:phoenix, :gettext] ++ Mix.compilers(),
+ compilers: Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps()
@@ -20,7 +20,7 @@ defmodule Recognizer.MixProject do
def application do
[
mod: {Recognizer.Application, []},
- extra_applications: [:logger, :runtime_tools]
+ extra_applications: [:logger, :runtime_tools, :os_mon]
]
end
@@ -56,6 +56,7 @@ defmodule Recognizer.MixProject do
{:phoenix_html, "~> 3.1"},
{:phoenix_live_reload, "~> 1.3", only: :dev},
{:phoenix, "~> 1.6.2"},
+ {:phoenix_live_dashboard, "~> 0.5"},
{:plug_cowboy, "~> 2.5"},
{:pot, "~> 1.0"},
{:spandex, "~> 3.1.0"},
diff --git a/mix.lock b/mix.lock
index 18717fb..0db2043 100644
--- a/mix.lock
+++ b/mix.lock
@@ -49,7 +49,9 @@
"phoenix": {:hex, :phoenix, "1.6.2", "6cbd5c8ed7a797f25a919a37fafbc2fb1634c9cdb12a4448d7a5d0b26926f005", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 1.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7bbee475acae0c3abc229b7f189e210ea788e63bd168e585f60c299a4b2f9133"},
"phoenix_ecto": {:hex, :phoenix_ecto, "4.4.0", "0672ed4e4808b3fbed494dded89958e22fb882de47a97634c0b13e7b0b5f7720", [:mix], [{:ecto, "~> 3.3", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "09864e558ed31ee00bd48fcc1d4fc58ae9678c9e81649075431e69dbabb43cc1"},
"phoenix_html": {:hex, :phoenix_html, "3.1.0", "0b499df05aad27160d697a9362f0e89fa0e24d3c7a9065c2bd9d38b4d1416c09", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "0c0a98a2cefa63433657983a2a594c7dee5927e4391e0f1bfd3a151d1def33fc"},
+ "phoenix_live_dashboard": {:hex, :phoenix_live_dashboard, "0.6.2", "0769470265eb13af01b5001b29cb935f4710d6adaa1ffc18417a570a337a2f0f", [:mix], [{:ecto, "~> 3.6.2 or ~> 3.7", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_mysql_extras, "~> 0.3", [hex: :ecto_mysql_extras, repo: "hexpm", optional: true]}, {:ecto_psql_extras, "~> 0.7", [hex: :ecto_psql_extras, repo: "hexpm", optional: true]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.17.1", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "5bc6c6b38a2ca8b5020b442322fcee6afd5e641637a0b1fb059d4bd89bc58e7b"},
"phoenix_live_reload": {:hex, :phoenix_live_reload, "1.3.3", "3a53772a6118d5679bf50fc1670505a290e32a1d195df9e069d8c53ab040c054", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "766796676e5f558dbae5d1bdb066849673e956005e3730dfd5affd7a6da4abac"},
+ "phoenix_live_view": {:hex, :phoenix_live_view, "0.17.5", "63f52a6f9f6983f04e424586ff897c016ecc5e4f8d1e2c22c2887af1c57215d8", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.5.9 or ~> 1.6.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.1", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c5586e6a3d4df71b8214c769d4f5eb8ece2b4001711a7ca0f97323c36958b0e3"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.0.0", "a1ae76717bb168cdeb10ec9d92d1480fec99e3080f011402c0a2d68d47395ffb", [:mix], [], "hexpm", "c52d948c4f261577b9c6fa804be91884b381a7f8f18450c5045975435350f771"},
"phoenix_view": {:hex, :phoenix_view, "1.0.0", "fea71ecaaed71178b26dd65c401607de5ec22e2e9ef141389c721b3f3d4d8011", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "82be3e2516f5633220246e2e58181282c71640dab7afc04f70ad94253025db0c"},
"plug": {:hex, :plug, "1.12.1", "645678c800601d8d9f27ad1aebba1fdb9ce5b2623ddb961a074da0b96c35187d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d57e799a777bc20494b784966dc5fbda91eb4a09f571f76545b72a634ce0d30b"},
From 6448796c6e0ce8de113151f2a4392a4b22b64e2a Mon Sep 17 00:00:00 2001
From: Dairon Medina Caro
Date: Wed, 8 Dec 2021 12:15:35 -0700
Subject: [PATCH 10/11] Add node version
---
.tool-versions | 1 +
config/config.exs | 1 -
config/dev.exs | 5 ++++-
config/releases.exs | 8 ++++++++
lib/recognizer_web/endpoint.ex | 10 ++++++++--
lib/recognizer_web/router.ex | 6 +++++-
lib/recognizer_web/telemetry.ex | 25 ++++++++++++++++++++-----
mix.exs | 2 +-
mix.lock | 4 ++--
9 files changed, 49 insertions(+), 13 deletions(-)
diff --git a/.tool-versions b/.tool-versions
index 958a1f8..03bf6e0 100644
--- a/.tool-versions
+++ b/.tool-versions
@@ -1 +1,2 @@
elixir 1.12.3-otp-23
+nodejs 12.9.1
diff --git a/config/config.exs b/config/config.exs
index 92b8430..a9b1110 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -8,7 +8,6 @@ config :recognizer,
config :recognizer, RecognizerWeb.Endpoint,
url: [host: "localhost"],
- secret_key_base: "vbOPS+hzz+UAQRtWxIdqiKrcOuWpbLTfocvgvRVDR9P4JRfxtmWZa45H25iKKYoI",
render_errors: [
view: RecognizerWeb.ErrorView,
accepts: ~w(html json),
diff --git a/config/dev.exs b/config/dev.exs
index fbc5546..ea65f5d 100644
--- a/config/dev.exs
+++ b/config/dev.exs
@@ -12,7 +12,10 @@ config :recognizer, Recognizer.Repo,
pool_size: 10
config :recognizer, RecognizerWeb.Endpoint,
- http: [port: 4000],
+ # Binding to loopback ipv4 address prevents access from other machines.
+ # Change to `ip: {0, 0, 0, 0}` to allow access from other machines.
+ http: [ip: {127, 0, 0, 1}, port: 4000],
+ secret_key_base: "vbOPS+hzz+UAQRtWxIdqiKrcOuWpbLTfocvgvRVDR9P4JRfxtmWZa45H25iKKYoI",
debug_errors: true,
code_reloader: true,
check_origin: false,
diff --git a/config/releases.exs b/config/releases.exs
index 718d3e4..73d2c3d 100644
--- a/config/releases.exs
+++ b/config/releases.exs
@@ -11,6 +11,14 @@ config :recognizer,
config :recognizer, RecognizerWeb.Endpoint,
url: [host: System.get_env("DOMAIN")],
+ http: [
+ # Enable IPv6 and bind on all interfaces.
+ # Set it to {0, 0, 0, 0, 0, 0, 0, 1} for local network only access.
+ # See the documentation on https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html
+ # for details about using IPv6 vs IPv4 and loopback vs public addresses.
+ ip: {0, 0, 0, 0, 0, 0, 0, 0},
+ port: String.to_integer(System.get_env("PORT") || "4000")
+ ],
secret_key_base: recognizer_config["SECRET_KEY_BASE"]
config :recognizer, Recognizer.Repo,
diff --git a/lib/recognizer_web/endpoint.ex b/lib/recognizer_web/endpoint.ex
index ef02f55..cf530a6 100644
--- a/lib/recognizer_web/endpoint.ex
+++ b/lib/recognizer_web/endpoint.ex
@@ -7,6 +7,8 @@ defmodule RecognizerWeb.Endpoint do
signing_salt: "juvsYHmf"
]
+ socket "/live", Phoenix.LiveView.Socket, websocket: [connect_info: [session: @session_options]]
+
plug RecognizerWeb.HealthcheckPlug
plug Plug.Static,
@@ -15,15 +17,19 @@ defmodule RecognizerWeb.Endpoint do
gzip: Application.get_env(:recognizer, __MODULE__)[:gzip],
only: ~w(styles fonts images scripts favicon.ico robots.txt)
+ # Code reloading can be explicitly enabled under the
+ # :code_reloader configuration of your endpoint.
# Code reloading can be explicitly enabled under the
# :code_reloader configuration of your endpoint.
if code_reloading? do
- socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
- plug Phoenix.LiveReloader
plug Phoenix.CodeReloader
plug Phoenix.Ecto.CheckRepoStatus, otp_app: :recognizer
end
+ plug Phoenix.LiveDashboard.RequestLogger,
+ param_key: "request_logger",
+ cookie_key: "request_logger"
+
plug CORSPlug
plug Bottle.RequestIdPlug
plug Plug.Telemetry, event_prefix: [:phoenix, :endpoint]
diff --git a/lib/recognizer_web/router.ex b/lib/recognizer_web/router.ex
index a55d39c..58992a6 100644
--- a/lib/recognizer_web/router.ex
+++ b/lib/recognizer_web/router.ex
@@ -116,7 +116,11 @@ defmodule RecognizerWeb.Router do
scope "/" do
pipe_through [:fetch_session, :protect_from_forgery]
- live_dashboard "/dashboard", metrics: AppWeb.Telemetry
+
+ live_dashboard "/dashboard",
+ metrics: RecognizerWeb.Telemetry,
+ ecto_repos: [Recognizer.Repo],
+ ecto_mysql_extras_options: [long_running_queries: [threshold: 200]]
end
end
end
diff --git a/lib/recognizer_web/telemetry.ex b/lib/recognizer_web/telemetry.ex
index b6d296b..2c9f02f 100644
--- a/lib/recognizer_web/telemetry.ex
+++ b/lib/recognizer_web/telemetry.ex
@@ -50,11 +50,26 @@ defmodule RecognizerWeb.Telemetry do
),
# Database Metrics
- summary("recognizer.repo.query.total_time", unit: {:native, :millisecond}),
- summary("recognizer.repo.query.decode_time", unit: {:native, :millisecond}),
- summary("recognizer.repo.query.query_time", unit: {:native, :millisecond}),
- summary("recognizer.repo.query.queue_time", unit: {:native, :millisecond}),
- summary("recognizer.repo.query.idle_time", unit: {:native, :millisecond}),
+ summary("app.repo.query.total_time",
+ unit: {:native, :millisecond},
+ description: "The sum of the other measurements"
+ ),
+ summary("app.repo.query.decode_time",
+ unit: {:native, :millisecond},
+ description: "The time spent decoding the data received from the database"
+ ),
+ summary("app.repo.query.query_time",
+ unit: {:native, :millisecond},
+ description: "The time spent executing the query"
+ ),
+ summary("app.repo.query.queue_time",
+ unit: {:native, :millisecond},
+ description: "The time spent waiting for a database connection"
+ ),
+ summary("app.repo.query.idle_time",
+ unit: {:native, :millisecond},
+ description: "The time the connection spent waiting before being checked out for the query"
+ ),
# VM Metrics
summary("vm.memory.total", unit: {:byte, :kilobyte}),
diff --git a/mix.exs b/mix.exs
index 5b43622..df477ec 100644
--- a/mix.exs
+++ b/mix.exs
@@ -40,6 +40,7 @@ defmodule Recognizer.MixProject do
{:credo, "~> 1.6.1", only: [:dev, :test], runtime: false},
{:decorator, "~> 1.2"},
{:ecto_enum, "~> 1.4"},
+ {:ecto_mysql_extras, "~> 0.3"},
{:ecto_sql, "~> 3.7"},
{:eqrcode, "~> 0.1.10"},
{:ex_machina, "~> 2.7", only: :test},
@@ -54,7 +55,6 @@ defmodule Recognizer.MixProject do
{:redix, ">= 0.0.0"},
{:phoenix_ecto, "~> 4.4"},
{:phoenix_html, "~> 3.1"},
- {:phoenix_live_reload, "~> 1.3", only: :dev},
{:phoenix, "~> 1.6.2"},
{:phoenix_live_dashboard, "~> 0.5"},
{:plug_cowboy, "~> 2.5"},
diff --git a/mix.lock b/mix.lock
index 0db2043..378bef2 100644
--- a/mix.lock
+++ b/mix.lock
@@ -18,6 +18,7 @@
"decorator": {:hex, :decorator, "1.4.0", "a57ac32c823ea7e4e67f5af56412d12b33274661bb7640ec7fc882f8d23ac419", [:mix], [], "hexpm", "0a07cedd9083da875c7418dea95b78361197cf2bf3211d743f6f7ce39656597f"},
"ecto": {:hex, :ecto, "3.7.1", "a20598862351b29f80f285b21ec5297da1181c0442687f9b8329f0445d228892", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d36e5b39fc479e654cffd4dbe1865d9716e4a9b6311faff799b6f90ab81b8638"},
"ecto_enum": {:hex, :ecto_enum, "1.4.0", "d14b00e04b974afc69c251632d1e49594d899067ee2b376277efd8233027aec8", [:mix], [{:ecto, ">= 3.0.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "> 3.0.0", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:mariaex, ">= 0.0.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:postgrex, ">= 0.0.0", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm", "8fb55c087181c2b15eee406519dc22578fa60dd82c088be376d0010172764ee4"},
+ "ecto_mysql_extras": {:hex, :ecto_mysql_extras, "0.3.1", "30473a0882303134d8b63ec76862d94dd001b8b943e11b9b098f5e15527e5b82", [:mix], [{:ecto_sql, "~> 3.7", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:myxql, "~> 0.5", [hex: :myxql, repo: "hexpm", optional: false]}, {:table_rex, "~> 3.1", [hex: :table_rex, repo: "hexpm", optional: true]}], "hexpm", "e60f2f830a7c11f0009380b010f14f144d3f043ac5d0dfd520aafe48a41e453d"},
"ecto_sql": {:hex, :ecto_sql, "3.7.1", "8de624ef50b2a8540252d8c60506379fbbc2707be1606853df371cf53df5d053", [:mix], [{:db_connection, "~> 2.2", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.7.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.4.0 or ~> 0.5.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.15.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "2b42a32e2ce92f64aba5c88617891ab3b0ba34f3f3a503fa20009eae1a401c81"},
"elixir_make": {:hex, :elixir_make, "0.6.3", "bc07d53221216838d79e03a8019d0839786703129599e9619f4ab74c8c096eac", [:mix], [], "hexpm", "f5cbd651c5678bcaabdbb7857658ee106b12509cd976c2c2fca99688e1daf716"},
"eqrcode": {:hex, :eqrcode, "0.1.10", "6294fece9d68ad64eef1c3c92cf111cfd6469f4fbf230a2d4cc905a682178f3f", [:mix], [], "hexpm", "da30e373c36a0fd37ab6f58664b16029919896d6c45a68a95cc4d713e81076f1"},
@@ -46,11 +47,10 @@
"oauth2": {:hex, :oauth2, "2.0.0", "338382079fe16c514420fa218b0903f8ad2d4bfc0ad0c9f988867dfa246731b0", [:mix], [{:hackney, "~> 1.13", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "881b8364ac7385f9fddc7949379cbe3f7081da37233a1aa7aab844670a91e7e7"},
"optimal": {:hex, :optimal, "0.3.6", "46bbf52fbbbd238cda81e02560caa84f93a53c75620f1fe19e81e4ae7b07d1dd", [:mix], [], "hexpm", "1a06ea6a653120226b35b283a1cd10039550f2c566edcdec22b29316d73640fd"},
"parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"},
- "phoenix": {:hex, :phoenix, "1.6.2", "6cbd5c8ed7a797f25a919a37fafbc2fb1634c9cdb12a4448d7a5d0b26926f005", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 1.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7bbee475acae0c3abc229b7f189e210ea788e63bd168e585f60c299a4b2f9133"},
+ "phoenix": {:hex, :phoenix, "1.6.3", "a760a4586a4736c32a706553dc9d7780761ca52f2ce74fd78d4a8f544c562d64", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 1.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "47f9c76944543735ba24b09fe2281b7ff4bc54c23bfee5253977248891aefe62"},
"phoenix_ecto": {:hex, :phoenix_ecto, "4.4.0", "0672ed4e4808b3fbed494dded89958e22fb882de47a97634c0b13e7b0b5f7720", [:mix], [{:ecto, "~> 3.3", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "09864e558ed31ee00bd48fcc1d4fc58ae9678c9e81649075431e69dbabb43cc1"},
"phoenix_html": {:hex, :phoenix_html, "3.1.0", "0b499df05aad27160d697a9362f0e89fa0e24d3c7a9065c2bd9d38b4d1416c09", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "0c0a98a2cefa63433657983a2a594c7dee5927e4391e0f1bfd3a151d1def33fc"},
"phoenix_live_dashboard": {:hex, :phoenix_live_dashboard, "0.6.2", "0769470265eb13af01b5001b29cb935f4710d6adaa1ffc18417a570a337a2f0f", [:mix], [{:ecto, "~> 3.6.2 or ~> 3.7", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_mysql_extras, "~> 0.3", [hex: :ecto_mysql_extras, repo: "hexpm", optional: true]}, {:ecto_psql_extras, "~> 0.7", [hex: :ecto_psql_extras, repo: "hexpm", optional: true]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.17.1", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "5bc6c6b38a2ca8b5020b442322fcee6afd5e641637a0b1fb059d4bd89bc58e7b"},
- "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.3.3", "3a53772a6118d5679bf50fc1670505a290e32a1d195df9e069d8c53ab040c054", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "766796676e5f558dbae5d1bdb066849673e956005e3730dfd5affd7a6da4abac"},
"phoenix_live_view": {:hex, :phoenix_live_view, "0.17.5", "63f52a6f9f6983f04e424586ff897c016ecc5e4f8d1e2c22c2887af1c57215d8", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.5.9 or ~> 1.6.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.1", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c5586e6a3d4df71b8214c769d4f5eb8ece2b4001711a7ca0f97323c36958b0e3"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.0.0", "a1ae76717bb168cdeb10ec9d92d1480fec99e3080f011402c0a2d68d47395ffb", [:mix], [], "hexpm", "c52d948c4f261577b9c6fa804be91884b381a7f8f18450c5045975435350f771"},
"phoenix_view": {:hex, :phoenix_view, "1.0.0", "fea71ecaaed71178b26dd65c401607de5ec22e2e9ef141389c721b3f3d4d8011", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "82be3e2516f5633220246e2e58181282c71640dab7afc04f70ad94253025db0c"},
From 730f4f479cec0ae3657f7f7434b9293437af5ef7 Mon Sep 17 00:00:00 2001
From: Dairon Medina Caro
Date: Wed, 8 Dec 2021 13:57:47 -0700
Subject: [PATCH 11/11] Fix test settings
---
config/test.exs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/config/test.exs b/config/test.exs
index 4aabb5a..8693da2 100644
--- a/config/test.exs
+++ b/config/test.exs
@@ -16,7 +16,11 @@ config :recognizer, Recognizer.Repo,
pool: Ecto.Adapters.SQL.Sandbox
config :recognizer, RecognizerWeb.Endpoint,
- http: [port: 4002],
+ http: [ip: {127, 0, 0, 1}, port: 4002],
+ secret_key_base: "vbOPS+hzz+UAQRtWxIdqiKrcOuWpbLTfocvgvRVDR9P4JRfxtmWZa45H25iKKYoI",
server: false
config :logger, level: :warn
+
+# Initialize plugs at runtime for faster test compilation
+config :phoenix, :plug_init_mode, :runtime