Skip to content

Commit 0b4eb98

Browse files
Alex Martsinovichmartosaur
authored andcommitted
Run formatter
1 parent 3218e50 commit 0b4eb98

File tree

3 files changed

+25
-27
lines changed

3 files changed

+25
-27
lines changed

.formatter.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[
2+
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
3+
]

lib/safeurl/httpoison.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ if Code.ensure_loaded?(HTTPoison) do
2727
2828
"""
2929
@spec get(binary(), HTTPoison.headers(), Keyword.t()) ::
30-
{:ok, HTTPoison.Response.t()} | {:error, HTTPoison.Error.t()} | {:error, SafeURL.error()} | {:error, :restricted}
30+
{:ok, HTTPoison.Response.t()}
31+
| {:error, HTTPoison.Error.t()}
32+
| {:error, SafeURL.error()}
33+
| {:error, :restricted}
3134
def get(url, headers \\ [], options \\ []) do
3235
with :ok <- SafeURL.validate(url) do
3336
HTTPoison.get(url, headers, options)

mix.exs

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,43 @@
11
defmodule SafeURL.MixProject do
22
use Mix.Project
33

4-
5-
@app :safeurl
6-
@name "SafeURL"
4+
@app :safeurl
5+
@name "SafeURL"
76
@version "0.3.1"
8-
@github "https://github.com/slab/safeurl-elixir"
9-
7+
@github "https://github.com/slab/safeurl-elixir"
108

119
def project do
1210
[
1311
# Project
14-
app: @app,
15-
version: @version,
16-
elixir: "~> 1.10",
17-
description: description(),
18-
package: package(),
19-
deps: deps(),
20-
elixirc_paths: elixirc_paths(Mix.env()),
12+
app: @app,
13+
version: @version,
14+
elixir: "~> 1.10",
15+
description: description(),
16+
package: package(),
17+
deps: deps(),
18+
elixirc_paths: elixirc_paths(Mix.env()),
2119

2220
# ExDoc
23-
name: @name,
21+
name: @name,
2422
docs: [
25-
main: @name,
26-
source_url: @github,
23+
main: @name,
24+
source_url: @github,
2725
homepage_url: @github,
28-
canonical: "https://hexdocs.pm/#{@app}",
29-
extras: ["README.md"]
26+
canonical: "https://hexdocs.pm/#{@app}",
27+
extras: ["README.md"]
3028
]
3129
]
3230
end
3331

34-
3532
defp description do
3633
"SSRF Protection in Elixir 🛡️"
3734
end
3835

39-
4036
# BEAM Application
4137
def application do
4238
[env: default_configs()]
4339
end
4440

45-
4641
defp default_configs do
4742
[
4843
schemes: ~w[http https],
@@ -54,23 +49,20 @@ defmodule SafeURL.MixProject do
5449
]
5550
end
5651

57-
5852
# Dependencies
5953
defp deps do
6054
[
6155
{:httpoison, "~> 1.0 or ~> 2.0", optional: true},
6256
{:inet_cidr, "~> 1.0 and >= 1.0.6"},
6357
{:dns, "~> 2.2"},
6458
{:tesla, "~> 1.0", optional: true},
65-
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
59+
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false}
6660
]
6761
end
6862

69-
7063
# Compilation Paths
7164
defp elixirc_paths(:test), do: ["lib", "test/support"]
72-
defp elixirc_paths(_), do: ["lib"]
73-
65+
defp elixirc_paths(_), do: ["lib"]
7466

7567
# Package Information
7668
defp package do
@@ -81,7 +73,7 @@ defmodule SafeURL.MixProject do
8173
files: ~w(mix.exs lib README.md),
8274
links: %{
8375
"Github" => @github,
84-
"Slab" => "https://slab.com/",
76+
"Slab" => "https://slab.com/"
8577
}
8678
]
8779
end

0 commit comments

Comments
 (0)