Skip to content

Commit

Permalink
Merge pull request #77 from dwyl/maintenance-dependency-update-issue-74
Browse files Browse the repository at this point in the history
Update Ecto.Type from @behaviour to "use" #76
  • Loading branch information
iteles authored Sep 13, 2020
2 parents 604cafb + 93e2ccd commit 73fef72
Show file tree
Hide file tree
Showing 22 changed files with 24 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: elixir
elixir:
- 1.10.2
- 1.10.4
otp_release:
- 22.1.8
- 23.0.4
env:
global:
- MIX_ENV=test
Expand Down
3 changes: 1 addition & 2 deletions lib/address.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ defmodule Fields.Address do
```
"""
alias Fields.Validate

@behaviour Ecto.Type
use Ecto.Type

def type, do: :string

Expand Down
3 changes: 1 addition & 2 deletions lib/address_encrypted.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ defmodule Fields.AddressEncrypted do
end
"""
alias Fields.{Address, Encrypted}

@behaviour Ecto.Type
use Ecto.Type

def type, do: :binary

Expand Down
2 changes: 1 addition & 1 deletion lib/description_plaintext_unlimited.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule Fields.DescriptionPlaintextUnlimited do
field(:description, Fields.DescriptionPlaintextUnlimited)
end
"""
@behaviour Ecto.Type
use Ecto.Type

def type, do: :string

Expand Down
3 changes: 1 addition & 2 deletions lib/email_encrypted.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ defmodule Fields.EmailEncrypted do
end
"""
alias Fields.{EmailPlaintext, Encrypted}

@behaviour Ecto.Type
use Ecto.Type

def type, do: :binary

Expand Down
3 changes: 1 addition & 2 deletions lib/email_hash.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ defmodule Fields.EmailHash do
end
"""
alias Fields.{EmailPlaintext, Hash}

@behaviour Ecto.Type
use Ecto.Type

def type, do: :binary

Expand Down
3 changes: 1 addition & 2 deletions lib/email_plaintext.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ defmodule Fields.EmailPlaintext do
end
"""
alias Fields.Validate

@behaviour Ecto.Type
use Ecto.Type

def type, do: :string

Expand Down
3 changes: 1 addition & 2 deletions lib/encrypted.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ defmodule Fields.Encrypted do
end
"""
alias Fields.AES

@behaviour Ecto.Type
use Ecto.Type
def type, do: :binary

def cast(value) do
Expand Down
3 changes: 1 addition & 2 deletions lib/hash.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ defmodule Fields.Hash do
field(:digest, Fields.Hash)
end
"""
@behaviour Ecto.Type

use Ecto.Type
alias Fields.Helpers

def type, do: :binary
Expand Down
2 changes: 1 addition & 1 deletion lib/html-body.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule Fields.HtmlBody do
field(:body, Fields.HtmlBody)
end
"""
@behaviour Ecto.Type
use Ecto.Type

def type, do: :string

Expand Down
3 changes: 1 addition & 2 deletions lib/ip_address_encrypted.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ defmodule Fields.IpAddressEncrypted do
end
"""
alias Fields.{IpAddressPlaintext, Encrypted}

@behaviour Ecto.Type
use Ecto.Type

def type, do: :binary

Expand Down
3 changes: 1 addition & 2 deletions lib/ip_address_hash.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ defmodule Fields.IpAddressHash do
end
"""
alias Fields.{IpAddressPlaintext, Hash}

@behaviour Ecto.Type
use Ecto.Type

def type, do: :binary

Expand Down
3 changes: 1 addition & 2 deletions lib/ip_address_plaintext.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ defmodule Fields.IpAddressPlaintext do
end
"""
alias Fields.Validate

@behaviour Ecto.Type
use Ecto.Type

def type, do: :string

Expand Down
3 changes: 1 addition & 2 deletions lib/name.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ defmodule Fields.Name do
```
"""
alias Fields.{Validate, Encrypted}

@behaviour Ecto.Type
use Ecto.Type

def type, do: :binary

Expand Down
3 changes: 1 addition & 2 deletions lib/password.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ defmodule Fields.Password do
field(:password, Fields.Password)
end
"""
@behaviour Ecto.Type

use Ecto.Type
alias Fields.Helpers

def type, do: :binary
Expand Down
3 changes: 1 addition & 2 deletions lib/phone_number.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ defmodule Fields.PhoneNumber do
end
"""
alias Fields.Validate

@behaviour Ecto.Type
use Ecto.Type

def type, do: :string

Expand Down
3 changes: 1 addition & 2 deletions lib/phone_number_encrypted.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ defmodule Fields.PhoneNumberEncrypted do
end
"""
alias Fields.{PhoneNumber, Encrypted}

@behaviour Ecto.Type
use Ecto.Type

def type, do: :binary

Expand Down
3 changes: 1 addition & 2 deletions lib/postcode.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ defmodule Fields.Postcode do
end
"""
alias Fields.Validate

@behaviour Ecto.Type
use Ecto.Type

def type, do: :string

Expand Down
3 changes: 1 addition & 2 deletions lib/postcode_encrypted.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ defmodule Fields.PostcodeEncrypted do
end
"""
alias Fields.{Postcode, Encrypted}

@behaviour Ecto.Type
use Ecto.Type

def type, do: :binary

Expand Down
3 changes: 1 addition & 2 deletions lib/url.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ defmodule Fields.Url do
end
"""
alias Fields.Validate

@behaviour Ecto.Type
use Ecto.Type

def type, do: :string

Expand Down
3 changes: 1 addition & 2 deletions lib/url_encrypted.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ defmodule Fields.UrlEncrypted do
```
"""
alias Fields.{Validate, Encrypted}

@behaviour Ecto.Type
use Ecto.Type

def type, do: :binary

Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ defmodule Fields.MixProject do
[
app: :fields,
description: "A collection of useful fields for building Phoenix apps faster!",
version: "2.7.0",
elixir: "~> 1.9",
version: "2.7.1",
elixir: "~> 1.10.4",
start_permanent: Mix.env() == :prod,
deps: deps(),
package: package(),
Expand Down

0 comments on commit 73fef72

Please sign in to comment.