Table of Contents generated with DocToc

Changelog

v2.4.0

  • #18 - @KronicDeth

    • JSONAPI filter values that allow multiple values, similar to includes, are comma separated without spaces, instead of having to do String.split(comma_separated_values, ",") in all filters that accept multiple values, Calcinator.Resources.split_filter_value/1 can be used.
    • Pass the final query with all filters applied through distinct(query, true), so that filters don’t need to ensure they return distinct results, which is an expectation of JSONAPI.

v2.3.1

Bug Fixes

  • #17 - @KronicDeth

    • Guard Calcinator.Resources.params and Calcinator.Resources.query_options with is_map/1
    • Update to postgrex 0.13.2 for Elixir 1.5.0-dev compatibility
    • Calcinator.Resources.query_options :filters should be a map from filter name to filter value, each being a String.t instead of a list single-entry maps because filter names can only be used once and order should not matter.

v2.3.0

Enhancements

  • #16 - Calcinator.Resources.Ecto.Repo.filter(query, name, value) is a new optional callback that use Calcinator.Resources.Ecto.Repo modules can implement to support filters on the query before module repo all is called. - @KronicDeth

v2.2.0

Enhancements

  • #14 - @KronicDeth

    • Dependency updates

      • alembic to 3.2.0
      • ex_doc to 0.15.1
      • ja_serializer to 0.12.0 (but continue compatibility with older versions)
      • phoenix to 1.2.3
      • credo to 0.7.3
    • Add excoveralls for coverage tracking
    • Add CircleCI build status badge
    • Add CodeClimate credo status badge
    • Add HexFaktor dependencies status badge
    • Add InchEx documentation badge
    • Use Erlang 19.3 and Elixir 1.4.1 on CircleCI

v2.1.0

Enhancements

Bug Fixes

  • #12 - Fix capitalization of SubjectLess when used as the %Calcinator{} default authorization_module. - @KronicDeth

v2.0.0

Enhancements

  • #10 - @KronicDeth

    • Explain why relationships/2 is overridden in views
    • Routing docs for get_related_resource and show_relationship
    • Actions and related Authorization docs for Calcinator.Controller
    • Use Ecto.Repo config/0 instead of requiring sandboxed?/0 to be defined.

Bug Fixes

  • #10 - @KronicDeth

    • Add missing renames for README controllers

      • alias InterpreterServerWeb.Controller -> alias Calcinator.Controller
      • use Controller.Resources, -> use Controller,
    • Replace use MyApp.Web, :view with use JaSerializer.PhoenixView, so it doesn’t require MyApp.Web.view/0 to include use JaSerializer.PhoenixView
    • Renamed second Author Ecto.Schema modules to Post
    • Don’t require user assign in Calcinator.Controller
    • Fix Elixir 1.4 () warnings.
  • #11 - Code.ensure_loaded?(Phoenix.Controller) can be used to protect Calcinator.Controller.Error and Calcinator.Controller, so that it is not defined when its dependency, Phoenix.Controller is not available. Without this change, (CompileError) lib/calcinator/controller/error.ex:12: module Phoenix.Controller is not loaded and could not be found is raised in retort. - @KronicDeth

Incompatible Changes

  • #10 - Instead of requiring user assign in Plug.Conn to get subject for %Calcinator{}, a private key, :calcinator_subject, will be used using Plug.Conn.put_private. The subject will be stored using Calcinator.Controller.put_subject and retrieved with Calcinator.Controller.get_subject. Calling put_subject in a plug is shown in README and Calcinator.Controller examples. - @KronicDeth

v1.7.0

Enhancements

Bug Fixes

  • #9 - Add missing ecto_schema_module/0 callback to README example of use Calcinator.Resources.Ecto.Repo - @KronicDeth

v1.6.0

Enhancements

v1.5.1

Bug Fixes

  • #7 - preload(module, queryable, opts) returns {:ok, query} instead of just query now. - @KronicDeth

v1.5.0

Enhancements

Bug Fixes

  • #6 - Previously get and list were the only Calcinator.Resources.Ecto.Repo functions that converted DBConnection.OwnershipError to {:error, :ownership}, but the other Ecto.Repo calls could also throw the Error, so all calls need to be protected for consistency. - @KronicDeth

v1.4.0

Enhancements

  • #4 - use Calcinator.Resources.Ecto.Repo will define the callbacks for Calcinator.Resources backed by an Ecto.Repo. The only callbacks that are required then are ecto_schema_module/0, full_associations/1 and repo/0. - @KronicDeth
  • #5 - @KronicDeth

    • Update to credo 0.5.3
    • Update to ja_serializer 0.11.2

v1.3.0

Enhancements

  • #3 - @KronicDeth

    • Calcinator.Authorization implementations

    • Document Steps and Returns of Calcinator actions. Steps make it clearer which parts of state are used when. Returns explain why a given return happens.
    • Document and clarify Calcinator.Authorization calling patterns

      • Document each callback with the target shape for each action.
    • Break up the callbacks into multiple signatures for the different call site

Bug Fixes

  • #3 - @KronicDeth

    • Add missing related Calcinator.View callbacks, get_related_resource and show_relationship, that are needed for their respective functions in Calcinator.
    • Add missing newline at end of file.
    • Remove argN arguments in docs by naming arguments in specs
    • Remove extra blank line

v1.2.0

Enhancements

Bug Fixes

v1.1.0

Enhancements

  • #1 - Expose attribute_to_field that was used in Calcinator.Resources.Sort as it is useful in other places instead of using String.to_existing_atom, which doesn’t handle the hyphenation and can fail if the atom hasn’t been loaded yet. - @KronicDeth

Bug Fixes

  • #1 - @KronicDeth

    • Add missing top-level files to extras:

      • CHANGELOG.md
      • CODE_OF_CONDUCT.md
      • CONTRIBUTING.md
      • LICENSE.md