Skip to content

Commit ad9029d

Browse files
committed
chore: Fix docs and test matrix
Signed-off-by: Austin Ziegler <[email protected]>
1 parent 679d37c commit ad9029d

File tree

6 files changed

+26
-26
lines changed

6 files changed

+26
-26
lines changed

.github/workflows/elixir.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
include:
25-
- elixir: '1.10'
26-
otp: '21'
27-
os: ubuntu-20.04
28-
- elixir: '1.11'
29-
otp: '21'
30-
os: ubuntu-20.04
31-
- elixir: '1.11'
32-
otp: '23'
33-
os: ubuntu-20.04
3425
- elixir: '1.12'
3526
otp: '24'
3627
os: ubuntu-22.04
@@ -43,6 +34,19 @@ jobs:
4334
- elixir: '1.15'
4435
otp: '26'
4536
os: ubuntu-22.04
37+
- elixir: '1.16'
38+
otp: '27'
39+
os: ubuntu-24.04
40+
check_formatted: true
41+
warnings_as_errors: true
42+
dialyzer: true
43+
credo: true
44+
- elixir: '1.17'
45+
otp: '27'
46+
os: ubuntu-24.04
47+
- elixir: '1.18'
48+
otp: '27'
49+
os: ubuntu-22.04
4650
check_formatted: true
4751
warnings_as_errors: true
4852
dialyzer: true
@@ -90,5 +94,5 @@ jobs:
9094
restore-keys: |
9195
plts@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix-
9296
93-
- run: mix dialyzer
97+
- run: mix dialyzer --format github
9498
if: matrix.dialyzer

README.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ If the request IP is not allowed, the specified response code and body will be
88
added to the Plug.Conn and the chain will be halted. Otherwise, the plug chain
99
will continue.
1010

