Browse Source

renamed project

danilo silva 3 years ago
parent
commit
f7a5054de7
44 changed files with 152 additions and 152 deletions
  1. 1 1
      Dockerfile
  2. 6 6
      config/config.exs
  3. 6 6
      config/dev.exs
  4. 4 4
      config/prod.exs
  5. 1 1
      config/releases.exs
  6. 3 3
      config/test.exs
  7. 3 3
      lib/openpod.ex
  8. 8 8
      lib/openpod/application.ex
  9. 4 4
      lib/openpod/boundary/archive_server.ex
  10. 4 4
      lib/openpod/provider/archive/parser.ex
  11. 1 1
      lib/openpod/utility/format.ex
  12. 12 12
      lib/openpod_web.ex
  13. 3 3
      lib/openpod_web/channels/user_socket.ex
  14. 3 3
      lib/openpod_web/controllers/feed_controller.ex
  15. 7 0
      lib/openpod_web/controllers/page_controller.ex
  16. 7 7
      lib/openpod_web/endpoint.ex
  17. 3 3
      lib/openpod_web/gettext.ex
  18. 5 5
      lib/openpod_web/router.ex
  19. 7 7
      lib/openpod_web/telemetry.ex
  20. 1 1
      lib/openpod_web/templates/feed/feed.xml.eex
  21. 1 1
      lib/openpod_web/templates/layout/app.html.eex
  22. 0 0
      lib/openpod_web/templates/page/index.html.eex
  23. 3 3
      lib/openpod_web/views/error_helpers.ex
  24. 2 2
      lib/openpod_web/views/error_view.ex
  25. 2 2
      lib/openpod_web/views/feed_view.ex
  26. 3 0
      lib/openpod_web/views/layout_view.ex
  27. 3 0
      lib/openpod_web/views/page_view.ex
  28. 0 7
      lib/podcast_feed_web/controllers/page_controller.ex
  29. 0 3
      lib/podcast_feed_web/views/layout_view.ex
  30. 0 3
      lib/podcast_feed_web/views/page_view.ex
  31. 3 3
      mix.exs
  32. 1 1
      priv/repo/seeds.exs
  33. 2 2
      test/openpod/provider/archive/parser_test.exs
  34. 2 2
      test/openpod/utility/format_test.exs
  35. 2 2
      test/openpod_web/controllers/page_controller_test.exs
  36. 14 0
      test/openpod_web/views/error_view_test.exs
  37. 2 2
      test/openpod_web/views/layout_view_test.exs
  38. 3 0
      test/openpod_web/views/page_view_test.exs
  39. 0 14
      test/podcast_feed_web/views/error_view_test.exs
  40. 0 3
      test/podcast_feed_web/views/page_view_test.exs
  41. 6 6
      test/support/channel_case.ex
  42. 7 7
      test/support/conn_case.ex
  43. 6 6
      test/support/data_case.ex
  44. 1 1
      test/test_helper.exs

+ 1 - 1
Dockerfile

@@ -55,4 +55,4 @@ RUN chown -R app: ./prod
 USER app
 USER app
 
 
 # Run the Phoenix app
 # Run the Phoenix app
-CMD ["./prod/rel/podcast_feed/bin/podcast_feed", "start"]
+CMD ["./prod/rel/openpod/bin/openpod", "start"]

+ 6 - 6
config/config.exs

@@ -7,18 +7,18 @@
 # General application configuration
 # General application configuration
 use Mix.Config
 use Mix.Config
 
 
-config :podcast_feed,
-  ecto_repos: [PodcastFeed.Repo]
+config :openpod,
+  ecto_repos: [Openpod.Repo]
 
 
 # Configures the endpoint
 # Configures the endpoint
-config :podcast_feed, PodcastFeedWeb.Endpoint,
+config :openpod, OpenpodWeb.Endpoint,
   url: [host: "localhost"],
   url: [host: "localhost"],
   secret_key_base: "SWl0xVj8AVXoc2G0eUk6VfeOd/lppjkaKbiHWs4ucxAUJ8+wzAEa4bMo0ZVjtVVk",
   secret_key_base: "SWl0xVj8AVXoc2G0eUk6VfeOd/lppjkaKbiHWs4ucxAUJ8+wzAEa4bMo0ZVjtVVk",
-  render_errors: [view: PodcastFeedWeb.ErrorView, accepts: ~w(html json), layout: false],
-  pubsub_server: PodcastFeed.PubSub,
+  render_errors: [view: OpenpodWeb.ErrorView, accepts: ~w(html json), layout: false],
+  pubsub_server: Openpod.PubSub,
   live_view: [signing_salt: "6jHv46Xw"]
   live_view: [signing_salt: "6jHv46Xw"]
 
 
-config :podcast_feed,
+config :openpod,
   cache_duration: :timer.hours(24)
   cache_duration: :timer.hours(24)
 
 
 # Configures Elixir's Logger
 # Configures Elixir's Logger

+ 6 - 6
config/dev.exs

@@ -1,10 +1,10 @@
 use Mix.Config
 use Mix.Config
 
 
 # Configure your database
 # Configure your database
-config :podcast_feed, PodcastFeed.Repo,
+config :openpod, Openpod.Repo,
   username: "postgres",
   username: "postgres",
   password: "postgres",
   password: "postgres",
-  database: "podcast_feed_dev",
+  database: "openpod_dev",
   hostname: "localhost",
   hostname: "localhost",
   show_sensitive_data_on_connection_error: true,
   show_sensitive_data_on_connection_error: true,
   pool_size: 10
   pool_size: 10
@@ -15,7 +15,7 @@ config :podcast_feed, PodcastFeed.Repo,
 # The watchers configuration can be used to run external
 # The watchers configuration can be used to run external
 # watchers to your application. For example, we use it
 # watchers to your application. For example, we use it
 # with webpack to recompile .js and .css sources.
 # with webpack to recompile .js and .css sources.
-config :podcast_feed, PodcastFeedWeb.Endpoint,
+config :openpod, OpenpodWeb.Endpoint,
   http: [port: 5000],
   http: [port: 5000],
   debug_errors: true,
   debug_errors: true,
   code_reloader: true,
   code_reloader: true,
