Skip to content

Commit

Permalink
Fix typos (#214)
Browse files Browse the repository at this point in the history
Found via `typos --hidden --format brief`
  • Loading branch information
kianmeng authored Dec 9, 2023
1 parent 5023de6 commit 8e2ac81
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ Usage: mix vcr [options]
-d (--dir) Specify vcr cassettes directory
-c (--custom) Specify custom cassettes directory

Usage: mix vcr.delete [options] [cassete-file-names]
Usage: mix vcr.delete [options] [cassette-file-names]
Used to delete cassettes

-d (--dir) Specify vcr cassettes directory
Expand All @@ -602,7 +602,7 @@ Usage: mix vcr.check [options] [test-files]
-d (--dir) Specify vcr cassettes directory
-c (--custom) Specify custom cassettes directory

Usage: mix vcr.show [cassete-file-names]
Usage: mix vcr.show [cassette-file-names]
Used to show cassette contents

```
Expand Down
2 changes: 1 addition & 1 deletion lib/exvcr/adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ defmodule ExVCR.Adapter do
defoverridable [hook_response_from_cache: 2]

@doc """
Callback from ExVCR.Handler to get the response content tuple from the ExVCR.Reponse record.
Callback from ExVCR.Handler to get the response content tuple from the ExVCR.Response record.
"""
def get_response_value_from_cache(response) do
if response.type == "error" do
Expand Down
2 changes: 1 addition & 1 deletion lib/exvcr/adapter/finch.ex
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if Code.ensure_loaded?(Finch) do
end

@doc """
Callback from ExVCR.Handler to get the response content tuple from the ExVCR.Reponse record.
Callback from ExVCR.Handler to get the response content tuple from the ExVCR.Response record.
"""
def get_response_value_from_cache(response) do
if response.type == "error" do
Expand Down
2 changes: 1 addition & 1 deletion lib/exvcr/adapter/hackney.ex
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ defmodule ExVCR.Adapter.Hackney do
end

@doc """
Returns the response from the ExVCR.Reponse record.
Returns the response from the ExVCR.Response record.
"""
def get_response_value_from_cache(response) do
if response.type == "error" do
Expand Down
2 changes: 1 addition & 1 deletion lib/exvcr/adapter/httpc.ex
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ defmodule ExVCR.Adapter.Httpc do
end

@doc """
Returns the response from the ExVCR.Reponse record.
Returns the response from the ExVCR.Response record.
"""
def get_response_value_from_cache(response) do
if response.type == "error" do
Expand Down
2 changes: 1 addition & 1 deletion lib/exvcr/adapter/ibrowse.ex
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ defmodule ExVCR.Adapter.IBrowse do
end

@doc """
Callback from ExVCR.Handler to get the response content tuple from the ExVCR.Reponse record.
Callback from ExVCR.Handler to get the response content tuple from the ExVCR.Response record.
"""
def get_response_value_from_cache(response) do
if response.type == "error" do
Expand Down
2 changes: 1 addition & 1 deletion lib/exvcr/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defmodule ExVCR.Config do

@doc """
Replace the specified pattern with placeholder.
It can be used to remove sensitive data from the casette file.
It can be used to remove sensitive data from the cassette file.
## Examples
Expand Down
6 changes: 3 additions & 3 deletions lib/exvcr/filter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule ExVCR.Filter do
"""

@doc """
Filter out senstive data from the response.
Filter out sensitive data from the response.
"""
def filter_sensitive_data(body) when is_binary(body) do
if String.valid?(body) do
Expand All @@ -16,14 +16,14 @@ defmodule ExVCR.Filter do
def filter_sensitive_data(body), do: body

@doc """
Filter out senstive data from the request header.
Filter out sensitive data from the request header.
"""
def filter_request_header(header, value) do
if Enum.member?(ExVCR.Setting.get(:filter_request_headers), header), do: "***", else: value
end

@doc """
Filter out senstive data from the request options.
Filter out sensitive data from the request options.
"""
def filter_request_option(option, value) do
if Enum.member?(ExVCR.Setting.get(:filter_request_options), option), do: "***", else: value
Expand Down
2 changes: 1 addition & 1 deletion lib/exvcr/task/show.ex
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ defmodule ExVCR.Task.Show do
|> JSX.decode!()
|> List.first()
|> Enum.into(%{})
|> get_in(["responce", "body"])
|> get_in(["response", "body"])
end
end
6 changes: 3 additions & 3 deletions lib/exvcr/task/util.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule ExVCR.Task.Util do
end

@doc """
Method for priting help message.
Method for printing help message.
"""
def print_help_message do
IO.puts """
Expand All @@ -23,7 +23,7 @@ Usage: mix vcr [options]
-d (--dir) Specify vcr cassettes directory
-c (--custom) Specify custom cassettes directory
Usage: mix vcr.delete [options] [cassete-file-names]
Usage: mix vcr.delete [options] [cassette-file-names]
Used to delete cassettes
-d (--dir) Specify vcr cassettes directory
Expand All @@ -37,7 +37,7 @@ Usage: mix vcr.check [options] [test-files]
-d (--dir) Specify vcr cassettes directory
-c (--custom) Specify custom cassettes directory
Usage: mix vcr.show [cassete-file-names]
Usage: mix vcr.show [cassette-file-names]
Used to show cassette contents
"""
Expand Down
2 changes: 1 addition & 1 deletion test/adapter_finch_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ defmodule ExVCR.Adapter.FinchTest do
end
end

test "using recorded cassete, but requesting with different url should return error" do
test "using recorded cassette, but requesting with different url should return error" do
use_cassette "example_finch_different" do
{:ok, response} = Finch.build(:get, "http://example.com") |> Finch.request(ExVCRFinch)
assert response.status == 200
Expand Down
2 changes: 1 addition & 1 deletion test/adapter_ibrowse_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ defmodule ExVCR.Adapter.IBrowseTest do
end
end

test "using recorded cassete, but requesting with different url should return error" do
test "using recorded cassette, but requesting with different url should return error" do
use_cassette "example_ibrowse_different" do
{:ok, status_code, _headers, body} = :ibrowse.send_req('http://example.com', [], :get)
assert status_code == '200'
Expand Down
2 changes: 1 addition & 1 deletion test/strict_mode_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ defmodule ExVCR.StrictModeTest do
end
end

test "it does not uses a cassette when override the defaut config" do
test "it does not uses a cassette when override the default config" do
ExVCR.Setting.set(:strict_mode, true)

use_cassette "strict_mode_cassette", strict_mode: false do
Expand Down

0 comments on commit 8e2ac81

Please sign in to comment.