Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Rename internal build symbols (#3942)

hq1d6824de1adc4
diff --git a/.github/workflows/build-public-images-ghcr.yml b/.github/workflows/build-public-images-ghcr.yml
index 0fdbba79cd..7794b31c21 100644
--- a/.github/workflows/build-public-images-ghcr.yml
+++ b/.github/workflows/build-public-images-ghcr.yml
@@ -51,7 +51,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
- MIX_ENV=small
+ MIX_ENV=ce
BUILD_METADATA=${{ steps.meta.outputs.json }}
ERL_FLAGS=+JPperf true
diff --git a/.github/workflows/build-public-images.yml b/.github/workflows/build-public-images.yml
index 0d12f6331b..e88c932b9f 100644
--- a/.github/workflows/build-public-images.yml
+++ b/.github/workflows/build-public-images.yml
@@ -46,7 +46,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
- MIX_ENV=small
+ MIX_ENV=ce
BUILD_METADATA=${{ steps.meta.outputs.json }}
ERL_FLAGS=+JMsingle true
diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml
index 5655b33b1d..05a4ff0cf8 100644
--- a/.github/workflows/elixir.yml
+++ b/.github/workflows/elixir.yml
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- mix_env: ["test", "small_test"]
+ mix_env: ["test", "ce_test"]
postgres_image: ["postgres:16"]
test_experimental_reduced_joins: ["0"]
@@ -113,7 +113,7 @@ jobs:
MINIO_HOST_FOR_CLICKHOUSE: "172.17.0.1"
- run: mix test --include slow --max-failures 1 --warnings-as-errors
- if: env.MIX_ENV == 'small_test'
+ if: env.MIX_ENV == 'ce_test'
static:
name: Static checks (format, credo, dialyzer)
diff --git a/Dockerfile b/Dockerfile
index 5915fe3cc4..617d10e304 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,7 +4,7 @@
#### Builder
FROM hexpm/elixir:1.16.0-erlang-26.2.1-alpine-3.18.4 as buildcontainer
-ARG MIX_ENV=small
+ARG MIX_ENV=ce
# preparation
ENV MIX_ENV=$MIX_ENV
@@ -60,7 +60,7 @@ LABEL maintainer="plausible.io <[email protected]>"
ARG BUILD_METADATA={}
ENV BUILD_METADATA=$BUILD_METADATA
ENV LANG=C.UTF-8
-ARG MIX_ENV=small
+ARG MIX_ENV=ce
ENV MIX_ENV=$MIX_ENV
RUN adduser -S -H -u 999 -G nogroup plausible -g 'Plausible Analytics'
diff --git a/config/small.exs b/config/ce.exs
similarity index 100%
rename from config/small.exs
rename to config/ce.exs
diff --git a/config/small_dev.exs b/config/ce_dev.exs
similarity index 100%
rename from config/small_dev.exs
rename to config/ce_dev.exs
diff --git a/config/small_test.exs b/config/ce_test.exs
similarity index 100%
rename from config/small_test.exs
rename to config/ce_test.exs
diff --git a/config/runtime.exs b/config/runtime.exs
index 2f43f0b48b..2bec1d0f1a 100644
--- a/config/runtime.exs
+++ b/config/runtime.exs
@@ -6,11 +6,11 @@ if config_env() in [:dev, :test] do
Envy.load(["config/.env.#{config_env()}"])
end
-if config_env() == :small_dev do
+if config_env() == :ce_dev do
Envy.load(["config/.env.dev"])
end
-if config_env() == :small_test do
+if config_env() == :ce_test do
Envy.load(["config/.env.test"])
end
diff --git a/lib/plausible.ex b/lib/plausible.ex
index a8fe326fa3..e853b470da 100644
--- a/lib/plausible.ex
+++ b/lib/plausible.ex
@@ -3,7 +3,7 @@ defmodule Plausible do
Build-related macros
"""
- @small_builds [:small, :small_test, :small_dev]
+ @ce_builds [:ce, :ce_test, :ce_dev]
defmacro __using__(_) do
quote do
@@ -12,41 +12,49 @@ defmodule Plausible do
end
end
- defmacro on_full_build(clauses) do
- do_on_full_build(clauses)
+ defmacro on_ee(clauses) do
+ do_on_ee(clauses)
end
- def do_on_full_build(do: block) do
- do_on_full_build(do: block, else: nil)
+ defmacro on_ce(clauses) do
+ do_on_ce(clauses)
end
- def do_on_full_build(do: do_block, else: else_block) do
- if Mix.env() not in @small_builds do
- quote do
- unquote(do_block)
- end
- else
- quote do
- unquote(else_block)
- end
- end
- end
-
- defmacro full_build?() do
- full_build? = Mix.env() not in @small_builds
+ defmacro ee?() do
+ ee? = Mix.env() not in @ce_builds
# Tricking dialyzer as per:
# https://github.com/elixir-lang/elixir/blob/v1.12.3/lib/elixir/lib/gen_server.ex#L771-L778
quote do
- :erlang.phash2(1, 1) == 0 and unquote(full_build?)
+ :erlang.phash2(1, 1) == 0 and unquote(ee?)
end
end
- defmacro small_build?() do
- small_build? = Mix.env() in @small_builds
+ defmacro ce?() do
+ ce_build? = Mix.env() in @ce_builds
quote do
- unquote(small_build?)
+ unquote(ce_build?)
+ end
+ end
+
+ defp do_on_ce(do: block) do
+ do_on_ee(do: nil, else: block)
+ end
+
+ defp do_on_ee(do: block) do
+ do_on_ee(do: block, else: nil)
+ end
+
+ defp do_on_ee(do: do_block, else: else_block) do
+ if Mix.env() not in @ce_builds do
+ quote do
+ unquote(do_block)
+ end
+ else
+ quote do
+ unquote(else_block)
+ end
end
end
end
diff --git a/lib/plausible/application.ex b/lib/plausible/application.ex
index 2d219ce54b..5ed3beaa1d 100644
--- a/lib/plausible/application.ex
+++ b/lib/plausible/application.ex
@@ -7,7 +7,7 @@ defmodule Plausible.Application do
require Logger
def start(_type, _args) do
- on_full_build(do: Plausible.License.ensure_valid_license())
+ on_ee(do: Plausible.License.ensure_valid_license())
children = [
Plausible.Cache.Stats,
diff --git a/lib/plausible/auth/auth.ex b/lib/plausible/auth/auth.ex
index 41cc124f8b..4eaf5df78a 100644
--- a/lib/plausible/auth/auth.ex
+++ b/lib/plausible/auth/auth.ex
@@ -57,7 +57,7 @@ defmodule Plausible.Auth do
)
end
- on_full_build do
+ on_ee do
def is_super_admin?(nil), do: false
def is_super_admin?(%Plausible.Auth.User{id: id}), do: is_super_admin?(id)
diff --git a/lib/plausible/auth/user.ex b/lib/plausible/auth/user.ex
index 80fa87992b..03f2881215 100644
--- a/lib/plausible/auth/user.ex
+++ b/lib/plausible/auth/user.ex
@@ -252,7 +252,7 @@ defmodule Plausible.Auth.User do
end
defp trial_expiry() do
- on_full_build do
+ on_ee do
Timex.today() |> Timex.shift(days: 30)
else
Timex.today() |> Timex.shift(years: 100)
@@ -260,7 +260,7 @@ defmodule Plausible.Auth.User do
end
defp set_email_verification_status(user) do
- on_full_build do
+ on_ee do
change(user, email_verified: false)
else
selfhosted_config = Application.get_env(:plausible, :selfhost)
diff --git a/lib/plausible/auth/user_admin.ex b/lib/plausible/auth/user_admin.ex
index e8173d2a3f..dd9bf98fb2 100644
--- a/lib/plausible/auth/user_admin.ex
+++ b/lib/plausible/auth/user_admin.ex
@@ -134,7 +134,7 @@ defmodule Plausible.Auth.UserAdmin do
end
end
- on_full_build do
+ on_ee do
defp usage_link(user) do
path = PlausibleWeb.Router.Helpers.admin_path(PlausibleWeb.Endpoint, :usage, user.id)
{:safe, ~s(<a href="#{path}">Usage</a>)}
diff --git a/lib/plausible/billing/quota.ex b/lib/plausible/billing/quota.ex
index cd8a104462..a6505e5df2 100644
--- a/lib/plausible/billing/quota.ex
+++ b/lib/plausible/billing/quota.ex
@@ -45,7 +45,7 @@ defmodule Plausible.Billing.Quota do
end
end
- on_full_build do
+ on_ee do
@limit_sites_since ~D[2021-05-05]
@site_limit_for_trials 10
@team_member_limit_for_trials 3
@@ -349,7 +349,7 @@ defmodule Plausible.Billing.Quota do
stats_api_usage = from a in Plausible.Auth.ApiKey, where: a.user_id == ^user.id
queries =
- on_full_build do
+ on_ee do
funnels_usage_query =
from f in "funnels",
inner_join: os in subquery(owned_sites_query(user)),
@@ -378,7 +378,7 @@ defmodule Plausible.Billing.Quota do
props_exist = is_list(site.allowed_event_props) && site.allowed_event_props != []
funnels_exist =
- on_full_build do
+ on_ee do
Plausible.Repo.exists?(from f in Plausible.Funnel, where: f.site_id == ^site.id)
else
false
diff --git a/lib/plausible/exports.ex b/lib/plausible/exports.ex
index 00b7e4dc41..078e62c418 100644
--- a/lib/plausible/exports.ex
+++ b/lib/plausible/exports.ex
@@ -254,7 +254,7 @@ defmodule Plausible.Exports do
}
end
- on_full_build do
+ on_ee do
defp sampled(table, date_range) do
from(table)
|> Plausible.Stats.Sampling.add_query_hint()
diff --git a/lib/plausible/goal/schema.ex b/lib/plausible/goal/schema.ex
index b4c0967bbf..99e335f95e 100644
--- a/lib/plausible/goal/schema.ex
+++ b/lib/plausible/goal/schema.ex
@@ -9,7 +9,7 @@ defmodule Plausible.Goal do
field :event_name, :string
field :page_path, :string
- on_full_build do
+ on_ee do
field :currency, Ecto.Enum, values: Money.Currency.known_current_currencies()
many_to_many :funnels, Plausible.Funnel, join_through: Plausible.Funnel.Step
else
@@ -22,7 +22,7 @@ defmodule Plausible.Goal do
timestamps()
end
- @fields [:id, :site_id, :event_name, :page_path] ++ on_full_build(do: [:currency], else: [])
+ @fields [:id, :site_id, :event_name, :page_path] ++ on_ee(do: [:currency], else: [])
def changeset(goal, attrs \\ %{}) do
goal
@@ -77,7 +77,7 @@ defmodule Plausible.Goal do
end
defp maybe_drop_currency(changeset) do
- if full_build?() and get_field(changeset, :page_path) do
+ if ee?() and get_field(changeset, :page_path) do
delete_change(changeset, :currency)
else
changeset
diff --git a/lib/plausible/goals.ex b/lib/plausible/goals.ex
index 11118ff840..a0b2f8a3aa 100644
--- a/lib/plausible/goals.ex
+++ b/lib/plausible/goals.ex
@@ -22,7 +22,7 @@ defmodule Plausible.Goals do
Repo.transaction(fn ->
case insert_goal(site, params, upsert?) do
{:ok, :insert, goal} ->
- on_full_build do
+ on_ee do
now = Keyword.get(opts, :now, DateTime.utc_now())
# credo:disable-for-next-line Credo.Check.Refactor.Nesting
if Plausible.Goal.Revenue.revenue?(goal) do
@@ -103,7 +103,7 @@ defmodule Plausible.Goals do
order_by: [desc: g.id],
preload: [:site]
- if opts[:preload_funnels?] == true and full_build?() do
+ if opts[:preload_funnels?] == true and ee?() do
from(g in query,
left_join: assoc(g, :funnels),
group_by: g.id,
@@ -136,7 +136,7 @@ defmodule Plausible.Goals do
where: g.site_id == ^site_id
)
- goal_query = on_full_build(do: preload(goal_query, funnels: :steps), else: goal_query)
+ goal_query = on_ee(do: preload(goal_query, funnels: :steps), else: goal_query)
result =
Multi.new()
diff --git a/lib/plausible/ingestion/event.ex b/lib/plausible/ingestion/event.ex
index 8baf66a923..ec3653b02a 100644
--- a/lib/plausible/ingestion/event.ex
+++ b/lib/plausible/ingestion/event.ex
@@ -292,7 +292,7 @@ defmodule Plausible.Ingestion.Event do
defp put_props(%__MODULE__{} = event), do: event
defp put_revenue(event) do
- on_full_build do
+ on_ee do
attrs = Plausible.Ingestion.Event.Revenue.get_revenue_attrs(event)
update_event_attrs(event, attrs)
else
diff --git a/lib/plausible/ingestion/request.ex b/lib/plausible/ingestion/request.ex
index c5f6818e4f..fa2218611b 100644
--- a/lib/plausible/ingestion/request.ex
+++ b/lib/plausible/ingestion/request.ex
@@ -42,7 +42,7 @@ defmodule Plausible.Ingestion.Request do
field :pathname, :string
field :props, :map
- on_full_build do
+ on_ee do
field :revenue_source, :map
end
@@ -95,7 +95,7 @@ defmodule Plausible.Ingestion.Request do
end
end
- on_full_build do
+ on_ee do
defp put_revenue_source(changeset, request_body) do
Plausible.Ingestion.Request.Revenue.put_revenue_source(changeset, request_body)
end
diff --git a/lib/plausible/plugins/api/token.ex b/lib/plausible/plugins/api/token.ex
index 4f64ccbe84..7fe3c2f2d2 100644
--- a/lib/plausible/plugins/api/token.ex
+++ b/lib/plausible/plugins/api/token.ex
@@ -64,7 +64,7 @@ defmodule Plausible.Plugins.API.Token do
can scan repositories for accidental secret commits.
"""
def prefix() do
- on_full_build do
+ on_ee do
env = Application.get_env(:plausible, :environment)
case env do
diff --git a/lib/plausible/s3.ex b/lib/plausible/s3.ex
index 3db53297b9..2cf3ae1d43 100644
--- a/lib/plausible/s3.ex
+++ b/lib/plausible/s3.ex
@@ -58,7 +58,7 @@ defmodule Plausible.S3 do
# to make ClickHouse see MinIO in dev and test envs we replace
# the host in the S3 URL with host.docker.internal or whatever's set in $MINIO_HOST_FOR_CLICKHOUSE
- if Mix.env() in [:dev, :test, :small_dev, :small_test] do
+ if Mix.env() in [:dev, :test, :ce_dev, :ce_test] do
defp extract_s3_url(presigned_url) do
[s3_url, _] = String.split(presigned_url, "?")
default_ch_host = unless System.get_env("CI"), do: "host.docker.internal"
diff --git a/lib/plausible/site/memberships/accept_invitation.ex b/lib/plausible/site/memberships/accept_invitation.ex
index 44f9e20ac4..bffe63105e 100644
--- a/lib/plausible/site/memberships/accept_invitation.ex
+++ b/lib/plausible/site/memberships/accept_invitation.ex
@@ -106,7 +106,7 @@ defmodule Plausible.Site.Memberships.AcceptInvitation do
|> downgrade_previous_owner(site, user)
|> Multi.insert_or_update(:membership, membership)
|> Multi.run(:update_locked_sites, fn _, _ ->
- on_full_build do
+ on_ee do
# At this point this function should be guaranteed to unlock
# the site, via `Invitations.ensure_can_take_ownership/2`.
:unlocked = Billing.SiteLocker.update_sites_for(user, send_email?: false)
diff --git a/lib/plausible/site/memberships/invitations.ex b/lib/plausible/site/memberships/invitations.ex
index 5c2bbe4530..c8569aad34 100644
--- a/lib/plausible/site/memberships/invitations.ex
+++ b/lib/plausible/site/memberships/invitations.ex
@@ -64,7 +64,7 @@ defmodule Plausible.Site.Memberships.Invitations do
:ok
end
- on_full_build do
+ on_ee do
@spec ensure_can_take_ownership(Site.t(), Auth.User.t()) ::
:ok | {:error, Quota.over_limits_error() | :no_plan}
def ensure_can_take_ownership(site, new_owner) do
diff --git a/lib/plausible/stats.ex b/lib/plausible/stats.ex
index b37e8fe771..3a5f33a7b9 100644
--- a/lib/plausible/stats.ex
+++ b/lib/plausible/stats.ex
@@ -31,7 +31,7 @@ defmodule Plausible.Stats do
CurrentVisitors.current_visitors(site)
end
- on_full_build do
+ on_ee do
def funnel(site, query, funnel) do
include_sentry_replay_info()
Plausible.Stats.Funnel.funnel(site, query, funnel)
diff --git a/lib/plausible/stats/aggregate.ex b/lib/plausible/stats/aggregate.ex
index 45e3010d76..27d4290b01 100644
--- a/lib/plausible/stats/aggregate.ex
+++ b/lib/plausible/stats/aggregate.ex
@@ -7,7 +7,7 @@ defmodule Plausible.Stats.Aggregate do
def aggregate(site, query, metrics) do
{currency, metrics} =
- on_full_build do
+ on_ee do
Plausible.Stats.Goal.Revenue.get_revenue_tracking_currency(site, query, metrics)
else
{nil, metrics}
@@ -200,7 +200,7 @@ defmodule Plausible.Stats.Aggregate do
defp maybe_round_value(entry), do: entry
- on_full_build do
+ on_ee do
defp cast_revenue_metrics_to_money(results, revenue_goals) do
Plausible.Stats.Goal.Revenue.cast_revenue_metrics_to_money(results, revenue_goals)
end
diff --git a/lib/plausible/stats/base.ex b/lib/plausible/stats/base.ex
index 923ab53b32..50ecc69633 100644
--- a/lib/plausible/stats/base.ex
+++ b/lib/plausible/stats/base.ex
@@ -48,7 +48,7 @@ defmodule Plausible.Stats.Base do
where: e.timestamp >= ^first_datetime and e.timestamp < ^last_datetime
)
- on_full_build do
+ on_ee do
q = Plausible.Stats.Sampling.add_query_hint(q, query)
end
@@ -142,7 +142,7 @@ defmodule Plausible.Stats.Base do
from s in q, where: s.start >= ^first_datetime and s.start < ^last_datetime
end
- on_full_build do
+ on_ee do
sessions_q = Plausible.Stats.Sampling.add_query_hint(sessions_q, query)
end
@@ -254,7 +254,7 @@ defmodule Plausible.Stats.Base do
}
end
- on_full_build do
+ on_ee do
defp select_event_metric(:total_revenue) do
%{total_revenue: Plausible.Stats.Goal.Revenue.total_revenue_query()}
end
diff --git a/lib/plausible/stats/breakdown.ex b/lib/plausible/stats/breakdown.ex
index 9eb64bab27..e2b0b40667 100644
--- a/lib/plausible/stats/breakdown.ex
+++ b/lib/plausible/stats/breakdown.ex
@@ -13,7 +13,7 @@ defmodule Plausible.Stats.Breakdown do
@session_metrics [:bounce_rate, :visit_duration]
- @revenue_metrics on_full_build(do: Plausible.Stats.Goal.Revenue.revenue_metrics(), else: [])
+ @revenue_metrics on_ee(do: Plausible.Stats.Goal.Revenue.revenue_metrics(), else: [])
@event_metrics [:visits, :visitors, :pageviews, :events, :percentage] ++ @revenue_metrics
@@ -38,7 +38,7 @@ defmodule Plausible.Stats.Breakdown do
no_revenue = {nil, metrics -- @revenue_metrics}
{revenue_goals, metrics} =
- on_full_build do
+ on_ee do
if Plausible.Billing.Feature.RevenueGoals.enabled?(site) do
revenue_goals = Enum.filter(event_goals, &Plausible.Goal.Revenue.revenue?/1)
metrics = if Enum.empty?(revenue_goals), do: metrics -- @revenue_metrics, else: metrics
@@ -122,7 +122,7 @@ defmodule Plausible.Stats.Breakdown do
def breakdown(site, query, "event:props:" <> custom_prop = property, metrics, pagination, opts) do
{currency, metrics} =
- on_full_build do
+ on_ee do
Plausible.Stats.Goal.Revenue.get_revenue_tracking_currency(site, query, metrics)
else
{nil, metrics}
@@ -758,7 +758,7 @@ defmodule Plausible.Stats.Breakdown do
])
end
- on_full_build do
+ on_ee do
defp cast_revenue_metrics_to_money(results, revenue_goals) do
Plausible.Stats.Goal.Revenue.cast_revenue_metrics_to_money(results, revenue_goals)
end
diff --git a/lib/plausible/stats/clickhouse.ex b/lib/plausible/stats/clickhouse.ex
index 139e92e99f..52d2e889ce 100644
--- a/lib/plausible/stats/clickhouse.ex
+++ b/lib/plausible/stats/clickhouse.ex
@@ -113,7 +113,7 @@ defmodule Plausible.Stats.Clickhouse do
offset: ^offset
)
- on_full_build do
+ on_ee do
referrers = Plausible.Stats.Sampling.add_query_hint(referrers, 10_000_000)
end
@@ -193,7 +193,7 @@ defmodule Plausible.Stats.Clickhouse do
order_by: [e.site_id, fragment("toStartOfHour(timestamp)")]
)
- on_full_build do
+ on_ee do
current_q = Plausible.Stats.Sampling.add_query_hint(current_q)
end
@@ -231,7 +231,7 @@ defmodule Plausible.Stats.Clickhouse do
},
group_by: [e.site_id]
- on_full_build do
+ on_ee do
query = Plausible.Stats.Sampling.add_query_hint(query)
end
@@ -260,7 +260,7 @@ defmodule Plausible.Stats.Clickhouse do
where: e.timestamp >= ^first_datetime and e.timestamp < ^last_datetime
)
- on_full_build do
+ on_ee do
q = Plausible.Stats.Sampling.add_query_hint(q, 10_000_000)
end
diff --git a/lib/plausible/stats/metrics.ex b/lib/plausible/stats/metrics.ex
index b1c34f2bbe..36a1c3743e 100644
--- a/lib/plausible/stats/metrics.ex
+++ b/lib/plausible/stats/metrics.ex
@@ -17,7 +17,7 @@ defmodule Plausible.Stats.Metrics do
:events,
:conversion_rate,
:time_on_page
- ] ++ on_full_build(do: Plausible.Stats.Goal.Revenue.revenue_metrics(), else: [])
+ ] ++ on_ee(do: Plausible.Stats.Goal.Revenue.revenue_metrics(), else: [])
@metric_mappings Enum.into(@all_metrics, %{}, fn metric -> {to_string(metric), metric} end)
diff --git a/lib/plausible/stats/query.ex b/lib/plausible/stats/query.ex
index 852f4e3723..4d0b512051 100644
--- a/lib/plausible/stats/query.ex
+++ b/lib/plausible/stats/query.ex
@@ -31,7 +31,7 @@ defmodule Plausible.Stats.Query do
|> put_imported_opts(site, params)
|> maybe_drop_prop_filter(site)
- on_full_build do
+ on_ee do
query = Plausible.Stats.Sampling.put_threshold(query, params)
end
diff --git a/lib/plausible/stats/timeseries.ex b/lib/plausible/stats/timeseries.ex
index 16594594bf..3b400907b1 100644
--- a/lib/plausible/stats/timeseries.ex
+++ b/lib/plausible/stats/timeseries.ex
@@ -25,7 +25,7 @@ defmodule Plausible.Stats.Timeseries do
Plausible.Stats.TableDecider.partition_metrics(metrics, query)
{currency, event_metrics} =
- on_full_build do
+ on_ee do
Plausible.Stats.Goal.Revenue.get_revenue_tracking_currency(site, query, event_metrics)
else
{nil, event_metrics}
@@ -245,7 +245,7 @@ defmodule Plausible.Stats.Timeseries do
end)
end
- on_full_build do
+ on_ee do
defp cast_revenue_metrics_to_money(results, revenue_goals) do
Plausible.Stats.Goal.Revenue.cast_revenue_metrics_to_money(results, revenue_goals)
end
diff --git a/lib/plausible/users.ex b/lib/plausible/users.ex
index 727e35bb4a..03e4f8b883 100644
--- a/lib/plausible/users.ex
+++ b/lib/plausible/users.ex
@@ -12,7 +12,7 @@ defmodule Plausible.Users do
alias Plausible.Repo
@spec on_trial?(Auth.User.t()) :: boolean()
- on_full_build do
+ on_ee do
def on_trial?(%Auth.User{trial_expiry_date: nil}), do: false
def on_trial?(user) do
@@ -36,7 +36,7 @@ defmodule Plausible.Users do
end
@spec accept_traffic_until(Auth.User.t()) :: Date.t()
- on_full_build do
+ on_ee do
def accept_traffic_until(user) do
user = with_subscription(user)
diff --git a/lib/plausible_release.ex b/lib/plausible_release.ex
index 057e3bc53b..9d23382e76 100644
--- a/lib/plausible_release.ex
+++ b/lib/plausible_release.ex
@@ -12,7 +12,7 @@ defmodule Plausible.Release do
]
def should_be_first_launch? do
- on_full_build do
+ on_ee do
false
else
not (_has_users? = Repo.exists?(Plausible.Auth.User))
diff --git a/lib/plausible_web/controllers/api/stats_controller.ex b/lib/plausible_web/controllers/api/stats_controller.ex
index 3d90f84e30..8b411eef0b 100644
--- a/lib/plausible_web/controllers/api/stats_controller.ex
+++ b/lib/plausible_web/controllers/api/stats_controller.ex
@@ -10,7 +10,7 @@ defmodule PlausibleWeb.Api.StatsController do
require Logger
- @revenue_metrics on_full_build(do: Plausible.Stats.Goal.Revenue.revenue_metrics(), else: [])
+ @revenue_metrics on_ee(do: Plausible.Stats.Goal.Revenue.revenue_metrics(), else: [])
plug(:date_validation_plug)
@@ -347,13 +347,13 @@ defmodule PlausibleWeb.Api.StatsController do
top_stats_entry(results, comparison, "Unique visitors", :total_visitors),
top_stats_entry(results, comparison, "Unique conversions", :visitors, graphable?: true),
top_stats_entry(results, comparison, "Total conversions", :events, graphable?: true),
- on_full_build do
+ on_ee do
top_stats_entry(results, comparison, "Average revenue", :average_revenue,
formatter: &format_money/1,
graphable?: true
)
end,
- on_full_build do
+ on_ee do
top_stats_entry(results, comparison, "Total revenue", :total_revenue,
formatter: &format_money/1,
graphable?: true
@@ -480,7 +480,7 @@ defmodule PlausibleWeb.Api.StatsController do
end
end
- on_full_build do
+ on_ee do
def funnel(conn, %{"id" => funnel_id} = params) do
site = Plausible.Repo.preload(conn.assigns.site, :owner)
@@ -1377,7 +1377,7 @@ defmodule PlausibleWeb.Api.StatsController do
end
end
- on_full_build do
+ on_ee do
defdelegate format_revenue_metric(metric_value), to: PlausibleWeb.Controllers.API.Revenue
defdelegate format_money(money), to: PlausibleWeb.Controllers.API.Revenue
else
diff --git a/lib/plausible_web/controllers/site_controller.ex b/lib/plausible_web/controllers/site_controller.ex
index 00e093bb9a..a89519821e 100644
--- a/lib/plausible_web/controllers/site_controller.ex
+++ b/lib/plausible_web/controllers/site_controller.ex
@@ -679,7 +679,7 @@ defmodule PlausibleWeb.SiteController do
|> redirect(external: Routes.site_path(conn, :settings_integrations, site.domain))
end
- on_full_build do
+ on_ee do
# exported archives are downloaded from object storage
else
alias Plausible.Exports
diff --git a/lib/plausible_web/controllers/stats_controller.ex b/lib/plausible_web/controllers/stats_controller.ex
index c360c26bf7..ca921c045f 100644
--- a/lib/plausible_web/controllers/stats_controller.ex
+++ b/lib/plausible_web/controllers/stats_controller.ex
@@ -89,7 +89,7 @@ defmodule PlausibleWeb.StatsController do
end
end
- on_full_build do
+ on_ee do
defp list_funnels(site) do
Plausible.Funnels.list(site)
end
@@ -356,7 +356,7 @@ defmodule PlausibleWeb.StatsController do
defp get_flags(_user, _site), do: %{}
defp is_dbip() do
- on_full_build do
+ on_ee do
false
else
Plausible.Geo.database_type()
diff --git a/lib/plausible_web/email.ex b/lib/plausible_web/email.ex
index 01218d896f..3a428b16aa 100644
--- a/lib/plausible_web/email.ex
+++ b/lib/plausible_web/email.ex
@@ -349,7 +349,7 @@ defmodule PlausibleWeb.Email do
def export_success(user, site, download_url, expires_at) do
subject =
- on_full_build do
+ on_ee do
"Your Plausible Analytics export is now ready for download"
else
"Your export is now ready for download"
@@ -377,7 +377,7 @@ defmodule PlausibleWeb.Email do
def export_failure(user, site) do
subject =
- on_full_build do
+ on_ee do
"Your Plausible Analytics export has failed"
else
"Your export has failed"
diff --git a/lib/plausible_web/endpoint.ex b/lib/plausible_web/endpoint.ex
index 8b83b084c1..7721b75668 100644
--- a/lib/plausible_web/endpoint.ex
+++ b/lib/plausible_web/endpoint.ex
@@ -36,7 +36,7 @@ defmodule PlausibleWeb.Endpoint do
static_paths = ~w(css js images favicon.ico)
static_paths =
- on_full_build do
+ on_ee do
# NOTE: The Cloud uses custom robots.txt from https://github.com/plausible/website: https://plausible.io/robots.txt
static_paths
else
@@ -50,7 +50,7 @@ defmodule PlausibleWeb.Endpoint do
only: static_paths
)
- on_full_build do
+ on_ee do
plug(Plug.Static,
at: "/kaffy",
from: :kaffy,
diff --git a/lib/plausible_web/live/goal_settings/form.ex b/lib/plausible_web/live/goal_settings/form.ex
index d9d39c420b..c6c41a3307 100644
--- a/lib/plausible_web/live/goal_settings/form.ex
+++ b/lib/plausible_web/live/goal_settings/form.ex
@@ -149,7 +149,7 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do
</div>
<div
- :if={full_build?()}
+ :if={ee?()}
class="mt-6 space-y-3"
x-data={
Jason.encode!(%{
@@ -211,7 +211,7 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do
submit_name={@f[:currency].name}
module={ComboBox}
suggest_fun={
- on_full_build do
+ on_ee do
fn
"", [] ->
Plausible.Goal.Revenue.currency_options()
diff --git a/lib/plausible_web/live/register_form.ex b/lib/plausible_web/live/register_form.ex
index 8b80fc1d7c..422a1c447f 100644
--- a/lib/plausible_web/live/register_form.ex
+++ b/lib/plausible_web/live/register_form.ex
@@ -64,7 +64,7 @@ defmodule PlausibleWeb.Live.RegisterForm do
~H"""
<div class="mx-auto mt-6 text-center dark:text-gray-300">
<h1 class="text-3xl font-black">
- <%= if small_build?() or @live_action == :register_from_invitation_form do %>
+ <%= if ce?() or @live_action == :register_from_invitation_form do %>
Register your Plausible Analytics account
<% else %>
Register your 30-day free trial
@@ -158,7 +158,7 @@ defmodule PlausibleWeb.Live.RegisterForm do
<% end %>
<% submit_text =
- if small_build?() or @invitation do
+ if ce?() or @invitation do
"Create my account →"
else
"Start my free trial →"
@@ -301,7 +301,7 @@ defmodule PlausibleWeb.Live.RegisterForm do
defp add_user(socket, user) do
case Repo.insert(user) do
{:ok, _user} ->
- on_full_build do
+ on_ee do
metrics_params =
if socket.assigns.invitation do
%{
diff --git a/lib/plausible_web/live/sites.ex b/lib/plausible_web/live/sites.ex
index 3ef7f2f198..334f3ce459 100644
--- a/lib/plausible_web/live/sites.ex
+++ b/lib/plausible_web/live/sites.ex
@@ -682,7 +682,7 @@ defmodule PlausibleWeb.Live.Sites do
defp check_limits(invitation, _), do: %{invitation: invitation}
defp check_features(%{role: :owner, site: site} = invitation, user) do
- case Invitations.check_feature_access(site, user, small_build?()) do
+ case Invitations.check_feature_access(site, user, ce?()) do
:ok ->
%{invitation: invitation}
diff --git a/lib/plausible_web/router.ex b/lib/plausible_web/router.ex
index fabc192563..a0ece8f72e 100644
--- a/lib/plausible_web/router.ex
+++ b/lib/plausible_web/router.ex
@@ -10,7 +10,7 @@ defmodule PlausibleWeb.Router do
plug :fetch_live_flash
plug :put_secure_browser_headers
plug PlausibleWeb.Plugs.NoRobots
- on_full_build(do: nil, else: plug(PlausibleWeb.FirstLaunchPlug, redirect_to: "/register"))
+ on_ee(do: nil, else: plug(PlausibleWeb.FirstLaunchPlug, redirect_to: "/register"))
plug PlausibleWeb.SessionTimeoutPlug, timeout_after_seconds: @two_weeks_in_seconds
plug PlausibleWeb.AuthPlug
plug PlausibleWeb.LastSeenPlug
@@ -51,7 +51,7 @@ defmodule PlausibleWeb.Router do
plug :accepts, ["json"]
end
- on_full_build do
+ on_ee do
pipeline :flags do
plug :accepts, ["html"]
plug :put_secure_browser_headers
@@ -62,24 +62,24 @@ defmodule PlausibleWeb.Router do
end
end
- if Mix.env() in [:dev, :small_dev] do
+ if Mix.env() in [:dev, :ce_dev] do
forward "/sent-emails", Bamboo.SentEmailViewerPlug
end
- on_full_build do
+ on_ee do
use Kaffy.Routes,
scope: "/crm",
pipe_through: [PlausibleWeb.Plugs.NoRobots, PlausibleWeb.CRMAuthPlug]
end
- on_full_build do
+ on_ee do
scope "/crm", PlausibleWeb do
pipe_through :flags
get "/auth/user/:user_id/usage", AdminController, :usage
end
end
- on_full_build do
+ on_ee do
scope path: "/flags" do
pipe_through :flags
forward "/", FunWithFlags.UI.Router, namespace: "flags"
@@ -129,7 +129,7 @@ defmodule PlausibleWeb.Router do
scope "/api/stats", PlausibleWeb.Api do
pipe_through :internal_stats_api
- on_full_build do
+ on_ee do
get "/:domain/funnels/:id", StatsController, :funnel
end
@@ -168,7 +168,7 @@ defmodule PlausibleWeb.Router do
get "/timeseries", ExternalStatsController, :timeseries
end
- on_full_build do
+ on_ee do
scope "/api/v1/sites", PlausibleWeb.Api do
pipe_through [:public_api, PlausibleWeb.AuthorizeSitesApiPlug]
@@ -352,7 +352,7 @@ defmodule PlausibleWeb.Router do
get "/:website/settings/goals", SiteController, :settings_goals
get "/:website/settings/properties", SiteController, :settings_props
- on_full_build do
+ on_ee do
get "/:website/settings/funnels", SiteController, :settings_funnels
end
@@ -391,7 +391,7 @@ defmodule PlausibleWeb.Router do
delete "/:website/settings/forget-imported", SiteController, :forget_imported
delete "/:website/settings/forget-import/:import_id", SiteController, :forget_import
- on_full_build do
+ on_ee do
# exported archives are downloaded from object storage
else
get "/:website/exported-archive", SiteController, :download_local_export
diff --git a/lib/plausible_web/templates/auth/activate.html.heex b/lib/plausible_web/templates/auth/activate.html.heex
index b406face69..a1c8e2aa60 100644
--- a/lib/plausible_web/templates/auth/activate.html.heex
+++ b/lib/plausible_web/templates/auth/activate.html.heex
@@ -45,7 +45,7 @@
method: :post
) %> to <%= @conn.assigns[:current_user].email %>
</li>
- <%= if full_build?() do %>
+ <%= if ee?() do %>
<li>
<a class="underline text-indigo-600" href="https://plausible.io/contact">
Contact us
diff --git a/lib/plausible_web/templates/auth/password_reset_request_success.html.heex b/lib/plausible_web/templates/auth/password_reset_request_success.html.heex
index 846a7c03e2..f345d761d5 100644
--- a/lib/plausible_web/templates/auth/password_reset_request_success.html.heex
+++ b/lib/plausible_web/templates/auth/password_reset_request_success.html.heex
@@ -11,13 +11,13 @@
You might have used an email address that's not registered in our database. Please verify the email address associated with your Plausible account and attempt the password reset once more.
</div>
<div class="mt-2 text-sm text-gray-600 dark:text-gray-400 leading-tight">
- <span :if={small_build?()}>
+ <span :if={ce?()}>
Certain that you're using the correct email address but still aren't receiving the password reset email? Please check your spam folder or ask on our <a
href="https://github.com/plausible/analytics/discussions"
class="text-indigo-500"
>community-supported forum</a>.
</span>
- <span :if={full_build?()}>
+ <span :if={ee?()}>
Certain that you're using the correct email address but still aren't receiving the password reset email? Please check your spam folder or <a
href="https://plausible.io/contact"
class="text-indigo-500"
diff --git a/lib/plausible_web/templates/auth/user_settings.html.heex b/lib/plausible_web/templates/auth/user_settings.html.heex
index fb0746e2c3..95acddcd24 100644
--- a/lib/plausible_web/templates/auth/user_settings.html.heex
+++ b/lib/plausible_web/templates/auth/user_settings.html.heex
@@ -1,5 +1,5 @@
<div x-data="{disable2FAOpen: false, regenerate2FAOpen: false}">
- <%= if full_build?() do %>
+ <%= if ee?() do %>
<div class="max-w-2xl px-8 pt-4 pb-8 mx-auto mt-24 bg-white border-t-2 border-orange-200 rounded rounded-t-none shadow-md dark:bg-gray-800 dark:border-orange-200 ">
<div class="flex flex-wrap justify-between">
<h2 class="text-xl font-black dark:text-gray-100 w-max mr-4 mt-2">Subscription Plan</h2>
diff --git a/lib/plausible_web/templates/auth/verify_2fa.html.heex b/lib/plausible_web/templates/auth/verify_2fa.html.heex
index f166018908..fbe78db278 100644
--- a/lib/plausible_web/templates/auth/verify_2fa.html.heex
+++ b/lib/plausible_web/templates/auth/verify_2fa.html.heex
@@ -30,7 +30,7 @@
>
Use recovery code
</a>
- <%= if full_build?() do %>
+ <%= if ee?() do %>
<br /> Lost your recovery codes?
<a href="https://plausible.io/contact" class="underline text-indigo-600">
Contact us
diff --git a/lib/plausible_web/templates/auth/verify_2fa_recovery_code.html.heex b/lib/plausible_web/templates/auth/verify_2fa_recovery_code.html.heex
index 8c893acf59..8905c056e5 100644
--- a/lib/plausible_web/templates/auth/verify_2fa_recovery_code.html.heex
+++ b/lib/plausible_web/templates/auth/verify_2fa_recovery_code.html.heex
@@ -46,7 +46,7 @@
<a href={Routes.auth_path(@conn, :verify_2fa)} class="underline text-indigo-600">
Enter verification code
</a>
- <%= if full_build?() do %>
+ <%= if ee?() do %>
<br /> Lost your recovery codes?
<a href="https://plausible.io/contact" class="underline text-indigo-600">
Contact us
diff --git a/lib/plausible_web/templates/email/csv_import.html.heex b/lib/plausible_web/templates/email/csv_import.html.heex
index b4ff1a4fcf..feef762cb0 100644
--- a/lib/plausible_web/templates/email/csv_import.html.heex
+++ b/lib/plausible_web/templates/email/csv_import.html.heex
@@ -7,7 +7,7 @@
<% else %>
Unfortunately, your CSV import for <%= @site_import.site.domain %> did not complete successfully. Sorry about that!
<br /><br /> Please try to do the import once again.
- <%= if full_build?() do %>
+ <%= if ee?() do %>
<br /> <br />
Please reply to this email to let us know if you're still experiencing issues with the import.
<% end %>
diff --git a/lib/plausible_web/templates/email/export_failure.html.eex b/lib/plausible_web/templates/email/export_failure.html.eex
index ddcfd53f03..f4163bbfe3 100644
--- a/lib/plausible_web/templates/email/export_failure.html.eex
+++ b/lib/plausible_web/templates/email/export_failure.html.eex
@@ -1,5 +1,5 @@
-Your <%= if full_build?() do %>Plausible Analytics <% end %>export for <%= @site.domain %> has encountered an error and was unsuccessful.
+Your <%= if ee?() do %>Plausible Analytics <% end %>export for <%= @site.domain %> has encountered an error and was unsuccessful.
Sorry for the trouble this may have caused.
<br/><br/>
Please attempt to export your data again.
-<%= if full_build?() do %>Should the problem persist, do reply to this email so we can assist. Thanks!<% end %>
+<%= if ee?() do %>Should the problem persist, do reply to this email so we can assist. Thanks!<% end %>
diff --git a/lib/plausible_web/templates/email/export_success.html.eex b/lib/plausible_web/templates/email/export_success.html.eex
index 705daf537b..541a0e11b5 100644
--- a/lib/plausible_web/templates/email/export_success.html.eex
+++ b/lib/plausible_web/templates/email/export_success.html.eex
@@ -1,3 +1,3 @@
-Your <%= if full_build?() do %>Plausible Analytics <% end %>export for <%= @site.domain %> is now ready for download.
+Your <%= if ee?() do %>Plausible Analytics <% end %>export for <%= @site.domain %> is now ready for download.
Please click <a href="<%= @download_url %>">here</a> to start the download process.
<%= if @expires_in do %>Note that this link will expire <%= @expires_in %>.<% end %>
diff --git a/lib/plausible_web/templates/email/google_analytics_import.html.heex b/lib/plausible_web/templates/email/google_analytics_import.html.heex
index c0369fd65b..033d0710a5 100644
--- a/lib/plausible_web/templates/email/google_analytics_import.html.heex
+++ b/lib/plausible_web/templates/email/google_analytics_import.html.heex
@@ -8,7 +8,7 @@
Unfortunately, your Google Analytics import for <%= @site_import.site.domain %> did not complete successfully. Sorry about that!
<br /><br />
Please try to do the import once again. Sometimes the Google Analytics API just randomly returns empty data. It's intermittent and random. Trying to do the import again may return what you need.
- <%= if full_build?() do %>
+ <%= if ee?() do %>
<br /> <br />
Please reply to this email to let us know if you're still experiencing issues with the import.
<% end %>
diff --git a/lib/plausible_web/templates/error/server_error.html.heex b/lib/plausible_web/templates/error/server_error.html.heex
index 24077e525a..41cc9123f7 100644
--- a/lib/plausible_web/templates/error/server_error.html.heex
+++ b/lib/plausible_web/templates/error/server_error.html.heex
@@ -22,14 +22,14 @@
<div class="ml-3">
<h3 class="text-sm font-medium text-yellow-800 dark:text-yellow-400">
There has been a server error.
- <%= if full_build?() do %>
+ <%= if ee?() do %>
But don't worry, we're on it!
<% end %>
</h3>
<div class="mt-2 text-sm text-yellow-700 dark:text-yellow-300">
<p>
- <%= if assigns[:trace_id] && full_build?() do %>
+ <%= if assigns[:trace_id] && ee?() do %>
If you would like to help, tell us what you were trying to do. Our development team will receive your report.
<% else %>
We have been notified.
@@ -40,7 +40,7 @@
</div>
</div>
- <%= if full_build?() do %>
+ <%= if ee?() do %>
<%= if assigns[:trace_id] do %>
<div class="my-6">
<%= form_for :error, Routes.error_report_path(PlausibleWeb.Endpoint, :submit_error_report), fn f -> %>
diff --git a/lib/plausible_web/templates/layout/_footer.html.heex b/lib/plausible_web/templates/layout/_footer.html.heex
index bc51a1b6c1..d90e774c83 100644
--- a/lib/plausible_web/templates/layout/_footer.html.heex
+++ b/lib/plausible_web/templates/layout/_footer.html.heex
@@ -14,12 +14,12 @@
) %>
</h4>
<p class="mt-4 text-base text-gray-400 leading-6">
- <%= if full_build?() do %>
+ <%= if ee?() do %>
Made and hosted in the EU <span class="text-lg">🇪🇺</span> <br />
Solely funded by our subscribers.
<% end %>
- <%= if small_build?() do %>
+ <%= if ce?() do %>
This dashboard is running on self-managed infrastructure, not tested by Plausible Analytics. We cannot vouch for its performance or reliability. For official managed hosting, check out
<.styled_link href="https://plausible.io">
plausible.io
diff --git a/lib/plausible_web/templates/layout/_header.html.heex b/lib/plausible_web/templates/layout/_header.html.heex
index de0402c7fd..f5cd4d944a 100644
--- a/lib/plausible_web/templates/layout/_header.html.heex
+++ b/lib/plausible_web/templates/layout/_header.html.heex
@@ -28,7 +28,7 @@
<% @conn.assigns[:current_user] -> %>
<ul class="flex items-center w-full sm:w-auto">
<li
- :if={full_build?() and Plausible.Users.on_trial?(@conn.assigns[:current_user])}
+ :if={ee?() and Plausible.Users.on_trial?(@conn.assigns[:current_user])}
class="hidden mr-6 sm:block"
>
<%= link(trial_notificaton(@conn.assigns[:current_user]),
@@ -61,7 +61,7 @@
<.dropdown_link new_tab href="https://plausible.io/docs">
Help Center
</.dropdown_link>
- <%= if full_build?() do %>
+ <%= if ee?() do %>
<.dropdown_link new_tab href="https://plausible.io/contact">
Contact Support
</.dropdown_link>
@@ -80,7 +80,7 @@
</:panel>
</.dropdown>
</li>
- <%= if @conn.assigns[:current_user] && full_build?() do %>
+ <%= if @conn.assigns[:current_user] && ee?() do %>
<li id="changelog-notification" class="relative py-2"></li>
<% end %>
</ul>
diff --git a/lib/plausible_web/templates/layout/_tracking.html.heex b/lib/plausible_web/templates/layout/_tracking.html.heex
index e999cbc67a..d5451dc751 100644
--- a/lib/plausible_web/templates/layout/_tracking.html.heex
+++ b/lib/plausible_web/templates/layout/_tracking.html.heex
@@ -1,4 +1,4 @@
-<%= on_full_build do %>
+<%= on_ee do %>
<%= if [email protected][:skip_plausible_tracking] do %>
<script
defer
diff --git a/lib/plausible_web/templates/layout/base_email.html.eex b/lib/plausible_web/templates/layout/base_email.html.eex
index f9ffd0af87..4fb94f6a65 100644
--- a/lib/plausible_web/templates/layout/base_email.html.eex
+++ b/lib/plausible_web/templates/layout/base_email.html.eex
@@ -4,7 +4,7 @@
<%= @inner_content %>
<br /><br />
-<%= if full_build?() do %>Regards,<br />
+<%= if ee?() do %>Regards,<br />
The Plausible Team 💌
<br /><br /><% end %>
@@ -12,4 +12,4 @@ The Plausible Team 💌
<br /><br />
<%= link(plausible_url(), to: plausible_url()) %><br />
-<%= if full_build?() do %>{{{ pm:unsubscribe }}}<% end %>
+<%= if ee?() do %>{{{ pm:unsubscribe }}}<% end %>
diff --git a/lib/plausible_web/templates/layout/priority_email.html.eex b/lib/plausible_web/templates/layout/priority_email.html.eex
index 3ecb07826a..2567b8b1b5 100644
--- a/lib/plausible_web/templates/layout/priority_email.html.eex
+++ b/lib/plausible_web/templates/layout/priority_email.html.eex
@@ -4,7 +4,7 @@
<%= @inner_content %>
<br /><br />
-<%= if full_build?() do %>Regards,<br />
+<%= if ee?() do %>Regards,<br />
The Plausible Team 💌
<br /><br /><% end %>
diff --git a/lib/plausible_web/templates/site/csv_import.html.heex b/lib/plausible_web/templates/site/csv_import.html.heex
index a979419937..f551dc3252 100644
--- a/lib/plausible_web/templates/site/csv_import.html.heex
+++ b/lib/plausible_web/templates/site/csv_import.html.heex
@@ -18,7 +18,7 @@
session: %{
"site_id" => @site.id,
"current_user_id" => @current_user.id,
- "storage" => on_full_build(do: "s3", else: "local")
+ "storage" => on_ee(do: "s3", else: "local")
}
) %>
</div>
diff --git a/lib/plausible_web/templates/site/settings_goals.html.heex b/lib/plausible_web/templates/site/settings_goals.html.heex
index 8cc16afd21..8ea638a516 100644
--- a/lib/plausible_web/templates/site/settings_goals.html.heex
+++ b/lib/plausible_web/templates/site/settings_goals.html.heex
@@ -4,7 +4,7 @@
<p class="mt-2 text-sm leading-5 text-gray-500 dark:text-gray-200">
Define actions that you want your users to take, like visiting a certain page, submitting a form, etc.
</p>
- <p :if={full_build?()} class="text-sm leading-5 text-gray-500 dark:text-gray-200">
+ <p :if={ee?()} class="text-sm leading-5 text-gray-500 dark:text-gray-200">
You can also <a
href={Routes.site_path(@conn, :settings_funnels, @site.domain)}
class="text-indigo-500 underline"
diff --git a/lib/plausible_web/templates/site/settings_imports_exports.html.heex b/lib/plausible_web/templates/site/settings_imports_exports.html.heex
index 983d88ccc5..eb04a3eae2 100644
--- a/lib/plausible_web/templates/site/settings_imports_exports.html.heex
+++ b/lib/plausible_web/templates/site/settings_imports_exports.html.heex
@@ -35,7 +35,7 @@
session: %{
"site_id" => @site.id,
"email_to" => @current_user.email,
- "storage" => on_full_build(do: "s3", else: "local")
+ "storage" => on_ee(do: "s3", else: "local")
}
) %>
</div>
diff --git a/lib/plausible_web/templates/stats/waiting_first_pageview.html.heex b/lib/plausible_web/templates/stats/waiting_first_pageview.html.heex
index f3a7457133..5bc248735e 100644
--- a/lib/plausible_web/templates/stats/waiting_first_pageview.html.heex
+++ b/lib/plausible_web/templates/stats/waiting_first_pageview.html.heex
@@ -42,14 +42,14 @@
</.styled_link>
<br />
- <span :if={full_build?()}>
+ <span :if={ee?()}>
Check the
<.styled_link href={Routes.site_path(@conn, :settings_general, @site.domain)}>
site settings
</.styled_link>
to invite team members, <br /> import historical stats and more.
</span>
- <span :if={small_build?()}>
+ <span :if={ce?()}>
Still not working? Ask on our
<.styled_link new_tab href="https://github.com/plausible/analytics/discussions">
community-supported forum
diff --git a/lib/plausible_web/views/error_view.ex b/lib/plausible_web/views/error_view.ex
index f84a1f0f15..2e642e7e15 100644
--- a/lib/plausible_web/views/error_view.ex
+++ b/lib/plausible_web/views/error_view.ex
@@ -4,7 +4,7 @@ defmodule PlausibleWeb.ErrorView do
def render("500.json", %{conn: %{assigns: %{plugins_api: true}}}) do
contact_support_note =
- on_full_build do
+ on_ee do
"If the problem persists please contact [email protected]"
end
diff --git a/lib/plausible_web/views/layout_view.ex b/lib/plausible_web/views/layout_view.ex
index bc4c52d357..17d9a2f68d 100644
--- a/lib/plausible_web/views/layout_view.ex
+++ b/lib/plausible_web/views/layout_view.ex
@@ -41,7 +41,7 @@ defmodule PlausibleWeb.LayoutView do
end
def logo_path(filename) do
- if full_build?() do
+ if ee?() do
Path.join("/images/ee/", filename)
else
Path.join("/images/ce/", filename)
@@ -61,7 +61,7 @@ defmodule PlausibleWeb.LayoutView do
%{key: "People", value: "people", icon: :users},
%{key: "Visibility", value: "visibility", icon: :eye},
%{key: "Goals", value: "goals", icon: :check_circle},
- on_full_build do
+ on_ee do
%{key: "Funnels", value: "funnels", icon: :funnel}
end,
%{key: "Custom Properties", value: "properties", icon: :document_text},
diff --git a/lib/workers/clickhouse_clean_sites.ex b/lib/workers/clickhouse_clean_sites.ex
index 974dd0d9dc..0d2475d064 100644
--- a/lib/workers/clickhouse_clean_sites.ex
+++ b/lib/workers/clickhouse_clean_sites.ex
@@ -30,7 +30,7 @@ defmodule Plausible.Workers.ClickhouseCleanSites do
"imported_visitors"
]
- @settings if Mix.env() in [:test, :small_test], do: [mutations_sync: 2], else: []
+ @settings if Mix.env() in [:test, :ce_test], do: [mutations_sync: 2], else: []
def perform(_job) do
deleted_sites = get_deleted_sites_with_clickhouse_data()
diff --git a/mix.exs b/mix.exs
index 619e367a0d..0974037a76 100644
--- a/mix.exs
+++ b/mix.exs
@@ -10,7 +10,7 @@ defmodule Plausible.MixProject do
version: System.get_env("APP_VERSION", "0.0.1"),
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
- start_permanent: Mix.env() in [:prod, :small],
+ start_permanent: Mix.env() in [:prod, :ce],
aliases: aliases(),
deps: deps(),
test_coverage: [
@@ -51,10 +51,10 @@ defmodule Plausible.MixProject do
defp elixirc_paths(env) when env in [:test, :dev],
do: ["lib", "test/support", "extra/lib"]
- defp elixirc_paths(env) when env in [:small_test, :small_dev],
+ defp elixirc_paths(env) when env in [:ce_test, :ce_dev],
do: ["lib", "test/support"]
- defp elixirc_paths(:small), do: ["lib"]
+ defp elixirc_paths(:ce), do: ["lib"]
defp elixirc_paths(_), do: ["lib", "extra/lib"]
# Specifies your project dependencies.
@@ -68,7 +68,7 @@ defmodule Plausible.MixProject do
{:bamboo_smtp, "~> 4.1"},
{:bamboo_mua, "~> 0.1.4"},
{:bcrypt_elixir, "~> 3.0"},
- {:bypass, "~> 2.1", only: [:dev, :test, :small_test]},
+ {:bypass, "~> 2.1", only: [:dev, :test, :ce_test]},
{:ecto_ch, "~> 0.3"},
{:cloak, "~> 1.1"},
{:cloak_ecto, "~> 1.2"},
@@ -77,15 +77,15 @@ defmodule Plausible.MixProject do
{:credo, "~> 1.5", only: [:dev, :test], runtime: false},
{:csv, "~> 2.3"},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
- {:double, "~> 0.8.0", only: [:test, :small_test]},
+ {:double, "~> 0.8.0", only: [:test, :ce_test]},
{:ecto, "~> 3.11.0"},
{:ecto_sql, "~> 3.11.0"},
{:envy, "~> 1.1.1"},
{:eqrcode, "~> 0.1.10"},
- {:ex_machina, "~> 2.3", only: [:dev, :test, :small_dev, :small_test]},
+ {:ex_machina, "~> 2.3", only: [:dev, :test, :ce_dev, :ce_test]},
{:excoveralls, "~> 0.10", only: :test},
{:finch, "~> 0.16.0"},
- {:floki, "~> 0.35.0", only: [:dev, :test, :small_dev, :small_test]},
+ {:floki, "~> 0.35.0", only: [:dev, :test, :ce_dev, :ce_test]},
{:fun_with_flags, "~> 1.11.0"},
{:fun_with_flags_ui, "~> 1.0"},
{:locus, "~> 2.3"},
@@ -94,7 +94,7 @@ defmodule Plausible.MixProject do
{:jason, "~> 1.3"},
{:kaffy, "~> 0.10.2", only: [:dev, :test, :staging, :prod]},
{:location, git: "https://github.com/plausible/location.git"},
- {:mox, "~> 1.0", only: [:test, :small_test]},
+ {:mox, "~> 1.0", only: [:test, :ce_test]},
{:nanoid, "~> 2.1.0"},
{:nimble_totp, "~> 1.0"},
{:oban, "~> 2.17.0"},
@@ -109,7 +109,7 @@ defmodule Plausible.MixProject do
{:phoenix_view, "~> 2.0"},
{:phoenix_ecto, "~> 4.0"},
{:phoenix_html, "~> 3.3", override: true},
- {:phoenix_live_reload, "~> 1.2", only: [:dev, :small_dev]},
+ {:phoenix_live_reload, "~> 1.2", only: [:dev, :ce_dev]},
{:phoenix_pubsub, "~> 2.0"},
{:phoenix_live_view, "~> 0.18"},
{:php_serializer, "~> 2.0"},
@@ -134,8 +134,8 @@ defmodule Plausible.MixProject do
{:joken, "~> 2.5"},
{:paginator, git: "https://github.com/duffelhq/paginator.git"},
{:scrivener_ecto, "~> 2.0"},
- {:esbuild, "~> 0.7", runtime: Mix.env() in [:dev, :small_dev]},
- {:tailwind, "~> 0.2.0", runtime: Mix.env() in [:dev, :small_dev]},
+ {:esbuild, "~> 0.7", runtime: Mix.env() in [:dev, :ce_dev]},
+ {:tailwind, "~> 0.2.0", runtime: Mix.env() in [:dev, :ce_dev]},
{:ex_json_logger, "~> 1.4.0"},
{:ecto_network, "~> 1.5.0"},
{:ex_aws, "~> 2.5"},
diff --git a/test/plausible/auth/users_test.exs b/test/plausible/auth/users_test.exs
index 6354097a23..be57e9a71d 100644
--- a/test/plausible/auth/users_test.exs
+++ b/test/plausible/auth/users_test.exs
@@ -20,7 +20,7 @@ defmodule Plausible.UsersTest do
end
describe "on_trial?" do
- @describetag :full_build_only
+ @describetag :ee_only
test "is true with >= 0 trial days left" do
user = insert(:user)
@@ -41,7 +41,7 @@ defmodule Plausible.UsersTest do
end
describe "update_accept_traffic_until" do
- @describetag :full_build_only
+ @describetag :ee_only
test "update" do
user = insert(:user) |> User.start_trial() |> Repo.update!()
# 30 for trial + 14
diff --git a/test/plausible/billing/billing_test.exs b/test/plausible/billing/billing_test.exs
index 5ca9461443..e4b19cd85f 100644
--- a/test/plausible/billing/billing_test.exs
+++ b/test/plausible/billing/billing_test.exs
@@ -154,7 +154,7 @@ defmodule Plausible.BillingTest do
refute Repo.reload!(site).locked
end
- @tag :full_build_only
+ @tag :ee_only
test "updates accept_traffic_until" do
user = insert(:user)
@@ -228,7 +228,7 @@ defmodule Plausible.BillingTest do
refute Repo.reload!(site).locked
end
- @tag :full_build_only
+ @tag :ee_only
test "updates accept_traffic_until" do
user = insert(:user)
subscription = insert(:subscription, user: user)
@@ -359,7 +359,7 @@ defmodule Plausible.BillingTest do
end
describe "subscription_payment_succeeded" do
- @tag :full_build_only
+ @tag :ee_only
test "updates accept_traffic_until" do
user = insert(:user)
subscription = insert(:subscription, user: user)
diff --git a/test/plausible/billing/plans_test.exs b/test/plausible/billing/plans_test.exs
index a9b9b0e4e9..2fedaceadc 100644
--- a/test/plausible/billing/plans_test.exs
+++ b/test/plausible/billing/plans_test.exs
@@ -307,7 +307,7 @@ defmodule Plausible.Billing.PlansTest do
assert Plans.suggest_tier(user) == :growth
end
- @tag :full_build_only
+ @tag :ee_only
test "suggests Business tier for a user who used the Revenue Goals, even when they signed up before Business tier release" do
user = insert(:user, inserted_at: ~N[2023-10-25 10:00:00])
site = insert(:site, members: [user])
diff --git a/test/plausible/billing/quota_test.exs b/test/plausible/billing/quota_test.exs
index b4eb5dedba..0bc76baebd 100644
--- a/test/plausible/billing/quota_test.exs
+++ b/test/plausible/billing/quota_test.exs
@@ -4,7 +4,7 @@ defmodule Plausible.Billing.QuotaTest do
alias Plausible.Billing.{Quota, Plans}
alias Plausible.Billing.Feature.{Goals, Props, StatsAPI}
- on_full_build do
+ on_ee do
alias Plausible.Billing.Feature.Funnels
alias Plausible.Billing.Feature.RevenueGoals
end
@@ -17,7 +17,7 @@ defmodule Plausible.Billing.QuotaTest do
@v4_1m_plan_id "857101"
describe "site_limit/1" do
- @describetag :full_build_only
+ @describetag :ee_only
test "returns 50 when user is on an old plan" do
user_on_v1 = insert(:user, subscription: build(:subscription, paddle_plan_id: @v1_plan_id))
@@ -386,7 +386,7 @@ defmodule Plausible.Billing.QuotaTest do
end
describe "team_member_limit/1" do
- @describetag :full_build_only
+ @describetag :ee_only
test "returns unlimited when user is on an old plan" do
user_on_v1 = insert(:user, subscription: build(:subscription, paddle_plan_id: @v1_plan_id))
user_on_v2 = insert(:user, subscription: build(:subscription, paddle_plan_id: @v2_plan_id))
@@ -458,7 +458,7 @@ defmodule Plausible.Billing.QuotaTest do
assert [Props] == Quota.features_usage(user)
end
- on_full_build do
+ on_ee do
test "returns [Funnels] when user/site uses funnels" do
user = insert(:user)
site = insert(:site, memberships: [build(:site_membership, user: user, role: :owner)])
@@ -488,7 +488,7 @@ defmodule Plausible.Billing.QuotaTest do
assert [StatsAPI] == Quota.features_usage(user)
end
- on_full_build do
+ on_ee do
test "returns multiple features" do
user = insert(:user)
@@ -522,7 +522,7 @@ defmodule Plausible.Billing.QuotaTest do
end
describe "allowed_features_for/1" do
- on_full_build do
+ on_ee do
test "users with expired trials have no access to subscription features" do
user = insert(:user, trial_expiry_date: ~D[2023-01-01])
assert [Goals] == Quota.allowed_features_for(user)
@@ -544,7 +544,7 @@ defmodule Plausible.Billing.QuotaTest do
assert [Goals, Props, StatsAPI] == Quota.allowed_features_for(user)
end
- on_full_build do
+ on_ee do
test "returns the enterprise plan features" do
user = insert(:user)
diff --git a/test/plausible/funnels_test.exs b/test/plausible/funnels_test.exs
index 4273c64e99..47d13b191d 100644
--- a/test/plausible/funnels_test.exs
+++ b/test/plausible/funnels_test.exs
@@ -1,10 +1,10 @@
defmodule Plausible.FunnelsTest do
use Plausible.DataCase
- @moduletag :full_build_only
+ @moduletag :ee_only
use Plausible
- on_full_build do
+ on_ee do
alias Plausible.Goals
alias Plausible.Funnels
alias Plausible.Stats
diff --git a/test/plausible/goals_test.exs b/test/plausible/goals_test.exs
index 15a2378047..e17f62084a 100644
--- a/test/plausible/goals_test.exs
+++ b/test/plausible/goals_test.exs
@@ -48,7 +48,7 @@ defmodule Plausible.GoalsTest do
assert {"has already been taken", _} = changeset.errors[:event_name]
end
- @tag :full_build_only
+ @tag :ee_only
test "create/2 sets site.updated_at for revenue goal" do
site_1 = insert(:site, updated_at: DateTime.add(DateTime.utc_now(), -3600))
@@ -64,7 +64,7 @@ defmodule Plausible.GoalsTest do
:eq
end
- @tag :full_build_only
+ @tag :ee_only
test "create/2 creates revenue goal" do
site = insert(:site)
{:ok, goal} = Goals.create(site, %{"event_name" => "Purchase", "currency" => "EUR"})
@@ -73,7 +73,7 @@ defmodule Plausible.GoalsTest do
assert goal.currency == :EUR
end
- @tag :full_build_only
+ @tag :ee_only
test "create/2 returns error when site does not have access to revenue goals" do
user = insert(:user, subscription: build(:growth_subscription))
site = insert(:site, members: [user])
@@ -82,7 +82,7 @@ defmodule Plausible.GoalsTest do
Goals.create(site, %{"event_name" => "Purchase", "currency" => "EUR"})
end
- @tag :full_build_only
+ @tag :ee_only
test "create/2 fails for unknown currency code" do
site = insert(:site)
@@ -92,7 +92,7 @@ defmodule Plausible.GoalsTest do
assert [currency: {"is invalid", _}] = changeset.errors
end
- @tag :full_build_only
+ @tag :ee_only
test "list_revenue_goals/1 lists event_names and currencies for each revenue goal" do
site = insert(:site)
@@ -155,7 +155,7 @@ defmodule Plausible.GoalsTest do
assert [] = Goals.for_site(site)
end
- on_full_build do
+ on_ee do
test "goals can be fetched with funnel count preloaded" do
site = insert(:site)
diff --git a/test/plausible/imported/csv_importer_test.exs b/test/plausible/imported/csv_importer_test.exs
index 3e6bb55aa1..cc801e0cb3 100644
--- a/test/plausible/imported/csv_importer_test.exs
+++ b/test/plausible/imported/csv_importer_test.exs
@@ -6,7 +6,7 @@ defmodule Plausible.Imported.CSVImporterTest do
doctest CSVImporter, import: true
- on_full_build do
+ on_ee do
@moduletag :minio
end
@@ -33,7 +33,7 @@ defmodule Plausible.Imported.CSVImporterTest do
Enum.map(tables, fn table ->
filename = "#{table}_#{start_date}_#{end_date}.csv"
- on_full_build do
+ on_ee do
%{
"filename" => filename,
"s3_url" =>
@@ -54,7 +54,7 @@ defmodule Plausible.Imported.CSVImporterTest do
start_date: date_range.first,
end_date: date_range.last,
uploads: uploads,
- storage: on_full_build(do: "s3", else: "local")
+ storage: on_ee(do: "s3", else: "local")
)
assert %Oban.Job{args: %{"import_id" => import_id, "uploads" => ^uploads} = args} =
@@ -72,7 +72,7 @@ defmodule Plausible.Imported.CSVImporterTest do
assert CSVImporter.parse_args(args) == [
uploads: uploads,
- storage: on_full_build(do: "s3", else: "local")
+ storage: on_ee(do: "s3", else: "local")
]
end
end
@@ -312,7 +312,7 @@ defmodule Plausible.Imported.CSVImporterTest do
uploads =
for %{name: name, body: body} <- csvs do
- on_full_build do
+ on_ee do
%{s3_url: s3_url} = Plausible.S3.import_presign_upload(site.id, name)
[bucket, key] = String.split(URI.parse(s3_url).path, "/", parts: 2)
ExAws.request!(ExAws.S3.put_object(bucket, key, body))
@@ -331,7 +331,7 @@ defmodule Plausible.Imported.CSVImporterTest do
start_date: date_range.first,
end_date: date_range.last,
uploads: uploads,
- storage: on_full_build(do: "s3", else: "local")
+ storage: on_ee(do: "s3", else: "local")
)
assert %{success: 1} = Oban.drain_queue(queue: :analytics_imports, with_safety?: false)
@@ -374,7 +374,7 @@ defmodule Plausible.Imported.CSVImporterTest do
uploads =
for %{name: name, body: body} <- csvs do
- on_full_build do
+ on_ee do
%{s3_url: s3_url} = Plausible.S3.import_presign_upload(site.id, name)
[bucket, key] = String.split(URI.parse(s3_url).path, "/", parts: 2)
ExAws.request!(ExAws.S3.put_object(bucket, key, body))
@@ -393,7 +393,7 @@ defmodule Plausible.Imported.CSVImporterTest do
start_date: date_range.first,
end_date: date_range.last,
uploads: uploads,
- storage: on_full_build(do: "s3", else: "local")
+ storage: on_ee(do: "s3", else: "local")
)
assert %{discard: 1} = Oban.drain_queue(queue: :analytics_imports, with_safety?: false)
@@ -479,7 +479,7 @@ defmodule Plausible.Imported.CSVImporterTest do
])
# export archive to s3
- on_full_build do
+ on_ee do
assert {:ok, _job} = Plausible.Exports.schedule_s3_export(site.id, user.email)
else
assert {:ok, %{args: %{"local_path" => local_path}}} =
@@ -489,7 +489,7 @@ defmodule Plausible.Imported.CSVImporterTest do
assert %{success: 1} = Oban.drain_queue(queue: :analytics_exports, with_safety: false)
# download archive
- on_full_build do
+ on_ee do
ExAws.request!(
ExAws.S3.download_file(
Plausible.S3.exports_bucket(),
@@ -508,7 +508,7 @@ defmodule Plausible.Imported.CSVImporterTest do
# upload csvs
uploads =
Enum.map(files, fn file ->
- on_full_build do
+ on_ee do
%{s3_url: s3_url} = Plausible.S3.import_presign_upload(site.id, file)
[bucket, key] = String.split(URI.parse(s3_url).path, "/", parts: 2)
ExAws.request!(ExAws.S3.put_object(bucket, key, File.read!(file)))
@@ -526,7 +526,7 @@ defmodule Plausible.Imported.CSVImporterTest do
start_date: date_range.first,
end_date: date_range.last,
uploads: uploads,
- storage: on_full_build(do: "s3", else: "local")
+ storage: on_ee(do: "s3", else: "local")
)
assert %{success: 1} = Oban.drain_queue(queue: :analytics_imports, with_safety: false)
@@ -544,7 +544,7 @@ defmodule Plausible.Imported.CSVImporterTest do
end
defp clean_buckets(_context) do
- on_full_build do
+ on_ee do
clean_bucket = fn bucket ->
ExAws.S3.list_objects_v2(bucket)
|> ExAws.stream!()
diff --git a/test/plausible/ingestion/event_test.exs b/test/plausible/ingestion/event_test.exs
index 9176089203..b2a903b46a 100644
--- a/test/plausible/ingestion/event_test.exs
+++ b/test/plausible/ingestion/event_test.exs
@@ -236,7 +236,7 @@ defmodule Plausible.Ingestion.EventTest do
assert dropped.drop_reason == :payment_required
end
- @tag :full_build_only
+ @tag :ee_only
test "saves revenue amount" do
site = insert(:site)
_goal = insert(:goal, event_name: "checkout", currency: "USD", site: site)
diff --git a/test/plausible/ingestion/request_test.exs b/test/plausible/ingestion/request_test.exs
index 6a12aecab4..cfe5929381 100644
--- a/test/plausible/ingestion/request_test.exs
+++ b/test/plausible/ingestion/request_test.exs
@@ -171,7 +171,7 @@ defmodule Plausible.Ingestion.RequestTest do
assert request.props["custom2"] == "property2"
end
- @tag :full_build_only
+ @tag :ee_only
test "parses revenue source field from a json string" do
payload = %{
name: "pageview",
@@ -187,7 +187,7 @@ defmodule Plausible.Ingestion.RequestTest do
assert Decimal.new("20.2") == amount
end
- @tag :full_build_only
+ @tag :ee_only
test "sets revenue source with integer amount" do
payload = %{
name: "pageview",
@@ -206,7 +206,7 @@ defmodule Plausible.Ingestion.RequestTest do
assert Decimal.equal?(amount, Decimal.new("20.0"))
end
- @tag :full_build_only
+ @tag :ee_only
test "sets revenue source with float amount" do
payload = %{
name: "pageview",
@@ -225,7 +225,7 @@ defmodule Plausible.Ingestion.RequestTest do
assert Decimal.equal?(amount, Decimal.new("20.1"))
end
- @tag :full_build_only
+ @tag :ee_only
test "parses string amounts into money structs" do
payload = %{
name: "pageview",
@@ -244,7 +244,7 @@ defmodule Plausible.Ingestion.RequestTest do
assert Decimal.equal?(amount, Decimal.new("12.3"))
end
- @tag :full_build_only
+ @tag :ee_only
test "ignores revenue data when currency is invalid" do
payload = %{
name: "pageview",
@@ -429,7 +429,7 @@ defmodule Plausible.Ingestion.RequestTest do
assert changeset.errors[:request]
end
- @tag :full_build_only
+ @tag :ee_only
test "encodable" do
params = %{
name: "pageview",
diff --git a/test/plausible/plugins/api/token_test.exs b/test/plausible/plugins/api/token_test.exs
index 47ce9fdabc..8b91efbba9 100644
--- a/test/plausible/plugins/api/token_test.exs
+++ b/test/plausible/plugins/api/token_test.exs
@@ -3,7 +3,7 @@ defmodule Plausible.Plugins.API.TokenTest do
alias Plausible.Plugins.API.Token
- @tag :full_build_only
+ @tag :ee_only
test "basic token properties" do
t1 = Token.generate()
t2 = Token.generate()
@@ -25,23 +25,23 @@ defmodule Plausible.Plugins.API.TokenTest do
end
describe "prefix/0" do
- @tag :full_build_only
+ @tag :ee_only
test "default prefix - full build" do
assert Token.prefix() == "plausible-plugin-test"
end
- @tag :small_build_only
+ @tag :ce_build_only
test "selfhosted prefix" do
assert Token.prefix() == "plausible-plugin-selfhost"
end
- @tag :full_build_only
+ @tag :ee_only
test "prod prefix" do
patch_env(:environment, "prod")
assert Token.prefix() == "plausible-plugin"
end
- @tag :full_build_only
+ @tag :ee_only
test "staging prefix" do
patch_env(:environment, "staging")
assert Token.prefix() == "plausible-plugin-staging"
diff --git a/test/plausible/release_test.exs b/test/plausible/release_test.exs
index 07ba568fd0..4d35bdab29 100644
--- a/test/plausible/release_test.exs
+++ b/test/plausible/release_test.exs
@@ -4,25 +4,25 @@ defmodule Plausible.ReleaseTest do
import ExUnit.CaptureIO
describe "should_be_first_launch?/0" do
- @tag :small_build_only
+ @tag :ce_build_only
test "returns true when self-hosted and no users" do
refute Repo.exists?(Auth.User)
assert Release.should_be_first_launch?()
end
- @tag :full_build_only
+ @tag :ee_only
test "returns false when not self-hosted and has no users" do
refute Repo.exists?(Auth.User)
refute Release.should_be_first_launch?()
end
- @tag :full_build_only
+ @tag :ee_only
test "returns false when not self-hosted and has users" do
insert(:user)
refute Release.should_be_first_launch?()
end
- @tag :small_build_only
+ @tag :ce_build_only
test "returns false when self-hosted and has users" do
insert(:user)
refute Release.should_be_first_launch?()
diff --git a/test/plausible/site/admin_test.exs b/test/plausible/site/admin_test.exs
index 988265b83f..136f54bfe4 100644
--- a/test/plausible/site/admin_test.exs
+++ b/test/plausible/site/admin_test.exs
@@ -87,7 +87,7 @@ defmodule Plausible.Site.AdminTest do
action.(conn, [site], %{"email" => current_owner.email})
end
- @tag :full_build_only
+ @tag :ee_only
test "new owner's plan must accommodate the transferred site", %{
conn: conn,
transfer_direct_action: action
diff --git a/test/plausible/site/cache_test.exs b/test/plausible/site/cache_test.exs
index 7c5a889f77..6d8d5fd38b 100644
--- a/test/plausible/site/cache_test.exs
+++ b/test/plausible/site/cache_test.exs
@@ -51,7 +51,7 @@ defmodule Plausible.Site.CacheTest do
refute Cache.get("site3.example.com", cache_name: test, force?: true)
end
- @tag :full_build_only
+ @tag :ee_only
test "cache caches revenue goals", %{test: test} do
{:ok, _} =
Supervisor.start_link(
@@ -83,7 +83,7 @@ defmodule Plausible.Site.CacheTest do
] = Enum.sort_by(cached_goals, & &1.event_name)
end
- @tag :full_build_only
+ @tag :ee_only
test "cache caches revenue goals with event refresh", %{test: test} do
{:ok, _} =
Supervisor.start_link(
diff --git a/test/plausible/site/memberships/accept_invitation_test.exs b/test/plausible/site/memberships/accept_invitation_test.exs
index 275e66d92f..f9e2a4a3ea 100644
--- a/test/plausible/site/memberships/accept_invitation_test.exs
+++ b/test/plausible/site/memberships/accept_invitation_test.exs
@@ -32,7 +32,7 @@ defmodule Plausible.Site.Memberships.AcceptInvitationTest do
assert_no_emails_delivered()
end
- @tag :full_build_only
+ @tag :ee_only
test "unlocks the site if it was previously locked" do
site = insert(:site, locked: true, memberships: [])
existing_owner = insert(:user)
@@ -86,7 +86,7 @@ defmodule Plausible.Site.Memberships.AcceptInvitationTest do
assert Repo.reload!(owner).trial_expiry_date == nil
end
- @tag :full_build_only
+ @tag :ee_only
test "does not allow transferring to an account without an active subscription" do
current_owner = insert(:user)
site = insert(:site, members: [current_owner])
@@ -131,7 +131,7 @@ defmodule Plausible.Site.Memberships.AcceptInvitationTest do
AcceptInvitation.transfer_ownership(site, current_owner)
end
- @tag :full_build_only
+ @tag :ee_only
test "does not allow transferring to and account without suitable plan" do
current_owner = insert(:user)
site = insert(:site, members: [current_owner])
@@ -146,7 +146,7 @@ defmodule Plausible.Site.Memberships.AcceptInvitationTest do
AcceptInvitation.transfer_ownership(site, new_owner)
end
- @tag :small_build_only
+ @tag :ce_build_only
test "allows transferring to an account without a subscription on self hosted" do
current_owner = insert(:user)
site = insert(:site, members: [current_owner])
@@ -315,7 +315,7 @@ defmodule Plausible.Site.Memberships.AcceptInvitationTest do
)
end
- @tag :full_build_only
+ @tag :ee_only
test "unlocks a previously locked site after transfer" do
site = insert(:site, locked: true, memberships: [])
existing_owner = insert(:user)
@@ -405,7 +405,7 @@ defmodule Plausible.Site.Memberships.AcceptInvitationTest do
refute Repo.reload(invitation)
end
- @tag :full_build_only
+ @tag :ee_only
test "does not allow transferring ownership to a non-member user when at team members limit" do
old_owner = insert(:user, subscription: build(:business_subscription))
new_owner = insert(:user, subscription: build(:growth_subscription))
@@ -432,7 +432,7 @@ defmodule Plausible.Site.Memberships.AcceptInvitationTest do
)
end
- @tag :full_build_only
+ @tag :ee_only
test "allows transferring ownership to existing site member when at team members limit" do
old_owner = insert(:user, subscription: build(:business_subscription))
new_owner = insert(:user, subscription: build(:growth_subscription))
@@ -462,7 +462,7 @@ defmodule Plausible.Site.Memberships.AcceptInvitationTest do
)
end
- @tag :full_build_only
+ @tag :ee_only
test "does not allow transferring ownership when sites limit exceeded" do
old_owner = insert(:user, subscription: build(:business_subscription))
new_owner = insert(:user, subscription: build(:growth_subscription))
@@ -486,7 +486,7 @@ defmodule Plausible.Site.Memberships.AcceptInvitationTest do
)
end
- @tag :full_build_only
+ @tag :ee_only
test "does not allow transferring ownership when pageview limit exceeded" do
old_owner = insert(:user, subscription: build(:business_subscription))
new_owner = insert(:user, subscription: build(:growth_subscription))
@@ -515,7 +515,7 @@ defmodule Plausible.Site.Memberships.AcceptInvitationTest do
AcceptInvitation.accept_invitation(invitation.invitation_id, new_owner)
end
- @tag :full_build_only
+ @tag :ee_only
test "allow_next_upgrade_override field has no effect when checking the pageview limit on ownership transfer" do
old_owner = insert(:user, subscription: build(:business_subscription))
@@ -549,7 +549,7 @@ defmodule Plausible.Site.Memberships.AcceptInvitationTest do
AcceptInvitation.accept_invitation(invitation.invitation_id, new_owner)
end
- @tag :full_build_only
+ @tag :ee_only
test "does not allow transferring ownership when many limits exceeded at once" do
old_owner = insert(:user, subscription: build(:business_subscription))
new_owner = insert(:user, subscription: build(:growth_subscription))
diff --git a/test/plausible/site/memberships/create_invitation_test.exs b/test/plausible/site/memberships/create_invitation_test.exs
index eb2e181231..92506b0942 100644
--- a/test/plausible/site/memberships/create_invitation_test.exs
+++ b/test/plausible/site/memberships/create_invitation_test.exs
@@ -66,7 +66,7 @@ defmodule Plausible.Site.Memberships.CreateInvitationTest do
)
end
- @tag :full_build_only
+ @tag :ee_only
test "returns error when owner is over their team member limit" do
[owner, inviter, invitee] = insert_list(3, :user)
@@ -82,7 +82,7 @@ defmodule Plausible.Site.Memberships.CreateInvitationTest do
CreateInvitation.create_invitation(site, inviter, invitee.email, :viewer)
end
- @tag :full_build_only
+ @tag :ee_only
test "allows inviting users who were already invited to other sites, within the limit" do
owner = insert(:user)
@@ -107,7 +107,7 @@ defmodule Plausible.Site.Memberships.CreateInvitationTest do
assert {:ok, _} = invite.(site2, "[email protected]")
end
- @tag :full_build_only
+ @tag :ee_only
test "allows inviting users who are already members of other sites, within the limit" do
[u1, u2, u3, u4] = insert_list(4, :user)
@@ -385,7 +385,7 @@ defmodule Plausible.Site.Memberships.CreateInvitationTest do
)
end
- @tag :full_build_only
+ @tag :ee_only
test "does not allow transferring ownership to a non-member user when at team members limit" do
old_owner = insert(:user, subscription: build(:business_subscription))
new_owner = insert(:user, subscription: build(:growth_subscription))
@@ -401,7 +401,7 @@ defmodule Plausible.Site.Memberships.CreateInvitationTest do
CreateInvitation.bulk_transfer_ownership_direct([site], new_owner)
end
- @tag :full_build_only
+ @tag :ee_only
test "allows transferring ownership to existing site member when at team members limit" do
old_owner = insert(:user, subscription: build(:business_subscription))
new_owner = insert(:user, subscription: build(:growth_subscription))
@@ -420,7 +420,7 @@ defmodule Plausible.Site.Memberships.CreateInvitationTest do
CreateInvitation.bulk_transfer_ownership_direct([site], new_owner)
end
- @tag :full_build_only
+ @tag :ee_only
test "does not allow transferring ownership when sites limit exceeded" do
old_owner = insert(:user, subscription: build(:business_subscription))
new_owner = insert(:user, subscription: build(:growth_subscription))
@@ -433,7 +433,7 @@ defmodule Plausible.Site.Memberships.CreateInvitationTest do
CreateInvitation.bulk_transfer_ownership_direct([site], new_owner)
end
- @tag :full_build_only
+ @tag :ee_only
test "exceeding limits error takes precedence over missing features" do
old_owner = insert(:user, subscription: build(:business_subscription))
new_owner = insert(:user, subscription: build(:growth_subscription))
diff --git a/test/plausible/site/sites_test.exs b/test/plausible/site/sites_test.exs
index b7c5d837df..df812b1c84 100644
--- a/test/plausible/site/sites_test.exs
+++ b/test/plausible/site/sites_test.exs
@@ -114,7 +114,7 @@ defmodule Plausible.SitesTest do
end
describe "get_for_user/2" do
- @tag :full_build_only
+ @tag :ee_only
test "get site for super_admin" do
user1 = insert(:user)
user2 = insert(:user)
diff --git a/test/plausible/stats/query_test.exs b/test/plausible/stats/query_test.exs
index 697e34e20e..c6400ddba6 100644
--- a/test/plausible/stats/query_test.exs
+++ b/test/plausible/stats/query_test.exs
@@ -177,13 +177,13 @@ defmodule Plausible.Stats.QueryTest do
assert q.interval == "date"
end
- @tag :full_build_only
+ @tag :ee_only
test "adds sample_threshold :infinite to query struct", %{site: site} do
q = Query.from(site, %{"period" => "30d", "sample_threshold" => "infinite"})
assert q.sample_threshold == :infinite
end
- @tag :full_build_only
+ @tag :ee_only
test "casts sample_threshold to integer in query struct", %{site: site} do
q = Query.from(site, %{"period" => "30d", "sample_threshold" => "30000000"})
assert q.sample_threshold == 30_000_000
diff --git a/test/plausible_web/components/billing/notice_test.exs b/test/plausible_web/components/billing/notice_test.exs
index f71bf456a7..07eb69c38f 100644
--- a/test/plausible_web/components/billing/notice_test.exs
+++ b/test/plausible_web/components/billing/notice_test.exs
@@ -87,7 +87,7 @@ defmodule PlausibleWeb.Components.Billing.NoticeTest do
assert rendered =~ "please reach out to the site owner to upgrade their subscription"
end
- @tag :full_build_only
+ @tag :ee_only
test "limit_exceeded/1 when billable user is on trial displays upgrade link" do
me = insert(:user)
@@ -104,7 +104,7 @@ defmodule PlausibleWeb.Components.Billing.NoticeTest do
assert rendered =~ "/billing/choose-plan"
end
- @tag :full_build_only
+ @tag :ee_only
test "limit_exceeded/1 when billable user is on an enterprise plan displays support email" do
me =
insert(:user,
@@ -126,7 +126,7 @@ defmodule PlausibleWeb.Components.Billing.NoticeTest do
assert rendered =~ "upgrade your subscription"
end
- @tag :full_build_only
+ @tag :ee_only
test "limit_exceeded/1 when billable user is on a business plan displays support email" do
me = insert(:user, subscription: build(:business_subscription))
diff --git a/test/plausible_web/controllers/admin_auth_controller_test.exs b/test/plausible_web/controllers/admin_auth_controller_test.exs
index dc216e126f..517f1654cc 100644
--- a/test/plausible_web/controllers/admin_auth_controller_test.exs
+++ b/test/plausible_web/controllers/admin_auth_controller_test.exs
@@ -3,7 +3,7 @@ defmodule PlausibleWeb.AdminAuthControllerTest do
alias Plausible.Release
describe "GET /" do
- @describetag :small_build_only
+ @describetag :ce_build_only
test "disable registration", %{conn: conn} do
insert(:user)
patch_config(disable_registration: true)
diff --git a/test/plausible_web/controllers/admin_controller_test.exs b/test/plausible_web/controllers/admin_controller_test.exs
index 4b6bccc655..90321bb1e3 100644
--- a/test/plausible_web/controllers/admin_controller_test.exs
+++ b/test/plausible_web/controllers/admin_controller_test.exs
@@ -6,7 +6,7 @@ defmodule PlausibleWeb.AdminControllerTest do
describe "GET /crm/auth/user/:user_id/usage" do
setup [:create_user, :log_in]
- @tag :full_build_only
+ @tag :ee_only
test "returns 403 if the logged in user is not a super admin", %{conn: conn} do
conn = get(conn, "/crm/auth/user/1/usage")
assert response(conn, 403) == "Not allowed"
@@ -16,7 +16,7 @@ defmodule PlausibleWeb.AdminControllerTest do
describe "POST /crm/sites/site/:site_id" do
setup [:create_user, :log_in]
- @tag :full_build_only
+ @tag :ee_only
test "resets stats start date on native stats start time change", %{conn: conn, user: user} do
patch_env(:super_admin_user_ids, [user.id])
diff --git a/test/plausible_web/controllers/api/external_controller_test.exs b/test/plausible_web/controllers/api/external_controller_test.exs
index 868c73c4bb..69f0ac06b8 100644
--- a/test/plausible_web/controllers/api/external_controller_test.exs
+++ b/test/plausible_web/controllers/api/external_controller_test.exs
@@ -727,7 +727,7 @@ defmodule PlausibleWeb.Api.ExternalControllerTest do
assert Map.get(event, :"meta.value") == ["true"]
end
- @tag :full_build_only
+ @tag :ee_only
test "converts revenue values into the goal currency", %{conn: conn, site: site} do
params = %{
name: "Payment",
@@ -744,7 +744,7 @@ defmodule PlausibleWeb.Api.ExternalControllerTest do
assert Decimal.equal?(Decimal.new("7.14"), amount)
end
- @tag :full_build_only
+ @tag :ee_only
test "revenue values can be sent with minified keys", %{conn: conn, site: site} do
params = %{
"n" => "Payment",
@@ -761,7 +761,7 @@ defmodule PlausibleWeb.Api.ExternalControllerTest do
assert Decimal.equal?(Decimal.new("7.14"), amount)
end
- @tag :full_build_only
+ @tag :ee_only
test "saves the exact same amount when goal currency is the same as the event", %{
conn: conn,
site: site
diff --git a/test/plausible_web/controllers/api/external_sites_controller_test.exs b/test/plausible_web/controllers/api/external_sites_controller_test.exs
index de907c9e88..e454a6bd46 100644
--- a/test/plausible_web/controllers/api/external_sites_controller_test.exs
+++ b/test/plausible_web/controllers/api/external_sites_controller_test.exs
@@ -3,7 +3,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
use PlausibleWeb.ConnCase, async: false
use Plausible.Repo
- on_full_build do
+ on_ee do
setup :create_user
setup %{conn: conn, user: user} do
diff --git a/test/plausible_web/controllers/api/external_stats_controller/auth_test.exs b/test/plausible_web/controllers/api/external_stats_controller/auth_test.exs
index e8ca4804d5..3d66538c06 100644
--- a/test/plausible_web/controllers/api/external_stats_controller/auth_test.exs
+++ b/test/plausible_web/controllers/api/external_stats_controller/auth_test.exs
@@ -67,7 +67,7 @@ defmodule PlausibleWeb.Api.ExternalStatsController.AuthTest do
end
describe "super admin access" do
- @describetag :full_build_only
+ @describetag :ee_only
setup %{user: user} do
patch_env(:super_admin_user_ids, [user.id])
end
diff --git a/test/plausible_web/controllers/api/internal_controller/sync_test.exs b/test/plausible_web/controllers/api/internal_controller/sync_test.exs
index f5d3b883b3..1a048b0721 100644
--- a/test/plausible_web/controllers/api/internal_controller/sync_test.exs
+++ b/test/plausible_web/controllers/api/internal_controller/sync_test.exs
@@ -5,7 +5,7 @@ defmodule PlausibleWeb.Api.InternalController.SyncTest do
describe "PUT /api/:domain/disable-feature" do
setup [:create_user, :log_in]
- @tag :full_build_only
+ @tag :ee_only
test "when the logged-in user is an super-admin", %{conn: conn, user: user} do
site = insert(:site)
patch_env(:super_admin_user_ids, [user.id])
diff --git a/test/plausible_web/controllers/api/stats_controller/conversions_test.exs b/test/plausible_web/controllers/api/stats_controller/conversions_test.exs
index c594f660ea..5d8e9e9c5a 100644
--- a/test/plausible_web/controllers/api/stats_controller/conversions_test.exs
+++ b/test/plausible_web/controllers/api/stats_controller/conversions_test.exs
@@ -265,7 +265,7 @@ defmodule PlausibleWeb.Api.StatsController.ConversionsTest do
]
end
- @tag :full_build_only
+ @tag :ee_only
test "returns formatted average and total values for a conversion with revenue value", %{
conn: conn,
site: site
@@ -306,7 +306,7 @@ defmodule PlausibleWeb.Api.StatsController.ConversionsTest do
]
end
- @tag :full_build_only
+ @tag :ee_only
test "returns revenue goals as custom events if the plan doesn't cover the feature", %{
conn: conn,
site: site,
@@ -350,7 +350,7 @@ defmodule PlausibleWeb.Api.StatsController.ConversionsTest do
]
end
- @tag :full_build_only
+ @tag :ee_only
test "returns revenue metrics as nil for non-revenue goals", %{
conn: conn,
site: site
diff --git a/test/plausible_web/controllers/api/stats_controller/custom_prop_breakdown_test.exs b/test/plausible_web/controllers/api/stats_controller/custom_prop_breakdown_test.exs
index 400e6d26ce..d53658806c 100644
--- a/test/plausible_web/controllers/api/stats_controller/custom_prop_breakdown_test.exs
+++ b/test/plausible_web/controllers/api/stats_controller/custom_prop_breakdown_test.exs
@@ -745,7 +745,7 @@ defmodule PlausibleWeb.Api.StatsController.CustomPropBreakdownTest do
]
end
- @tag :full_build_only
+ @tag :ee_only
test "returns revenue metrics when filtering by a revenue goal", %{conn: conn, site: site} do
prop_key = "logged_in"
@@ -803,7 +803,7 @@ defmodule PlausibleWeb.Api.StatsController.CustomPropBreakdownTest do
]
end
- @tag :full_build_only
+ @tag :ee_only
test "returns revenue metrics when filtering by many revenue goals with same currency", %{
conn: conn,
site: site
diff --git a/test/plausible_web/controllers/api/stats_controller/funnels_test.exs b/test/plausible_web/controllers/api/stats_controller/funnels_test.exs
index 132f163ee1..0539674d0d 100644
--- a/test/plausible_web/controllers/api/stats_controller/funnels_test.exs
+++ b/test/plausible_web/controllers/api/stats_controller/funnels_test.exs
@@ -1,9 +1,9 @@
defmodule PlausibleWeb.Api.StatsController.FunnelsTest do
use PlausibleWeb.ConnCase, async: true
use Plausible
- @moduletag :full_build_only
+ @moduletag :ee_only
- on_full_build do
+ on_ee do
@user_id 123
@other_user_id 456
diff --git a/test/plausible_web/controllers/api/stats_controller/main_graph_test.exs b/test/plausible_web/controllers/api/stats_controller/main_graph_test.exs
index b3cc866684..97b661e9ae 100644
--- a/test/plausible_web/controllers/api/stats_controller/main_graph_test.exs
+++ b/test/plausible_web/controllers/api/stats_controller/main_graph_test.exs
@@ -1101,7 +1101,7 @@ defmodule PlausibleWeb.Api.StatsController.MainGraphTest do
end
end
- @tag :full_build_only
+ @tag :ee_only
describe "GET /api/stats/main-graph - total_revenue plot" do
setup [:create_user, :log_in, :create_new_site, :create_legacy_site_import]
@@ -1181,7 +1181,7 @@ defmodule PlausibleWeb.Api.StatsController.MainGraphTest do
end
end
- @tag :full_build_only
+ @tag :ee_only
describe "GET /api/stats/main-graph - average_revenue plot" do
setup [:create_user, :log_in, :create_new_site, :create_legacy_site_import]
diff --git a/test/plausible_web/controllers/api/stats_controller/top_stats_test.exs b/test/plausible_web/controllers/api/stats_controller/top_stats_test.exs
index 46c7fb1f0e..4ec122086c 100644
--- a/test/plausible_web/controllers/api/stats_controller/top_stats_test.exs
+++ b/test/plausible_web/controllers/api/stats_controller/top_stats_test.exs
@@ -1102,7 +1102,7 @@ defmodule PlausibleWeb.Api.StatsController.TopStatsTest do
]
end
- @tag :full_build_only
+ @tag :ee_only
test "returns average and total when filtering by a revenue goal", %{conn: conn, site: site} do
insert(:goal, site: site, event_name: "Payment", currency: "USD")
insert(:goal, site: site, event_name: "AddToCart", currency: "EUR")
@@ -1147,7 +1147,7 @@ defmodule PlausibleWeb.Api.StatsController.TopStatsTest do
} in top_stats
end
- @tag :full_build_only
+ @tag :ee_only
test "returns average and total when filtering by many revenue goals with same currency", %{
conn: conn,
site: site
diff --git a/test/plausible_web/controllers/auth_controller_sync_test.exs b/test/plausible_web/controllers/auth_controller_sync_test.exs
index 3e7ec55d97..ab76731afa 100644
--- a/test/plausible_web/controllers/auth_controller_sync_test.exs
+++ b/test/plausible_web/controllers/auth_controller_sync_test.exs
@@ -8,7 +8,7 @@ defmodule PlausibleWeb.AuthControllerSyncTest do
describe "PUT /settings/email" do
setup [:create_user, :log_in]
- @tag :small_build_only
+ @tag :ce_build_only
test "updates email but DOES NOT force reverification when feature disabled", %{
conn: conn,
user: user
diff --git a/test/plausible_web/controllers/auth_controller_test.exs b/test/plausible_web/controllers/auth_controller_test.exs
index c55356b186..a04da8b9e7 100644
--- a/test/plausible_web/controllers/auth_controller_test.exs
+++ b/test/plausible_web/controllers/auth_controller_test.exs
@@ -526,7 +526,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert resp =~ "Change email address"
end
- @tag :full_build_only
+ @tag :ee_only
test "shows subscription", %{conn: conn, user: user} do
insert(:subscription, paddle_plan_id: "558018", user: user)
conn = get(conn, "/settings")
@@ -534,7 +534,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert html_response(conn, 200) =~ "monthly billing"
end
- @tag :full_build_only
+ @tag :ee_only
test "shows yearly subscription", %{conn: conn, user: user} do
insert(:subscription, paddle_plan_id: "590752", user: user)
conn = get(conn, "/settings")
@@ -542,7 +542,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert html_response(conn, 200) =~ "yearly billing"
end
- @tag :full_build_only
+ @tag :ee_only
test "shows free subscription", %{conn: conn, user: user} do
insert(:subscription, paddle_plan_id: "free_10k", user: user)
conn = get(conn, "/settings")
@@ -550,7 +550,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert html_response(conn, 200) =~ "N/A billing"
end
- @tag :full_build_only
+ @tag :ee_only
test "shows enterprise plan subscription", %{conn: conn, user: user} do
insert(:subscription, paddle_plan_id: "123", user: user)
@@ -561,7 +561,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert html_response(conn, 200) =~ "yearly billing"
end
- @tag :full_build_only
+ @tag :ee_only
test "shows current enterprise plan subscription when user has a new one to upgrade to", %{
conn: conn,
user: user
@@ -585,7 +585,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert html_response(conn, 200) =~ "yearly billing"
end
- @tag :full_build_only
+ @tag :ee_only
test "renders two links to '/billing/choose-plan` with the text 'Upgrade'", %{conn: conn} do
doc =
get(conn, "/settings")
@@ -601,7 +601,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert text_of_attr(upgrade_link_2, "href") == Routes.billing_path(conn, :choose_plan)
end
- @tag :full_build_only
+ @tag :ee_only
test "renders a link to '/billing/choose-plan' with the text 'Change plan' + cancel link", %{
conn: conn,
user: user
@@ -661,7 +661,7 @@ defmodule PlausibleWeb.AuthControllerTest do
refute element_exists?(doc, "#upgrade-or-change-plan-link")
end
- @tag :full_build_only
+ @tag :ee_only
test "renders two links to '/billing/choose-plan' with the text 'Upgrade' for a configured enterprise plan",
%{conn: conn, user: user} do
configure_enterprise_plan(user)
@@ -684,7 +684,7 @@ defmodule PlausibleWeb.AuthControllerTest do
Routes.billing_path(conn, :choose_plan)
end
- @tag :full_build_only
+ @tag :ee_only
test "links to '/billing/choose-plan' with the text 'Change plan' for a configured enterprise plan with an existing subscription + renders cancel button",
%{conn: conn, user: user} do
insert(:subscription, paddle_plan_id: @v3_plan_id, user: user)
@@ -706,7 +706,7 @@ defmodule PlausibleWeb.AuthControllerTest do
Routes.billing_path(conn, :choose_plan)
end
- @tag :full_build_only
+ @tag :ee_only
test "renders cancelled subscription notice", %{conn: conn, user: user} do
insert(:subscription,
paddle_plan_id: @v4_plan_id,
@@ -724,7 +724,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert notice_text =~ "Upgrade your subscription to get access to your stats again"
end
- @tag :full_build_only
+ @tag :ee_only
test "renders cancelled subscription notice with some subscription days still left", %{
conn: conn,
user: user
@@ -746,7 +746,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert notice_text =~ "Upgrade your subscription to make sure you don't lose access"
end
- @tag :full_build_only
+ @tag :ee_only
test "renders cancelled subscription notice with a warning about losing grandfathering", %{
conn: conn,
user: user
@@ -770,7 +770,7 @@ defmodule PlausibleWeb.AuthControllerTest do
"by letting your subscription expire, you lose access to our grandfathered terms"
end
- @tag :full_build_only
+ @tag :ee_only
test "shows invoices for subscribed user", %{conn: conn, user: user} do
insert(:subscription,
paddle_plan_id: "558018",
@@ -785,7 +785,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert html_response(conn, 200) =~ "$22.00"
end
- @tag :full_build_only
+ @tag :ee_only
test "shows 'something went wrong' on failed invoice request'", %{conn: conn, user: user} do
insert(:subscription,
paddle_plan_id: "558018",
@@ -811,7 +811,7 @@ defmodule PlausibleWeb.AuthControllerTest do
refute html_response(conn, 200) =~ "Invoices"
end
- @tag :full_build_only
+ @tag :ee_only
test "renders pageview usage for current, last, and penultimate billing cycles", %{
conn: conn,
user: user
@@ -876,7 +876,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert text_of_element(doc, "#custom_events_penultimate_cycle") =~ "Custom events 1"
end
- @tag :full_build_only
+ @tag :ee_only
test "renders pageview usage per billing cycle for active subscribers", %{
conn: conn,
user: user
@@ -919,7 +919,7 @@ defmodule PlausibleWeb.AuthControllerTest do
get(conn, "/settings") |> html_response(200) |> assert_cycles_rendered.()
end
- @tag :full_build_only
+ @tag :ee_only
test "penultimate cycle is disabled if there's no usage", %{conn: conn, user: user} do
site = insert(:site, members: [user])
@@ -947,7 +947,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert text_of_element(doc, "#billing_cycle_tab_penultimate_cycle") =~ "Not available"
end
- @tag :full_build_only
+ @tag :ee_only
test "penultimate and last cycles are both disabled if there's no usage", %{
conn: conn,
user: user
@@ -982,7 +982,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert text_of_element(doc, "#billing_cycle_tab_penultimate_cycle") =~ "Not available"
end
- @tag :full_build_only
+ @tag :ee_only
test "when last cycle usage is 0, it's still not disabled if penultimate cycle has usage", %{
conn: conn,
user: user
@@ -1016,7 +1016,7 @@ defmodule PlausibleWeb.AuthControllerTest do
refute text_of_element(doc, "#billing_cycle_tab_penultimate_cycle") =~ "Not available"
end
- @tag :full_build_only
+ @tag :ee_only
test "renders last 30 days pageview usage for trials and non-active/free_10k subscriptions",
%{
conn: conn,
@@ -1072,7 +1072,7 @@ defmodule PlausibleWeb.AuthControllerTest do
get(conn, "/settings") |> html_response(200) |> assert_usage.()
end
- @tag :full_build_only
+ @tag :ee_only
test "renders sites usage and limit", %{conn: conn, user: user} do
insert(:subscription, paddle_plan_id: @v3_plan_id, user: user)
insert(:site, members: [user])
@@ -1086,7 +1086,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert site_usage_row_text =~ "Owned sites 1 / 50"
end
- @tag :full_build_only
+ @tag :ee_only
test "renders team members usage and limit", %{conn: conn, user: user} do
insert(:subscription, paddle_plan_id: @v4_plan_id, user: user)
@@ -1099,7 +1099,7 @@ defmodule PlausibleWeb.AuthControllerTest do
assert team_member_usage_row_text =~ "Team members 0 / 3"
end
- @tag :full_build_only
+ @tag :ee_only
test "renders team member usage without limit if it's unlimited", %{conn: conn, user: user} do
insert(:subscription, paddle_plan_id: @v3_plan_id, user: user)
diff --git a/test/plausible_web/controllers/error_report_controller_test.exs b/test/plausible_web/controllers/error_report_controller_test.exs
index 52eed66135..d1c1f0d55c 100644
--- a/test/plausible_web/controllers/error_report_controller_test.exs
+++ b/test/plausible_web/controllers/error_report_controller_test.exs
@@ -1,6 +1,6 @@
defmodule PlausibleWeb.ErrorReportControllerTest do
use PlausibleWeb.ConnCase, async: true
- @moduletag :full_build_only
+ @moduletag :ee_only
use Bamboo.Test
diff --git a/test/plausible_web/controllers/invitation_controller_test.exs b/test/plausible_web/controllers/invitation_controller_test.exs
index ca30bf1372..4dabdbcad2 100644
--- a/test/plausible_web/controllers/invitation_controller_test.exs
+++ b/test/plausible_web/controllers/invitation_controller_test.exs
@@ -85,7 +85,7 @@ defmodule PlausibleWeb.Site.InvitationControllerTest do
assert new_owner_membership.role == :owner
end
- @tag :full_build_only
+ @tag :ee_only
test "fails when new owner has no plan", %{conn: conn, user: user} do
old_owner = insert(:user)
site = insert(:site, members: [old_owner])
@@ -101,7 +101,7 @@ defmodule PlausibleWeb.Site.InvitationControllerTest do
"No existing subscription"
end
- @tag :full_build_only
+ @tag :ee_only
test "fails when new owner's plan is unsuitable", %{conn: conn, user: user} do
old_owner = insert(:user)
site = insert(:site, members: [old_owner])
diff --git a/test/plausible_web/controllers/site/membership_controller_test.exs b/test/plausible_web/controllers/site/membership_controller_test.exs
index 2f85f291a4..4f7332a52c 100644
--- a/test/plausible_web/controllers/site/membership_controller_test.exs
+++ b/test/plausible_web/controllers/site/membership_controller_test.exs
@@ -21,7 +21,7 @@ defmodule PlausibleWeb.Site.MembershipControllerTest do
refute element_exists?(html, ~s/button[type=submit][disabled]/)
end
- @tag :full_build_only
+ @tag :ee_only
test "display a notice when is over limit", %{conn: conn, user: user} do
memberships = [
build(:site_membership, user: user, role: :owner) | build_list(5, :site_membership)
@@ -54,7 +54,7 @@ defmodule PlausibleWeb.Site.MembershipControllerTest do
assert redirected_to(conn) == "/#{URI.encode_www_form(site.domain)}/settings/people"
end
- @tag :full_build_only
+ @tag :ee_only
test "fails to create invitation when is over limit", %{conn: conn, user: user} do
memberships = [
build(:site_membership, user: user, role: :owner) | build_list(5, :site_membership)
diff --git a/test/plausible_web/controllers/site_controller_test.exs b/test/plausible_web/controllers/site_controller_test.exs
index 52942c8236..8d5fe7dc59 100644
--- a/test/plausible_web/controllers/site_controller_test.exs
+++ b/test/plausible_web/controllers/site_controller_test.exs
@@ -305,7 +305,7 @@ defmodule PlausibleWeb.SiteControllerTest do
assert_no_emails_delivered()
end
- @tag :full_build_only
+ @tag :ee_only
test "does not allow site creation when the user is at their site limit", %{
conn: conn,
user: user
diff --git a/test/plausible_web/controllers/stats_controller_test.exs b/test/plausible_web/controllers/stats_controller_test.exs
index 80030ce4c1..05b9c1f351 100644
--- a/test/plausible_web/controllers/stats_controller_test.exs
+++ b/test/plausible_web/controllers/stats_controller_test.exs
@@ -91,7 +91,7 @@ defmodule PlausibleWeb.StatsControllerTest do
end
describe "GET /:website - as a super admin" do
- @describetag :full_build_only
+ @describetag :ee_only
setup [:create_user, :make_user_super_admin, :log_in]
test "can view a private dashboard with stats", %{conn: conn} do
diff --git a/test/plausible_web/email_test.exs b/test/plausible_web/email_test.exs
index e802127352..984f7f2685 100644
--- a/test/plausible_web/email_test.exs
+++ b/test/plausible_web/email_test.exs
@@ -31,7 +31,7 @@ defmodule PlausibleWeb.EmailTest do
assert email.html_body =~ plausible_link()
end
- @tag :full_build_only
+ @tag :ee_only
test "renders unsubscribe placeholder" do
email =
Email.base_email()
diff --git a/test/plausible_web/live/choose_plan_test.exs b/test/plausible_web/live/choose_plan_test.exs
index a463cdbdca..e2a2a6e16c 100644
--- a/test/plausible_web/live/choose_plan_test.exs
+++ b/test/plausible_web/live/choose_plan_test.exs
@@ -1,6 +1,6 @@
defmodule PlausibleWeb.Live.ChoosePlanTest do
use PlausibleWeb.ConnCase, async: true
- @moduletag :full_build_only
+ @moduletag :ee_only
import Phoenix.LiveViewTest
import Plausible.Test.Support.HTML
diff --git a/test/plausible_web/live/funnel_settings/form_test.exs b/test/plausible_web/live/funnel_settings/form_test.exs
index 9a1dbc7296..ce30aeb489 100644
--- a/test/plausible_web/live/funnel_settings/form_test.exs
+++ b/test/plausible_web/live/funnel_settings/form_test.exs
@@ -1,6 +1,6 @@
defmodule PlausibleWeb.Live.FunnelSettings.FormTest do
use PlausibleWeb.ConnCase, async: true
- @moduletag :full_build_only
+ @moduletag :ee_only
import Phoenix.LiveViewTest
import Plausible.Test.Support.HTML
diff --git a/test/plausible_web/live/funnel_settings_test.exs b/test/plausible_web/live/funnel_settings_test.exs
index b13c87495a..0f67b0883e 100644
--- a/test/plausible_web/live/funnel_settings_test.exs
+++ b/test/plausible_web/live/funnel_settings_test.exs
@@ -1,9 +1,9 @@
defmodule PlausibleWeb.Live.FunnelSettingsTest do
use PlausibleWeb.ConnCase, async: true
use Plausible
- @moduletag :full_build_only
+ @moduletag :ee_only
- on_full_build do
+ on_ee do
import Phoenix.LiveViewTest
import Plausible.Test.Support.HTML
diff --git a/test/plausible_web/live/goal_settings/form_test.exs b/test/plausible_web/live/goal_settings/form_test.exs
index 8621d82476..72664fd635 100644
--- a/test/plausible_web/live/goal_settings/form_test.exs
+++ b/test/plausible_web/live/goal_settings/form_test.exs
@@ -26,7 +26,7 @@ defmodule PlausibleWeb.Live.GoalSettings.FormTest do
describe "Goal submission" do
setup [:create_user, :log_in, :create_site]
- @tag :full_build_only
+ @tag :ee_only
test "renders form fields (with currency)", %{conn: conn, site: site} do
lv = get_liveview(conn, site)
html = render(lv)
@@ -46,7 +46,7 @@ defmodule PlausibleWeb.Live.GoalSettings.FormTest do
assert name_of(page_path) == "goal[page_path]"
end
- @tag :small_build_only
+ @tag :ce_build_only
test "renders form fields (no currency)", %{conn: conn, site: site} do
lv = get_liveview(conn, site)
html = render(lv)
@@ -87,7 +87,7 @@ defmodule PlausibleWeb.Live.GoalSettings.FormTest do
assert html =~ "Custom Event"
end
- @tag :full_build_only
+ @tag :ee_only
test "creates a revenue goal", %{conn: conn, site: site} do
lv = get_liveview(conn, site)
refute render(lv) =~ "SampleRevenueGoal"
@@ -115,7 +115,7 @@ defmodule PlausibleWeb.Live.GoalSettings.FormTest do
describe "Combos integration" do
setup [:create_user, :log_in, :create_site]
- @tag :full_build_only
+ @tag :ee_only
test "currency combo works", %{conn: conn, site: site} do
lv = get_liveview(conn, site)
diff --git a/test/plausible_web/live/goal_settings_test.exs b/test/plausible_web/live/goal_settings_test.exs
index b098da83ab..eb7baf4647 100644
--- a/test/plausible_web/live/goal_settings_test.exs
+++ b/test/plausible_web/live/goal_settings_test.exs
@@ -6,7 +6,7 @@ defmodule PlausibleWeb.Live.GoalSettingsTest do
describe "GET /:website/settings/goals" do
setup [:create_user, :log_in, :create_site]
- @tag :full_build_only
+ @tag :ee_only
test "lists goals for the site and renders links", %{conn: conn, site: site} do
{:ok, [g1, g2, g3]} = setup_goals(site)
conn = get(conn, "/#{site.domain}/settings/goals")
@@ -25,7 +25,7 @@ defmodule PlausibleWeb.Live.GoalSettingsTest do
assert resp =~ "Revenue Goal"
end
- @tag :full_build_only
+ @tag :ee_only
test "lists Revenue Goals with feature availability annotation if the plan does not cover them",
%{conn: conn, user: user, site: site} do
{:ok, [_, _, g3]} = setup_goals(site)
diff --git a/test/plausible_web/live/register_form_test.exs b/test/plausible_web/live/register_form_test.exs
index 586584194c..2fa35a8ec2 100644
--- a/test/plausible_web/live/register_form_test.exs
+++ b/test/plausible_web/live/register_form_test.exs
@@ -63,7 +63,7 @@ defmodule PlausibleWeb.Live.RegisterFormTest do
html = lv |> element("form") |> render_submit()
- on_full_build do
+ on_ee do
assert_push_event(lv, "send-metrics", %{event_name: "Signup", params: %{}})
end
@@ -161,7 +161,7 @@ defmodule PlausibleWeb.Live.RegisterFormTest do
html = lv |> element("form") |> render_submit()
- on_full_build do
+ on_ee do
assert_push_event(lv, "send-metrics", %{event_name: "Signup via invitation", params: %{}})
end
diff --git a/test/plausible_web/live/sites_test.exs b/test/plausible_web/live/sites_test.exs
index 84625b0bf8..47bae8e44c 100644
--- a/test/plausible_web/live/sites_test.exs
+++ b/test/plausible_web/live/sites_test.exs
@@ -15,7 +15,7 @@ defmodule PlausibleWeb.Live.SitesTest do
assert text(html) =~ "You don't have any sites yet"
end
- @tag :full_build_only
+ @tag :ee_only
test "renders ownership transfer invitation for a case with no plan", %{
conn: conn,
user: user
@@ -37,7 +37,7 @@ defmodule PlausibleWeb.Live.SitesTest do
assert get_in(invitation_data, ["invitations", invitation.invitation_id, "no_plan"])
end
- @tag :full_build_only
+ @tag :ee_only
test "renders ownership transfer invitation for a case with exceeded limits", %{
conn: conn,
user: user
@@ -65,7 +65,7 @@ defmodule PlausibleWeb.Live.SitesTest do
"site limit"
end
- @tag :full_build_only
+ @tag :ee_only
test "renders ownership transfer invitation for a case with missing features", %{
conn: conn,
user: user
diff --git a/test/plausible_web/plugins/api/controllers/custom_props_test.exs b/test/plausible_web/plugins/api/controllers/custom_props_test.exs
index fd7e5f3414..d2e911c20e 100644
--- a/test/plausible_web/plugins/api/controllers/custom_props_test.exs
+++ b/test/plausible_web/plugins/api/controllers/custom_props_test.exs
@@ -35,7 +35,7 @@ defmodule PlausibleWeb.Plugins.API.Controllers.CustomPropsTest do
end
describe "business tier" do
- @describetag :full_build_only
+ @describetag :ee_only
test "fails on custom prop enable attempt with insufficient plan", %{
site: site,
token: token,
diff --git a/test/plausible_web/plugins/api/controllers/goals_test.exs b/test/plausible_web/plugins/api/controllers/goals_test.exs
index 633b845086..ca9a9f08ca 100644
--- a/test/plausible_web/plugins/api/controllers/goals_test.exs
+++ b/test/plausible_web/plugins/api/controllers/goals_test.exs
@@ -46,7 +46,7 @@ defmodule PlausibleWeb.Plugins.API.Controllers.GoalsTest do
end
describe "business tier" do
- @tag :full_build_only
+ @tag :ee_only
test "fails on revenue goal creation attempt with insufficient plan", %{
site: site,
token: token,
@@ -72,7 +72,7 @@ defmodule PlausibleWeb.Plugins.API.Controllers.GoalsTest do
|> assert_schema("PaymentRequiredError", spec())
end
- @tag :full_build_only
+ @tag :ee_only
test "fails on bulk revenue goal creation attempt with insufficient plan", %{
site: site,
token: token,
@@ -155,7 +155,7 @@ defmodule PlausibleWeb.Plugins.API.Controllers.GoalsTest do
assert [%{event_name: "Signup"}] = Plausible.Goals.for_site(site)
end
- @tag :full_build_only
+ @tag :ee_only
test "creates a revenue goal", %{conn: conn, token: token, site: site} do
url = Routes.plugins_api_goals_url(PlausibleWeb.Endpoint, :create)
@@ -193,7 +193,7 @@ defmodule PlausibleWeb.Plugins.API.Controllers.GoalsTest do
assert [%{event_name: "Purchase", currency: :EUR}] = Plausible.Goals.for_site(site)
end
- @tag :full_build_only
+ @tag :ee_only
test "fails to create a revenue goal with unknown currency", %{
conn: conn,
token: token,
@@ -222,7 +222,7 @@ defmodule PlausibleWeb.Plugins.API.Controllers.GoalsTest do
assert [%{detail: "currency: is invalid"}] = resp.errors
end
- @tag :full_build_only
+ @tag :ee_only
test "edge case - revenue goal exists under the same name and different currency", %{
conn: conn,
token: token,
@@ -306,7 +306,7 @@ defmodule PlausibleWeb.Plugins.API.Controllers.GoalsTest do
end
describe "put /goals - bulk creation" do
- @tag :full_build_only
+ @tag :ee_only
test "creates a goal of each type", %{conn: conn, token: token, site: site} do
url = Routes.plugins_api_goals_url(PlausibleWeb.Endpoint, :create)
@@ -398,7 +398,7 @@ defmodule PlausibleWeb.Plugins.API.Controllers.GoalsTest do
} in resp.errors
end
- @tag :full_build_only
+ @tag :ee_only
test "is idempotent", %{conn: conn, token: token, site: site} do
url = Routes.plugins_api_goals_url(PlausibleWeb.Endpoint, :create)
@@ -433,7 +433,7 @@ defmodule PlausibleWeb.Plugins.API.Controllers.GoalsTest do
|> assert_schema("Goal.ListResponse", spec())
end
- @tag :full_build_only
+ @tag :ee_only
test "edge case - revenue goals exist under the same name and different currency", %{
conn: conn,
token: token,
@@ -479,7 +479,7 @@ defmodule PlausibleWeb.Plugins.API.Controllers.GoalsTest do
assert %{errors: [%{detail: "Invalid integer. Got: string"}]} = resp
end
- @tag :full_build_only
+ @tag :ee_only
test "retrieves revenue goal by ID", %{conn: conn, site: site, token: token} do
{:ok, goal} =
Plausible.Goals.create(site, %{"event_name" => "Purchase", "currency" => "EUR"})
@@ -557,7 +557,7 @@ defmodule PlausibleWeb.Plugins.API.Controllers.GoalsTest do
assert resp.meta.pagination.links == %{}
end
- @tag :full_build_only
+ @tag :ee_only
test "returns a list of goals of each possible goal type", %{
conn: conn,
site: site,
diff --git a/test/plausible_web/plugs/first_launch_plug_test.exs b/test/plausible_web/plugs/first_launch_plug_test.exs
index 6f33f99b13..c5b21b957f 100644
--- a/test/plausible_web/plugs/first_launch_plug_test.exs
+++ b/test/plausible_web/plugs/first_launch_plug_test.exs
@@ -1,6 +1,6 @@
defmodule PlausibleWeb.FirstLaunchPlugTest do
use PlausibleWeb.ConnCase
- @moduletag :small_build_only
+ @moduletag :ce_build_only
import Plug.Test
alias PlausibleWeb.FirstLaunchPlug
diff --git a/test/test_helper.exs b/test/test_helper.exs
index 4b11fbbfdc..2768d1f339 100644
--- a/test/test_helper.exs
+++ b/test/test_helper.exs
@@ -22,10 +22,10 @@ if :minio in Keyword.fetch!(ExUnit.configuration(), :include) do
Plausible.TestUtils.ensure_minio()
end
-if Mix.env() == :small_test do
- IO.puts("Test mode: SMALL")
- ExUnit.configure(exclude: [:slow, :minio, :full_build_only])
+if Mix.env() == :ce_test do
+ IO.puts("Test mode: Communnity Edition")
+ ExUnit.configure(exclude: [:slow, :minio, :ee_only])
else
- IO.puts("Test mode: FULL")
- ExUnit.configure(exclude: [:slow, :minio, :small_build_only])
+ IO.puts("Test mode: Enterprise Edition")
+ ExUnit.configure(exclude: [:slow, :minio, :ce_build_only])
end
diff --git a/test/workers/accept_traffic_until_test.exs b/test/workers/accept_traffic_until_test.exs
index af76df44b2..8cd4ba21a7 100644
--- a/test/workers/accept_traffic_until_test.exs
+++ b/test/workers/accept_traffic_until_test.exs
@@ -4,7 +4,7 @@ defmodule Plausible.Workers.AcceptTrafficUntilTest do
alias Plausible.Workers.AcceptTrafficUntil
- @moduletag :full_build_only
+ @moduletag :ee_only
test "does not send any notifications when sites have no stats" do
today = Date.utc_today()