Skip to content

Commit 1ee37f9

Browse files
committed
improvement: update igniter, remove inflex
1 parent 53514b1 commit 1ee37f9

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

lib/data_layer.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3519,7 +3519,7 @@ defmodule AshPostgres.DataLayer do
35193519
|> Module.split()
35203520
|> List.last()
35213521
|> Macro.underscore()
3522-
|> Inflex.pluralize()
3522+
|> Igniter.Inflex.pluralize()
35233523

35243524
{options, _, _} = OptionParser.parse(argv, switches: [repo: :string])
35253525

lib/resource_generator/resource_generator.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ if Code.ensure_loaded?(Igniter) do
4747
|> Enum.map(fn %{table_name: table} = spec ->
4848
resource =
4949
table
50-
|> Inflex.singularize()
50+
|> Igniter.Inflex.singularize()
5151
|> Macro.camelize()
5252
|> then(&Module.concat([domain, &1]))
5353

lib/resource_generator/spec.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ defmodule AshPostgres.ResourceGenerator.Spec do
644644
[
645645
%Relationship{
646646
type: :belongs_to,
647-
name: Inflex.singularize(references),
647+
name: Igniter.Inflex.singularize(references),
648648
source: spec.resource,
649649
constraint_name: constraint_name,
650650
match_with: match_with,
@@ -694,16 +694,16 @@ defmodule AshPostgres.ResourceGenerator.Spec do
694694

695695
{name, type} =
696696
if has_unique_index? do
697-
if Inflex.pluralize(table) == table do
698-
{Inflex.singularize(table), :has_one}
697+
if Igniter.Inflex.pluralize(table) == table do
698+
{Igniter.Inflex.singularize(table), :has_one}
699699
else
700700
{table, :has_one}
701701
end
702702
else
703-
if Inflex.pluralize(table) == table do
703+
if Igniter.Inflex.pluralize(table) == table do
704704
{table, :has_many}
705705
else
706-
{Inflex.pluralize(table), :has_many}
706+
{Igniter.Inflex.pluralize(table), :has_many}
707707
end
708708
end
709709

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ defmodule AshPostgres.MixProject do
168168
[
169169
{:ash, ash_version("~> 3.4 and >= 3.4.69")},
170170
{:ash_sql, ash_sql_version("~> 0.2 and >= 0.2.72")},
171-
{:igniter, "~> 0.5 and >= 0.5.16", optional: true},
171+
{:igniter, "~> 0.6", optional: true},
172172
{:ecto_sql, "~> 3.12"},
173173
{:ecto, "~> 3.12 and >= 3.12.1"},
174174
{:jason, "~> 1.0"},

mix.lock

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
"git_ops": {:hex, :git_ops, "2.7.2", "2d3c164a8bcaf13f129ab339e8e9f0a99c80ffa8f85dd0b344d7515275236dbc", [:mix], [{:git_cli, "~> 0.2", [hex: :git_cli, repo: "hexpm", optional: false]}, {:igniter, ">= 0.5.27 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "1dcd68b3f5bcd0999d69274cd21e74e652a90452e683b54d490fa5b26152945f"},
2424
"glob_ex": {:hex, :glob_ex, "0.1.11", "cb50d3f1ef53f6ca04d6252c7fde09fd7a1cf63387714fe96f340a1349e62c93", [:mix], [], "hexpm", "342729363056e3145e61766b416769984c329e4378f1d558b63e341020525de4"},
2525
"hpax": {:hex, :hpax, "1.0.3", "ed67ef51ad4df91e75cc6a1494f851850c0bd98ebc0be6e81b026e765ee535aa", [:mix], [], "hexpm", "8eab6e1cfa8d5918c2ce4ba43588e894af35dbd8e91e6e55c817bca5847df34a"},
26-
"igniter": {:hex, :igniter, "0.5.52", "18777a36918e3bb91c70f07b69f6a6589d8fa5547a7d210b228d410a2453923f", [:mix], [{:glob_ex, "~> 0.1.7", [hex: :glob_ex, repo: "hexpm", optional: false]}, {:inflex, "~> 2.0", [hex: :inflex, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:owl, "~> 0.11", [hex: :owl, repo: "hexpm", optional: false]}, {:phx_new, "~> 1.7", [hex: :phx_new, repo: "hexpm", optional: true]}, {:req, "~> 0.5", [hex: :req, repo: "hexpm", optional: false]}, {:rewrite, ">= 1.1.1 and < 2.0.0-0", [hex: :rewrite, repo: "hexpm", optional: false]}, {:sourceror, "~> 1.4", [hex: :sourceror, repo: "hexpm", optional: false]}, {:spitfire, ">= 0.1.3 and < 1.0.0-0", [hex: :spitfire, repo: "hexpm", optional: false]}], "hexpm", "8d75f0f2307e21b53ad96bd746f1806da91859ec0d4a68b203b763da4d5ae567"},
27-
"inflex": {:hex, :inflex, "2.1.0", "a365cf0821a9dacb65067abd95008ca1b0bb7dcdd85ae59965deef2aa062924c", [:mix], [], "hexpm", "14c17d05db4ee9b6d319b0bff1bdf22aa389a25398d1952c7a0b5f3d93162dd8"},
26+
"igniter": {:hex, :igniter, "0.6.0", "ad1e794286519bd52a0bc645419cdab1b8bf0352903199f534ea369ea5623dc4", [:mix], [{:glob_ex, "~> 0.1.7", [hex: :glob_ex, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:owl, "~> 0.11", [hex: :owl, repo: "hexpm", optional: false]}, {:phx_new, "~> 1.7", [hex: :phx_new, repo: "hexpm", optional: true]}, {:req, "~> 0.5", [hex: :req, repo: "hexpm", optional: false]}, {:rewrite, ">= 1.1.1 and < 2.0.0-0", [hex: :rewrite, repo: "hexpm", optional: false]}, {:sourceror, "~> 1.4", [hex: :sourceror, repo: "hexpm", optional: false]}, {:spitfire, ">= 0.1.3 and < 1.0.0-0", [hex: :spitfire, repo: "hexpm", optional: false]}], "hexpm", "424df02a8acaeaec9cd01412916f60148d3ec710cd7317787c6656067f168f8b"},
2827
"iterex": {:hex, :iterex, "0.1.2", "58f9b9b9a22a55cbfc7b5234a9c9c63eaac26d276b3db80936c0e1c60355a5a6", [:mix], [], "hexpm", "2e103b8bcc81757a9af121f6dc0df312c9a17220f302b1193ef720460d03029d"},
2928
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
3029
"libgraph": {:hex, :libgraph, "0.16.0", "3936f3eca6ef826e08880230f806bfea13193e49bf153f93edcf0239d4fd1d07", [:mix], [], "hexpm", "41ca92240e8a4138c30a7e06466acc709b0cbb795c643e9e17174a178982d6bf"},

0 commit comments

Comments
 (0)