Skip to content

Commit 9655012

Browse files
authored
Fix typos (#100)
Found via `typos --hidden --format brief`
1 parent d2f9b2b commit 9655012

File tree

10 files changed

+19
-19
lines changed

10 files changed

+19
-19
lines changed

lib/mix/tasks/phoenix_sync.install.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ if Code.ensure_loaded?(Igniter) do
8686
if mode not in @valid_modes do
8787
Igniter.add_issue(
8888
igniter,
89-
"mode #{inspect(mode)} is invlid, valid modes are: #{@valid_modes |> Enum.join(", ")}"
89+
"mode #{inspect(mode)} is invalid, valid modes are: #{@valid_modes |> Enum.join(", ")}"
9090
)
9191
else
9292
add_dependencies(igniter, mode)

lib/phoenix/sync/electric.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ defmodule Phoenix.Sync.Electric do
3838
pass the key you configure here (in this case `:config`) to the
3939
`Phoenix.Sync.Electric` plug in it's `init_opts`.
4040
41-
In your application, build your Electric confguration using
41+
In your application, build your Electric configuration using
4242
`Phoenix.Sync.plug_opts()` and pass the result to your router as
4343
`phoenix_sync`:
4444
@@ -447,7 +447,7 @@ defmodule Phoenix.Sync.Electric do
447447
end
448448

449449
# Returns a function to generate the config so that we can
450-
# centralise the test for the existance of electric.
450+
# centralise the test for the existence of electric.
451451
# Need this because the convert_repo_config/1 function needs Electric
452452
# installed too
453453
defp validate_database_config(_env, mode, opts) do

lib/phoenix/sync/live_view.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ if Code.ensure_loaded?(Phoenix.Component) do
101101
102102
This event is useful to show the stream component after
103103
the initial sync. Because of the streaming nature of Electric Shapes, the
104-
intitial sync can cause flickering as items are added, removed and updated.
104+
initial sync can cause flickering as items are added, removed and updated.
105105
106106
E.g.:
107107

lib/phoenix/sync/plug.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defmodule Phoenix.Sync.Plug do
66
Rather than configuring your [Electric Typescript
77
client](https://electric-sql.com/docs/api/clients/typescript) directly, you
88
instead configure a route in your application with a pre-configured
9-
`Electric.Client.ShapeDefinition` and then retreive the URL and other
9+
`Electric.Client.ShapeDefinition` and then retrieve the URL and other
1010
configuration for that shape from your client via a request to your Phoenix
1111
application.
1212

lib/phoenix/sync/sandbox.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ if Phoenix.Sync.sandbox_enabled?() do
105105
end
106106
107107
However processes started outside of the test process tree that need to be
108-
[explictly granted access to the sandboxed
108+
[explicitly granted access to the sandboxed
109109
connection](https://hexdocs.pm/ecto_sql/Ecto.Adapters.SQL.Sandbox.html#module-allowances)
110110
will also need to be explicitly registered to the current test's
111111
replication stream using `#{inspect(__MODULE__)}.allow/3`. This calls
@@ -272,7 +272,7 @@ if Phoenix.Sync.sandbox_enabled?() do
272272
# we link the sandbox to the current (test) process not the connection
273273
# owner because that's the ownership route that works. The owner
274274
# is a convenience to link the repo connection to a process who's lifetime
275-
# is explictly managed rather than a mechanism for linking the test
275+
# is explicitly managed rather than a mechanism for linking the test
276276
# to the sandbox txn.
277277
Sandbox.StackRegistry.register(test_pid, stack_id)
278278

lib/phoenix/sync/sandbox/postgres/adapter.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ if Phoenix.Sync.sandbox_enabled?() do
392392
return_all = Enum.map(all_columns, &{:old, &1}) ++ Enum.map(all_columns, &{:new, &1})
393393

394394
# https://stackoverflow.com/a/7927957
395-
# return the old and new values from an update by aquiring an exclusive lock
395+
# return the old and new values from an update by acquiring an exclusive lock
396396
# on the row and using a sub-query.
397397
# UPDATE table new
398398
# SET value = $1

lib/phoenix/sync/writer.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ if Code.ensure_loaded?(Ecto) do
9696
Phoenix already ships with primitives like `Ecto.Multi` and `c:Ecto.Repo.transaction/2`.
9797
However, `#{inspect(__MODULE__)}` provides:
9898
99-
- a number of convienience functions that simplify ingesting mutation operations
99+
- a number of convenience functions that simplify ingesting mutation operations
100100
- a high-level pipeline that dries up a lot of common boilerplate and allows you to re-use
101101
your existing `Plug` and `Ecto.Changeset` logic
102102
@@ -113,7 +113,7 @@ if Code.ensure_loaded?(Ecto) do
113113
|> #{inspect(__MODULE__)}.allow(MyApp.OtherSchema)
114114
|> #{inspect(__MODULE__)}.apply(transaction, Repo, format: MyApp.MutationFormat)
115115
116-
Or, instead of `apply/4` you can use seperate calls to `ingest/3` and then `transaction/2`.
116+
Or, instead of `apply/4` you can use separate calls to `ingest/3` and then `transaction/2`.
117117
This allows you to ingest multiple formats, for example:
118118
119119
{:ok, txid} =
@@ -183,7 +183,7 @@ if Code.ensure_loaded?(Ecto) do
183183
when the transaction syncs through. At which point the client can discard its local
184184
optimistic state.
185185
186-
A convinient way of doing this is to parse the request data into a list of
186+
A convenient way of doing this is to parse the request data into a list of
187187
`#{inspect(__MODULE__)}.Operation`s using a `#{inspect(__MODULE__)}.Format`.
188188
You can then apply the changes yourself by matching on the operation data:
189189
@@ -1324,7 +1324,7 @@ if Code.ensure_loaded?(Ecto) do
13241324
{:ok, txid} =
13251325
Repo.transaction(fn ->
13261326
Enum.each(txn.operations, fn operation ->
1327-
# do something wih the given operation
1327+
# do something with the given operation
13281328
# raise if something is wrong...
13291329
end)
13301330
# return the transaction id
@@ -1921,7 +1921,7 @@ if Code.ensure_loaded?(Ecto) do
19211921
19221922
`Ecto.Multi` requires that all operation names be unique within a
19231923
transaction. This function gives you a simple way to generate a name for your
1924-
own operations that is guarateed not to conflict with any other.
1924+
own operations that is guaranteed not to conflict with any other.
19251925
19261926
Example:
19271927

test/phoenix/sync/application_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ defmodule Phoenix.Sync.ApplicationTest do
181181
mode: :embedded,
182182
env: :dev,
183183
repo: Support.ConfigTestRepo,
184-
# don't overwrite this explict config
184+
# don't overwrite this explicit config
185185
storage_dir: storage_dir
186186
]
187187

@@ -213,7 +213,7 @@ defmodule Phoenix.Sync.ApplicationTest do
213213
} = Map.new(opts)
214214
end
215215

216-
test "embedded mode with explict replication_connection_opts and query_connection_opts" do
216+
test "embedded mode with explicit replication_connection_opts and query_connection_opts" do
217217
storage_dir = Path.join([System.tmp_dir!(), "storage-dir#{System.monotonic_time()}"])
218218

219219
config = [
@@ -260,7 +260,7 @@ defmodule Phoenix.Sync.ApplicationTest do
260260
} = Map.new(opts)
261261
end
262262

263-
test "embedded mode with explict connection_opts" do
263+
test "embedded mode with explicit connection_opts" do
264264
storage_dir = Path.join([System.tmp_dir!(), "storage-dir#{System.monotonic_time()}"])
265265

266266
config = [

test/phoenix/sync/plug_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ defmodule Phoenix.Sync.PlugTest do
319319
}
320320
end
321321

322-
test "works with Phoenix.Router.forward/3 and paramter based shapes" do
322+
test "works with Phoenix.Router.forward/3 and parameter based shapes" do
323323
resp =
324324
Phoenix.ConnTest.build_conn()
325325
|> Phoenix.ConnTest.get("/shape/generic", %{

test/support/live_views/stream.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ defmodule Phoenix.Sync.LiveViewTest.StreamLive do
4242
end
4343

4444
def handle_info({:sync, event}, socket) do
45-
# send messsage to test pid, just for sync
45+
# send message to test pid, just for sync
4646
send(socket.assigns.test_pid, {:sync, event})
4747
{:noreply, Phoenix.Sync.LiveView.sync_stream_update(socket, event)}
4848
end
@@ -240,7 +240,7 @@ defmodule Phoenix.Sync.LiveViewTest.StreamSandbox do
240240
end
241241

242242
def handle_info({:sync, event}, socket) do
243-
# send messsage to test pid, just for sync
243+
# send message to test pid, just for sync
244244
send(socket.assigns.test_pid, {:sync, event})
245245
{:noreply, Phoenix.Sync.LiveView.sync_stream_update(socket, event)}
246246
end

0 commit comments

Comments
 (0)