Skip to content

Commit

Permalink
Export unique_integer/0 and unique_uuid/0
Browse files Browse the repository at this point in the history
  • Loading branch information
martinthenth committed Jun 17, 2023
1 parent 1fffe4a commit cf23ce6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.1.2

- Export unique_integer/0 and unique_uuid/0

# 0.1.1

- Updated documentation
Expand Down
12 changes: 11 additions & 1 deletion lib/factoid.ex
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ defmodule Factoid do
@doc false
defmacro __using__(opts) do
quote bind_quoted: [opts: opts] do
import Factoid
import Factoid, only: [insert: 4]

@repo Keyword.get(opts, :repo)

Expand All @@ -125,6 +125,16 @@ defmodule Factoid do
def insert(factory_name, attrs \\ %{}) do
insert(@repo, factory_name, &build/2, attrs)
end

@doc """
Generates a systemically unique integer.
"""
def unique_integer, do: Factoid.unique_integer()

@doc """
Generates a UUID.
"""
def unique_uuid, do: Factoid.unique_uuid()
end
end

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Factoid.MixProject do
use Mix.Project

@version "0.1.1"
@version "0.1.2"
@source_url "https://github.com/recruiterbay/factoid"
@changelog_url "https://github.com/recruiterbay/factoid/blob/main/CHANGELOG.md"

Expand Down

0 comments on commit cf23ce6

Please sign in to comment.