11-
Documentation can be found at
12-
[https://hexdocs.pm/ip_access_control][hexdocs].
11+
Documentation can be found at <https://hexdocs.pm/ip_access_control>.
1312

1413
## Installation
1514

@@ -26,12 +25,6 @@ def deps do
2625
end
2726
```
2827

29-
## Community and Contributing
30-
31-
We welcome your contributions, as described in [Contributing.md][]. Like all
32-
Kinetic Cafe [open source projects][], is under the Kinetic Cafe Open Source
33-
[Code of Conduct][kccoc].
34-
3528
[build status svg]: https://travis-ci.org/KineticCafe/bamboo_elastic_email.svg?branch=master
3629
[build status]: https://travis-ci.org/KineticCafe/bamboo_elastic_email
3730
[contributing.md]: Contributing.md

lib/ip_access_control.ex

+5-5
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ defmodule IpAccessControl do
5050
5151
# Include after a plug which puts the request IP to the remote_ip
5252
# attribute on the Plug.Conn.
53-
plug IPAccessControl,
53+
plug IpAccessControl,
5454
allow: ["1.1.1.0/31", "1.1.0.0/24", "127.0.0.0/8"]
5555
56-
plug IPAccessControl,
56+
plug IpAccessControl,
5757
allow: fn -> ["1.1.1.0/31", "1.1.0.0/24", "127.0.0.0/8"] end
5858
5959
### Blocked Action Configuration
@@ -66,7 +66,7 @@ defmodule IpAccessControl do
6666
When the remote IP address is blocked, the Plug pipeline is halted.
6767
6868
- `on_blocked`: A Plug that will be called when the IP address is not allowed.
69-
It will be passed the options provided to the the IPAccessControl plug.
69+
It will be passed the options provided to the the IpAccessControl plug.
7070
- `response_code_on_blocked`: The HTTP status code assigned to the response
7171
when the request’s IP address is not allowed. Defaults to `401` if not
7272
specified.
@@ -76,7 +76,7 @@ defmodule IpAccessControl do
7676
7777
Example:
7878
79-
plug IPAccessControl,
79+
plug IpAccessControl,
8080
allow: ["1.1.1.0/31", "1.1.0.0/24", "127.0.0.0/8"],
8181
on_blocked: fn conn, opts ->
8282
Conn.send_resp(
@@ -100,7 +100,7 @@ defmodule IpAccessControl do
100100
101101
Example:
102102
103-
plug IPAccessControl, module: EmployeeAccess
103+
plug IpAccessControl, module: EmployeeAccess
104104
105105
## Installation
106106

mise.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tools]
2+
elixir = "latest"
3+
erlang = "latest"

mix.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ defmodule IpAccessControlPlug.MixProject do
6464
]
6565
end
6666

67-
if Version.compare(System.version(), "1.15.0") == :lt do
67+
if Version.compare(System.version(), "1.18.0") == :lt do
6868
defp dev_deps, do: []
6969
else
7070
defp dev_deps do

mix.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
%{
22
"bitwise_ip": {:hex, :bitwise_ip, "1.1.0", "9942e03eddf6546dd79fd3c58a5630e22e149a927c7538f20b75ba4a6783d040", [:mix], [], "hexpm", "b414e8a9d3874a3c753ae52a5539ec29e5a31933b8b180b14fe9476e0ba5dea2"},
33
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
4-
"credo": {:hex, :credo, "1.7.11", "d3e805f7ddf6c9c854fd36f089649d7cf6ba74c42bc3795d587814e3c9847102", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "56826b4306843253a66e47ae45e98e7d284ee1f95d53d1612bb483f88a8cf219"},
4+
"credo": {:hex, :credo, "1.7.12", "9e3c20463de4b5f3f23721527fcaf16722ec815e70ff6c60b86412c695d426c1", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "8493d45c656c5427d9c729235b99d498bd133421f3e0a683e5c1b561471291e5"},
55
"dialyxir": {:hex, :dialyxir, "1.4.5", "ca1571ac18e0f88d4ab245f0b60fa31ff1b12cbae2b11bd25d207f865e8ae78a", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "b0fb08bb8107c750db5c0b324fa2df5ceaa0f9307690ee3c1f6ba5b9eb5d35c3"},
66
"earmark_parser": {:hex, :earmark_parser, "1.4.44", "f20830dd6b5c77afe2b063777ddbbff09f9759396500cdbe7523efd58d7a339c", [:mix], [], "hexpm", "4778ac752b4701a5599215f7030989c989ffdc4f6df457c5f36938cc2d2a2750"},
77
"erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"},
@@ -14,6 +14,6 @@
1414
"mime": {:hex, :mime, "2.0.6", "8f18486773d9b15f95f4f4f1e39b710045fa1de891fada4516559967276e4dc2", [:mix], [], "hexpm", "c9945363a6b26d747389aac3643f8e0e09d30499a138ad64fe8fd1d13d9b153e"},
1515
"nimble_parsec": {:hex, :nimble_parsec, "1.4.2", "8efba0122db06df95bfaa78f791344a89352ba04baedd3849593bfce4d0dc1c6", [:mix], [], "hexpm", "4b21398942dda052b403bbe1da991ccd03a053668d147d53fb8c4e0efe09c973"},
1616
"plug": {:hex, :plug, "1.17.0", "a0832e7af4ae0f4819e0c08dd2e7482364937aea6a8a997a679f2cbb7e026b2e", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f6692046652a69a00a5a21d0b7e11fcf401064839d59d6b8787f23af55b1e6bc"},
17-
"plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"},
17+
"plug_crypto": {:hex, :plug_crypto, "2.1.1", "19bda8184399cb24afa10be734f84a16ea0a2bc65054e23a62bb10f06bc89491", [:mix], [], "hexpm", "6470bce6ffe41c8bd497612ffde1a7e4af67f36a15eea5f921af71cf3e11247c"},
1818
"telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"},
1919
}

0 commit comments

Comments
 (0)