diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7befe8..477e13e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,6 @@ name: Actions CI on: push -env: - CUATRO_HEX_KEY: ${{ secrets.CUATRO_HEX_KEY }} - jobs: bless: name: Bless @@ -152,28 +149,14 @@ jobs: - name: Create a GitHub Release id: create_release - uses: NFIBrokerage/create-release@v4 + uses: elgohr/Github-Release-Action@v5 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ env.TAG }} - release_name: Release ${{ env.TAG }} - draft: false + title: Release ${{ env.TAG }} prerelease: false - name: Publish library run: mix hex.publish --yes env: HEX_API_KEY: ${{ secrets.HEX_PUBLISH_KEY }} - - - name: Notify ops channel of build success - run: > - curl - -X POST - -H 'Content-type:application/json' - -d "{\"text\":\":hexpm: package published for $REPOSITORY $(git tag -ln $TAG)\"}" - $SLACK_WEBHOOK - env: - SLACK_WEBHOOK: ${{ secrets.OPS_CHANNEL_SLACK_WEBHOOK }} - -# Generated by Elixir.Gaas.Generators.Simple.Actions.LibraryCi diff --git a/.github/workflows/refresh-dev-cache.yml b/.github/workflows/refresh-dev-cache.yml index baca005..6c91ad9 100644 --- a/.github/workflows/refresh-dev-cache.yml +++ b/.github/workflows/refresh-dev-cache.yml @@ -26,9 +26,6 @@ on: # Would like to run this as a scheduled workflow, but that is not currently # supported by the actions/cache action. -env: - CUATRO_HEX_KEY: ${{ secrets.CUATRO_HEX_KEY }} - jobs: refresh-dev-cache: name: Refresh Dev Cache diff --git a/.tool-versions b/.tool-versions index 93a429b..9c71c0d 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -elixir 1.12.3-otp-24 -erlang 24.0 +elixir 1.17.3-otp-27 +erlang 27.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c718e9..1f8b4e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -119,7 +119,3 @@ No changes. This release marks stability in the API. ## 0.0.0 - 2021-02-25 ### Added - -- This project was generated by Gaas - - diff --git a/LICENSE b/LICENSE index 953d159..690c725 100644 --- a/LICENSE +++ b/LICENSE @@ -174,5 +174,3 @@ of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS - -# Generated by Elixir.Gaas.Generators.Simple.License diff --git a/README.md b/README.md index 285db49..7794d5d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Fob -![Actions CI](https://github.com/NFIBrokerage/fob/workflows/Actions%20CI/badge.svg) +![Actions CI](https://github.com/CuatroElixir/fob/workflows/Actions%20CI/badge.svg) A minimalistic keyset pagination library for Ecto queries diff --git a/catalog-info.yaml b/catalog-info.yaml index 8d49c80..2ea4fb6 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -4,9 +4,9 @@ metadata: name: fob description: Keyset pagination tools for Ecto Queries annotations: - github.com/project-slug: NFIBrokerage/fob - backstage.io/source-ref: https://github.com/NFIBrokerage/fob - backstage.io/github-actions-id: https://github.com/NFIBrokerage/fob + github.com/project-slug: CuatroElixir/fob + backstage.io/source-ref: https://github.com/CuatroElixir/fob + backstage.io/github-actions-id: https://github.com/CuatroElixir/fob tags: - ecto - pagination diff --git a/config/config.exs b/config/config.exs index 306e644..2e2630a 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,4 +1,4 @@ -use Mix.Config +import Config config :fob, ecto_repos: [Fob.Repo] diff --git a/config/dev.exs b/config/dev.exs index fc332ca..38bf332 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -1,4 +1,4 @@ -use Mix.Config +import Config config :fob, Fob.Repo, database: "fob_test", diff --git a/config/prod.exs b/config/prod.exs index 7c4ea83..f31ff10 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -1,3 +1,3 @@ -use Mix.Config +import Config config :fob, ecto_repos: [] diff --git a/config/test.exs b/config/test.exs index 6dee7b9..12db1da 100644 --- a/config/test.exs +++ b/config/test.exs @@ -1,4 +1,9 @@ -use Mix.Config +import Config + +config :chaps, + coverage_options: [ + minimum_coverage: 91.5 + ] config :fob, Fob.Repo, database: "fob_test", diff --git a/lib/fob/ordering.ex b/lib/fob/ordering.ex index b9f6df9..aec70c1 100644 --- a/lib/fob/ordering.ex +++ b/lib/fob/ordering.ex @@ -22,7 +22,7 @@ defmodule Fob.Ordering do defstruct ~w[table column direction maybe_expression]a ++ [dependent_columns: []] - @spec config(%Query{}) :: [t()] + @spec config(Query.t()) :: [t()] def config(%Query{order_bys: orderings} = query) do Enum.flat_map(orderings, fn %expr_struct{expr: exprs} when expr_struct in [ @@ -77,7 +77,7 @@ defmodule Fob.Ordering do # chaps-ignore-start @deprecated "Use dependent_columns/1 instead" - @spec columns(%Query{}) :: [{table(), atom(), any()}] + @spec columns(Query.t()) :: [{table(), atom(), any()}] def columns(%Query{} = query) do query |> config() @@ -87,7 +87,7 @@ defmodule Fob.Ordering do # chaps-ignore-stop - @spec dependent_columns(%Query{}) :: [{table(), atom(), any(), list(any())}] + @spec dependent_columns(Query.t()) :: [{table(), atom(), any(), list(any())}] def dependent_columns(%Query{} = query) do query |> config() @@ -98,7 +98,7 @@ defmodule Fob.Ordering do # this mapping can help translate between the columns returned by config/1 # into what will be on the records, so it's useful for fetching values for # page breaks - @spec selection_mapping(%Query{}) :: %{{table(), atom()} => atom()} + @spec selection_mapping(Query.t()) :: %{{table(), atom()} => atom()} def selection_mapping(%Query{ select: %Query.SelectExpr{ expr: {:%{}, _, [{:|, _, [{:&, _, [0]}, merges]}]} diff --git a/mix.exs b/mix.exs index 7f0e785..9959e78 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Fob.MixProject do use Mix.Project - @source_url "https://github.com/NFIBrokerage/fob" + @source_url "https://github.com/CuatroElixir/fob" @version_file Path.join(__DIR__, ".version") @external_resource @version_file @version (case Regex.run(~r/^v([\d\.\w-]+)/, File.read!(@version_file), @@ -77,7 +77,7 @@ defmodule Fob.MixProject do [ # do you reference other projects in your documentation? if so, add # them to the :deps key here. for an example, see - # https://github.com/NFIBrokerage/projection/blob/5f406872d00156e2b94cfa9fae8e92a1aa4c177b/mix.exs#L88-L90 + # https://github.com/CuatroElixir/projection/blob/5f406872d00156e2b94cfa9fae8e92a1aa4c177b/mix.exs#L88-L90 deps: [], extras: [ "CHANGELOG.md" @@ -96,5 +96,3 @@ defmodule Fob.MixProject do ] end end - -# Generated by Elixir.Gaas.Generators.Simple.LibraryMix diff --git a/mix.lock b/mix.lock index 4504d06..08d91f8 100644 --- a/mix.lock +++ b/mix.lock @@ -1,22 +1,22 @@ %{ "bless": {:hex, :bless, "1.2.0", "5e8190738dcf2fedcbcee2433b44f0e4629a1b0ce84052e5ba17f8dff48d42bd", [:mix], [], "hexpm", "046692560e401dc33c2bb3223bb3f210c18fafbae24431f0056516bb5c8be805"}, - "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, - "chaps": {:hex, :chaps, "0.17.0", "2b2dcb8a96178f7b841dcc0d3784be3afe876d915ab51ef8efeffb3deba0cc71", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_options, "~> 0.3 and >= 0.3.7", [hex: :nimble_options, repo: "hexpm", optional: false]}], "hexpm", "f0c749ac186ddd1cd4f3c366b98bd3a30733c33300bf731b529b6c3c4d028c4a"}, + "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, + "chaps": {:hex, :chaps, "0.17.1", "2dfc79939a3691eb102f1d27f109c4cf7041cbb5c12c01d72832abe323f34951", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_options, ">= 0.3.7 and < 1.0.0-0", [hex: :nimble_options, repo: "hexpm", optional: false]}], "hexpm", "1ca318c778d9cdad505ffa71c46f0b5f440127cc6922f0b43adb286230b06b74"}, "connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"}, - "credo": {:hex, :credo, "1.5.5", "e8f422026f553bc3bebb81c8e8bf1932f498ca03339856c7fec63d3faac8424b", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "dd8623ab7091956a855dc9f3062486add9c52d310dfd62748779c4315d8247de"}, + "credo": {:hex, :credo, "1.7.15", "283da72eeb2fd3ccf7248f4941a0527efb97afa224bcdef30b4b580bc8258e1c", [: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", "291e8645ea3fea7481829f1e1eb0881b8395db212821338e577a90bf225c5607"}, "db_connection": {:hex, :db_connection, "2.4.2", "f92e79aff2375299a16bcb069a14ee8615c3414863a6fef93156aee8e86c2ff3", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4fe53ca91b99f55ea249693a0229356a08f4d1a7931d8ffa79289b145fe83668"}, - "decimal": {:hex, :decimal, "2.0.0", "a78296e617b0f5dd4c6caf57c714431347912ffb1d0842e998e9792b5642d697", [:mix], [], "hexpm", "34666e9c55dea81013e77d9d87370fe6cb6291d1ef32f46a1600230b1d44f577"}, + "decimal": {:hex, :decimal, "2.3.0", "3ad6255aa77b4a3c4f818171b12d237500e63525c2fd056699967a3e7ea20f62", [:mix], [], "hexpm", "a4d66355cb29cb47c3cf30e71329e58361cfcb37c34235ef3bf1d7bf3773aeac"}, "earmark_parser": {:hex, :earmark_parser, "1.4.25", "2024618731c55ebfcc5439d756852ec4e85978a39d0d58593763924d9a15916f", [:mix], [], "hexpm", "56749c5e1c59447f7b7a23ddb235e4b3defe276afc220a6227237f3efe83f51e"}, - "ecto": {:hex, :ecto, "3.9.1", "67173b1687afeb68ce805ee7420b4261649d5e2deed8fe5550df23bab0bc4396", [:mix], [{:decimal, "~> 1.6 or ~> 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", "c80bb3d736648df790f7f92f81b36c922d9dd3203ca65be4ff01d067f54eb304"}, + "ecto": {:hex, :ecto, "3.9.6", "2f420c173efcb2e22fa4f8fc41e75e02b3c5bd4cffef12085cae5418c12e530d", [:mix], [{:decimal, "~> 1.6 or ~> 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", "df17bc06ba6f78a7b764e4a14ef877fe5f4499332c5a105ace11fe7013b72c84"}, "ecto_sql": {:hex, :ecto_sql, "3.9.0", "2bb21210a2a13317e098a420a8c1cc58b0c3421ab8e3acfa96417dab7817918c", [:mix], [{:db_connection, "~> 2.5 or ~> 2.4.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.9.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a8f3f720073b8b1ac4c978be25fa7960ed7fd44997420c304a4a2e200b596453"}, "ex_doc": {:hex, :ex_doc, "0.28.4", "001a0ea6beac2f810f1abc3dbf4b123e9593eaa5f00dd13ded024eae7c523298", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "bf85d003dd34911d89c8ddb8bda1a958af3471a274a4c2150a9c01c78ac3f8ed"}, - "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, - "jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"}, + "file_system": {:hex, :file_system, "1.1.1", "31864f4685b0148f25bd3fbef2b1228457c0c89024ad67f7a81a3ffbc0bbad3a", [:mix], [], "hexpm", "7a15ff97dfe526aeefb090a7a9d3d03aa907e100e262a0f8f7746b78f8f87a5d"}, + "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, "makeup_elixir": {:hex, :makeup_elixir, "0.16.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, - "nimble_options": {:hex, :nimble_options, "0.4.0", "c89babbab52221a24b8d1ff9e7d838be70f0d871be823165c94dd3418eea728f", [:mix], [], "hexpm", "e6701c1af326a11eea9634a3b1c62b475339ace9456c1a23ec3bc9a847bca02d"}, + "nimble_options": {:hex, :nimble_options, "0.5.2", "42703307b924880f8c08d97719da7472673391905f528259915782bb346e0a1b", [:mix], [], "hexpm", "4da7f904b915fd71db549bcdc25f8d56f378ef7ae07dc1d372cbe72ba950dce0"}, "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, "postgrex": {:hex, :postgrex, "0.16.5", "fcc4035cc90e23933c5d69a9cd686e329469446ef7abba2cf70f08e2c4b69810", [:mix], [{:connection, "~> 1.1", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "edead639dc6e882618c01d8fc891214c481ab9a3788dfe38dd5e37fd1d5fb2e8"}, - "telemetry": {:hex, :telemetry, "1.1.0", "a589817034a27eab11144ad24d5c0f9fab1f58173274b1e9bae7074af9cbee51", [:rebar3], [], "hexpm", "b727b2a1f75614774cff2d7565b64d0dfa5bd52ba517f16543e6fc7efcc0df48"}, + "telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"}, } diff --git a/test/test_helper.exs b/test/test_helper.exs index a88457c..add38e6 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -4,5 +4,3 @@ |> Supervisor.start_link(strategy: :one_for_one) ExUnit.start() - -# Generated by Elixir.Gaas.Generators.Simple.TestHelper