From ee866c2cf2d23bef02e8c0d31fefd40bf1d4e7cf Mon Sep 17 00:00:00 2001 From: Jamil Bou Kheir Date: Mon, 11 May 2020 16:16:45 -0500 Subject: [PATCH 1/2] First rename --- apps/cf_http/README.md | 3 --- .../lib/cf_http_web/views/device_view.ex | 3 --- .../lib/cf_http_web/views/layout_view.ex | 3 --- .../lib/cf_http_web/views/rule_view.ex | 3 --- .../lib/cf_http_web/views/user_view.ex | 3 --- apps/cf_http/test/cf_http/devices_test.exs | 6 ----- apps/cf_http/test/cf_http/rules_test.exs | 6 ----- apps/cf_http/test/test_helper.exs | 2 -- apps/cf_vpn/test/cf_vpn_test.exs | 8 ------ apps/cf_wall/test/cf_wall_test.exs | 8 ------ apps/{cf_http => fg_http}/.formatter.exs | 0 apps/{cf_http => fg_http}/.gitignore | 0 apps/fg_http/README.md | 3 +++ apps/{cf_http => fg_http}/assets/.babelrc | 0 apps/{cf_http => fg_http}/assets/css/app.css | 0 apps/{cf_http => fg_http}/assets/css/main.css | 0 apps/{cf_http => fg_http}/assets/js/app.js | 0 apps/{cf_http => fg_http}/assets/js/socket.js | 0 .../assets/package-lock.json | 0 apps/{cf_http => fg_http}/assets/package.json | 0 .../assets/static/favicon.ico | Bin .../assets/static/robots.txt | 0 .../assets/webpack.config.js | 0 .../lib/cf_http.ex => fg_http/lib/fg_http.ex} | 4 +-- .../lib/fg_http}/application.ex | 16 ++++++------ .../lib/fg_http}/devices.ex | 6 ++--- .../lib/fg_http}/devices/device.ex | 4 +-- .../lib/fg_http}/release.ex | 4 +-- .../cf_http => fg_http/lib/fg_http}/repo.ex | 4 +-- .../cf_http => fg_http/lib/fg_http}/rules.ex | 6 ++--- .../lib/fg_http}/rules/rule.ex | 4 +-- .../lib/fg_http}/sessions.ex | 6 ++--- .../lib/fg_http}/sessions/session.ex | 2 +- .../cf_http => fg_http/lib/fg_http}/users.ex | 6 ++--- .../lib/fg_http}/users/user.ex | 2 +- .../lib/fg_http_web.ex} | 24 +++++++++--------- .../lib/fg_http_web}/channels/user_socket.ex | 6 ++--- .../controllers/device_controller.ex | 8 +++--- .../controllers/rule_controller.ex | 8 +++--- .../controllers/session_controller.ex | 8 +++--- .../controllers/user_controller.ex | 8 +++--- .../lib/fg_http_web}/endpoint.ex | 12 ++++----- .../lib/fg_http_web}/gettext.ex | 6 ++--- .../lib/fg_http_web}/plugs/authenticator.ex | 4 +-- .../lib/fg_http_web}/router.ex | 8 +++--- .../templates/device/edit.html.eex | 0 .../templates/device/form.html.eex | 0 .../templates/device/index.html.eex | 0 .../templates/device/new.html.eex | 0 .../templates/device/show.html.eex | 0 .../templates/layout/app.html.eex | 2 +- .../fg_http_web}/templates/rule/edit.html.eex | 0 .../fg_http_web}/templates/rule/form.html.eex | 0 .../templates/rule/index.html.eex | 0 .../fg_http_web}/templates/rule/new.html.eex | 0 .../fg_http_web}/templates/rule/show.html.eex | 0 .../templates/session/new.html.eex | 0 .../fg_http_web}/templates/user/edit.html.eex | 0 .../fg_http_web}/templates/user/new.html.eex | 0 .../fg_http_web}/templates/user/show.html.eex | 0 .../lib/fg_http_web/views/device_view.ex | 3 +++ .../lib/fg_http_web}/views/error_helpers.ex | 6 ++--- .../lib/fg_http_web}/views/error_view.ex | 4 +-- .../lib/fg_http_web/views/layout_view.ex | 3 +++ .../lib/fg_http_web/views/rule_view.ex | 3 +++ .../lib/fg_http_web/views/user_view.ex | 3 +++ apps/{cf_http => fg_http}/mix.exs | 6 ++--- .../priv/gettext/en/LC_MESSAGES/errors.po | 0 .../priv/gettext/errors.pot | 0 .../priv/repo/migrations/.formatter.exs | 0 .../20200225005454_create_users.exs | 2 +- .../20200228145810_create_devices.exs | 2 +- .../20200228154815_create_rules.exs | 2 +- .../20200510162435_create_sessions.exs | 2 +- apps/{cf_http => fg_http}/priv/repo/seeds.exs | 2 +- apps/fg_http/test/fg_http/devices_test.exs | 6 +++++ apps/fg_http/test/fg_http/rules_test.exs | 6 +++++ .../controllers/device_controller_test.exs | 6 ++--- .../controllers/rule_controller_test.exs | 4 +-- .../fg_http_web}/views/error_view_test.exs | 8 +++--- .../fg_http_web}/views/layout_view_test.exs | 4 +-- .../test/support/channel_case.ex | 10 ++++---- .../test/support/conn_case.ex | 12 ++++----- .../test/support/data_case.ex | 12 ++++----- apps/fg_http/test/test_helper.exs | 2 ++ apps/{cf_vpn => fg_vpn}/.formatter.exs | 0 apps/{cf_vpn => fg_vpn}/.gitignore | 0 apps/{cf_vpn => fg_vpn}/README.md | 8 +++--- .../lib/cf_vpn.ex => fg_vpn/lib/fg_vpn.ex} | 6 ++--- .../lib/fg_vpn}/application.ex | 8 +++--- apps/{cf_vpn => fg_vpn}/mix.exs | 6 ++--- apps/fg_vpn/test/fg_vpn_test.exs | 8 ++++++ apps/{cf_vpn => fg_vpn}/test/test_helper.exs | 0 apps/{cf_wall => fg_wall}/.formatter.exs | 0 apps/{cf_wall => fg_wall}/.gitignore | 0 apps/{cf_wall => fg_wall}/README.md | 8 +++--- .../lib/cf_wall.ex => fg_wall/lib/fg_wall.ex} | 6 ++--- .../lib/fg_wall}/application.ex | 8 +++--- apps/{cf_wall => fg_wall}/mix.exs | 6 ++--- apps/fg_wall/test/fg_wall_test.exs | 8 ++++++ .../{cf_wall => fg_wall}/test/test_helper.exs | 0 bin/start_cf_http.sh | 7 ----- bin/start_fg_http.sh | 7 +++++ config/config.exs | 10 ++++---- config/dev.exs | 16 ++++++------ config/prod.exs | 6 ++--- config/releases.exs | 6 ++--- config/test.exs | 4 +-- mix.exs | 8 +++--- 109 files changed, 225 insertions(+), 225 deletions(-) delete mode 100644 apps/cf_http/README.md delete mode 100644 apps/cf_http/lib/cf_http_web/views/device_view.ex delete mode 100644 apps/cf_http/lib/cf_http_web/views/layout_view.ex delete mode 100644 apps/cf_http/lib/cf_http_web/views/rule_view.ex delete mode 100644 apps/cf_http/lib/cf_http_web/views/user_view.ex delete mode 100644 apps/cf_http/test/cf_http/devices_test.exs delete mode 100644 apps/cf_http/test/cf_http/rules_test.exs delete mode 100644 apps/cf_http/test/test_helper.exs delete mode 100644 apps/cf_vpn/test/cf_vpn_test.exs delete mode 100644 apps/cf_wall/test/cf_wall_test.exs rename apps/{cf_http => fg_http}/.formatter.exs (100%) rename apps/{cf_http => fg_http}/.gitignore (100%) create mode 100644 apps/fg_http/README.md rename apps/{cf_http => fg_http}/assets/.babelrc (100%) rename apps/{cf_http => fg_http}/assets/css/app.css (100%) rename apps/{cf_http => fg_http}/assets/css/main.css (100%) rename apps/{cf_http => fg_http}/assets/js/app.js (100%) rename apps/{cf_http => fg_http}/assets/js/socket.js (100%) rename apps/{cf_http => fg_http}/assets/package-lock.json (100%) rename apps/{cf_http => fg_http}/assets/package.json (100%) rename apps/{cf_http => fg_http}/assets/static/favicon.ico (100%) rename apps/{cf_http => fg_http}/assets/static/robots.txt (100%) rename apps/{cf_http => fg_http}/assets/webpack.config.js (100%) rename apps/{cf_http/lib/cf_http.ex => fg_http/lib/fg_http.ex} (71%) rename apps/{cf_http/lib/cf_http => fg_http/lib/fg_http}/application.ex (66%) rename apps/{cf_http/lib/cf_http => fg_http/lib/fg_http}/devices.ex (95%) rename apps/{cf_http/lib/cf_http => fg_http/lib/fg_http}/devices/device.ex (84%) rename apps/{cf_http/lib/cf_http => fg_http/lib/fg_http}/release.ex (91%) rename apps/{cf_http/lib/cf_http => fg_http/lib/fg_http}/repo.ex (54%) rename apps/{cf_http/lib/cf_http => fg_http/lib/fg_http}/rules.ex (95%) rename apps/{cf_http/lib/cf_http => fg_http/lib/fg_http}/rules/rule.ex (86%) rename apps/{cf_http/lib/cf_http => fg_http/lib/fg_http}/sessions.ex (95%) rename apps/{cf_http/lib/cf_http => fg_http/lib/fg_http}/sessions/session.ex (88%) rename apps/{cf_http/lib/cf_http => fg_http/lib/fg_http}/users.ex (95%) rename apps/{cf_http/lib/cf_http => fg_http/lib/fg_http}/users/user.ex (94%) rename apps/{cf_http/lib/cf_http_web.ex => fg_http/lib/fg_http_web.ex} (73%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/channels/user_socket.ex (86%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/controllers/device_controller.ex (90%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/controllers/rule_controller.ex (92%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/controllers/session_controller.ex (87%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/controllers/user_controller.ex (91%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/endpoint.ex (86%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/gettext.ex (86%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/plugs/authenticator.ex (78%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/router.ex (88%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/device/edit.html.eex (100%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/device/form.html.eex (100%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/device/index.html.eex (100%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/device/new.html.eex (100%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/device/show.html.eex (100%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/layout/app.html.eex (93%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/rule/edit.html.eex (100%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/rule/form.html.eex (100%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/rule/index.html.eex (100%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/rule/new.html.eex (100%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/rule/show.html.eex (100%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/session/new.html.eex (100%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/user/edit.html.eex (100%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/user/new.html.eex (100%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/templates/user/show.html.eex (100%) create mode 100644 apps/fg_http/lib/fg_http_web/views/device_view.ex rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/views/error_helpers.ex (88%) rename apps/{cf_http/lib/cf_http_web => fg_http/lib/fg_http_web}/views/error_view.ex (88%) create mode 100644 apps/fg_http/lib/fg_http_web/views/layout_view.ex create mode 100644 apps/fg_http/lib/fg_http_web/views/rule_view.ex create mode 100644 apps/fg_http/lib/fg_http_web/views/user_view.ex rename apps/{cf_http => fg_http}/mix.exs (95%) rename apps/{cf_http => fg_http}/priv/gettext/en/LC_MESSAGES/errors.po (100%) rename apps/{cf_http => fg_http}/priv/gettext/errors.pot (100%) rename apps/{cf_http => fg_http}/priv/repo/migrations/.formatter.exs (100%) rename apps/{cf_http => fg_http}/priv/repo/migrations/20200225005454_create_users.exs (85%) rename apps/{cf_http => fg_http}/priv/repo/migrations/20200228145810_create_devices.exs (85%) rename apps/{cf_http => fg_http}/priv/repo/migrations/20200228154815_create_rules.exs (88%) rename apps/{cf_http => fg_http}/priv/repo/migrations/20200510162435_create_sessions.exs (80%) rename apps/{cf_http => fg_http}/priv/repo/seeds.exs (86%) create mode 100644 apps/fg_http/test/fg_http/devices_test.exs create mode 100644 apps/fg_http/test/fg_http/rules_test.exs rename apps/{cf_http/test/cf_http_web => fg_http/test/fg_http_web}/controllers/device_controller_test.exs (95%) rename apps/{cf_http/test/cf_http_web => fg_http/test/fg_http_web}/controllers/rule_controller_test.exs (75%) rename apps/{cf_http/test/cf_http_web => fg_http/test/fg_http_web}/views/error_view_test.exs (50%) rename apps/{cf_http/test/cf_http_web => fg_http/test/fg_http_web}/views/layout_view_test.exs (71%) rename apps/{cf_http => fg_http}/test/support/channel_case.ex (78%) rename apps/{cf_http => fg_http}/test/support/conn_case.ex (77%) rename apps/{cf_http => fg_http}/test/support/data_case.ex (84%) create mode 100644 apps/fg_http/test/test_helper.exs rename apps/{cf_vpn => fg_vpn}/.formatter.exs (100%) rename apps/{cf_vpn => fg_vpn}/.gitignore (100%) rename apps/{cf_vpn => fg_vpn}/README.md (67%) rename apps/{cf_vpn/lib/cf_vpn.ex => fg_vpn/lib/fg_vpn.ex} (62%) rename apps/{cf_vpn/lib/cf_vpn => fg_vpn/lib/fg_vpn}/application.ex (65%) rename apps/{cf_vpn => fg_vpn}/mix.exs (90%) create mode 100644 apps/fg_vpn/test/fg_vpn_test.exs rename apps/{cf_vpn => fg_vpn}/test/test_helper.exs (100%) rename apps/{cf_wall => fg_wall}/.formatter.exs (100%) rename apps/{cf_wall => fg_wall}/.gitignore (100%) rename apps/{cf_wall => fg_wall}/README.md (67%) rename apps/{cf_wall/lib/cf_wall.ex => fg_wall/lib/fg_wall.ex} (62%) rename apps/{cf_wall/lib/cf_wall => fg_wall/lib/fg_wall}/application.ex (64%) rename apps/{cf_wall => fg_wall}/mix.exs (89%) create mode 100644 apps/fg_wall/test/fg_wall_test.exs rename apps/{cf_wall => fg_wall}/test/test_helper.exs (100%) delete mode 100755 bin/start_cf_http.sh create mode 100755 bin/start_fg_http.sh diff --git a/apps/cf_http/README.md b/apps/cf_http/README.md deleted file mode 100644 index 14b22c931..000000000 --- a/apps/cf_http/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# CfHttp - - diff --git a/apps/cf_http/lib/cf_http_web/views/device_view.ex b/apps/cf_http/lib/cf_http_web/views/device_view.ex deleted file mode 100644 index c490c4db7..000000000 --- a/apps/cf_http/lib/cf_http_web/views/device_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule CfHttpWeb.DeviceView do - use CfHttpWeb, :view -end diff --git a/apps/cf_http/lib/cf_http_web/views/layout_view.ex b/apps/cf_http/lib/cf_http_web/views/layout_view.ex deleted file mode 100644 index 78cea4062..000000000 --- a/apps/cf_http/lib/cf_http_web/views/layout_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule CfHttpWeb.LayoutView do - use CfHttpWeb, :view -end diff --git a/apps/cf_http/lib/cf_http_web/views/rule_view.ex b/apps/cf_http/lib/cf_http_web/views/rule_view.ex deleted file mode 100644 index d354a584f..000000000 --- a/apps/cf_http/lib/cf_http_web/views/rule_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule CfHttpWeb.RuleView do - use CfHttpWeb, :view -end diff --git a/apps/cf_http/lib/cf_http_web/views/user_view.ex b/apps/cf_http/lib/cf_http_web/views/user_view.ex deleted file mode 100644 index 1dd8cd496..000000000 --- a/apps/cf_http/lib/cf_http_web/views/user_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule CfHttpWeb.UserView do - use CfHttpWeb, :view -end diff --git a/apps/cf_http/test/cf_http/devices_test.exs b/apps/cf_http/test/cf_http/devices_test.exs deleted file mode 100644 index e09a94998..000000000 --- a/apps/cf_http/test/cf_http/devices_test.exs +++ /dev/null @@ -1,6 +0,0 @@ -defmodule CfHttp.DevicesTest do - use CfHttp.DataCase - - describe "devices" do - end -end diff --git a/apps/cf_http/test/cf_http/rules_test.exs b/apps/cf_http/test/cf_http/rules_test.exs deleted file mode 100644 index 7222a43cc..000000000 --- a/apps/cf_http/test/cf_http/rules_test.exs +++ /dev/null @@ -1,6 +0,0 @@ -defmodule CfHttp.RulesTest do - use CfHttp.DataCase - - describe "rules" do - end -end diff --git a/apps/cf_http/test/test_helper.exs b/apps/cf_http/test/test_helper.exs deleted file mode 100644 index dec00ccea..000000000 --- a/apps/cf_http/test/test_helper.exs +++ /dev/null @@ -1,2 +0,0 @@ -ExUnit.start() -Ecto.Adapters.SQL.Sandbox.mode(CfHttp.Repo, :manual) diff --git a/apps/cf_vpn/test/cf_vpn_test.exs b/apps/cf_vpn/test/cf_vpn_test.exs deleted file mode 100644 index ebfc8157a..000000000 --- a/apps/cf_vpn/test/cf_vpn_test.exs +++ /dev/null @@ -1,8 +0,0 @@ -defmodule CfVpnTest do - use ExUnit.Case - doctest CfVpn - - test "greets the world" do - assert CfVpn.hello() == :world - end -end diff --git a/apps/cf_wall/test/cf_wall_test.exs b/apps/cf_wall/test/cf_wall_test.exs deleted file mode 100644 index 6280b3659..000000000 --- a/apps/cf_wall/test/cf_wall_test.exs +++ /dev/null @@ -1,8 +0,0 @@ -defmodule CfWallTest do - use ExUnit.Case - doctest CfWall - - test "greets the world" do - assert CfWall.hello() == :world - end -end diff --git a/apps/cf_http/.formatter.exs b/apps/fg_http/.formatter.exs similarity index 100% rename from apps/cf_http/.formatter.exs rename to apps/fg_http/.formatter.exs diff --git a/apps/cf_http/.gitignore b/apps/fg_http/.gitignore similarity index 100% rename from apps/cf_http/.gitignore rename to apps/fg_http/.gitignore diff --git a/apps/fg_http/README.md b/apps/fg_http/README.md new file mode 100644 index 000000000..62bed92fe --- /dev/null +++ b/apps/fg_http/README.md @@ -0,0 +1,3 @@ +# FgHttp + + diff --git a/apps/cf_http/assets/.babelrc b/apps/fg_http/assets/.babelrc similarity index 100% rename from apps/cf_http/assets/.babelrc rename to apps/fg_http/assets/.babelrc diff --git a/apps/cf_http/assets/css/app.css b/apps/fg_http/assets/css/app.css similarity index 100% rename from apps/cf_http/assets/css/app.css rename to apps/fg_http/assets/css/app.css diff --git a/apps/cf_http/assets/css/main.css b/apps/fg_http/assets/css/main.css similarity index 100% rename from apps/cf_http/assets/css/main.css rename to apps/fg_http/assets/css/main.css diff --git a/apps/cf_http/assets/js/app.js b/apps/fg_http/assets/js/app.js similarity index 100% rename from apps/cf_http/assets/js/app.js rename to apps/fg_http/assets/js/app.js diff --git a/apps/cf_http/assets/js/socket.js b/apps/fg_http/assets/js/socket.js similarity index 100% rename from apps/cf_http/assets/js/socket.js rename to apps/fg_http/assets/js/socket.js diff --git a/apps/cf_http/assets/package-lock.json b/apps/fg_http/assets/package-lock.json similarity index 100% rename from apps/cf_http/assets/package-lock.json rename to apps/fg_http/assets/package-lock.json diff --git a/apps/cf_http/assets/package.json b/apps/fg_http/assets/package.json similarity index 100% rename from apps/cf_http/assets/package.json rename to apps/fg_http/assets/package.json diff --git a/apps/cf_http/assets/static/favicon.ico b/apps/fg_http/assets/static/favicon.ico similarity index 100% rename from apps/cf_http/assets/static/favicon.ico rename to apps/fg_http/assets/static/favicon.ico diff --git a/apps/cf_http/assets/static/robots.txt b/apps/fg_http/assets/static/robots.txt similarity index 100% rename from apps/cf_http/assets/static/robots.txt rename to apps/fg_http/assets/static/robots.txt diff --git a/apps/cf_http/assets/webpack.config.js b/apps/fg_http/assets/webpack.config.js similarity index 100% rename from apps/cf_http/assets/webpack.config.js rename to apps/fg_http/assets/webpack.config.js diff --git a/apps/cf_http/lib/cf_http.ex b/apps/fg_http/lib/fg_http.ex similarity index 71% rename from apps/cf_http/lib/cf_http.ex rename to apps/fg_http/lib/fg_http.ex index 5b09fce54..81a0cc2d1 100644 --- a/apps/cf_http/lib/cf_http.ex +++ b/apps/fg_http/lib/fg_http.ex @@ -1,6 +1,6 @@ -defmodule CfHttp do +defmodule FgHttp do @moduledoc """ - CfHttp keeps the contexts that define your domain + FgHttp keeps the contexts that define your domain and business logic. Contexts are also responsible for managing your data, regardless diff --git a/apps/cf_http/lib/cf_http/application.ex b/apps/fg_http/lib/fg_http/application.ex similarity index 66% rename from apps/cf_http/lib/cf_http/application.ex rename to apps/fg_http/lib/fg_http/application.ex index 663a0b6c2..d346049c1 100644 --- a/apps/cf_http/lib/cf_http/application.ex +++ b/apps/fg_http/lib/fg_http/application.ex @@ -1,4 +1,4 @@ -defmodule CfHttp.Application do +defmodule FgHttp.Application do # See https://hexdocs.pm/elixir/Application.html # for more information on OTP Applications @moduledoc false @@ -9,25 +9,25 @@ defmodule CfHttp.Application do # List all child processes to be supervised children = [ # Start the Ecto repository - CfHttp.Repo, + FgHttp.Repo, # Start the PubSub system - {Phoenix.PubSub, name: CfHttp.PubSub}, + {Phoenix.PubSub, name: FgHttp.PubSub}, # Start the endpoint when the application starts - CfHttpWeb.Endpoint - # Starts a worker by calling: CfHttp.Worker.start_link(arg) - # {CfHttp.Worker, arg}, + FgHttpWeb.Endpoint + # Starts a worker by calling: FgHttp.Worker.start_link(arg) + # {FgHttp.Worker, arg}, ] # See https://hexdocs.pm/elixir/Supervisor.html # for other strategies and supported options - opts = [strategy: :one_for_one, name: CfHttp.Supervisor] + opts = [strategy: :one_for_one, name: FgHttp.Supervisor] Supervisor.start_link(children, opts) end # Tell Phoenix to update the endpoint configuration # whenever the application is updated. def config_change(changed, _new, removed) do - CfHttpWeb.Endpoint.config_change(changed, removed) + FgHttpWeb.Endpoint.config_change(changed, removed) :ok end end diff --git a/apps/cf_http/lib/cf_http/devices.ex b/apps/fg_http/lib/fg_http/devices.ex similarity index 95% rename from apps/cf_http/lib/cf_http/devices.ex rename to apps/fg_http/lib/fg_http/devices.ex index ea94bf1e4..ddec2ef0b 100644 --- a/apps/cf_http/lib/cf_http/devices.ex +++ b/apps/fg_http/lib/fg_http/devices.ex @@ -1,12 +1,12 @@ -defmodule CfHttp.Devices do +defmodule FgHttp.Devices do @moduledoc """ The Devices context. """ import Ecto.Query, warn: false - alias CfHttp.Repo + alias FgHttp.Repo - alias CfHttp.Devices.Device + alias FgHttp.Devices.Device @doc """ Returns the list of devices. diff --git a/apps/cf_http/lib/cf_http/devices/device.ex b/apps/fg_http/lib/fg_http/devices/device.ex similarity index 84% rename from apps/cf_http/lib/cf_http/devices/device.ex rename to apps/fg_http/lib/fg_http/devices/device.ex index b83740905..e37f4d936 100644 --- a/apps/cf_http/lib/cf_http/devices/device.ex +++ b/apps/fg_http/lib/fg_http/devices/device.ex @@ -1,4 +1,4 @@ -defmodule CfHttp.Devices.Device do +defmodule FgHttp.Devices.Device do @moduledoc """ Manages Device things """ @@ -12,7 +12,7 @@ defmodule CfHttp.Devices.Device do field :verified_at, :utc_datetime field :user_id, :id - has_many :rules, CfHttp.Rules.Rule + has_many :rules, FgHttp.Rules.Rule timestamps() end diff --git a/apps/cf_http/lib/cf_http/release.ex b/apps/fg_http/lib/fg_http/release.ex similarity index 91% rename from apps/cf_http/lib/cf_http/release.ex rename to apps/fg_http/lib/fg_http/release.ex index d2ce12e3c..ba59249e5 100644 --- a/apps/cf_http/lib/cf_http/release.ex +++ b/apps/fg_http/lib/fg_http/release.ex @@ -1,9 +1,9 @@ -defmodule CfHttp.Release do +defmodule FgHttp.Release do @moduledoc """ Configures the Mix Release or something """ - @app :cf_http + @app :fg_http def migrate do load_app() diff --git a/apps/cf_http/lib/cf_http/repo.ex b/apps/fg_http/lib/fg_http/repo.ex similarity index 54% rename from apps/cf_http/lib/cf_http/repo.ex rename to apps/fg_http/lib/fg_http/repo.ex index 6a0a4ca9b..8e42d8dbe 100644 --- a/apps/cf_http/lib/cf_http/repo.ex +++ b/apps/fg_http/lib/fg_http/repo.ex @@ -1,5 +1,5 @@ -defmodule CfHttp.Repo do +defmodule FgHttp.Repo do use Ecto.Repo, - otp_app: :cf_http, + otp_app: :fg_http, adapter: Ecto.Adapters.Postgres end diff --git a/apps/cf_http/lib/cf_http/rules.ex b/apps/fg_http/lib/fg_http/rules.ex similarity index 95% rename from apps/cf_http/lib/cf_http/rules.ex rename to apps/fg_http/lib/fg_http/rules.ex index 6696f0776..362479eca 100644 --- a/apps/cf_http/lib/cf_http/rules.ex +++ b/apps/fg_http/lib/fg_http/rules.ex @@ -1,12 +1,12 @@ -defmodule CfHttp.Rules do +defmodule FgHttp.Rules do @moduledoc """ The Rules context. """ import Ecto.Query, warn: false - alias CfHttp.Repo + alias FgHttp.Repo - alias CfHttp.Rules.Rule + alias FgHttp.Rules.Rule @doc """ Returns the list of rules. diff --git a/apps/cf_http/lib/cf_http/rules/rule.ex b/apps/fg_http/lib/fg_http/rules/rule.ex similarity index 86% rename from apps/cf_http/lib/cf_http/rules/rule.ex rename to apps/fg_http/lib/fg_http/rules/rule.ex index 254512913..89597b348 100644 --- a/apps/cf_http/lib/cf_http/rules/rule.ex +++ b/apps/fg_http/lib/fg_http/rules/rule.ex @@ -1,4 +1,4 @@ -defmodule CfHttp.Rules.Rule do +defmodule FgHttp.Rules.Rule do @moduledoc """ Not really sure what to write here. I'll update this later. """ @@ -12,7 +12,7 @@ defmodule CfHttp.Rules.Rule do field :port, :string field :protocol, :string - belongs_to :device, CfHttp.Devices.Device + belongs_to :device, FgHttp.Devices.Device timestamps() end diff --git a/apps/cf_http/lib/cf_http/sessions.ex b/apps/fg_http/lib/fg_http/sessions.ex similarity index 95% rename from apps/cf_http/lib/cf_http/sessions.ex rename to apps/fg_http/lib/fg_http/sessions.ex index ae2e9ce8e..9f28bebc2 100644 --- a/apps/cf_http/lib/cf_http/sessions.ex +++ b/apps/fg_http/lib/fg_http/sessions.ex @@ -1,12 +1,12 @@ -defmodule CfHttp.Sessions do +defmodule FgHttp.Sessions do @moduledoc """ The Sessions context. """ import Ecto.Query, warn: false - alias CfHttp.Repo + alias FgHttp.Repo - alias CfHttp.Sessions.Session + alias FgHttp.Sessions.Session @doc """ Returns the list of sessions. diff --git a/apps/cf_http/lib/cf_http/sessions/session.ex b/apps/fg_http/lib/fg_http/sessions/session.ex similarity index 88% rename from apps/cf_http/lib/cf_http/sessions/session.ex rename to apps/fg_http/lib/fg_http/sessions/session.ex index 30b1a7842..e9f2174a1 100644 --- a/apps/cf_http/lib/cf_http/sessions/session.ex +++ b/apps/fg_http/lib/fg_http/sessions/session.ex @@ -1,4 +1,4 @@ -defmodule CfHttp.Sessions.Session do +defmodule FgHttp.Sessions.Session do @moduledoc """ Represents a Session """ diff --git a/apps/cf_http/lib/cf_http/users.ex b/apps/fg_http/lib/fg_http/users.ex similarity index 95% rename from apps/cf_http/lib/cf_http/users.ex rename to apps/fg_http/lib/fg_http/users.ex index 102f806dc..9c90b2f6b 100644 --- a/apps/cf_http/lib/cf_http/users.ex +++ b/apps/fg_http/lib/fg_http/users.ex @@ -1,12 +1,12 @@ -defmodule CfHttp.Users do +defmodule FgHttp.Users do @moduledoc """ The Users context. """ import Ecto.Query, warn: false - alias CfHttp.Repo + alias FgHttp.Repo - alias CfHttp.Users.User + alias FgHttp.Users.User @doc """ Returns the list of users. diff --git a/apps/cf_http/lib/cf_http/users/user.ex b/apps/fg_http/lib/fg_http/users/user.ex similarity index 94% rename from apps/cf_http/lib/cf_http/users/user.ex rename to apps/fg_http/lib/fg_http/users/user.ex index 5b34bc16d..5dbddfe94 100644 --- a/apps/cf_http/lib/cf_http/users/user.ex +++ b/apps/fg_http/lib/fg_http/users/user.ex @@ -1,4 +1,4 @@ -defmodule CfHttp.Users.User do +defmodule FgHttp.Users.User do @moduledoc """ Represents a User I guess """ diff --git a/apps/cf_http/lib/cf_http_web.ex b/apps/fg_http/lib/fg_http_web.ex similarity index 73% rename from apps/cf_http/lib/cf_http_web.ex rename to apps/fg_http/lib/fg_http_web.ex index ee2f7295d..e3d232526 100644 --- a/apps/cf_http/lib/cf_http_web.ex +++ b/apps/fg_http/lib/fg_http_web.ex @@ -1,12 +1,12 @@ -defmodule CfHttpWeb do +defmodule FgHttpWeb do @moduledoc """ The entrypoint for defining your web interface, such as controllers, views, channels and so on. This can be used in your application as: - use CfHttpWeb, :controller - use CfHttpWeb, :view + use FgHttpWeb, :controller + use FgHttpWeb, :view The definitions below will be executed for every view, controller, etc, so keep them short and clean, focused @@ -19,19 +19,19 @@ defmodule CfHttpWeb do def controller do quote do - use Phoenix.Controller, namespace: CfHttpWeb + use Phoenix.Controller, namespace: FgHttpWeb import Plug.Conn - import CfHttpWeb.Gettext - alias CfHttpWeb.Router.Helpers, as: Routes + import FgHttpWeb.Gettext + alias FgHttpWeb.Router.Helpers, as: Routes end end def view do quote do use Phoenix.View, - root: "lib/cf_http_web/templates", - namespace: CfHttpWeb + root: "lib/fg_http_web/templates", + namespace: FgHttpWeb # Import convenience functions from controllers import Phoenix.Controller, only: [get_flash: 1, get_flash: 2, view_module: 1] @@ -39,9 +39,9 @@ defmodule CfHttpWeb do # Use all HTML functionality (forms, tags, etc) use Phoenix.HTML - import CfHttpWeb.ErrorHelpers - import CfHttpWeb.Gettext - alias CfHttpWeb.Router.Helpers, as: Routes + import FgHttpWeb.ErrorHelpers + import FgHttpWeb.Gettext + alias FgHttpWeb.Router.Helpers, as: Routes end end @@ -56,7 +56,7 @@ defmodule CfHttpWeb do def channel do quote do use Phoenix.Channel - import CfHttpWeb.Gettext + import FgHttpWeb.Gettext end end diff --git a/apps/cf_http/lib/cf_http_web/channels/user_socket.ex b/apps/fg_http/lib/fg_http_web/channels/user_socket.ex similarity index 86% rename from apps/cf_http/lib/cf_http_web/channels/user_socket.ex rename to apps/fg_http/lib/fg_http_web/channels/user_socket.ex index b71ba25ed..99ad60988 100644 --- a/apps/cf_http/lib/cf_http_web/channels/user_socket.ex +++ b/apps/fg_http/lib/fg_http_web/channels/user_socket.ex @@ -1,8 +1,8 @@ -defmodule CfHttpWeb.UserSocket do +defmodule FgHttpWeb.UserSocket do use Phoenix.Socket ## Channels - # channel "room:*", CfHttpWeb.RoomChannel + # channel "room:*", FgHttpWeb.RoomChannel # Socket params are passed from the client and can # be used to verify and authenticate a user. After @@ -26,7 +26,7 @@ defmodule CfHttpWeb.UserSocket do # Would allow you to broadcast a "disconnect" event and terminate # all active sockets and channels for a given user: # - # CfHttpWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{}) + # FgHttpWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{}) # # Returning `nil` makes this socket anonymous. def id(_socket), do: nil diff --git a/apps/cf_http/lib/cf_http_web/controllers/device_controller.ex b/apps/fg_http/lib/fg_http_web/controllers/device_controller.ex similarity index 90% rename from apps/cf_http/lib/cf_http_web/controllers/device_controller.ex rename to apps/fg_http/lib/fg_http_web/controllers/device_controller.ex index 28ed56f17..3763e3444 100644 --- a/apps/cf_http/lib/cf_http_web/controllers/device_controller.ex +++ b/apps/fg_http/lib/fg_http_web/controllers/device_controller.ex @@ -1,12 +1,12 @@ -defmodule CfHttpWeb.DeviceController do +defmodule FgHttpWeb.DeviceController do @moduledoc """ Implements the CRUD for a Device """ - use CfHttpWeb, :controller - alias CfHttp.{Devices, Devices.Device} + use FgHttpWeb, :controller + alias FgHttp.{Devices, Devices.Device} - plug CfHttpWeb.Plugs.Authenticator + plug FgHttpWeb.Plugs.Authenticator def index(conn, _params) do devices = Devices.list_devices() diff --git a/apps/cf_http/lib/cf_http_web/controllers/rule_controller.ex b/apps/fg_http/lib/fg_http_web/controllers/rule_controller.ex similarity index 92% rename from apps/cf_http/lib/cf_http_web/controllers/rule_controller.ex rename to apps/fg_http/lib/fg_http_web/controllers/rule_controller.ex index 0cdd740a7..129ebfb0b 100644 --- a/apps/cf_http/lib/cf_http_web/controllers/rule_controller.ex +++ b/apps/fg_http/lib/fg_http_web/controllers/rule_controller.ex @@ -1,12 +1,12 @@ -defmodule CfHttpWeb.RuleController do +defmodule FgHttpWeb.RuleController do @moduledoc """ Controller logic for Rules """ - use CfHttpWeb, :controller - alias CfHttp.{Devices, Rules, Rules.Rule} + use FgHttpWeb, :controller + alias FgHttp.{Devices, Rules, Rules.Rule} - plug CfHttpWeb.Plugs.Authenticator + plug FgHttpWeb.Plugs.Authenticator def index(conn, %{"device_id" => device_id}) do device = Devices.get_device!(device_id) diff --git a/apps/cf_http/lib/cf_http_web/controllers/session_controller.ex b/apps/fg_http/lib/fg_http_web/controllers/session_controller.ex similarity index 87% rename from apps/cf_http/lib/cf_http_web/controllers/session_controller.ex rename to apps/fg_http/lib/fg_http_web/controllers/session_controller.ex index 594b3ca26..8ba0f8c29 100644 --- a/apps/cf_http/lib/cf_http_web/controllers/session_controller.ex +++ b/apps/fg_http/lib/fg_http_web/controllers/session_controller.ex @@ -1,13 +1,13 @@ -defmodule CfHttpWeb.SessionController do +defmodule FgHttpWeb.SessionController do @moduledoc """ Implements the CRUD for a Session """ - use CfHttpWeb, :controller - alias CfHttp.{Repo, Users.User, Sessions, Sessions.Session} + use FgHttpWeb, :controller + alias FgHttp.{Repo, Users.User, Sessions, Sessions.Session} plug :redirect_authenticated when action in [:new] - plug CfHttpWeb.Plugs.Authenticator when action in [:delete] + plug FgHttpWeb.Plugs.Authenticator when action in [:delete] # GET /sessions/new def new(conn, _params) do diff --git a/apps/cf_http/lib/cf_http_web/controllers/user_controller.ex b/apps/fg_http/lib/fg_http_web/controllers/user_controller.ex similarity index 91% rename from apps/cf_http/lib/cf_http_web/controllers/user_controller.ex rename to apps/fg_http/lib/fg_http_web/controllers/user_controller.ex index 0baf01dc3..7609bb031 100644 --- a/apps/cf_http/lib/cf_http_web/controllers/user_controller.ex +++ b/apps/fg_http/lib/fg_http_web/controllers/user_controller.ex @@ -1,12 +1,12 @@ -defmodule CfHttpWeb.UserController do +defmodule FgHttpWeb.UserController do @moduledoc """ Implements the CRUD for a User """ - use CfHttpWeb, :controller - alias CfHttp.{Repo, Users, Users.User} + use FgHttpWeb, :controller + alias FgHttp.{Repo, Users, Users.User} - plug CfHttpWeb.Plugs.Authenticator when action in [:show, :edit, :update, :delete] + plug FgHttpWeb.Plugs.Authenticator when action in [:show, :edit, :update, :delete] # GET /users/new def new(conn, _params) do diff --git a/apps/cf_http/lib/cf_http_web/endpoint.ex b/apps/fg_http/lib/fg_http_web/endpoint.ex similarity index 86% rename from apps/cf_http/lib/cf_http_web/endpoint.ex rename to apps/fg_http/lib/fg_http_web/endpoint.ex index 5ca3abb51..c1efa255e 100644 --- a/apps/cf_http/lib/cf_http_web/endpoint.ex +++ b/apps/fg_http/lib/fg_http_web/endpoint.ex @@ -1,16 +1,16 @@ -defmodule CfHttpWeb.Endpoint do - use Phoenix.Endpoint, otp_app: :cf_http +defmodule FgHttpWeb.Endpoint do + use Phoenix.Endpoint, otp_app: :fg_http # 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: "_cf_http_key", + key: "_fg_http_key", signing_salt: "Z9eq8iof" ] - socket "/socket", CfHttpWeb.UserSocket, + socket "/socket", FgHttpWeb.UserSocket, websocket: true, longpoll: false @@ -20,7 +20,7 @@ defmodule CfHttpWeb.Endpoint do # when deploying your static files in production. plug Plug.Static, at: "/", - from: :cf_http, + from: :fg_http, gzip: false, only: ~w(css fonts images js favicon.ico robots.txt) @@ -43,5 +43,5 @@ defmodule CfHttpWeb.Endpoint do plug Plug.MethodOverride plug Plug.Head plug Plug.Session, @session_options - plug CfHttpWeb.Router + plug FgHttpWeb.Router end diff --git a/apps/cf_http/lib/cf_http_web/gettext.ex b/apps/fg_http/lib/fg_http_web/gettext.ex similarity index 86% rename from apps/cf_http/lib/cf_http_web/gettext.ex rename to apps/fg_http/lib/fg_http_web/gettext.ex index dd22e2732..7887d147c 100644 --- a/apps/cf_http/lib/cf_http_web/gettext.ex +++ b/apps/fg_http/lib/fg_http_web/gettext.ex @@ -1,11 +1,11 @@ -defmodule CfHttpWeb.Gettext do +defmodule FgHttpWeb.Gettext do @moduledoc """ A module providing Internationalization with a gettext-based API. By using [Gettext](https://hexdocs.pm/gettext), your module gains a set of macros for translations, for example: - import CfHttpWeb.Gettext + import FgHttpWeb.Gettext # Simple translation gettext("Here is the string to translate") @@ -20,5 +20,5 @@ defmodule CfHttpWeb.Gettext do See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage. """ - use Gettext, otp_app: :cf_http + use Gettext, otp_app: :fg_http end diff --git a/apps/cf_http/lib/cf_http_web/plugs/authenticator.ex b/apps/fg_http/lib/fg_http_web/plugs/authenticator.ex similarity index 78% rename from apps/cf_http/lib/cf_http_web/plugs/authenticator.ex rename to apps/fg_http/lib/fg_http_web/plugs/authenticator.ex index 194cfa50b..005f6dba4 100644 --- a/apps/cf_http/lib/cf_http_web/plugs/authenticator.ex +++ b/apps/fg_http/lib/fg_http_web/plugs/authenticator.ex @@ -1,10 +1,10 @@ -defmodule CfHttpWeb.Plugs.Authenticator do +defmodule FgHttpWeb.Plugs.Authenticator do @moduledoc """ Loads the user's session from cookie """ import Plug.Conn - alias CfHttp.Users.User + alias FgHttp.Users.User def init(default), do: default diff --git a/apps/cf_http/lib/cf_http_web/router.ex b/apps/fg_http/lib/fg_http_web/router.ex similarity index 88% rename from apps/cf_http/lib/cf_http_web/router.ex rename to apps/fg_http/lib/fg_http_web/router.ex index 5e6cea2e9..038e4f383 100644 --- a/apps/cf_http/lib/cf_http_web/router.ex +++ b/apps/fg_http/lib/fg_http_web/router.ex @@ -1,9 +1,9 @@ -defmodule CfHttpWeb.Router do +defmodule FgHttpWeb.Router do @moduledoc """ Main Application Router """ - use CfHttpWeb, :router + use FgHttpWeb, :router pipeline :browser do plug :accepts, ["html"] @@ -17,7 +17,7 @@ defmodule CfHttpWeb.Router do plug :accepts, ["json"] end - scope "/", CfHttpWeb do + scope "/", FgHttpWeb do pipe_through :browser resources "/user", UserController, singleton: true, only: [:show, :edit, :update, :delete] @@ -35,7 +35,7 @@ defmodule CfHttpWeb.Router do end # Other scopes may use custom stacks. - # scope "/api", CfHttpWeb do + # scope "/api", FgHttpWeb do # pipe_through :api # end end diff --git a/apps/cf_http/lib/cf_http_web/templates/device/edit.html.eex b/apps/fg_http/lib/fg_http_web/templates/device/edit.html.eex similarity index 100% rename from apps/cf_http/lib/cf_http_web/templates/device/edit.html.eex rename to apps/fg_http/lib/fg_http_web/templates/device/edit.html.eex diff --git a/apps/cf_http/lib/cf_http_web/templates/device/form.html.eex b/apps/fg_http/lib/fg_http_web/templates/device/form.html.eex similarity index 100% rename from apps/cf_http/lib/cf_http_web/templates/device/form.html.eex rename to apps/fg_http/lib/fg_http_web/templates/device/form.html.eex diff --git a/apps/cf_http/lib/cf_http_web/templates/device/index.html.eex b/apps/fg_http/lib/fg_http_web/templates/device/index.html.eex similarity index 100% rename from apps/cf_http/lib/cf_http_web/templates/device/index.html.eex rename to apps/fg_http/lib/fg_http_web/templates/device/index.html.eex diff --git a/apps/cf_http/lib/cf_http_web/templates/device/new.html.eex b/apps/fg_http/lib/fg_http_web/templates/device/new.html.eex similarity index 100% rename from apps/cf_http/lib/cf_http_web/templates/device/new.html.eex rename to apps/fg_http/lib/fg_http_web/templates/device/new.html.eex diff --git a/apps/cf_http/lib/cf_http_web/templates/device/show.html.eex b/apps/fg_http/lib/fg_http_web/templates/device/show.html.eex similarity index 100% rename from apps/cf_http/lib/cf_http_web/templates/device/show.html.eex rename to apps/fg_http/lib/fg_http_web/templates/device/show.html.eex diff --git a/apps/cf_http/lib/cf_http_web/templates/layout/app.html.eex b/apps/fg_http/lib/fg_http_web/templates/layout/app.html.eex similarity index 93% rename from apps/cf_http/lib/cf_http_web/templates/layout/app.html.eex rename to apps/fg_http/lib/fg_http_web/templates/layout/app.html.eex index 79a1244b8..4a81f1000 100644 --- a/apps/cf_http/lib/cf_http_web/templates/layout/app.html.eex +++ b/apps/fg_http/lib/fg_http_web/templates/layout/app.html.eex @@ -12,7 +12,7 @@