Skip to content

Commit cc14ec0

Browse files
committed
chore: upgrade deps to latest versions
1 parent 308a676 commit cc14ec0

File tree

7 files changed

+61
-121
lines changed

7 files changed

+61
-121
lines changed

.github/workflows/test.yml

Lines changed: 30 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,61 @@
11
name: Test
22

3-
on: [push, pull_request]
3+
on: [pull_request]
44

55
jobs:
66
test:
77
runs-on: ubuntu-latest
8+
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
89
strategy:
910
matrix:
1011
elixir:
11-
- 1.13-slim # otp 24
12-
- 1.12-slim # otp 24
13-
- 1.11-slim # otp 23
14-
- 1.10-slim # otp 22
15-
- 1.9-slim # otp 22
16-
- 1.8-otp-22
17-
- 1.8-slim # otp 21
18-
- 1.7-slim # otp 21
19-
container:
20-
image: elixir:${{ matrix.elixir }}
12+
- 1.13
13+
- 1.12
14+
otp:
15+
- 24.3
16+
- 23.3
2117
steps:
2218
- uses: actions/checkout@v2
23-
- name: Install Dependencies
24-
env:
25-
MIX_ENV: test
26-
run: |
27-
mix local.rebar --force
28-
mix local.hex --force
29-
mix deps.get
30-
- name: Run Tests
31-
run: mix test --trace
32-
33-
test-1:
34-
name: run tests from v1.0.0
35-
runs-on: ubuntu-latest
36-
container:
37-
image: elixir:1.7-slim
38-
steps:
39-
- uses: actions/checkout@v2
40-
41-
- name: Install Dependencies
42-
env:
43-
MIX_ENV: test
44-
run: |
45-
mix local.rebar --force
46-
mix local.hex --force
47-
mix deps.get
48-
49-
- name: Checkout v1.0.0 tests
50-
uses: actions/checkout@v2
19+
- name: Set up Elixir
20+
uses: erlef/setup-beam@v1
5121
with:
52-
path: "test-1"
53-
ref: "v1.0.0-compat"
54-
55-
- name: Replace test dir with test-1/test dir
56-
run: |
57-
ls -la
58-
rm -rf test
59-
mv test-1/test test
60-
61-
- name: Run v1.0.0 Tests
62-
run: mix test --trace
63-
64-
test-poison3:
65-
runs-on: ubuntu-latest
66-
container:
67-
image: elixir:1.9-slim
68-
steps:
69-
- uses: actions/checkout@v2
22+
elixir-version: ${{ matrix.elixir }}
23+
otp-version: ${{ matrix.otp }}
24+
- name: Restore dependencies cache
25+
uses: actions/cache@v2
26+
with:
27+
path: deps
28+
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
29+
restore-keys: ${{ runner.os }}-mix-
7030
- name: Install Dependencies
7131
env:
7232
MIX_ENV: test
73-
LOCKFILE: poison3
7433
run: |
7534
mix local.rebar --force
7635
mix local.hex --force
7736
mix deps.get
78-
- name: Run Tests for poison 3.x
79-
env:
80-
MIX_ENV: test
81-
LOCKFILE: poison3
37+
- name: Run Tests
8238
run: mix test --trace
8339

8440
format:
8541
runs-on: ubuntu-latest
86-
container:
87-
image: elixir:1.9-slim
8842
steps:
8943
- uses: actions/checkout@v2
44+
- name: Set up Elixir
45+
uses: erlef/setup-beam@v1
46+
with:
47+
elixir-version: '1.13'
48+
otp-version: '24.3'
49+
- name: Restore dependencies cache
50+
uses: actions/cache@v2
51+
with:
52+
path: deps
53+
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
54+
restore-keys: ${{ runner.os }}-mix-
9055
- name: Install Dependencies
9156
run: |
9257
mix local.rebar --force
9358
mix local.hex --force
9459
mix deps.get
9560
- name: Check Format
96-
run: mix format --check-formatted --dry-run
61+
run: mix format --check-formatted

lib/tesla/builder.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ defmodule Tesla.Builder do
214214
for bang <- [:safe, :bang],
215215
client <- [:client, :noclient],
216216
opts <- [:opts, :noopts],
217-
method in only && not (method in except) do
217+
method in only && method not in except do
218218
gen(method, bang, client, opts, docs)
219219
end
220220
end

lib/tesla/middleware/follow_redirects.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ defmodule Tesla.Middleware.FollowRedirects do
3131

3232
defp redirect(env, next, left) when left == 0 do
3333
case Tesla.run(env, next) do
34-
{:ok, %{status: status} = env} when not (status in @redirect_statuses) ->
34+
{:ok, %{status: status} = env} when status not in @redirect_statuses ->
3535
{:ok, env}
3636

3737
{:ok, _env} ->

lib/tesla/middleware/method_override.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ defmodule Tesla.Middleware.MethodOverride do
4444
if opts[:override] do
4545
env.method in opts[:override]
4646
else
47-
not (env.method in [:get, :post])
47+
env.method not in [:get, :post]
4848
end
4949
end
5050
end

mix.exs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ defmodule Tesla.Mixfile do
5555
{:mime, "~> 1.0 or ~> 2.0"},
5656

5757
# http clients
58-
{:ibrowse, "4.4.0", optional: true},
58+
{:ibrowse, "~> 4.4", optional: true},
5959
{:hackney, "~> 1.6", optional: true},
6060
{:gun, "~> 1.3", optional: true},
6161
{:finch, "~> 0.3", optional: true},
@@ -72,16 +72,16 @@ defmodule Tesla.Mixfile do
7272
{:telemetry, "~> 0.4 or ~> 1.0", optional: true},
7373

7474
# testing & docs
75-
{:excoveralls, "~> 0.8", only: :test},
75+
{:excoveralls, ">= 0.0.0", only: :test, runtime: false},
7676
{:httparrot, "~> 1.3", only: :test},
77-
{:ex_doc, "~> 0.21", only: :dev, runtime: false},
78-
{:mix_test_watch, "~> 1.0", only: :dev},
79-
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
80-
{:inch_ex, "~> 2.0", only: :docs},
77+
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
78+
{:mix_test_watch, ">= 0.0.0", only: :dev},
79+
{:dialyxir, ">= 0.0.0", only: [:dev, :test], runtime: false},
80+
{:inch_ex, ">= 0.0.0", only: :docs},
8181

8282
# override httparrot dependencies
8383
{:cowlib, "~> 2.9", only: :test, override: true},
84-
{:ranch, "~> 1.8", only: :test, override: true}
84+
{:ranch, "~> 2.1", only: :test, override: true}
8585
]
8686
end
8787

0 commit comments

Comments
 (0)