From dc8a140e294c0a52b6ab8b519000bbcbf6176dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sun, 1 Dec 2024 11:18:30 +0000 Subject: [PATCH 1/3] Use typos for spellchecking --- .codespellignore | 8 ------ .github/workflows/codespell.yml | 18 ------------ .github/workflows/typos.yml | 14 ++++++++++ .typos.toml | 28 +++++++++++++++++++ CHANGELOG.md | 2 +- assets/js/dashboard/components/table.tsx | 6 ++-- .../js/dashboard/stats/graph/visitor-graph.js | 2 +- assets/js/dashboard/stats/locations/map.tsx | 4 +-- .../stats/modals/breakdown-modal.tsx | 6 ++-- .../stats/modals/breakdown-table.tsx | 4 +-- .../stats/modals/google-keywords.tsx | 6 ++-- assets/js/dashboard/util/url.ts | 2 +- assets/tailwind.config.js | 2 +- lib/plausible/auth/user_admin.ex | 4 +-- lib/plausible/cache/stats.ex | 4 +-- .../data_migration/teams_consistency_check.ex | 2 +- lib/plausible/stats/imported/base.ex | 8 +++--- .../controllers/site_controller.ex | 6 ++-- .../templates/auth/activate.html.heex | 2 +- .../billing/change_plan_preview.html.heex | 2 +- .../templates/layout/_header.html.heex | 2 +- lib/plausible_web/views/layout_view.ex | 2 +- priv/ga4-source-categories.csv | 4 +-- ...200227092821_add_fingerprint_sessions.exs} | 2 +- ...ck_accept_traffic_until_notifications.exs} | 2 +- test/plausible/ingestion/event_test.exs | 2 +- test/plausible/release_test.exs | 2 +- test/plausible/shields/country_test.exs | 2 +- test/plausible/shields/hostname_test.exs | 2 +- test/plausible/shields/ip_test.exs | 2 +- test/plausible/shields/page_test.exs | 2 +- .../live/reset_password_form_test.exs | 10 +++---- test/plausible_web/plugs/favicon_test.exs | 8 +++--- test/workers/lock_sites_test.exs | 2 +- 34 files changed, 95 insertions(+), 79 deletions(-) delete mode 100644 .codespellignore delete mode 100644 .github/workflows/codespell.yml create mode 100644 .github/workflows/typos.yml create mode 100644 .typos.toml rename priv/repo/migrations/{20200227092821_add_fingerprint_sesssions.exs => 20200227092821_add_fingerprint_sessions.exs} (91%) rename priv/repo/migrations/{20231219083050_track_accept_traffic_until_notifcations.exs => 20231219083050_track_accept_traffic_until_notifications.exs} (96%) diff --git a/.codespellignore b/.codespellignore deleted file mode 100644 index cb20144e71a2..000000000000 --- a/.codespellignore +++ /dev/null @@ -1,8 +0,0 @@ -caf -Linz -linz -Taht -taht -referer -referers -statics diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index 76980153744f..000000000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Check spelling - -on: - pull_request: - push: - branches: [ master ] - merge_group: - -jobs: - codespell: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: codespell-project/actions-codespell@v2 - with: - check_filenames: true - ignore_words_file: .codespellignore - path: lib test extra diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml new file mode 100644 index 000000000000..3a0816eff7cb --- /dev/null +++ b/.github/workflows/typos.yml @@ -0,0 +1,14 @@ +name: Check spelling + +on: + pull_request: + push: + branches: [ master ] + merge_group: + +jobs: + typos: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: crate-ci/typos@master diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 000000000000..bed5fa3c99db --- /dev/null +++ b/.typos.toml @@ -0,0 +1,28 @@ +[files] +extend-exclude = [ + ".git/", + "fixture/*.csv", + "fixture/ga4_report_imported_entry_pages.json", + "fixture/ga4_report_imported_locations.json", + "priv/*.csv", + "priv/ref_inspector/*.yml", + "priv/referer_favicon_domains.json", + "priv/ua_inspector/*.yml", +] +ignore-hidden = false + +[default] +extend-ignore-re = [ + "\\bUku Taht\\b", + "Urfahr -> Linz", + "GOOGLE_CLIENT_SECRET=.+", + "\\bfo\\.wikipedia\\.org\\b", + 'RecoveryCode.disambiguate\(".+"\) == ".+"', +] + +[default.extend-words] +"referers" = "referers" + +[default.extend-identifiers] +# Typos +"Github" = "GitHub" diff --git a/CHANGELOG.md b/CHANGELOG.md index dc0f3056f8bb..4455fdb04a91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -369,7 +369,7 @@ All notable changes to this project will be documented in this file. - Fix some links not opening correctly in new tab - UI fix for more than one row of custom event properties plausible/analytics#1383 - UI fix for user menu and time picker overlapping plausible/analytics#1352 -- Respect the `path` component of BASE_URL to allow subfolder installatons +- Respect the `path` component of BASE_URL to allow subfolder installations ### Removed - Removes AppSignal monitoring package diff --git a/assets/js/dashboard/components/table.tsx b/assets/js/dashboard/components/table.tsx index 53976ec0235c..f62daf5120c8 100644 --- a/assets/js/dashboard/components/table.tsx +++ b/assets/js/dashboard/components/table.tsx @@ -5,7 +5,7 @@ import React, { ReactNode } from 'react' import { SortDirection } from '../hooks/use-order-by' import { SortButton } from './sort-button' -export type ColumnConfiguraton> = { +export type ColumnConfiguration> = { /** Unique column ID, used for sorting purposes and to get the value of the cell using rowItem[key] */ key: keyof T /** Column title */ @@ -72,7 +72,7 @@ export const ItemRow = >({ rowIndex: number pageIndex?: number item: T - columns: ColumnConfiguraton[] + columns: ColumnConfiguration[] }) => { return ( @@ -97,7 +97,7 @@ export const Table = >({ data, columns }: { - columns: ColumnConfiguraton[] + columns: ColumnConfiguration[] data: T[] | { pages: T[][] } }) => { return ( diff --git a/assets/js/dashboard/stats/graph/visitor-graph.js b/assets/js/dashboard/stats/graph/visitor-graph.js index 4f74868f5c1c..434bc09e307a 100644 --- a/assets/js/dashboard/stats/graph/visitor-graph.js +++ b/assets/js/dashboard/stats/graph/visitor-graph.js @@ -146,7 +146,7 @@ export default function VisitorGraph({ updateImportedDataInView }) { return ( - + diff --git a/assets/js/dashboard/stats/locations/map.tsx b/assets/js/dashboard/stats/locations/map.tsx index de2b07c37aeb..6068c8f99fe6 100644 --- a/assets/js/dashboard/stats/locations/map.tsx +++ b/assets/js/dashboard/stats/locations/map.tsx @@ -221,7 +221,7 @@ const highlightedCountryClass = classNames( /** * Used to color the countries - * @returns the svg elements represeting countries + * @returns the svg elements representing countries */ function colorInCountriesWithValues( element: SVGSVGElement, @@ -310,7 +310,7 @@ function setupProjetionPath() { function parseWorldTopoJsonToGeoJsonFeatures(): Array { const collection = topojson.feature( - // @ts-expect-error strings in worldJson not recongizable as the enum values declared in library + // @ts-expect-error strings in worldJson not recognizable as the enum values declared in library worldJson, worldJson.objects.countries ) diff --git a/assets/js/dashboard/stats/modals/breakdown-modal.tsx b/assets/js/dashboard/stats/modals/breakdown-modal.tsx index 6f0bc3f057e2..71cc9bdd8739 100644 --- a/assets/js/dashboard/stats/modals/breakdown-modal.tsx +++ b/assets/js/dashboard/stats/modals/breakdown-modal.tsx @@ -15,7 +15,7 @@ import { } from '../../hooks/use-order-by' import { Metric } from '../reports/metrics' import { BreakdownResultMeta, DashboardQuery } from '../../query' -import { ColumnConfiguraton } from '../../components/table' +import { ColumnConfiguration } from '../../components/table' import { BreakdownTable } from './breakdown-table' import { useSiteContext } from '../../site-context' @@ -130,7 +130,7 @@ export default function BreakdownModal({ afterFetchNextPage }) - const columns: ColumnConfiguraton[] = useMemo( + const columns: ColumnConfiguration[] = useMemo( () => [ { label: reportInfo.dimensionLabel, @@ -147,7 +147,7 @@ export default function BreakdownModal({ ) }, ...metrics.map( - (m): ColumnConfiguraton => ({ + (m): ColumnConfiguration => ({ label: m.renderLabel(query), key: m.key, width: m.width, diff --git a/assets/js/dashboard/stats/modals/breakdown-table.tsx b/assets/js/dashboard/stats/modals/breakdown-table.tsx index 31b6e0cbab7c..dc085d8b8200 100644 --- a/assets/js/dashboard/stats/modals/breakdown-table.tsx +++ b/assets/js/dashboard/stats/modals/breakdown-table.tsx @@ -3,7 +3,7 @@ import React, { ReactNode } from 'react' import { SearchInput } from '../../components/search-input' -import { ColumnConfiguraton, Table } from '../../components/table' +import { ColumnConfiguration, Table } from '../../components/table' import RocketIcon from './rocket-icon' import { QueryStatus } from '@tanstack/react-query' @@ -30,7 +30,7 @@ export const BreakdownTable = ({ hasNextPage: boolean isFetchingNextPage: boolean fetchNextPage: () => void - columns: ColumnConfiguraton[] + columns: ColumnConfiguration[] data?: { pages: TListItem[][] } status?: QueryStatus error?: Error | null diff --git a/assets/js/dashboard/stats/modals/google-keywords.tsx b/assets/js/dashboard/stats/modals/google-keywords.tsx index f3f0ddecaf20..29e17e031e80 100644 --- a/assets/js/dashboard/stats/modals/google-keywords.tsx +++ b/assets/js/dashboard/stats/modals/google-keywords.tsx @@ -13,7 +13,7 @@ import { } from '../../util/number-formatter' import { apiPath } from '../../util/url' import { DashboardQuery } from '../../query' -import { ColumnConfiguraton } from '../../components/table' +import { ColumnConfiguration } from '../../components/table' import { BreakdownTable } from './breakdown-table' type GoogleKeywordItem = { @@ -70,7 +70,7 @@ function GoogleKeywordsModal() { initialPageParam: 0 }) - const columns: ColumnConfiguraton[] = useMemo( + const columns: ColumnConfiguration[] = useMemo( () => [ { label: 'Search term', @@ -79,7 +79,7 @@ function GoogleKeywordsModal() { align: 'left' }, ...metrics.map( - (m): ColumnConfiguraton => ({ + (m): ColumnConfiguration => ({ label: m.renderLabel(query), key: m.key, width: m.width, diff --git a/assets/js/dashboard/util/url.ts b/assets/js/dashboard/util/url.ts index 2ce9def2e32e..67506af17de2 100644 --- a/assets/js/dashboard/util/url.ts +++ b/assets/js/dashboard/util/url.ts @@ -126,7 +126,7 @@ export function parseSearchFragment( return null } // tricky: the search string fragment is already decoded due to URLSearchParams intermediate (see tests), - // and these symbols are unparseable + // and these symbols are unparsable const fragmentWithReEncodedSymbols = searchStringFragment /* @ts-expect-error API supposedly not present in compilation target */ .replaceAll('=', encodeURIComponent('=')) diff --git a/assets/tailwind.config.js b/assets/tailwind.config.js index 1f8213e67468..a7c7a80e1cd0 100644 --- a/assets/tailwind.config.js +++ b/assets/tailwind.config.js @@ -21,7 +21,7 @@ module.exports = { }, extend: { colors: { - yellow: colors.amber, // We started usign `yellow` in v2 but it was renamed to `amber` in v3 https://tailwindcss.com/docs/upgrade-guide#removed-color-aliases + yellow: colors.amber, // We started using `yellow` in v2 but it was renamed to `amber` in v3 https://tailwindcss.com/docs/upgrade-guide#removed-color-aliases gray: colors.slate, 'gray-950': 'rgb(13, 18, 30)', 'gray-850': 'rgb(26, 32, 44)', diff --git a/lib/plausible/auth/user_admin.ex b/lib/plausible/auth/user_admin.ex index a93ddd84bc6d..d82125017714 100644 --- a/lib/plausible/auth/user_admin.ex +++ b/lib/plausible/auth/user_admin.ex @@ -5,8 +5,8 @@ defmodule Plausible.Auth.UserAdmin do alias Plausible.Billing.Subscription def custom_index_query(_conn, _schema, query) do - subscripton_q = from(s in Plausible.Billing.Subscription, order_by: [desc: s.inserted_at]) - from(r in query, preload: [subscription: ^subscripton_q]) + subscription_q = from(s in Plausible.Billing.Subscription, order_by: [desc: s.inserted_at]) + from(r in query, preload: [subscription: ^subscription_q]) end def form_fields(_) do diff --git a/lib/plausible/cache/stats.ex b/lib/plausible/cache/stats.ex index f88688bced27..c8fd5794f583 100644 --- a/lib/plausible/cache/stats.ex +++ b/lib/plausible/cache/stats.ex @@ -35,11 +35,11 @@ defmodule Plausible.Cache.Stats do {:ok, nil} end - def handle_telemetry_event(@telemetry_hit, _measurments, %{cache: %{name: cache_name}}, _) do + def handle_telemetry_event(@telemetry_hit, _measurements, %{cache: %{name: cache_name}}, _) do bump(cache_name, @hit) end - def handle_telemetry_event(@telemetry_miss, _measurments, %{cache: %{name: cache_name}}, _) do + def handle_telemetry_event(@telemetry_miss, _measurements, %{cache: %{name: cache_name}}, _) do bump(cache_name, @miss) end diff --git a/lib/plausible/data_migration/teams_consistency_check.ex b/lib/plausible/data_migration/teams_consistency_check.ex index e192b0405771..93e6696521e0 100644 --- a/lib/plausible/data_migration/teams_consistency_check.ex +++ b/lib/plausible/data_migration/teams_consistency_check.ex @@ -1,4 +1,4 @@ -defmodule Plausible.DataMigration.TeamsConsitencyCheck do +defmodule Plausible.DataMigration.TeamsConsistencyCheck do @moduledoc """ Verify consistency of teams. """ diff --git a/lib/plausible/stats/imported/base.ex b/lib/plausible/stats/imported/base.ex index 831314e6dcb8..210192ad434d 100644 --- a/lib/plausible/stats/imported/base.ex +++ b/lib/plausible/stats/imported/base.ex @@ -46,7 +46,7 @@ defmodule Plausible.Stats.Imported.Base do "time:hour" => "imported_visitors" } - @queriable_time_dimensions ["time:month", "time:week", "time:day", "time:hour"] + @queryable_time_dimensions ["time:month", "time:week", "time:day", "time:hour"] @imported_custom_props Imported.imported_custom_props() @@ -92,10 +92,10 @@ defmodule Plausible.Stats.Imported.Base do do_decide_custom_prop_table(query, dimension) end - @queriable_custom_prop_dimensions ["event:goal", "event:name"] ++ @queriable_time_dimensions + @queryable_custom_prop_dimensions ["event:goal", "event:name"] ++ @queryable_time_dimensions defp do_decide_custom_prop_table(%{dimensions: dimensions} = query) do if dimensions == [] or - (length(dimensions) == 1 and hd(dimensions) in @queriable_custom_prop_dimensions) do + (length(dimensions) == 1 and hd(dimensions) in @queryable_custom_prop_dimensions) do custom_prop_filters = dimensions_used_in_filters(query.filters) |> Enum.filter(&(&1 in @imported_custom_props)) @@ -169,7 +169,7 @@ defmodule Plausible.Stats.Imported.Base do table_candidates = dimensions_used_in_filters(query.filters) |> Enum.concat(query.dimensions) - |> Enum.reject(&(&1 in @queriable_time_dimensions or &1 == "event:goal")) + |> Enum.reject(&(&1 in @queryable_time_dimensions or &1 == "event:goal")) |> Enum.flat_map(fn "visit:screen" -> ["visit:device"] dimension -> [dimension] diff --git a/lib/plausible_web/controllers/site_controller.ex b/lib/plausible_web/controllers/site_controller.ex index f4d39f6ba6e8..1db121316d61 100644 --- a/lib/plausible_web/controllers/site_controller.ex +++ b/lib/plausible_web/controllers/site_controller.ex @@ -353,7 +353,7 @@ defmodule PlausibleWeb.SiteController do }) |> Repo.insert() - :ok = tolerate_unique_contraint_violation(result, "weekly_reports_site_id_index") + :ok = tolerate_unique_constraint_violation(result, "weekly_reports_site_id_index") conn |> put_flash(:success, "You will receive an email report every Monday going forward") @@ -407,7 +407,7 @@ defmodule PlausibleWeb.SiteController do }) |> Repo.insert() - :ok = tolerate_unique_contraint_violation(result, "monthly_reports_site_id_index") + :ok = tolerate_unique_constraint_violation(result, "monthly_reports_site_id_index") conn |> put_flash(:success, "You will receive an email report every month going forward") @@ -741,7 +741,7 @@ defmodule PlausibleWeb.SiteController do end end - defp tolerate_unique_contraint_violation(result, name) do + defp tolerate_unique_constraint_violation(result, name) do case result do {:ok, _} -> :ok diff --git a/lib/plausible_web/templates/auth/activate.html.heex b/lib/plausible_web/templates/auth/activate.html.heex index 7ab977865c25..0c8a7ac7fe1e 100644 --- a/lib/plausible_web/templates/auth/activate.html.heex +++ b/lib/plausible_web/templates/auth/activate.html.heex @@ -95,7 +95,7 @@ <.styled_link method="delete" href="/me?redirect=/register" - data-confim="Deleting your account cannot be reversed. Are you sure?" + data-confirm="Deleting your account cannot be reversed. Are you sure?" > Delete this account diff --git a/lib/plausible_web/templates/billing/change_plan_preview.html.heex b/lib/plausible_web/templates/billing/change_plan_preview.html.heex index 9febe88eb43e..b58d781179d8 100644 --- a/lib/plausible_web/templates/billing/change_plan_preview.html.heex +++ b/lib/plausible_web/templates/billing/change_plan_preview.html.heex @@ -84,7 +84,7 @@ Back - + <.button_link href={Routes.billing_path(@conn, :change_plan, @preview_info["plan_id"])} method="post" diff --git a/lib/plausible_web/templates/layout/_header.html.heex b/lib/plausible_web/templates/layout/_header.html.heex index bf376249b06b..78cdeb2861c5 100644 --- a/lib/plausible_web/templates/layout/_header.html.heex +++ b/lib/plausible_web/templates/layout/_header.html.heex @@ -90,7 +90,7 @@ <% else %> <.dropdown_link new_tab href="https://github.com/plausible/analytics"> - Github Repo + GitHub Repo <% end %> diff --git a/lib/plausible_web/views/layout_view.ex b/lib/plausible_web/views/layout_view.ex index 1842117342f0..19d928fdc731 100644 --- a/lib/plausible_web/views/layout_view.ex +++ b/lib/plausible_web/views/layout_view.ex @@ -93,7 +93,7 @@ defmodule PlausibleWeb.LayoutView do |> List.flatten() end - def trial_notificaton(user) do + def trial_notification(user) do case Plausible.Users.trial_days_left(user) do days when days > 1 -> "#{days} trial days left" diff --git a/priv/ga4-source-categories.csv b/priv/ga4-source-categories.csv index be40ba1549fa..4ee22c007c6d 100644 --- a/priv/ga4-source-categories.csv +++ b/priv/ga4-source-categories.csv @@ -365,7 +365,7 @@ instagram,SOURCE_CATEGORY_SOCIAL instagram.com,SOURCE_CATEGORY_SOCIAL instapaper,SOURCE_CATEGORY_SOCIAL instapaper.com,SOURCE_CATEGORY_SOCIAL -internations.org,SOURCE_CATEGORY_SOCIAL +interactions.org,SOURCE_CATEGORY_SOCIAL interpals.net,SOURCE_CATEGORY_SOCIAL intherooms,SOURCE_CATEGORY_SOCIAL intherooms.com,SOURCE_CATEGORY_SOCIAL @@ -434,7 +434,7 @@ mail.yandex.ru,SOURCE_CATEGORY_SEARCH malaysia.search.yahoo.com,SOURCE_CATEGORY_SEARCH mbga.jp,SOURCE_CATEGORY_SOCIAL medium.com,SOURCE_CATEGORY_SOCIAL -meetin.org,SOURCE_CATEGORY_SOCIAL +meeting.org,SOURCE_CATEGORY_SOCIAL meetup,SOURCE_CATEGORY_SOCIAL meetup.com,SOURCE_CATEGORY_SOCIAL meinvz.net,SOURCE_CATEGORY_SOCIAL diff --git a/priv/repo/migrations/20200227092821_add_fingerprint_sesssions.exs b/priv/repo/migrations/20200227092821_add_fingerprint_sessions.exs similarity index 91% rename from priv/repo/migrations/20200227092821_add_fingerprint_sesssions.exs rename to priv/repo/migrations/20200227092821_add_fingerprint_sessions.exs index 7bdd02823fcc..76acd47ba436 100644 --- a/priv/repo/migrations/20200227092821_add_fingerprint_sesssions.exs +++ b/priv/repo/migrations/20200227092821_add_fingerprint_sessions.exs @@ -1,4 +1,4 @@ -defmodule Plausible.Repo.Migrations.AddFingerprintSesssions do +defmodule Plausible.Repo.Migrations.AddFingerprintSessions do use Ecto.Migration def change do diff --git a/priv/repo/migrations/20231219083050_track_accept_traffic_until_notifcations.exs b/priv/repo/migrations/20231219083050_track_accept_traffic_until_notifications.exs similarity index 96% rename from priv/repo/migrations/20231219083050_track_accept_traffic_until_notifcations.exs rename to priv/repo/migrations/20231219083050_track_accept_traffic_until_notifications.exs index 3f19be08ae94..3268ecba102b 100644 --- a/priv/repo/migrations/20231219083050_track_accept_traffic_until_notifcations.exs +++ b/priv/repo/migrations/20231219083050_track_accept_traffic_until_notifications.exs @@ -1,4 +1,4 @@ -defmodule Plausible.Repo.Migrations.TrackAcceptTrafficUntilNotifcations do +defmodule Plausible.Repo.Migrations.TrackAcceptTrafficUntilNotifications do use Ecto.Migration def change do diff --git a/test/plausible/ingestion/event_test.exs b/test/plausible/ingestion/event_test.exs index 554efbc48d9e..069ddebbb4df 100644 --- a/test/plausible/ingestion/event_test.exs +++ b/test/plausible/ingestion/event_test.exs @@ -256,7 +256,7 @@ defmodule Plausible.Ingestion.EventTest do assert {:ok, %{buffered: [_], dropped: []}} = Event.build_and_buffer(request) end - test "drops events for site with accept_trafic_until in the past" do + test "drops events for site with accept_traffic_until in the past" do yesterday = Date.add(Date.utc_today(), -1) site = diff --git a/test/plausible/release_test.exs b/test/plausible/release_test.exs index 18835560f734..563137d7fe4f 100644 --- a/test/plausible/release_test.exs +++ b/test/plausible/release_test.exs @@ -179,7 +179,7 @@ defmodule Plausible.ReleaseTest do * 20231204151831_backfill_last_bill_date_to_subscriptions * 20231208125624_add_data_retention_in_years_to_plans * 20231211092344_add_accept_traffic_until_to_sites - * 20231219083050_track_accept_traffic_until_notifcations + * 20231219083050_track_accept_traffic_until_notifications * 20231220072829_add_accept_traffic_until_to_user * 20231220101920_backfill_accept_traffic_until * 20240103090304_upgrade_oban_jobs_to_v12 diff --git a/test/plausible/shields/country_test.exs b/test/plausible/shields/country_test.exs index 8b2218688c1e..43f5c4f42fd2 100644 --- a/test/plausible/shields/country_test.exs +++ b/test/plausible/shields/country_test.exs @@ -80,7 +80,7 @@ defmodule Plausible.Shields.CountryTest do end describe "remove_country_rule/2" do - test "is idempontent", %{site: site} do + test "is idempotent", %{site: site} do {:ok, rule} = add_country_rule(site, %{"country_code" => "EE"}) assert remove_country_rule(site, rule.id) == :ok refute Repo.get(Plausible.Shield.CountryRule, rule.id) diff --git a/test/plausible/shields/hostname_test.exs b/test/plausible/shields/hostname_test.exs index 75c7ca995140..35f562dec2ab 100644 --- a/test/plausible/shields/hostname_test.exs +++ b/test/plausible/shields/hostname_test.exs @@ -114,7 +114,7 @@ defmodule Plausible.Shields.HostnameTest do end describe "remove_hostname_rule/2" do - test "is idempontent", %{site: site} do + test "is idempotent", %{site: site} do {:ok, rule} = add_hostname_rule(site, %{"hostname" => "test"}) assert remove_hostname_rule(site, rule.id) == :ok refute Repo.get(Plausible.Shield.HostnameRule, rule.id) diff --git a/test/plausible/shields/ip_test.exs b/test/plausible/shields/ip_test.exs index bd597a3925e4..8e8f1d535c65 100644 --- a/test/plausible/shields/ip_test.exs +++ b/test/plausible/shields/ip_test.exs @@ -90,7 +90,7 @@ defmodule Plausible.Shields.IPTest do end describe "remove_ip_rule/2" do - test "is idempontent", %{site: site} do + test "is idempotent", %{site: site} do {:ok, rule} = add_ip_rule(site, %{"inet" => "127.0.0.1"}) assert remove_ip_rule(site, rule.id) == :ok refute Repo.get(Plausible.Shield.IPRule, rule.id) diff --git a/test/plausible/shields/page_test.exs b/test/plausible/shields/page_test.exs index 121672568fa8..51acee7a5d98 100644 --- a/test/plausible/shields/page_test.exs +++ b/test/plausible/shields/page_test.exs @@ -115,7 +115,7 @@ defmodule Plausible.Shields.PageTest do end describe "remove_page_rule/2" do - test "is idempontent", %{site: site} do + test "is idempotent", %{site: site} do {:ok, rule} = add_page_rule(site, %{"page_path" => "/test"}) assert remove_page_rule(site, rule.id) == :ok refute Repo.get(Plausible.Shield.PageRule, rule.id) diff --git a/test/plausible_web/live/reset_password_form_test.exs b/test/plausible_web/live/reset_password_form_test.exs index 2f0f8f9d6f09..ef8dc87d6f6f 100644 --- a/test/plausible_web/live/reset_password_form_test.exs +++ b/test/plausible_web/live/reset_password_form_test.exs @@ -17,7 +17,7 @@ defmodule PlausibleWeb.Live.ResetPasswordFormTest do lv = get_liveview(conn, "/password/reset?token=#{token}") - type_into_passowrd(lv, "very-secret-and-very-long-123") + type_into_password(lv, "very-secret-and-very-long-123") html = lv |> element("form") |> render_submit() assert [csrf_input, password_input | _] = find(html, "input") @@ -36,7 +36,7 @@ defmodule PlausibleWeb.Live.ResetPasswordFormTest do lv = get_liveview(conn, "/password/reset?token=#{token}") - type_into_passowrd(lv, "very-secret-and-very-long-123") + type_into_password(lv, "very-secret-and-very-long-123") lv |> element("form") |> render_submit() updated_user = Repo.reload!(user) @@ -51,7 +51,7 @@ defmodule PlausibleWeb.Live.ResetPasswordFormTest do lv = get_liveview(conn, "/password/reset?token=#{token}") - type_into_passowrd(lv, "too-short") + type_into_password(lv, "too-short") html = lv |> element("form") |> render_submit() assert html =~ "Password is too weak" @@ -78,7 +78,7 @@ defmodule PlausibleWeb.Live.ResetPasswordFormTest do lv = get_liveview(conn, "/password/reset?token=#{token}") - type_into_passowrd(lv, "very-secret-and-very-long-123") + type_into_password(lv, "very-secret-and-very-long-123") lv |> element("form") |> render_submit() assert [] = Repo.preload(user, :sessions).sessions @@ -94,7 +94,7 @@ defmodule PlausibleWeb.Live.ResetPasswordFormTest do lv end - defp type_into_passowrd(lv, text) do + defp type_into_password(lv, text) do lv |> element("form") |> render_change(%{"user[password]" => text}) diff --git a/test/plausible_web/plugs/favicon_test.exs b/test/plausible_web/plugs/favicon_test.exs index 45f93d457dbc..518322706e6c 100644 --- a/test/plausible_web/plugs/favicon_test.exs +++ b/test/plausible_web/plugs/favicon_test.exs @@ -145,7 +145,7 @@ defmodule PlausibleWeb.FaviconTest do end describe "Fallback to placeholder icon" do - @placholder_icon File.read!("priv/placeholder_favicon.ico") + @placeholder_icon File.read!("priv/placeholder_favicon.ico") test "falls back to placeholder when DDG returns a non-2xx response", %{plug_opts: plug_opts} do expect( @@ -163,7 +163,7 @@ defmodule PlausibleWeb.FaviconTest do assert conn.halted assert conn.status == 200 - assert conn.resp_body == @placholder_icon + assert conn.resp_body == @placeholder_icon end test "falls back to placeholder in case of a network error", %{plug_opts: plug_opts} do @@ -181,7 +181,7 @@ defmodule PlausibleWeb.FaviconTest do assert conn.halted assert conn.status == 200 - assert conn.resp_body == @placholder_icon + assert conn.resp_body == @placeholder_icon end test "falls back to placeholder when DDG returns a broken image response", %{ @@ -201,7 +201,7 @@ defmodule PlausibleWeb.FaviconTest do assert conn.halted assert conn.status == 200 - assert conn.resp_body == @placholder_icon + assert conn.resp_body == @placeholder_icon end end end diff --git a/test/workers/lock_sites_test.exs b/test/workers/lock_sites_test.exs index b8c27b4c971a..7124722c1a68 100644 --- a/test/workers/lock_sites_test.exs +++ b/test/workers/lock_sites_test.exs @@ -36,7 +36,7 @@ defmodule Plausible.Workers.LockSitesTest do assert Repo.reload!(site).locked end - test "does not lock active subsriber's sites" do + test "does not lock active subscriber's sites" do user = insert(:user) insert(:subscription, status: Subscription.Status.active(), user: user) site = insert(:site, members: [user]) From a6d60132b520382c397c7c21fcb0a629f5ec1514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sun, 1 Dec 2024 11:22:37 +0000 Subject: [PATCH 2/3] Revert changes in ignored file --- priv/ga4-source-categories.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/priv/ga4-source-categories.csv b/priv/ga4-source-categories.csv index 4ee22c007c6d..be40ba1549fa 100644 --- a/priv/ga4-source-categories.csv +++ b/priv/ga4-source-categories.csv @@ -365,7 +365,7 @@ instagram,SOURCE_CATEGORY_SOCIAL instagram.com,SOURCE_CATEGORY_SOCIAL instapaper,SOURCE_CATEGORY_SOCIAL instapaper.com,SOURCE_CATEGORY_SOCIAL -interactions.org,SOURCE_CATEGORY_SOCIAL +internations.org,SOURCE_CATEGORY_SOCIAL interpals.net,SOURCE_CATEGORY_SOCIAL intherooms,SOURCE_CATEGORY_SOCIAL intherooms.com,SOURCE_CATEGORY_SOCIAL @@ -434,7 +434,7 @@ mail.yandex.ru,SOURCE_CATEGORY_SEARCH malaysia.search.yahoo.com,SOURCE_CATEGORY_SEARCH mbga.jp,SOURCE_CATEGORY_SOCIAL medium.com,SOURCE_CATEGORY_SOCIAL -meeting.org,SOURCE_CATEGORY_SOCIAL +meetin.org,SOURCE_CATEGORY_SOCIAL meetup,SOURCE_CATEGORY_SOCIAL meetup.com,SOURCE_CATEGORY_SOCIAL meinvz.net,SOURCE_CATEGORY_SOCIAL From 81a1c9929ed1a2d28ff16d1a54e3f2373cfdf6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Mon, 2 Dec 2024 11:52:42 +0000 Subject: [PATCH 3/3] Fix another typo --- lib/plausible_web/templates/layout/_header.html.heex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plausible_web/templates/layout/_header.html.heex b/lib/plausible_web/templates/layout/_header.html.heex index 78cdeb2861c5..ac962921e725 100644 --- a/lib/plausible_web/templates/layout/_header.html.heex +++ b/lib/plausible_web/templates/layout/_header.html.heex @@ -51,7 +51,7 @@ class="text-sm text-yellow-900 dark:text-yellow-900 rounded px-3 py-2 rounded-md bg-yellow-100 dark:bg-yellow-100" href={Routes.settings_path(@conn, :subscription)} > - <%= trial_notificaton(@conn.assigns[:current_user]) %> + <%= trial_notification(@conn.assigns[:current_user]) %>