Skip to content

Commit

Permalink
Merge pull request #53 from dwyl/plug-upload-struct-fix-issue-#52
Browse files Browse the repository at this point in the history
PR: `Plug.Upload` Struct Fix issue #52
  • Loading branch information
LuchoTurtle authored Aug 15, 2023
2 parents 35278cf + bd3ed28 commit b5595ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Install by adding `useful` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:useful, "~> 1.12.0"}
{:useful, "~> 1.12.1"}
]
end
```
Expand Down
2 changes: 2 additions & 0 deletions lib/useful.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ defmodule Useful do
def atomize_map_keys(%Time{} = value), do: value
def atomize_map_keys(%DateTime{} = value), do: value
def atomize_map_keys(%NaiveDateTime{} = value), do: value
# Avoid Plug.Upload.__struct__/0 is undefined compilation error useful/issues#52
# alias Plug.Upload
def atomize_map_keys(%Plug.Upload{} = value), do: value

# handle lists in maps: github.com/dwyl/useful/issues/46
Expand Down
5 changes: 3 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Useful.MixProject do
[
app: :useful,
description: "A collection of useful functions",
version: "1.12.0",
version: "1.12.1",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand Down Expand Up @@ -45,7 +45,8 @@ defmodule Useful.MixProject do
{:pre_commit, "~> 0.3.4", only: :dev},

# Plug helper functions: github.com/elixir-plug/plug
{:plug, "~> 1.10", only: [:dev, :test]}
# Used for %Plug.Upload{} Struct see: #49 & #52
{:plug, "~> 1.14"}
]
end

Expand Down

0 comments on commit b5595ee

Please sign in to comment.