Skip to content

Commit

Permalink
chore: fix format, build, mix.exs credo
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Mar 30, 2024
1 parent bd0f1f8 commit 3ab822e
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 26 deletions.
3 changes: 2 additions & 1 deletion .formatter.exs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
spark_locals_without_parens = [
allow_nil?: 1,
domain: 1,
attribute_type: 1,
attributes_as_attributes: 1,
belongs_to_actor: 2,
belongs_to_actor: 3,
change_tracking_mode: 1,
define_attribute?: 1,
domain: 1,
ignore_attributes: 1,
mixin: 1,
on_actions: 1,
public?: 1,
reference_source?: 1,
store_action_name?: 1,
version_extensions: 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!--
This file was generated by Spark. Do not edit it by hand.
-->
# DSL: AshPaperTrail.Api
# DSL: AshPaperTrail.Domain

Documentation for `AshPaperTrail.Api`.
Documentation for `AshPaperTrail.Domain`.



Expand Down
11 changes: 0 additions & 11 deletions documentation/dsls/DSL:-AshPaperTrail.Registry.md

This file was deleted.

5 changes: 3 additions & 2 deletions documentation/dsls/DSL:-AshPaperTrail.Resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The actor on the version changeset is set.

### Examples
```
belongs_to_actor :user, MyApp.Users.User, api: MyApp.Users
belongs_to_actor :user, MyApp.Users.User, domain: MyApp.Users
```


Expand All @@ -70,8 +70,9 @@ belongs_to_actor :user, MyApp.Users.User, api: MyApp.Users
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`allow_nil?`](#paper_trail-belongs_to_actor-allow_nil?){: #paper_trail-belongs_to_actor-allow_nil? } | `boolean` | `true` | Whether this relationship must always be present, e.g: must be included on creation, and never removed (it may be modified). The generated attribute will not allow nil values. |
| [`api`](#paper_trail-belongs_to_actor-api){: #paper_trail-belongs_to_actor-api } | `atom` | | The API module to use when working with the related entity. |
| [`domain`](#paper_trail-belongs_to_actor-domain){: #paper_trail-belongs_to_actor-domain } | `atom` | | The Domain module to use when working with the related entity. |
| [`attribute_type`](#paper_trail-belongs_to_actor-attribute_type){: #paper_trail-belongs_to_actor-attribute_type } | `any` | `:uuid` | The type of the generated created attribute. See `Ash.Type` for more. |
| [`public?`](#paper_trail-belongs_to_actor-public?){: #paper_trail-belongs_to_actor-public? } | `boolean` | `false` | Whether this relationship should be included in public interfaces |
| [`define_attribute?`](#paper_trail-belongs_to_actor-define_attribute?){: #paper_trail-belongs_to_actor-define_attribute? } | `boolean` | `true` | If set to `false` an attribute is not created on the resource for this relationship, and one must be manually added in `attributes`, invalidating many other options. |


Expand Down
3 changes: 1 addition & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ defmodule AshPaperTrail.MixProject do
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# {:ash, "~> 3.0.0-rc.5"},
{:ash, path: "../ash", override: true},
{:ash, "~> 3.0.0-rc.5"},
{:ex_doc, "~> 0.22", only: [:dev, :test], runtime: false},
{:ex_check, "~> 0.12", only: [:dev, :test]},
{:credo, ">= 0.0.0", only: [:dev, :test], runtime: false},
Expand Down
4 changes: 0 additions & 4 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
"credo": {:hex, :credo, "1.7.5", "643213503b1c766ec0496d828c90c424471ea54da77c8a168c725686377b9545", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "f799e9b5cd1891577d8c773d245668aa74a2fcd15eb277f51a0131690ebfb3fd"},
"decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"},
"dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"},
"earmark": {:hex, :earmark, "1.4.46", "8c7287bd3137e99d26ae4643e5b7ef2129a260e3dcf41f251750cb4563c8fb81", [:mix], [], "hexpm", "798d86db3d79964e759ddc0c077d5eb254968ed426399fbf5a62de2b5ff8910a"},
"earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"},
"ecto": {:hex, :ecto, "3.11.2", "e1d26be989db350a633667c5cda9c3d115ae779b66da567c68c80cfb26a8c9ee", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3c38bca2c6f8d8023f2145326cc8a80100c3ffe4dcbd9842ff867f7fc6156c65"},
"elixir_make": {:hex, :elixir_make, "0.7.8", "505026f266552ee5aabca0b9f9c229cbb496c689537c9f922f3eb5431157efc7", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.0", [hex: :certifi, repo: "hexpm", optional: true]}], "hexpm", "7a71945b913d37ea89b06966e1342c85cfe549b15e6d6d081e8081c493062c07"},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"ets": {:hex, :ets, "0.9.0", "79c6a6c205436780486f72d84230c6cba2f8a9920456750ddd1e47389107d5fd", [:mix], [], "hexpm", "2861fdfb04bcaeff370f1a5904eec864f0a56dcfebe5921ea9aadf2a481c822b"},
"ex_check": {:hex, :ex_check, "0.16.0", "07615bef493c5b8d12d5119de3914274277299c6483989e52b0f6b8358a26b5f", [:mix], [], "hexpm", "4d809b72a18d405514dda4809257d8e665ae7cf37a7aee3be6b74a34dec310f5"},
Expand All @@ -22,9 +20,7 @@
"makeup": {:hex, :makeup, "1.1.1", "fa0bc768698053b2b3869fa8a62616501ff9d11a562f3ce39580d60860c3a55e", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "5dc62fbdd0de44de194898b6710692490be74baa02d9d108bc29f007783b0b48"},
"makeup_elixir": {:hex, :makeup_elixir, "0.16.2", "627e84b8e8bf22e60a2579dad15067c755531fea049ae26ef1020cad58fe9578", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "41193978704763f6bbe6cc2758b84909e62984c7752b3784bd3c218bb341706b"},
"makeup_erlang": {:hex, :makeup_erlang, "0.1.5", "e0ff5a7c708dda34311f7522a8758e23bfcd7d8d8068dc312b5eb41c6fd76eba", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "94d2e986428585a21516d7d7149781480013c56e30c6a233534bedf38867a59a"},
"nimble_options": {:hex, :nimble_options, "1.1.0", "3b31a57ede9cb1502071fade751ab0c7b8dbe75a9a4c2b5bbb0943a690b63172", [:mix], [], "hexpm", "8bbbb3941af3ca9acc7835f5655ea062111c9c27bcac53e004460dfd19008a99"},
"nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"},
"picosat_elixir": {:hex, :picosat_elixir, "0.2.3", "bf326d0f179fbb3b706bb2c15fbc367dacfa2517157d090fdfc32edae004c597", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "f76c9db2dec9d2561ffaa9be35f65403d53e984e8cd99c832383b7ab78c16c66"},
"reactor": {:hex, :reactor, "0.8.1", "1aec71d16083901277727c8162f6dd0f07e80f5ca98911b6ef4f2c95e6e62758", [:mix], [{:libgraph, "~> 0.16", [hex: :libgraph, repo: "hexpm", optional: false]}, {:spark, "~> 2.0", [hex: :spark, repo: "hexpm", optional: false]}, {:splode, "~> 0.2", [hex: :splode, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.2", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ae3936d97a3e4a316744f70c77b85345b08b70da334024c26e6b5eb8ede1246b"},
"sobelow": {:hex, :sobelow, "0.13.0", "218afe9075904793f5c64b8837cc356e493d88fddde126a463839351870b8d1e", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "cd6e9026b85fc35d7529da14f95e85a078d9dd1907a9097b3ba6ac7ebbe34a0d"},
"sourceror": {:hex, :sourceror, "1.0.2", "c5e86fdc14881f797749d1fe5df017ca66727a8146e7ee3e736605a3df78f3e6", [:mix], [], "hexpm", "832335e87d0913658f129d58b2a7dc0490ddd4487b02de6d85bca0169ec2bd79"},
Expand Down
1 change: 0 additions & 1 deletion test/support/accounts/user.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ defmodule AshPaperTrail.Test.Accounts.User do
end

code_interface do

define :create
define :read
end
Expand Down
1 change: 0 additions & 1 deletion test/support/posts/full_diff_post.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ defmodule AshPaperTrail.Test.Posts.FullDiffPost do
end

code_interface do

define :create
define :read
define :update
Expand Down
6 changes: 4 additions & 2 deletions test/support/posts/post.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ defmodule AshPaperTrail.Test.Posts.Post do
attributes_as_attributes [:subject, :body, :tenant]
change_tracking_mode :changes_only
store_action_name? true
belongs_to_actor :user, AshPaperTrail.Test.Accounts.User, domain: AshPaperTrail.Test.Accounts.Domain, public?: true

belongs_to_actor :user, AshPaperTrail.Test.Accounts.User,
domain: AshPaperTrail.Test.Accounts.Domain,
public?: true

belongs_to_actor :news_feed, AshPaperTrail.Test.Accounts.NewsFeed,
public?: true,
domain: AshPaperTrail.Test.Accounts.Domain
end

code_interface do

define :create
define :read
define :update
Expand Down

0 comments on commit 3ab822e

Please sign in to comment.