Addressed deprecation warnings
This commit is contained in:
parent
f1ef8d3d54
commit
c3062e73a4
2 changed files with 2 additions and 2 deletions
|
|
@ -49,7 +49,7 @@ defmodule Pinchflat.Metadata.MetadataFileHelpers do
|
|||
Returns {:ok, map()} | {:error, any}
|
||||
"""
|
||||
def read_compressed_metadata(filepath) do
|
||||
{:ok, json} = File.open(filepath, [:read, :compressed], &IO.read(&1, :all))
|
||||
{:ok, json} = File.open(filepath, [:read, :compressed], &IO.read(&1, :eof))
|
||||
|
||||
Phoenix.json_library().decode(json)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ defmodule Pinchflat.Metadata.MetadataFileHelpersTest do
|
|||
metadata_map = %{"foo" => "bar"}
|
||||
|
||||
filepath = Helpers.compress_and_store_metadata_for(media_item, metadata_map)
|
||||
{:ok, json} = File.open(filepath, [:read, :compressed], &IO.read(&1, :all))
|
||||
{:ok, json} = File.open(filepath, [:read, :compressed], &IO.read(&1, :eof))
|
||||
|
||||
assert json == Phoenix.json_library().encode!(metadata_map)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue