Skip to content

Commit

Permalink
updates to change name
Browse files Browse the repository at this point in the history
  • Loading branch information
ddaugher committed Mar 14, 2022
1 parent 59217ee commit ba984c9
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 32 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Tags_Multi_Tenant

[![CircleCI](https://circleci.com/gh/bizneo/taglet/tree/master.svg?style=svg)](https://circleci.com/gh/bizneo/taglet/tree/master)
[![CircleCI](https://circleci.com/gh/bizneo/tags_multi_tenant/tree/master.svg?style=svg)](https://circleci.com/gh/bizneo/tags_multi_tenant/tree/master)

Tags_Multi_Tenant allows you to manage tags associated to your records.

It also allows you to specify various contexts

## Installation

1. Add `taglet` to your list of dependencies in `mix.exs`:
1. Add `tags_multi_tenant` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[{:taglet, "~> 0.6.0"}]
[{:tags_multi_tenant, "~> 0.6.0"}]
end
```

Expand All @@ -22,7 +22,7 @@ It also allows you to specify various contexts
# Options
# taggable_id - This field is default :integer, but you can set it as :uuid

config :taglet,
config :tags_multi_tenant,
repo: ApplicationName.Repo,
taggable_id: :uuid
```
Expand All @@ -33,7 +33,7 @@ It also allows you to specify various contexts

4. Generate the migrations:

```mix taglet.install```
```mix tags_multi_tenant.install```

5. Run the migrations:

Expand Down Expand Up @@ -115,16 +115,16 @@ concatenate ecto queries and return the query.

If you want you can use directly a set of functions to play with tags:

[`Tags_Multi_Tenant.add/4`](https://hexdocs.pm/taglet/Tags_Multi_Tenant.html#add/4)
[`Tags_Multi_Tenant.add/4`](https://hexdocs.pm/tags_multi_tenant/Tags_Multi_Tenant.html#add/4)

[`Tags_Multi_Tenant.remove/4`](https://hexdocs.pm/taglet/Tags_Multi_Tenant.html#remove/4)
[`Tags_Multi_Tenant.remove/4`](https://hexdocs.pm/tags_multi_tenant/Tags_Multi_Tenant.html#remove/4)

[`Tags_Multi_Tenant.rename/5`](https://hexdocs.pm/taglet/Tags_Multi_Tenant.html#rename/5)
[`Tags_Multi_Tenant.rename/5`](https://hexdocs.pm/tags_multi_tenant/Tags_Multi_Tenant.html#rename/5)

[`Tags_Multi_Tenant.tag_list/3`](https://hexdocs.pm/taglet/Tags_Multi_Tenant.html#tag_list/3)
[`Tags_Multi_Tenant.tag_list/3`](https://hexdocs.pm/tags_multi_tenant/Tags_Multi_Tenant.html#tag_list/3)

[`Tags_Multi_Tenant.tag_list_queryable/2`](https://hexdocs.pm/taglet/Tags_Multi_Tenant.html#tag_list_queryable/2)
[`Tags_Multi_Tenant.tag_list_queryable/2`](https://hexdocs.pm/tags_multi_tenant/Tags_Multi_Tenant.html#tag_list_queryable/2)

[`Tags_Multi_Tenant.tagged_with/4`](https://hexdocs.pm/taglet/Tags_Multi_Tenant.html#tagged_with/4)
[`Tags_Multi_Tenant.tagged_with/4`](https://hexdocs.pm/tags_multi_tenant/Tags_Multi_Tenant.html#tagged_with/4)

[`Tags_Multi_Tenant.tagged_with_query/3`](https://hexdocs.pm/taglet/Tags_Multi_Tenant.html#tagged_with_query/3)
[`Tags_Multi_Tenant.tagged_with_query/3`](https://hexdocs.pm/tags_multi_tenant/Tags_Multi_Tenant.html#tagged_with_query/3)
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ machine:

database:
override:
- createdb taglet_test
- createdb tags_multi_tenant_test

dependencies:
cache_directories:
Expand Down
8 changes: 4 additions & 4 deletions config/ci.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ use Mix.Config

config :logger, level: :info

config :taglet, ecto_repos: [Tags_Multi_Tenant.Repo]
config :tags_multi_tenant, ecto_repos: [Tags_Multi_Tenant.Repo]

config :taglet, repo: Tags_Multi_Tenant.Repo
config :tags_multi_tenant, repo: Tags_Multi_Tenant.Repo

config :taglet, Tags_Multi_Tenant.Repo,
config :tags_multi_tenant, Tags_Multi_Tenant.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "postgres",
database: "taglet_test",
database: "tags_multi_tenant_test",
hostname: "localhost",
poolsize: 10
4 changes: 2 additions & 2 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ use Mix.Config

# You can configure for your application as:
#
# config :taglet, key: :value
# config :tags_multi_tenant, key: :value
#
# And access this configuration in your application as:
#
# Application.get_env(:taglet, :key)
# Application.get_env(:tags_multi_tenant, :key)
#
# Or configure a 3rd-party app:
#
Expand Down
8 changes: 4 additions & 4 deletions config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ use Mix.Config

config :logger, level: :info

config :taglet, ecto_repos: [Tags_Multi_Tenant.Repo]
config :tags_multi_tenant, ecto_repos: [Tags_Multi_Tenant.Repo]

config :taglet, repo: Tags_Multi_Tenant.Repo
config :tags_multi_tenant, repo: Tags_Multi_Tenant.Repo

config :taglet, Tags_Multi_Tenant.Repo,
config :tags_multi_tenant, Tags_Multi_Tenant.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "postgres",
database: "taglet_test",
database: "tags_multi_tenant_test",
hostname: "localhost",
poolsize: 10
4 changes: 2 additions & 2 deletions lib/mix/tasks/tags_multi_tenant/install.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defmodule Mix.Tasks.Tags_Multi_Tenant.Install do
@shortdoc "generates taglet migration file for the database"
@shortdoc "generates tags_multi_tenant migration file for the database"

use Mix.Task
import Mix.Generator
Expand All @@ -9,7 +9,7 @@ defmodule Mix.Tasks.Tags_Multi_Tenant.Install do
path = Path.relative_to("priv/repo/migrations", Mix.Project.app_path)
tag_file = Path.join(path, "#{timestamp()}_create_tag.exs")
tagging_file = Path.join(path, "#{timestamp()}_create_tagging.exs")
taggable_id_type = Application.get_env(:taglet, :taggable_id, :integer)
taggable_id_type = Application.get_env(:tags_multi_tenant, :taggable_id, :integer)
create_directory path

create_file tag_file, """
Expand Down
2 changes: 1 addition & 1 deletion lib/taglet/repo_client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ defmodule Tags_Multi_Tenant.RepoClient do
@doc """
Gets the configured repo module or defaults to Repo if none configured
"""
def repo, do: Application.get_env(:taglet, :repo, Repo)
def repo, do: Application.get_env(:tags_multi_tenant, :repo, Repo)
end
2 changes: 1 addition & 1 deletion lib/taglet/tagging.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Tags_Multi_Tenant.Tagging do
use Ecto.Schema
import Ecto.Changeset

@taggable_id_type if Application.get_env(:taglet, :taggable_id) == :uuid, do: :binary_id, else: :integer
@taggable_id_type if Application.get_env(:tags_multi_tenant, :taggable_id) == :uuid, do: :binary_id, else: :integer

schema "taggings" do
field :taggable_id, @taggable_id_type, null: false
Expand Down
2 changes: 1 addition & 1 deletion lib/taglet/taglet_query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Tags_Multi_Tenant.Tags_Multi_TenantQuery do
alias Tags_Multi_Tenant.{Tagging, Tag}

@moduledoc """
Allow to build essential ecto queries for taglet
Allow to build essential ecto queries for tags_multi_tenant
All this functions only should be used from Tags_Multi_Tenant module
"""
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Tags_Multi_Tenant.Mixfile do
def project do
[app: :tags_multi_tenant,
name: "Tags_Multi_Tenant",
version: "0.1.1",
version: "0.1.2",
elixir: "~> 1.10",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
Expand Down
2 changes: 1 addition & 1 deletion test/support/repo.ex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
defmodule Tags_Multi_Tenant.Repo do
use Ecto.Repo, otp_app: :taglet, adapter: Ecto.Adapters.Postgres
use Ecto.Repo, otp_app: :tags_multi_tenant, adapter: Ecto.Adapters.Postgres
end
2 changes: 1 addition & 1 deletion test/taglet/tag_as_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ defmodule Tags_Multi_Tenant.TagAsTest do

# Aux functions
defp setup_tenant do
migrations_path = Application.app_dir(:taglet, ["priv", "repo", "migrations"])
migrations_path = Application.app_dir(:tags_multi_tenant, ["priv", "repo", "migrations"])

# Drop the previous tenant to reset the data
SQL.query(@repo, "DROP SCHEMA \"#{@tenant_id}\" CASCADE", [])
Expand Down
2 changes: 1 addition & 1 deletion test/taglet_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ defmodule Tags_Multi_TenantTest do

# Aux functions
defp setup_tenant do
migrations_path = Application.app_dir(:taglet, ["priv", "repo", "migrations"])
migrations_path = Application.app_dir(:tags_multi_tenant, ["priv", "repo", "migrations"])

# Drop the previous tenant to reset the data
SQL.query(@repo, "DROP SCHEMA \"#{@tenant_id}\" CASCADE", [])
Expand Down

0 comments on commit ba984c9

Please sign in to comment.