From 5ee1f222bb338072be1f68ebe911d061efb924c4 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Wed, 6 Jul 2022 22:52:52 +0800 Subject: [PATCH] Fix typos (#30) --- lib/ecto/erd/document/mermaid.ex | 4 ++-- lib/ecto/erd/node.ex | 2 +- lib/mix/tasks/ecto.gen.erd.ex | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ecto/erd/document/mermaid.ex b/lib/ecto/erd/document/mermaid.ex index 06661b5..afbcc01 100644 --- a/lib/ecto/erd/document/mermaid.ex +++ b/lib/ecto/erd/document/mermaid.ex @@ -51,7 +51,7 @@ defmodule Ecto.ERD.Document.Mermaid do end else Logger.warning( - "Source #{inspect(source)} countains invalid symbols and cannot be displayed" + "Source #{inspect(source)} contains invalid symbols and cannot be displayed" ) nil @@ -94,7 +94,7 @@ defmodule Ecto.ERD.Document.Mermaid do end else Logger.warning( - "Field name #{inspect(field.name)} countains invalid symbols and cannot be displayed" + "Field name #{inspect(field.name)} contains invalid symbols and cannot be displayed" ) nil diff --git a/lib/ecto/erd/node.ex b/lib/ecto/erd/node.ex index ccd6837..11d619f 100644 --- a/lib/ecto/erd/node.ex +++ b/lib/ecto/erd/node.ex @@ -62,7 +62,7 @@ defmodule Ecto.ERD.Node do } ) when not is_nil(source) do - # if fields have different types with the same name, then only 1 type will be choosen + # if fields have different types with the same name, then only 1 type will be chosen fields = Enum.uniq_by(fields1 ++ fields2, & &1.name) cluster = diff --git a/lib/mix/tasks/ecto.gen.erd.ex b/lib/mix/tasks/ecto.gen.erd.ex index 23695ae..5cc90d8 100644 --- a/lib/mix/tasks/ecto.gen.erd.ex +++ b/lib/mix/tasks/ecto.gen.erd.ex @@ -56,7 +56,7 @@ defmodule Mix.Tasks.Ecto.Gen.Erd do ## QuickDBD A format that is used by [QuickDBD](https://www.quickdatabasediagrams.com) - a competitor of [dbdiagram.io](https://dbdiagram.io). - Similarly to DBML, it is also focused on tables and cannot display embeded schemas. However, this format doesn't support clusters. + Similarly to DBML, it is also focused on tables and cannot display embedded schemas. However, this format doesn't support clusters. It doesn't have a reserved file extension, but we use `*.qdbd`. @@ -73,7 +73,7 @@ defmodule Mix.Tasks.Ecto.Gen.Erd do $ mix ecto.gen.erd --output-path=ecto_erd.mmd ``` If you have installed [mermaid-cli](https://github.com/mermaid-js/mermaid-cli) locally, the output `*.mmd` file can be - coverted to image using the following command: + converted to image using the following command: ``` $ mmdc -i ecto_erd.mmd -o erd.png -w 6000 -H 6000 ``` @@ -93,7 +93,7 @@ defmodule Mix.Tasks.Ecto.Gen.Erd do * `:fontname` - font name, defaults to `Roboto Mono`. Must be monospaced font if output format is `dot` and more than 1 column is displayed. The option is only supported for `dot` and `puml` files. - * `:columns` - list of columns which will be displayed for each node (schema/source). Set to `[]` to hide fields completelly. + * `:columns` - list of columns which will be displayed for each node (schema/source). Set to `[]` to hide fields completely. Available columns: `:name` and `:type`. The option is only supported for `dot`, `puml` and `mmd`(`mmd` only allows usage of `[]` and the default value). Default values: * `[:name, :type]` for `dot` and `puml`.