Skip to content

Commit 14b9c86

Browse files
committed
Upgrade poison and mime gax dependencies
This allows compatibility with other projects that require later versions of the poison and mime libraries. Also fixed a couple of tests that were not accounting for the "accept-encoding" header that Tesla sends.
1 parent 42689ac commit 14b9c86

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clients/gax/mix.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ defmodule GoogleApi.Gax.MixProject do
2727
defp deps() do
2828
[
2929
{:tesla, "~> 1.2"},
30-
{:mime, "~> 1.0"},
31-
{:poison, ">= 3.0.0 and < 5.0.0"},
30+
{:mime, "~> 1.0 or ~> 2.0"},
31+
{:poison, ">= 3.0.0 and < 7.0.0"},
3232
{:ex_doc, "~> 0.16", only: :dev},
3333
{:dialyxir, "~> 0.5", only: [:dev], runtime: false}
3434
]

clients/gax/test/gax/api_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ defmodule Gax.ApiTest do
3535
mock(fn %{
3636
method: :get,
3737
url: "https://example.com/v1/stores/store-1/pets",
38-
headers: [{"x-goog-api-client", ^api_client}]
38+
headers: [{"x-goog-api-client", ^api_client}, {"accept-encoding", "gzip, deflate, identity"}]
3939
} ->
4040
%Tesla.Env{status: 200, body: @pets_json}
4141
end)
@@ -61,7 +61,7 @@ defmodule Gax.ApiTest do
6161
mock(fn %{
6262
method: :get,
6363
url: "https://example.com/v1/stores/store-1/pets",
64-
headers: [{"x-goog-api-client", ^api_client}]
64+
headers: [{"x-goog-api-client", ^api_client}, {"accept-encoding", "gzip, deflate, identity"}]
6565
} ->
6666
%Tesla.Env{status: 200, body: @pets_json_compressed,
6767
headers: [{"content-encoding", "gzip"}]}

0 commit comments

Comments
 (0)