@@ -55,13 +55,13 @@ config :podcast_feed, PodcastFeedWeb.Endpoint,
 # different ports.
 # different ports.
 
 
 # Watch static and templates for browser reloading.
 # Watch static and templates for browser reloading.
-config :podcast_feed, PodcastFeedWeb.Endpoint,
+config :openpod, OpenpodWeb.Endpoint,
   live_reload: [
   live_reload: [
     patterns: [
     patterns: [
       ~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
       ~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
       ~r"priv/gettext/.*(po)$",
       ~r"priv/gettext/.*(po)$",
-      ~r"lib/podcast_feed_web/(live|views)/.*(ex)$",
-      ~r"lib/podcast_feed_web/templates/.*(eex)$"
+      ~r"lib/openpod_web/(live|views)/.*(ex)$",
+      ~r"lib/openpod_web/templates/.*(eex)$"
     ]
     ]
   ]
   ]
 
 

+ 4 - 4
config/prod.exs

@@ -9,7 +9,7 @@ use Mix.Config
 # manifest is generated by the `mix phx.digest` task,
 # manifest is generated by the `mix phx.digest` task,
 # which you should run after static files are built and
 # which you should run after static files are built and
 # before starting your production server.
 # before starting your production server.
-config :podcast_feed, PodcastFeedWeb.Endpoint,
+config :openpod, OpenpodWeb.Endpoint,
   load_from_system_env: true,
   load_from_system_env: true,
   url: [scheme: "https", host: "other-unwilling-barasinga.gigalixirapp.com", port: 443],
   url: [scheme: "https", host: "other-unwilling-barasinga.gigalixirapp.com", port: 443],
   http: [port: {:system, "PORT"}],
   http: [port: {:system, "PORT"}],
@@ -19,7 +19,7 @@ config :podcast_feed, PodcastFeedWeb.Endpoint,
   version: Application.spec(:phoenix_distillery, :vsn)
   version: Application.spec(:phoenix_distillery, :vsn)
   # force_ssl: [rewrite_on: [:x_forwarded_proto]]
   # force_ssl: [rewrite_on: [:x_forwarded_proto]]
 
 
-config :podcast_feed,
+config :openpod,
   cache_duration: :timer.hours(24)
   cache_duration: :timer.hours(24)
 
 
 # Do not print debug messages in production
 # Do not print debug messages in production
@@ -30,7 +30,7 @@ config :logger, level: :info
 # To get SSL working, you will need to add the `https` key
 # To get SSL working, you will need to add the `https` key
 # to the previous section and set your `:url` port to 443:
 # to the previous section and set your `:url` port to 443:
 #
 #
-#     config :podcast_feed, PodcastFeedWeb.Endpoint,
+#     config :openpod, OpenpodWeb.Endpoint,
 #       ...
 #       ...
 #       url: [host: "example.com", port: 443],
 #       url: [host: "example.com", port: 443],
 #       https: [
 #       https: [
@@ -54,7 +54,7 @@ config :logger, level: :info
 # We also recommend setting `force_ssl` in your endpoint, ensuring
 # We also recommend setting `force_ssl` in your endpoint, ensuring
 # no data is ever sent via http, always redirecting to https:
 # no data is ever sent via http, always redirecting to https:
 #
 #
-#     config :podcast_feed, PodcastFeedWeb.Endpoint,
+#     config :openpod, OpenpodWeb.Endpoint,
 #       force_ssl: [hsts: true]
 #       force_ssl: [hsts: true]
 #
 #
 # Check `Plug.SSL` for all available options in `force_ssl`.
 # Check `Plug.SSL` for all available options in `force_ssl`.

+ 1 - 1
config/releases.exs

@@ -4,7 +4,7 @@ secret_key_base = System.fetch_env!("SECRET_KEY_BASE")
 application_port = System.fetch_env!("APP_PORT")
 application_port = System.fetch_env!("APP_PORT")
 application_host = System.fetch_env!("APP_HOST")
 application_host = System.fetch_env!("APP_HOST")
 
 
-config :podcast_feed, PodcastFeedWeb.Endpoint,
+config :openpod, OpenpodWeb.Endpoint,
   url: [scheme: "http", host: application_host, port: String.to_integer(application_port)],
   url: [scheme: "http", host: application_host, port: String.to_integer(application_port)],
   http: [:inet6, port: String.to_integer(application_port)],
   http: [:inet6, port: String.to_integer(application_port)],
   secret_key_base: secret_key_base
   secret_key_base: secret_key_base

+ 3 - 3
config/test.exs

@@ -5,16 +5,16 @@ use Mix.Config
 # The MIX_TEST_PARTITION environment variable can be used
 # The MIX_TEST_PARTITION environment variable can be used
 # to provide built-in test partitioning in CI environment.
 # to provide built-in test partitioning in CI environment.
 # Run `mix help test` for more information.
 # Run `mix help test` for more information.
-# config :podcast_feed, PodcastFeed.Repo,
+# config :openpod, Openpod.Repo,
 #   username: "postgres",
 #   username: "postgres",
 #   password: "postgres",
 #   password: "postgres",
-#   database: "podcast_feed_test#{System.get_env("MIX_TEST_PARTITION")}",
+#   database: "openpod_test#{System.get_env("MIX_TEST_PARTITION")}",
 #   hostname: "localhost",
 #   hostname: "localhost",
 #   pool: Ecto.Adapters.SQL.Sandbox
 #   pool: Ecto.Adapters.SQL.Sandbox
 
 
 # We don't run a server during test. If one is required,
 # We don't run a server during test. If one is required,
 # you can enable the server option below.
 # you can enable the server option below.
-config :podcast_feed, PodcastFeedWeb.Endpoint,
+config :openpod, OpenpodWeb.Endpoint,
   http: [port: 4002],
   http: [port: 4002],
   server: false
   server: false
 
 

+ 3 - 3
lib/podcast_feed.ex → lib/openpod.ex

@@ -1,12 +1,12 @@
-defmodule PodcastFeed do
+defmodule Openpod do
   @moduledoc """
   @moduledoc """
-  PodcastFeed keeps the contexts that define your domain
+  Openpod keeps the contexts that define your domain
   and business logic.
   and business logic.
 
 
   Contexts are also responsible for managing your data, regardless
   Contexts are also responsible for managing your data, regardless
   if it comes from the database, an external API or others.
   if it comes from the database, an external API or others.
   """
   """
