Skip to content

Commit

Permalink
create dependabot.yml and update charlist to sigil_c
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeyson committed Mar 23, 2024
1 parent 6123ac1 commit 560eb16
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "mix" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
labels:
- "hex"
- "dependencies"
2 changes: 1 addition & 1 deletion lib/ex_typesense/document.ex
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ defmodule ExTypesense.Document do

path = Path.join([@collections_path, collection_name, @documents_path, @import_path])
uri = %URI{path: path, query: "action=#{action}"}
HttpClient.httpc_run(uri, :post, payload, 'text/plain')
HttpClient.httpc_run(uri, :post, payload, ~c"text/plain")
end

@doc """
Expand Down
4 changes: 2 additions & 2 deletions lib/ex_typesense/http_client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule ExTypesense.HttpClient do
@type request_body() :: iodata() | nil
@type request_method() :: :get | :post | :delete | :patch | :put
@type request_path() :: String.t()
@api_header_name 'X-TYPESENSE-API-KEY'
@api_header_name ~c"X-TYPESENSE-API-KEY"

def get_host, do: Application.get_env(:ex_typesense, :host)
def get_port, do: Application.get_env(:ex_typesense, :port)
Expand Down Expand Up @@ -64,7 +64,7 @@ defmodule ExTypesense.HttpClient do
end

@spec httpc_run(URI.__struct__(), atom(), String.t(), list()) :: {:ok, map()} | {:error, map()}
def httpc_run(uri, method, payload, content_type \\ 'application/json') do
def httpc_run(uri, method, payload, content_type \\ ~c"application/json") do
uri = %URI{
scheme: get_scheme(),
host: get_host(),
Expand Down

0 comments on commit 560eb16

Please sign in to comment.