rename project from SimpleshopTheme to Berrypod
All modules, configs, paths, and references updated. 836 tests pass, zero warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,33 +7,33 @@
|
||||
# General application configuration
|
||||
import Config
|
||||
|
||||
config :simpleshop_theme, :scopes,
|
||||
config :berrypod, :scopes,
|
||||
user: [
|
||||
default: true,
|
||||
module: SimpleshopTheme.Accounts.Scope,
|
||||
module: Berrypod.Accounts.Scope,
|
||||
assign_key: :current_scope,
|
||||
access_path: [:user, :id],
|
||||
schema_key: :user_id,
|
||||
schema_type: :binary_id,
|
||||
schema_table: :users,
|
||||
test_data_fixture: SimpleshopTheme.AccountsFixtures,
|
||||
test_data_fixture: Berrypod.AccountsFixtures,
|
||||
test_setup_helper: :register_and_log_in_user
|
||||
]
|
||||
|
||||
config :simpleshop_theme,
|
||||
config :berrypod,
|
||||
env: config_env(),
|
||||
ecto_repos: [SimpleshopTheme.Repo],
|
||||
ecto_repos: [Berrypod.Repo],
|
||||
generators: [timestamp_type: :utc_datetime, binary_id: true]
|
||||
|
||||
# Configures the endpoint
|
||||
config :simpleshop_theme, SimpleshopThemeWeb.Endpoint,
|
||||
config :berrypod, BerrypodWeb.Endpoint,
|
||||
url: [host: "localhost"],
|
||||
adapter: Bandit.PhoenixAdapter,
|
||||
render_errors: [
|
||||
formats: [html: SimpleshopThemeWeb.ErrorHTML, json: SimpleshopThemeWeb.ErrorJSON],
|
||||
formats: [html: BerrypodWeb.ErrorHTML, json: BerrypodWeb.ErrorJSON],
|
||||
layout: false
|
||||
],
|
||||
pubsub_server: SimpleshopTheme.PubSub,
|
||||
pubsub_server: Berrypod.PubSub,
|
||||
live_view: [signing_salt: "HWdz7Vt8"]
|
||||
|
||||
# Configures the mailer
|
||||
@@ -43,22 +43,22 @@ config :simpleshop_theme, SimpleshopThemeWeb.Endpoint,
|
||||
#
|
||||
# For production it's recommended to configure a different adapter
|
||||
# at the `config/runtime.exs`.
|
||||
config :simpleshop_theme, SimpleshopTheme.Mailer, adapter: Swoosh.Adapters.Local
|
||||
config :berrypod, Berrypod.Mailer, adapter: Swoosh.Adapters.Local
|
||||
|
||||
# Configure esbuild (the version is required)
|
||||
config :esbuild,
|
||||
version: "0.25.4",
|
||||
simpleshop_theme: [
|
||||
berrypod: [
|
||||
args:
|
||||
~w(js/app.js --bundle --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=.),
|
||||
cd: Path.expand("../assets", __DIR__),
|
||||
env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]}
|
||||
],
|
||||
simpleshop_theme_shop_css: [
|
||||
berrypod_shop_css: [
|
||||
args: ~w(css/shop.css --bundle --outdir=../priv/static/assets/css),
|
||||
cd: Path.expand("../assets", __DIR__)
|
||||
],
|
||||
simpleshop_theme_admin_css: [
|
||||
berrypod_admin_css: [
|
||||
args: ~w(css/admin.css --bundle --outdir=../priv/static/assets/css),
|
||||
cd: Path.expand("../assets", __DIR__)
|
||||
]
|
||||
@@ -72,28 +72,28 @@ config :logger, :default_formatter,
|
||||
config :phoenix, :json_library, Jason
|
||||
|
||||
# ex_money configuration for currency handling
|
||||
config :ex_money, default_cldr_backend: SimpleshopTheme.Cldr
|
||||
config :ex_money, default_cldr_backend: Berrypod.Cldr
|
||||
|
||||
# Error tracking (stored in DB, auto-captures Phoenix/LiveView/Oban errors)
|
||||
config :error_tracker,
|
||||
repo: SimpleshopTheme.Repo,
|
||||
otp_app: :simpleshop_theme,
|
||||
repo: Berrypod.Repo,
|
||||
otp_app: :berrypod,
|
||||
plugins: [ErrorTracker.Plugins.Pruner]
|
||||
|
||||
# Stripe configuration
|
||||
config :stripity_stripe, api_version: "2024-12-18.acacia"
|
||||
|
||||
# Oban configuration for background jobs
|
||||
config :simpleshop_theme, Oban,
|
||||
config :berrypod, Oban,
|
||||
engine: Oban.Engines.Lite,
|
||||
repo: SimpleshopTheme.Repo,
|
||||
repo: Berrypod.Repo,
|
||||
plugins: [
|
||||
{Oban.Plugins.Pruner, max_age: 60},
|
||||
{Oban.Plugins.Lifeline, rescue_after: :timer.minutes(5)},
|
||||
{Oban.Plugins.Cron,
|
||||
crontab: [
|
||||
{"*/30 * * * *", SimpleshopTheme.Orders.FulfilmentStatusWorker},
|
||||
{"0 */6 * * *", SimpleshopTheme.Sync.ScheduledSyncWorker}
|
||||
{"*/30 * * * *", Berrypod.Orders.FulfilmentStatusWorker},
|
||||
{"0 */6 * * *", Berrypod.Sync.ScheduledSyncWorker}
|
||||
]}
|
||||
],
|
||||
queues: [images: 2, sync: 1, checkout: 1]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import Config
|
||||
|
||||
# Configure your database
|
||||
config :simpleshop_theme, SimpleshopTheme.Repo,
|
||||
database: Path.expand("../simpleshop_theme_dev.db", __DIR__),
|
||||
config :berrypod, Berrypod.Repo,
|
||||
database: Path.expand("../berrypod_dev.db", __DIR__),
|
||||
pool_size: 5,
|
||||
journal_mode: :wal,
|
||||
busy_timeout: 5000,
|
||||
@@ -15,7 +15,7 @@ config :simpleshop_theme, SimpleshopTheme.Repo,
|
||||
# The watchers configuration can be used to run external
|
||||
# watchers to your application. For example, we can use it
|
||||
# to bundle .js and .css sources.
|
||||
config :simpleshop_theme, SimpleshopThemeWeb.Endpoint,
|
||||
config :berrypod, BerrypodWeb.Endpoint,
|
||||
# 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: {0, 0, 0, 0}, port: String.to_integer(System.get_env("PORT") || "4000")],
|
||||
@@ -24,11 +24,11 @@ config :simpleshop_theme, SimpleshopThemeWeb.Endpoint,
|
||||
debug_errors: true,
|
||||
secret_key_base: "Jk04sYT/pzfZ0cywS+i0vCURPoQYgqAGa72uS8bv2gydLyusWFc08kJyEnQP4zgT",
|
||||
watchers: [
|
||||
esbuild: {Esbuild, :install_and_run, [:simpleshop_theme, ~w(--sourcemap=inline --watch)]},
|
||||
esbuild: {Esbuild, :install_and_run, [:berrypod, ~w(--sourcemap=inline --watch)]},
|
||||
esbuild_shop_css:
|
||||
{Esbuild, :install_and_run, [:simpleshop_theme_shop_css, ~w(--sourcemap=inline --watch)]},
|
||||
{Esbuild, :install_and_run, [:berrypod_shop_css, ~w(--sourcemap=inline --watch)]},
|
||||
esbuild_admin_css:
|
||||
{Esbuild, :install_and_run, [:simpleshop_theme_admin_css, ~w(--sourcemap=inline --watch)]}
|
||||
{Esbuild, :install_and_run, [:berrypod_admin_css, ~w(--sourcemap=inline --watch)]}
|
||||
]
|
||||
|
||||
# ## SSL Support
|
||||
@@ -55,18 +55,18 @@ config :simpleshop_theme, SimpleshopThemeWeb.Endpoint,
|
||||
# different ports.
|
||||
|
||||
# Watch static and templates for browser reloading.
|
||||
config :simpleshop_theme, SimpleshopThemeWeb.Endpoint,
|
||||
config :berrypod, BerrypodWeb.Endpoint,
|
||||
live_reload: [
|
||||
web_console_logger: true,
|
||||
patterns: [
|
||||
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",
|
||||
~r"priv/gettext/.*(po)$",
|
||||
~r"lib/simpleshop_theme_web/(?:controllers|live|components|router)/?.*\.(ex|heex)$"
|
||||
~r"lib/berrypod_web/(?:controllers|live|components|router)/?.*\.(ex|heex)$"
|
||||
]
|
||||
]
|
||||
|
||||
# Enable dev routes for dashboard and mailbox
|
||||
config :simpleshop_theme, dev_routes: true
|
||||
config :berrypod, dev_routes: true
|
||||
|
||||
# Do not include metadata nor timestamps in development logs
|
||||
config :logger, :default_formatter, format: "[$level] $message\n"
|
||||
|
||||
@@ -5,8 +5,7 @@ import Config
|
||||
# manifest is generated by the `mix assets.deploy` task,
|
||||
# which you should run after static files are built and
|
||||
# before starting your production server.
|
||||
config :simpleshop_theme, SimpleshopThemeWeb.Endpoint,
|
||||
cache_static_manifest: "priv/static/cache_manifest.json"
|
||||
config :berrypod, BerrypodWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
|
||||
|
||||
# Configures Swoosh API Client
|
||||
config :swoosh, api_client: Swoosh.ApiClient.Req
|
||||
|
||||
@@ -12,12 +12,12 @@ import Config
|
||||
# If you use `mix release`, you need to explicitly enable the server
|
||||
# by passing the PHX_SERVER=true when you start it:
|
||||
#
|
||||
# PHX_SERVER=true bin/simpleshop_theme start
|
||||
# PHX_SERVER=true bin/berrypod start
|
||||
#
|
||||
# Alternatively, you can use `mix phx.gen.release` to generate a `bin/server`
|
||||
# script that automatically sets the env var above.
|
||||
if System.get_env("PHX_SERVER") do
|
||||
config :simpleshop_theme, SimpleshopThemeWeb.Endpoint, server: true
|
||||
config :berrypod, BerrypodWeb.Endpoint, server: true
|
||||
end
|
||||
|
||||
if config_env() == :prod do
|
||||
@@ -25,10 +25,10 @@ if config_env() == :prod do
|
||||
System.get_env("DATABASE_PATH") ||
|
||||
raise """
|
||||
environment variable DATABASE_PATH is missing.
|
||||
For example: /data/simpleshop_theme.db
|
||||
For example: /data/berrypod.db
|
||||
"""
|
||||
|
||||
config :simpleshop_theme, SimpleshopTheme.Repo,
|
||||
config :berrypod, Berrypod.Repo,
|
||||
database: database_path,
|
||||
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "5"),
|
||||
journal_mode: :wal,
|
||||
@@ -49,9 +49,9 @@ if config_env() == :prod do
|
||||
host = System.get_env("PHX_HOST") || "example.com"
|
||||
port = String.to_integer(System.get_env("PORT") || "4000")
|
||||
|
||||
config :simpleshop_theme, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
|
||||
config :berrypod, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
|
||||
|
||||
config :simpleshop_theme, SimpleshopThemeWeb.Endpoint,
|
||||
config :berrypod, BerrypodWeb.Endpoint,
|
||||
url: [host: host, port: 443, scheme: "https"],
|
||||
http: [
|
||||
# Enable IPv6 and bind on all interfaces.
|
||||
@@ -68,7 +68,7 @@ if config_env() == :prod do
|
||||
# To get SSL working, you will need to add the `https` key
|
||||
# to your endpoint configuration:
|
||||
#
|
||||
# config :simpleshop_theme, SimpleshopThemeWeb.Endpoint,
|
||||
# config :berrypod, BerrypodWeb.Endpoint,
|
||||
# https: [
|
||||
# ...,
|
||||
# port: 443,
|
||||
@@ -90,7 +90,7 @@ if config_env() == :prod do
|
||||
# We also recommend setting `force_ssl` in your config/prod.exs,
|
||||
# ensuring no data is ever sent via http, always redirecting to https:
|
||||
#
|
||||
# config :simpleshop_theme, SimpleshopThemeWeb.Endpoint,
|
||||
# config :berrypod, BerrypodWeb.Endpoint,
|
||||
# force_ssl: [hsts: true]
|
||||
#
|
||||
# Check `Plug.SSL` for all available options in `force_ssl`.
|
||||
@@ -102,20 +102,20 @@ if config_env() == :prod do
|
||||
#
|
||||
# Postmark (recommended):
|
||||
#
|
||||
# config :simpleshop_theme, SimpleshopTheme.Mailer,
|
||||
# config :berrypod, Berrypod.Mailer,
|
||||
# adapter: Swoosh.Adapters.Postmark,
|
||||
# api_key: System.get_env("POSTMARK_API_KEY")
|
||||
#
|
||||
# Mailgun:
|
||||
#
|
||||
# config :simpleshop_theme, SimpleshopTheme.Mailer,
|
||||
# config :berrypod, Berrypod.Mailer,
|
||||
# adapter: Swoosh.Adapters.Mailgun,
|
||||
# api_key: System.get_env("MAILGUN_API_KEY"),
|
||||
# domain: System.get_env("MAILGUN_DOMAIN")
|
||||
#
|
||||
# SMTP (any provider):
|
||||
#
|
||||
# config :simpleshop_theme, SimpleshopTheme.Mailer,
|
||||
# config :berrypod, Berrypod.Mailer,
|
||||
# adapter: Swoosh.Adapters.SMTP,
|
||||
# relay: System.get_env("SMTP_HOST"),
|
||||
# port: String.to_integer(System.get_env("SMTP_PORT") || "587"),
|
||||
@@ -124,5 +124,5 @@ if config_env() == :prod do
|
||||
# tls: :if_available
|
||||
|
||||
# Stripe and Printify keys are stored encrypted in the database and loaded
|
||||
# at runtime by SimpleshopTheme.Secrets. No env vars needed for those.
|
||||
# at runtime by Berrypod.Secrets. No env vars needed for those.
|
||||
end
|
||||
|
||||
@@ -8,8 +8,8 @@ config :bcrypt_elixir, :log_rounds, 1
|
||||
# The MIX_TEST_PARTITION environment variable can be used
|
||||
# to provide built-in test partitioning in CI environment.
|
||||
# Run `mix help test` for more information.
|
||||
config :simpleshop_theme, SimpleshopTheme.Repo,
|
||||
database: Path.expand("../simpleshop_theme_test.db", __DIR__),
|
||||
config :berrypod, Berrypod.Repo,
|
||||
database: Path.expand("../berrypod_test.db", __DIR__),
|
||||
pool_size: 1,
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
journal_mode: :wal,
|
||||
@@ -17,13 +17,13 @@ config :simpleshop_theme, SimpleshopTheme.Repo,
|
||||
|
||||
# We don't run a server during test. If one is required,
|
||||
# you can enable the server option below.
|
||||
config :simpleshop_theme, SimpleshopThemeWeb.Endpoint,
|
||||
config :berrypod, BerrypodWeb.Endpoint,
|
||||
http: [ip: {127, 0, 0, 1}, port: 4002],
|
||||
secret_key_base: "FgIOvs+0ZwA+GU1gInqNuyDz3zSnfeRu0kD7DYyGpC05/wE+G2xVJ5zlc/ufGedN",
|
||||
server: false
|
||||
|
||||
# In test we don't send emails
|
||||
config :simpleshop_theme, SimpleshopTheme.Mailer, adapter: Swoosh.Adapters.Test
|
||||
config :berrypod, Berrypod.Mailer, adapter: Swoosh.Adapters.Test
|
||||
|
||||
# Disable swoosh api client as it is only required for production adapters
|
||||
config :swoosh, :api_client, false
|
||||
@@ -39,7 +39,7 @@ config :phoenix_live_view,
|
||||
enable_expensive_runtime_checks: true
|
||||
|
||||
# Use inline testing mode for Oban
|
||||
config :simpleshop_theme, Oban, testing: :inline
|
||||
config :berrypod, Oban, testing: :inline
|
||||
|
||||
# Isolate image cache so test cleanup doesn't wipe the dev cache
|
||||
config :simpleshop_theme, :image_cache_dir, Path.expand("../tmp/test_image_cache", __DIR__)
|
||||
config :berrypod, :image_cache_dir, Path.expand("../tmp/test_image_cache", __DIR__)
|
||||
|
||||
Reference in New Issue
Block a user