-  alias PodcastFeed.Provider.Archive
+  alias Openpod.Provider.Archive
 
 
   def archive(identifier) do
   def archive(identifier) do
     Archive.Parser.by_identifier(identifier)
     Archive.Parser.by_identifier(identifier)

+ 8 - 8
lib/podcast_feed/application.ex → lib/openpod/application.ex

@@ -1,4 +1,4 @@
-defmodule PodcastFeed.Application do
+defmodule Openpod.Application do
   # See https://hexdocs.pm/elixir/Application.html
   # See https://hexdocs.pm/elixir/Application.html
   # for more information on OTP Applications
   # for more information on OTP Applications
   @moduledoc false
   @moduledoc false
@@ -15,25 +15,25 @@ defmodule PodcastFeed.Application do
       # Start the dynamic supervisor in order to dynamically start podcast cache
       # Start the dynamic supervisor in order to dynamically start podcast cache
       {DynamicSupervisor, [name: @archive_supervisor, strategy: :one_for_one]},
       {DynamicSupervisor, [name: @archive_supervisor, strategy: :one_for_one]},
       # Start the Telemetry supervisor
       # Start the Telemetry supervisor
-      PodcastFeedWeb.Telemetry,
+      OpenpodWeb.Telemetry,
       # Start the PubSub system
       # Start the PubSub system
-      {Phoenix.PubSub, name: PodcastFeed.PubSub},
+      {Phoenix.PubSub, name: Openpod.PubSub},
       # Start the Endpoint (http/https)
       # Start the Endpoint (http/https)
-      PodcastFeedWeb.Endpoint
-      # Start a worker by calling: PodcastFeed.Worker.start_link(arg)
-      # {PodcastFeed.Worker, arg}
+      OpenpodWeb.Endpoint
+      # Start a worker by calling: Openpod.Worker.start_link(arg)
+      # {Openpod.Worker, arg}
     ]
     ]
 
 
     # See https://hexdocs.pm/elixir/Supervisor.html
     # See https://hexdocs.pm/elixir/Supervisor.html
     # for other strategies and supported options
     # for other strategies and supported options
-    opts = [strategy: :one_for_one, name: PodcastFeed.Supervisor]
+    opts = [strategy: :one_for_one, name: Openpod.Supervisor]
     Supervisor.start_link(children, opts)
     Supervisor.start_link(children, opts)
   end
   end
 
 
   # Tell Phoenix to update the endpoint configuration
   # Tell Phoenix to update the endpoint configuration
   # whenever the application is updated.
   # whenever the application is updated.
   def config_change(changed, _new, removed) do
   def config_change(changed, _new, removed) do
-    PodcastFeedWeb.Endpoint.config_change(changed, removed)
+    OpenpodWeb.Endpoint.config_change(changed, removed)
     :ok
     :ok
   end
   end
 end
 end

+ 4 - 4
lib/podcast_feed/boundary/archive_server.ex → lib/openpod/boundary/archive_server.ex

@@ -1,10 +1,10 @@
-defmodule PodcastFeed.Boundary.ArchiveServer do
+defmodule Openpod.Boundary.ArchiveServer do
   @moduledoc false
   @moduledoc false
 
 
   use GenServer, restart: :temporary
   use GenServer, restart: :temporary
   require Logger
   require Logger
-  alias PodcastFeed
-  alias PodcastFeed.Provider.Archive
+  alias Openpod
+  alias Openpod.Provider.Archive
 
 
   @registry :podcast_registry
   @registry :podcast_registry
   @archive_supervisor :archive_supervisor
   @archive_supervisor :archive_supervisor
@@ -44,7 +44,7 @@ defmodule PodcastFeed.Boundary.ArchiveServer do
 
 
   def handle_call(:get_feed, _from, feed) do
   def handle_call(:get_feed, _from, feed) do
     Logger.debug "retrieve cached feed data for #{feed[:identifier]}..."
     Logger.debug "retrieve cached feed data for #{feed[:identifier]}..."
-    {:reply, feed[:feed_data], feed, Application.fetch_env!(:podcast_feed, :cache_duration)}
+    {:reply, feed[:feed_data], feed, Application.fetch_env!(:openpod, :cache_duration)}
   end
   end
 
 
   def handle_call(:reload, _from, feed) do
   def handle_call(:reload, _from, feed) do

+ 4 - 4
lib/podcast_feed/provider/archive/parser.ex → lib/openpod/provider/archive/parser.ex

@@ -1,10 +1,10 @@
-defmodule PodcastFeed.Provider.Archive.Parser do
+defmodule Openpod.Provider.Archive.Parser do
   @moduledoc """
   @moduledoc """
   This module provides a public API for fetching data from archive.org and convert them
   This module provides a public API for fetching data from archive.org and convert them
   in a common podcast data structures.
   in a common podcast data structures.
   """
   """
 
 
-  alias PodcastFeed.Utility.Format
+  alias Openpod.Utility.Format
   alias __MODULE__
   alias __MODULE__
 
 
   @archive_metadata_url "http://archive.org/metadata/{identifier}"
   @archive_metadata_url "http://archive.org/metadata/{identifier}"
@@ -29,10 +29,10 @@ defmodule PodcastFeed.Provider.Archive.Parser do
   def by_identifier(identifier) do
   def by_identifier(identifier) do
     %Parser{identifier: identifier}
     %Parser{identifier: identifier}
     |> enrich_with_archive_metadata()
     |> enrich_with_archive_metadata()
-    |> to_podcast_feed_data()
+    |> to_openpod_data()
   end
   end
 
 
