Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codespell fixes #3710

Merged
merged 9 commits into from
Oct 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style(elixir): codespell implementations/elixir/
  • Loading branch information
jtmoon79 authored and mrinalwadhwa committed Oct 22, 2022
commit da04f7c87d9c40742a1ec0f0a32bdc7ef44ecb34
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ defmodule Ockam.Credential.AttributeStorageETS do

@doc """
Save attribute set for identity id
Current attribute set (if exists) will be overriden.
Current attribute set (if exists) will be overridden.
"""
@spec put_attribute_set(identity_id(), AttributeSet.t()) :: :ok | {:error, any()}
def put_attribute_set(id, attribute_set) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defmodule Ockam.Examples.Ping do

{previous, ""} = Integer.parse(Message.payload(message))

Logger.info("\nReceived pong fo #{inspect(previous)}")
Logger.info("\nReceived pong for #{inspect(previous)}")

state =
case Map.get(state, :last, 0) do
Expand Down
2 changes: 1 addition & 1 deletion implementations/elixir/ockam/ockam/lib/ockam/node.ex
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ defmodule Ockam.Node do
@spec get_random_unregistered_address(prefix :: String.t(), length_in_bytes :: integer()) ::
binary()
@doc """
Returns a random address that is currently not registed on the node.
Returns a random address that is currently not registered on the node.
"""
def get_random_unregistered_address(
prefix \\ "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule Ockam.Node.Registry do

@spec register_name(any, any) :: :no | :yes
@doc false
# This function is used when a process is registed using the `:via` option.
# This function is used when a process is registered using the `:via` option.
#
# The Gen* modules expect this function to be exported.
# See the "Name registration" section of the `GenServer` module.
Expand All @@ -33,15 +33,15 @@ defmodule Ockam.Node.Registry do

@spec whereis_name(any) :: :undefined | pid
@doc false
# This function is used when a process is registed using the `:via` option.
# This function is used when a process is registered using the `:via` option.
#
# The Gen* modules expect this function to be exported.
# See the "Name registration" section of the `GenServer` module.
def whereis_name(address), do: Registry.whereis_name({__MODULE__, address})

@spec unregister_name(any) :: :ok
@doc false
# This function is used when a process is registed using the `:via` option.
# This function is used when a process is registered using the `:via` option.
#
# The Gen* modules expect this function to be exported.
# See the "Name registration" section of the `GenServer` module.
Expand All @@ -54,7 +54,7 @@ defmodule Ockam.Node.Registry do

def addresses(pid), do: Registry.keys(__MODULE__, pid)

# This function is used when a process is registed using the `:via` option.
# This function is used when a process is registered using the `:via` option.
#
# The Gen* modules expect this function to be exported.
# See the "Name registration" section of the `GenServer` module.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ defmodule Ockam.Router.Storage do
@doc """
Puts the given `value` under `key` in storage.

If key is successfullly set, `:ok` is returned.
If key is successfully set, `:ok` is returned.
If a value already exists for this key, it will be overwritten, `:ok` is returned.
"""
@spec put(key(), value()) :: :ok
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ defmodule Ockam.Identity.SecureChannel.Handshake do
@impl true
def handle_responder(handshake_options, message, handshake_state) do
## TODO: maybe we need some separate handle_init_message for responder?
## Currently using a flag in handshake_state ot distinguish between
## Currently using a flag in handshake_state to distinguish between
## init message and handshake message
case Map.get(handshake_state, :expected_message, :init) do
:init ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Ockam.Transport.Portal.InletWorker do
It had three states:
:wait_for_socket : right after starting. It's waiting for the Listener to transfer control of the socket.
:wait_for_pong : already sent the initial :ping message, and are waiting for the pong response.
:connected : pong has been recived, socket is moved into {active, once} mode to start reading from it.
:connected : pong has been received, socket is moved into {active, once} mode to start reading from it.

TODO: Ideally this should be implemented as a GenFsm, but that's not what Ockam.Worker expect.
It's also a good candidate to use the session framework on Ockam.Session.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ defmodule Ockam.Transport.TCP.Handler do
end

def handle_info(other, state) do
Logger.warn("TCP HANDLER Received unkown message #{inspect(other)} #{inspect(state)}")
Logger.warn("TCP HANDLER Received unknown message #{inspect(other)} #{inspect(state)}")
{:noreply, state}
end

Expand Down
2 changes: 1 addition & 1 deletion implementations/elixir/ockam/ockam/lib/ockam/worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ defmodule Ockam.Worker do

def is_authorized(message, state) do
## Address check is default authorization rule for all workers
## It can be overriden by implementing custom is_authorized function
## It can be overridden by implementing custom is_authorized function
with :ok <- Authorization.to_my_address(message, state) do
Ockam.Worker.Authorization.with_state_config(message, state)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defmodule Ockam.Transport.Portal.OutletWorker.Tests do
{:target_port, echo_port}
])

# We must receive the :pong responde handshake
# We must receive the :pong response handshake
assert :pong == receive_msg()

# Send some data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule Ockam.Transport.TCP.Listener.Tests do

@tag :skip
describe "Ockam.Transport.TCP.Listener.Handler" do
test "placehoder test" do
test "placeholder test" do
assert true
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule Ockam.Services.Provider.Sidecar do
- sidecar_port - port for sidecar node, default is 4100
- sidecar_address - worker address on the sidecar node, default is "ca_verifier_service"

:sidecar_node - service forwarding to a sidecar node (essentialy a persistent TCP client)
:sidecar_node - service forwarding to a sidecar node (essentially a persistent TCP client)

Options:
- service_id - atom id of the service for the supervisor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Ockam.TypedCBOR do
@moduledoc """
Helpers encode/decode structs to/from CBOR, aimed at compatibility with minicbor rust library.
Prefered usage is through TypedStruct macros, see examples on test/plugin_test.exs
Preferred usage is through TypedStruct macros, see examples on test/plugin_test.exs
"""

@doc ~S"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ defmodule Ockam.Vault.Software.MixProject do

base_url = @ockam_release_url <> version_path

## To donwload files we need inets and ssl
## To download files we need inets and ssl
:inets.start()
:ssl.start()

Expand Down