-  def to_podcast_feed_data(token) do
+  def to_openpod_data(token) do
     %{
     %{
       podcast: podcast_data(token),
       podcast: podcast_data(token),
       items: items_data(token)
       items: items_data(token)

+ 1 - 1
lib/podcast_feed/utility/format.ex → lib/openpod/utility/format.ex

@@ -1,4 +1,4 @@
-defmodule PodcastFeed.Utility.Format do
+defmodule Openpod.Utility.Format do
   @moduledoc """
   @moduledoc """
   This module provides utility to format a string
   This module provides utility to format a string
   """
   """

+ 12 - 12
lib/podcast_feed_web.ex → lib/openpod_web.ex

@@ -1,12 +1,12 @@
-defmodule PodcastFeedWeb do
+defmodule OpenpodWeb do
   @moduledoc """
   @moduledoc """
   The entrypoint for defining your web interface, such
   The entrypoint for defining your web interface, such
   as controllers, views, channels and so on.
   as controllers, views, channels and so on.
 
 
   This can be used in your application as:
   This can be used in your application as:
 
 
-      use PodcastFeedWeb, :controller
-      use PodcastFeedWeb, :view
+      use OpenpodWeb, :controller
+      use OpenpodWeb, :view
 
 
   The definitions below will be executed for every view,
   The definitions below will be executed for every view,
   controller, etc, so keep them short and clean, focused
   controller, etc, so keep them short and clean, focused
@@ -19,19 +19,19 @@ defmodule PodcastFeedWeb do
 
 
   def controller do
   def controller do
     quote do
     quote do
-      use Phoenix.Controller, namespace: PodcastFeedWeb
+      use Phoenix.Controller, namespace: OpenpodWeb
 
 
       import Plug.Conn
       import Plug.Conn
-      import PodcastFeedWeb.Gettext
-      alias PodcastFeedWeb.Router.Helpers, as: Routes
+      import OpenpodWeb.Gettext
+      alias OpenpodWeb.Router.Helpers, as: Routes
     end
     end
   end
   end
 
 
   def view do
   def view do
     quote do
     quote do
       use Phoenix.View,
       use Phoenix.View,
-        root: "lib/podcast_feed_web/templates",
-        namespace: PodcastFeedWeb
+        root: "lib/openpod_web/templates",
+        namespace: OpenpodWeb
 
 
       # Import convenience functions from controllers
       # Import convenience functions from controllers
       import Phoenix.Controller,
       import Phoenix.Controller,
@@ -54,7 +54,7 @@ defmodule PodcastFeedWeb do
   def channel do
   def channel do
     quote do
     quote do
       use Phoenix.Channel
       use Phoenix.Channel
-      import PodcastFeedWeb.Gettext
+      import OpenpodWeb.Gettext
     end
     end
   end
   end
 
 
@@ -66,9 +66,9 @@ defmodule PodcastFeedWeb do
       # Import basic rendering functionality (render, render_layout, etc)
       # Import basic rendering functionality (render, render_layout, etc)
       import Phoenix.View
       import Phoenix.View
 
 
-      import PodcastFeedWeb.ErrorHelpers
-      import PodcastFeedWeb.Gettext
-      alias PodcastFeedWeb.Router.Helpers, as: Routes
+      import OpenpodWeb.ErrorHelpers
+      import OpenpodWeb.Gettext
+      alias OpenpodWeb.Router.Helpers, as: Routes
     end
     end
   end
   end
 
 

+ 3 - 3
lib/podcast_feed_web/channels/user_socket.ex → lib/openpod_web/channels/user_socket.ex

@@ -1,8 +1,8 @@
-defmodule PodcastFeedWeb.UserSocket do
+defmodule OpenpodWeb.UserSocket do
   use Phoenix.Socket
   use Phoenix.Socket
 
 
   ## Channels
   ## Channels
-  # channel "room:*", PodcastFeedWeb.RoomChannel
+  # channel "room:*", OpenpodWeb.RoomChannel
 
 
   # Socket params are passed from the client and can
   # Socket params are passed from the client and can
   # be used to verify and authenticate a user. After
   # be used to verify and authenticate a user. After
@@ -27,7 +27,7 @@ defmodule PodcastFeedWeb.UserSocket do
   # Would allow you to broadcast a "disconnect" event and terminate
   # Would allow you to broadcast a "disconnect" event and terminate
   # all active sockets and channels for a given user:
   # all active sockets and channels for a given user:
   #
   #
-  #     PodcastFeedWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{})
+  #     OpenpodWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{})
   #
   #
   # Returning `nil` makes this socket anonymous.
   # Returning `nil` makes this socket anonymous.
   @impl true
   @impl true

+ 3 - 3
lib/podcast_feed_web/controllers/feed_controller.ex → lib/openpod_web/controllers/feed_controller.ex

@@ -1,6 +1,6 @@
-defmodule PodcastFeedWeb.FeedController do
-  use PodcastFeedWeb, :controller
-  alias PodcastFeed.Boundary.ArchiveServer
+defmodule OpenpodWeb.FeedController do
+  use OpenpodWeb, :controller
+  alias Openpod.Boundary.ArchiveServer
 
 
   def by_identifier(conn, %{"identifier" => identifier, "reload" => _}) do
   def by_identifier(conn, %{"identifier" => identifier, "reload" => _}) do
     do_by_identifier(conn, identifier, fn -> ArchiveServer.reload(identifier) end)
     do_by_identifier(conn, identifier, fn -> ArchiveServer.reload(identifier) end)

+ 7 - 0
lib/openpod_web/controllers/page_controller.ex

@@ -0,0 +1,7 @@
+defmodule OpenpodWeb.PageController do
+  use OpenpodWeb, :controller
+
+  def index(conn, _params) do
+    render(conn, "index.html")
+  end
+end

+ 7 - 7
lib/podcast_feed_web/endpoint.ex → lib/openpod_web/endpoint.ex

@@ -1,16 +1,16 @@
-defmodule PodcastFeedWeb.Endpoint do
-  use Phoenix.Endpoint, otp_app: :podcast_feed
+defmodule OpenpodWeb.Endpoint do
+  use Phoenix.Endpoint, otp_app: :openpod
 
 
   # The session will be stored in the cookie and signed,
   # The session will be stored in the cookie and signed,
   # this means its contents can be read but not tampered with.
   # this means its contents can be read but not tampered with.
   # Set :encryption_salt if you would also like to encrypt it.
   # Set :encryption_salt if you would also like to encrypt it.
   @session_options [
   @session_options [
     store: :cookie,
     store: :cookie,
-    key: "_podcast_feed_key",
+    key: "_openpod_key",
     signing_salt: "kxzln5AX"
     signing_salt: "kxzln5AX"
   ]
   ]
 
 
-  socket "/socket", PodcastFeedWeb.UserSocket,
+  socket "/socket", OpenpodWeb.UserSocket,
     websocket: true,
     websocket: true,
     longpoll: false
     longpoll: false
 
 
@@ -22,7 +22,7 @@ defmodule PodcastFeedWeb.Endpoint do
   # when deploying your static files in production.
   # when deploying your static files in production.
   plug Plug.Static,
   plug Plug.Static,
     at: "/",
     at: "/",
-    from: :podcast_feed,
+    from: :openpod,
     gzip: false,
     gzip: false,
     only: ~w(css fonts images js favicon.ico robots.txt)
     only: ~w(css fonts images js favicon.ico robots.txt)
 
 
@@ -32,7 +32,7 @@ defmodule PodcastFeedWeb.Endpoint do
     socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
     socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
     plug Phoenix.LiveReloader
     plug Phoenix.LiveReloader
     plug Phoenix.CodeReloader
     plug Phoenix.CodeReloader
-    # plug Phoenix.Ecto.CheckRepoStatus, otp_app: :podcast_feed
+    # plug Phoenix.Ecto.CheckRepoStatus, otp_app: :openpod
   end
   end
 
 
   plug Phoenix.LiveDashboard.RequestLogger,
   plug Phoenix.LiveDashboard.RequestLogger,
@@ -50,5 +50,5 @@ defmodule PodcastFeedWeb.Endpoint do
   plug Plug.MethodOverride
   plug Plug.MethodOverride
   plug Plug.Head
   plug Plug.Head
   plug Plug.Session, @session_options
   plug Plug.Session, @session_options
-  plug PodcastFeedWeb.Router
+  plug OpenpodWeb.Router
 end
 end

+ 3 - 3
lib/podcast_feed_web/gettext.ex → lib/openpod_web/gettext.ex

@@ -1,11 +1,11 @@
-defmodule PodcastFeedWeb.Gettext do
+defmodule OpenpodWeb.Gettext do
   @moduledoc """
   @moduledoc """
   A module providing Internationalization with a gettext-based API.
   A module providing Internationalization with a gettext-based API.
 
 
   By using [Gettext](https://hexdocs.pm/gettext),
   By using [Gettext](https://hexdocs.pm/gettext),
   your module gains a set of macros for translations, for example:
   your module gains a set of macros for translations, for example:
 
 
-      import PodcastFeedWeb.Gettext
+      import OpenpodWeb.Gettext
 
 
       # Simple translation
       # Simple translation
       gettext("Here is the string to translate")
       gettext("Here is the string to translate")
@@ -20,5 +20,5 @@ defmodule PodcastFeedWeb.Gettext do
 
 
   See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
   See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
   """
   """
-  use Gettext, otp_app: :podcast_feed
+  use Gettext, otp_app: :openpod
 end
 end

+ 5 - 5
lib/podcast_feed_web/router.ex → lib/openpod_web/router.ex

@@ -1,5 +1,5 @@
-defmodule PodcastFeedWeb.Router do
-  use PodcastFeedWeb, :router
+defmodule OpenpodWeb.Router do
+  use OpenpodWeb, :router
 
 
   pipeline :browser do
   pipeline :browser do
     plug :accepts, ["html"]
     plug :accepts, ["html"]
@@ -13,14 +13,14 @@ defmodule PodcastFeedWeb.Router do
     plug :accepts, ["json"]
     plug :accepts, ["json"]
   end
   end
 
 
-  scope "/podcast", PodcastFeedWeb do
+  scope "/podcast", OpenpodWeb do
     pipe_through :browser
     pipe_through :browser
 
 
     get "/:identifier", FeedController, :by_identifier
     get "/:identifier", FeedController, :by_identifier
   end
   end
 
 
   # Other scopes may use custom stacks.
   # Other scopes may use custom stacks.
-  # scope "/api", PodcastFeedWeb do
+  # scope "/api", OpenpodWeb do
   #   pipe_through :api
   #   pipe_through :api
   # end
   # end
 
 
@@ -36,7 +36,7 @@ defmodule PodcastFeedWeb.Router do
 
 
     scope "/" do
     scope "/" do
       pipe_through :browser
       pipe_through :browser
-      live_dashboard "/dashboard", metrics: PodcastFeedWeb.Telemetry
+      live_dashboard "/dashboard", metrics: OpenpodWeb.Telemetry
     end
     end
   end
   end
 end
 end

+ 7 - 7
lib/podcast_feed_web/telemetry.ex → lib/openpod_web/telemetry.ex

@@ -1,4 +1,4 @@
-defmodule PodcastFeedWeb.Telemetry do
+defmodule OpenpodWeb.Telemetry do
   use Supervisor
   use Supervisor
   import Telemetry.Metrics
   import Telemetry.Metrics
 
 
@@ -31,11 +31,11 @@ defmodule PodcastFeedWeb.Telemetry do
       ),
       ),
 
 
       # Database Metrics
       # Database Metrics
-      summary("podcast_feed.repo.query.total_time", unit: {:native, :millisecond}),
-      summary("podcast_feed.repo.query.decode_time", unit: {:native, :millisecond}),
-      summary("podcast_feed.repo.query.query_time", unit: {:native, :millisecond}),
-      summary("podcast_feed.repo.query.queue_time", unit: {:native, :millisecond}),
-      summary("podcast_feed.repo.query.idle_time", unit: {:native, :millisecond}),
+      summary("openpod.repo.query.total_time", unit: {:native, :millisecond}),
+      summary("openpod.repo.query.decode_time", unit: {:native, :millisecond}),
+      summary("openpod.repo.query.query_time", unit: {:native, :millisecond}),
+      summary("openpod.repo.query.queue_time", unit: {:native, :millisecond}),
+      summary("openpod.repo.query.idle_time", unit: {:native, :millisecond}),
 
 
       # VM Metrics
       # VM Metrics
       summary("vm.memory.total", unit: {:byte, :kilobyte}),
       summary("vm.memory.total", unit: {:byte, :kilobyte}),
@@ -49,7 +49,7 @@ defmodule PodcastFeedWeb.Telemetry do
     [
     [
       # A module, function and arguments to be invoked periodically.
       # A module, function and arguments to be invoked periodically.
       # This function must call :telemetry.execute/3 and a metric must be added above.
       # This function must call :telemetry.execute/3 and a metric must be added above.
-      # {PodcastFeedWeb, :count_users, []}
+      # {OpenpodWeb, :count_users, []}
     ]
     ]
   end
   end
 end
 end

+ 1 - 1
lib/podcast_feed_web/templates/feed/feed.xml.eex → lib/openpod_web/templates/feed/feed.xml.eex

@@ -21,7 +21,7 @@
     <itunes:keywords><%= @podcast.keywords |> Enum.join(", ") %></itunes:keywords>
     <itunes:keywords><%= @podcast.keywords |> Enum.join(", ") %></itunes:keywords>
     <itunes:explicit><![CDATA[<%= @podcast.explicit %>]]></itunes:explicit>
     <itunes:explicit><![CDATA[<%= @podcast.explicit %>]]></itunes:explicit>
     <itunes:image href="<%= @podcast.image.url %>" />
     <itunes:image href="<%= @podcast.image.url %>" />
-    <atom:link href="<%= PodcastFeedWeb.Endpoint.url <> Routes.feed_path(@conn, :by_identifier, @identifier) %>" rel="self" type="application/rss+xml" />
+    <atom:link href="<%= OpenpodWeb.Endpoint.url <> Routes.feed_path(@conn, :by_identifier, @identifier) %>" rel="self" type="application/rss+xml" />
     <pubDate><%= @podcast.pubDate |> Calendar.DateTime.Format.rfc2822 %></pubDate>
     <pubDate><%= @podcast.pubDate |> Calendar.DateTime.Format.rfc2822 %></pubDate>
     <title><![CDATA[<%= @podcast.title %>]]></title>
     <title><![CDATA[<%= @podcast.title %>]]></title>
     <itunes:author><![CDATA[<%= @podcast.owner.name %>]]></itunes:author>
     <itunes:author><![CDATA[<%= @podcast.owner.name %>]]></itunes:author>

+ 1 - 1
lib/podcast_feed_web/templates/layout/app.html.eex → lib/openpod_web/templates/layout/app.html.eex

@@ -4,7 +4,7 @@
     <meta charset="utf-8"/>
     <meta charset="utf-8"/>
     <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
     <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
     <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
     <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
-    <title>PodcastFeed · Phoenix Framework</title>
+    <title>Openpod · Phoenix Framework</title>
     <link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
     <link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
     <script defer type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
     <script defer type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
   </head>
   </head>

+ 0 - 0
lib/podcast_feed_web/templates/page/index.html.eex → lib/openpod_web/templates/page/index.html.eex


+ 3 - 3
lib/podcast_feed_web/views/error_helpers.ex → lib/openpod_web/views/error_helpers.ex

@@ -1,4 +1,4 @@
-defmodule PodcastFeedWeb.ErrorHelpers do
+defmodule OpenpodWeb.ErrorHelpers do
   @moduledoc """
   @moduledoc """
   Conveniences for translating and building error messages.
   Conveniences for translating and building error messages.
   """
   """
@@ -39,9 +39,9 @@ defmodule PodcastFeedWeb.ErrorHelpers do
     # should be written to the errors.po file. The :count option is
     # should be written to the errors.po file. The :count option is
     # set by Ecto and indicates we should also apply plural rules.
     # set by Ecto and indicates we should also apply plural rules.
     if count = opts[:count] do
     if count = opts[:count] do
-      Gettext.dngettext(PodcastFeedWeb.Gettext, "errors", msg, msg, count, opts)
+      Gettext.dngettext(OpenpodWeb.Gettext, "errors", msg, msg, count, opts)
     else
     else
-      Gettext.dgettext(PodcastFeedWeb.Gettext, "errors", msg, opts)
+      Gettext.dgettext(OpenpodWeb.Gettext, "errors", msg, opts)
     end
     end
   end
   end
 end
 end

+ 2 - 2
lib/podcast_feed_web/views/error_view.ex → lib/openpod_web/views/error_view.ex

@@ -1,5 +1,5 @@
-defmodule PodcastFeedWeb.ErrorView do
-  use PodcastFeedWeb, :view
+defmodule OpenpodWeb.ErrorView do
+  use OpenpodWeb, :view
 
 
   # If you want to customize a particular status code
   # If you want to customize a particular status code
   # for a certain format, you may uncomment below.
   # for a certain format, you may uncomment below.

+ 2 - 2
lib/podcast_feed_web/views/feed_view.ex → lib/openpod_web/views/feed_view.ex

@@ -1,5 +1,5 @@
-defmodule PodcastFeedWeb.FeedView do
-  use PodcastFeedWeb, :view
+defmodule OpenpodWeb.FeedView do
+  use OpenpodWeb, :view
 
 
   def format_length(length) do
   def format_length(length) do
     min = length / 60 |> trunc()
     min = length / 60 |> trunc()

+ 3 - 0
lib/openpod_web/views/layout_view.ex

@@ -0,0 +1,3 @@
+defmodule OpenpodWeb.LayoutView do
+  use OpenpodWeb, :view
+end

+ 3 - 0
lib/openpod_web/views/page_view.ex

@@ -0,0 +1,3 @@
+defmodule OpenpodWeb.PageView do
+  use OpenpodWeb, :view
+end

+ 0 - 7
lib/podcast_feed_web/controllers/page_controller.ex

@@ -1,7 +0,0 @@
-defmodule PodcastFeedWeb.PageController do
-  use PodcastFeedWeb, :controller
-
-  def index(conn, _params) do
-    render(conn, "index.html")
-  end
-end

+ 0 - 3
lib/podcast_feed_web/views/layout_view.ex

@@ -1,3 +0,0 @@
-defmodule PodcastFeedWeb.LayoutView do
-  use PodcastFeedWeb, :view
-end

+ 0 - 3
lib/podcast_feed_web/views/page_view.ex

@@ -1,3 +0,0 @@
-defmodule PodcastFeedWeb.PageView do
-  use PodcastFeedWeb, :view
-end

+ 3 - 3
mix.exs

@@ -1,9 +1,9 @@
-defmodule PodcastFeed.MixProject do
+defmodule Openpod.MixProject do
   use Mix.Project
   use Mix.Project
 
 
   def project do
   def project do
     [
     [
-      app: :podcast_feed,
+      app: :openpod,
       version: "0.1.0",
       version: "0.1.0",
       elixir: "~> 1.10",
       elixir: "~> 1.10",
       elixirc_paths: elixirc_paths(Mix.env()),
       elixirc_paths: elixirc_paths(Mix.env()),
@@ -21,7 +21,7 @@ defmodule PodcastFeed.MixProject do
   # Type `mix help compile.app` for more information.
   # Type `mix help compile.app` for more information.
   def application do
   def application do
     [
     [
-      mod: {PodcastFeed.Application, []},
+      mod: {Openpod.Application, []},
       extra_applications: [:logger, :runtime_tools, :elixir_xml_to_map]
       extra_applications: [:logger, :runtime_tools, :elixir_xml_to_map]
     ]
     ]
   end
   end

+ 1 - 1
priv/repo/seeds.exs

@@ -5,7 +5,7 @@
 # Inside the script, you can read and write to any of your
 # Inside the script, you can read and write to any of your
 # repositories directly:
 # repositories directly:
 #
 #
-#     PodcastFeed.Repo.insert!(%PodcastFeed.SomeSchema{})
+#     Openpod.Repo.insert!(%Openpod.SomeSchema{})
 #
 #
 # We recommend using the bang functions (`insert!`, `update!`
 # We recommend using the bang functions (`insert!`, `update!`
 # and so on) as they will fail if something goes wrong.
 # and so on) as they will fail if something goes wrong.

File diff suppressed because it is too large
+ 2 - 2
test/openpod/provider/archive/parser_test.exs


+ 2 - 2
test/podcast_feed/utility/format_test.exs → test/openpod/utility/format_test.exs

@@ -1,7 +1,7 @@
-defmodule PodcastFeed.Utility.FormatTest do
+defmodule Openpod.Utility.FormatTest do
   use ExUnit.Case
   use ExUnit.Case
 
 
-  alias PodcastFeed.Utility.Format
+  alias Openpod.Utility.Format
 
 
   test "Test placeholder are replaced" do
   test "Test placeholder are replaced" do
     assert "http://foo/bar" == Format.compile("http://{host}/{path}", host: "foo", path: "bar")
     assert "http://foo/bar" == Format.compile("http://{host}/{path}", host: "foo", path: "bar")

+ 2 - 2
test/podcast_feed_web/controllers/page_controller_test.exs → test/openpod_web/controllers/page_controller_test.exs

@@ -1,5 +1,5 @@
-defmodule PodcastFeedWeb.PageControllerTest do
-  use PodcastFeedWeb.ConnCase
+defmodule OpenpodWeb.PageControllerTest do
+  use OpenpodWeb.ConnCase
 
 
   # test "GET /", %{conn: conn} do
   # test "GET /", %{conn: conn} do
   #   conn = get(conn, "/")
   #   conn = get(conn, "/")

+ 14 - 0
test/openpod_web/views/error_view_test.exs

@@ -0,0 +1,14 @@
+defmodule OpenpodWeb.ErrorViewTest do
+  use OpenpodWeb.ConnCase, async: true
+
+  # Bring render/3 and render_to_string/3 for testing custom views
+  import Phoenix.View
+
+  test "renders 404.html" do
+    assert render_to_string(OpenpodWeb.ErrorView, "404.html", []) == "Not Found"
+  end
+
+  test "renders 500.html" do
+    assert render_to_string(OpenpodWeb.ErrorView, "500.html", []) == "Internal Server Error"
+  end
+end

+ 2 - 2
test/podcast_feed_web/views/layout_view_test.exs → test/openpod_web/views/layout_view_test.exs

@@ -1,5 +1,5 @@
-defmodule PodcastFeedWeb.LayoutViewTest do
-  use PodcastFeedWeb.ConnCase, async: true
+defmodule OpenpodWeb.LayoutViewTest do
+  use OpenpodWeb.ConnCase, async: true
 
 
   # When testing helpers, you may want to import Phoenix.HTML and
   # When testing helpers, you may want to import Phoenix.HTML and
   # use functions such as safe_to_string() to convert the helper
   # use functions such as safe_to_string() to convert the helper

+ 3 - 0
test/openpod_web/views/page_view_test.exs

@@ -0,0 +1,3 @@
+defmodule OpenpodWeb.PageViewTest do
+  use OpenpodWeb.ConnCase, async: true
+end

+ 0 - 14
test/podcast_feed_web/views/error_view_test.exs

@@ -1,14 +0,0 @@
-defmodule PodcastFeedWeb.ErrorViewTest do
-  use PodcastFeedWeb.ConnCase, async: true
-
-  # Bring render/3 and render_to_string/3 for testing custom views
-  import Phoenix.View
-
-  test "renders 404.html" do
-    assert render_to_string(PodcastFeedWeb.ErrorView, "404.html", []) == "Not Found"
-  end
-
-  test "renders 500.html" do
-    assert render_to_string(PodcastFeedWeb.ErrorView, "500.html", []) == "Internal Server Error"
-  end
-end

+ 0 - 3
test/podcast_feed_web/views/page_view_test.exs

@@ -1,3 +0,0 @@
-defmodule PodcastFeedWeb.PageViewTest do
-  use PodcastFeedWeb.ConnCase, async: true
-end

+ 6 - 6
test/support/channel_case.ex

@@ -1,4 +1,4 @@
-defmodule PodcastFeedWeb.ChannelCase do
+defmodule OpenpodWeb.ChannelCase do
   @moduledoc """
   @moduledoc """
   This module defines the test case to be used by
   This module defines the test case to be used by
   channel tests.
   channel tests.
@@ -11,7 +11,7 @@ defmodule PodcastFeedWeb.ChannelCase do
   we enable the SQL sandbox, so changes done to the database
   we enable the SQL sandbox, so changes done to the database
   are reverted at the end of every test. If you are using
   are reverted at the end of every test. If you are using
   PostgreSQL, you can even run database tests asynchronously
   PostgreSQL, you can even run database tests asynchronously
-  by setting `use PodcastFeedWeb.ChannelCase, async: true`, although
+  by setting `use OpenpodWeb.ChannelCase, async: true`, although
   this option is not recommended for other databases.
   this option is not recommended for other databases.
   """
   """
 
 
@@ -21,18 +21,18 @@ defmodule PodcastFeedWeb.ChannelCase do
     quote do
     quote do
       # Import conveniences for testing with channels
       # Import conveniences for testing with channels
       import Phoenix.ChannelTest
       import Phoenix.ChannelTest
-      import PodcastFeedWeb.ChannelCase
+      import OpenpodWeb.ChannelCase
 
 
       # The default endpoint for testing
       # The default endpoint for testing
-      @endpoint PodcastFeedWeb.Endpoint
+      @endpoint OpenpodWeb.Endpoint
     end
     end
   end
   end
 
 
   setup tags do
   setup tags do
-    # :ok = Ecto.Adapters.SQL.Sandbox.checkout(PodcastFeed.Repo)
+    # :ok = Ecto.Adapters.SQL.Sandbox.checkout(Openpod.Repo)
 
 
     # unless tags[:async] do
     # unless tags[:async] do
-    #   Ecto.Adapters.SQL.Sandbox.mode(PodcastFeed.Repo, {:shared, self()})
+    #   Ecto.Adapters.SQL.Sandbox.mode(Openpod.Repo, {:shared, self()})
     # end
     # end
 
 
     :ok
     :ok

+ 7 - 7
test/support/conn_case.ex

@@ -1,4 +1,4 @@
-defmodule PodcastFeedWeb.ConnCase do
+defmodule OpenpodWeb.ConnCase do
   @moduledoc """
   @moduledoc """
   This module defines the test case to be used by
   This module defines the test case to be used by
   tests that require setting up a connection.
   tests that require setting up a connection.
@@ -11,7 +11,7 @@ defmodule PodcastFeedWeb.ConnCase do
   we enable the SQL sandbox, so changes done to the database
   we enable the SQL sandbox, so changes done to the database
   are reverted at the end of every test. If you are using
   are reverted at the end of every test. If you are using
   PostgreSQL, you can even run database tests asynchronously
   PostgreSQL, you can even run database tests asynchronously
-  by setting `use PodcastFeedWeb.ConnCase, async: true`, although
+  by setting `use OpenpodWeb.ConnCase, async: true`, although
   this option is not recommended for other databases.
   this option is not recommended for other databases.
   """
   """
 
 
@@ -22,20 +22,20 @@ defmodule PodcastFeedWeb.ConnCase do
       # Import conveniences for testing with connections
       # Import conveniences for testing with connections
       import Plug.Conn
       import Plug.Conn
       import Phoenix.ConnTest
       import Phoenix.ConnTest
-      import PodcastFeedWeb.ConnCase
+      import OpenpodWeb.ConnCase
 
 
-      alias PodcastFeedWeb.Router.Helpers, as: Routes
+      alias OpenpodWeb.Router.Helpers, as: Routes
 
 
       # The default endpoint for testing
       # The default endpoint for testing
-      @endpoint PodcastFeedWeb.Endpoint
+      @endpoint OpenpodWeb.Endpoint
     end
     end
   end
   end
 
 
   setup tags do
   setup tags do
-    # :ok = Ecto.Adapters.SQL.Sandbox.checkout(PodcastFeed.Repo)
+    # :ok = Ecto.Adapters.SQL.Sandbox.checkout(Openpod.Repo)
 
 
     # unless tags[:async] do
     # unless tags[:async] do
-    #   Ecto.Adapters.SQL.Sandbox.mode(PodcastFeed.Repo, {:shared, self()})
+    #   Ecto.Adapters.SQL.Sandbox.mode(Openpod.Repo, {:shared, self()})
     # end
     # end
 
 
     {:ok, conn: Phoenix.ConnTest.build_conn()}
     {:ok, conn: Phoenix.ConnTest.build_conn()}

+ 6 - 6
test/support/data_case.ex

@@ -1,4 +1,4 @@
-defmodule PodcastFeed.DataCase do
+defmodule Openpod.DataCase do
   @moduledoc """
   @moduledoc """
   This module defines the setup for tests requiring
   This module defines the setup for tests requiring
   access to the application's data layer.
   access to the application's data layer.
@@ -10,7 +10,7 @@ defmodule PodcastFeed.DataCase do
   we enable the SQL sandbox, so changes done to the database
   we enable the SQL sandbox, so changes done to the database
   are reverted at the end of every test. If you are using
   are reverted at the end of every test. If you are using
   PostgreSQL, you can even run database tests asynchronously
   PostgreSQL, you can even run database tests asynchronously
-  by setting `use PodcastFeed.DataCase, async: true`, although
+  by setting `use Openpod.DataCase, async: true`, although
   this option is not recommended for other databases.
   this option is not recommended for other databases.
   """
   """
 
 
@@ -18,20 +18,20 @@ defmodule PodcastFeed.DataCase do
 
 
   using do
   using do
     quote do
     quote do
-      alias PodcastFeed.Repo
+      alias Openpod.Repo
 
 
       # import Ecto
       # import Ecto
       # import Ecto.Changeset
       # import Ecto.Changeset
       # import Ecto.Query
       # import Ecto.Query
-      import PodcastFeed.DataCase
+      import Openpod.DataCase
     end
     end
   end
   end
 
 
   setup tags do
   setup tags do
-    # :ok = Ecto.Adapters.SQL.Sandbox.checkout(PodcastFeed.Repo)
+    # :ok = Ecto.Adapters.SQL.Sandbox.checkout(Openpod.Repo)
 
 
     # unless tags[:async] do
     # unless tags[:async] do
-    #   Ecto.Adapters.SQL.Sandbox.mode(PodcastFeed.Repo, {:shared, self()})
+    #   Ecto.Adapters.SQL.Sandbox.mode(Openpod.Repo, {:shared, self()})
     # end
     # end
 
 
     :ok
     :ok

+ 1 - 1
test/test_helper.exs

@@ -1,2 +1,2 @@
 ExUnit.start()
 ExUnit.start()
-# Ecto.Adapters.SQL.Sandbox.mode(PodcastFeed.Repo, :manual)
+# Ecto.Adapters.SQL.Sandbox.mode(Openpod.Repo, :manual)

Some files were not shown because too many files changed in this diff