Table of Contents generated with DocToc
Changelog
v2.3.0
Enhancements
- #16 -
Calcinator.Resources.Ecto.Repo.filter(query, name, value)
is a new optional callback thatuse Calcinator.Resources.Ecto.Repo
modules can implement to support filters on the query beforemodule
repo
all
is called. - @KronicDeth
v2.2.0
Enhancements
-
Dependency updates
alembic
to3.2.0
ex_doc
to0.15.1
ja_serializer
to0.12.0
(but continue compatibility with older versions)phoenix
to1.2.3
credo
to0.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
- #12 - Regression tests that
%Calcinator{}
defaultauthorization_module
implementsCalcinator.Authorization
behaviour. - @KronicDeth
Bug Fixes
- #12 - Fix capitalization of
SubjectLess
when used as the%Calcinator{}
defaultauthorization_module
. - @KronicDeth
v2.0.0
Enhancements
-
- Explain why
relationships/2
is overridden in views - Routing docs for
get_related_resource
andshow_relationship
- Actions and related Authorization docs for
Calcinator.Controller
- Use
Ecto.Repo
config/0
instead of requiringsandboxed?/0
to be defined.
- Explain why
Bug Fixes
-
Add missing renames for README controllers
alias InterpreterServerWeb.Controller
->alias Calcinator.Controller
use Controller.Resources,
->use Controller,
- Replace
use MyApp.Web, :view
withuse JaSerializer.PhoenixView
, so it doesn’t requireMyApp.Web.view/0
to includeuse JaSerializer.PhoenixView
- Renamed second
Author
Ecto.Schema
modules toPost
- Don’t require
user
assign inCalcinator.Controller
- Fix Elixir 1.4
()
warnings.
- #11 -
Code.ensure_loaded?(Phoenix.Controller)
can be used to protectCalcinator.Controller.Error
andCalcinator.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 getsubject
for%Calcinator{}
, a private key,:calcinator_subject
, will be used usingPlug.Conn.put_private
. Thesubject
will be stored usingCalcinator.Controller.put_subject
and retrieved withCalcinator.Controller.get_subject
. Callingput_subject
in a plug is shown in README andCalcinator.Controller
examples. - @KronicDeth
v1.7.0
Enhancements
- #9 - Examples for how to
use Calcinator.Resources.Ecto.Repo
inCalcinator.Resources.Ecto.Repo
’s@moduledoc
- @KronicDeth
Bug Fixes
- #9 - Add missing
ecto_schema_module/0
callback toREADME
example ofuse Calcinator.Resources.Ecto.Repo
- @KronicDeth
v1.6.0
Enhancements
-
use Calcinator.Controller
can be used inside aPhoenix
controller to define JSONAPI actions.Calcinator.Controller.Error
defines functions for JSONAPI formatted errors thatCalcinator.Controller
may respond with.- Document how to use
Calcinator.Controller
to accessRetort.Client.Generic
backedCalcinator.Resource
- Document how to use
Calcinator.Controller
to accessCalcinator.Resources.Ecto.Repo
v1.5.1
Bug Fixes
- #7 -
preload(module, queryable, opts)
returns{:ok, query}
instead of justquery
now. - @KronicDeth
v1.5.0
Enhancements
-
- Add
{:error, :ownership}
∀Calcinator.Resources
callbacks - Add
{:error, :ownership}
∀Calcinator
actions
- Add
Bug Fixes
- #6 - Previously
get
andlist
were the onlyCalcinator.Resources.Ecto.Repo
functions that convertedDBConnection.OwnershipError
to{:error, :ownership}
, but the otherEcto.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 forCalcinator.Resources
backed by anEcto.Repo
. The only callbacks that are required then areecto_schema_module/0
,full_associations/1
andrepo/0
. - @KronicDeth -
- Update to
credo
0.5.3
- Update to
ja_serializer
0.11.2
- Update to
v1.3.0
Enhancements
-
Calcinator.Authorization
implementationsCalcinator.Authorization.SubjectLess
allows allaction
s on alltarget
s, but only if the passedsubject
isnil
. Use it for when you don’t actually want authorization checks.
- Document Steps and Returns of
Calcinator
actions. Steps make it clearer which parts ofstate
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
-
- Add missing related
Calcinator.View
callbacks,get_related_resource
andshow_relationship
, that are needed for their respective functions inCalcinator
. - Add missing newline at end of file.
- Remove
argN
arguments in docs by naming arguments in specs - Remove extra blank line
- Add missing related
v1.2.0
Enhancements
- #2 - Doctests for
Calcinator.Resources.attribute_to_field/2
- @KronicDeth
Bug Fixes
- #2 -
Calcinator.Resources.attribute_to_field/2
now works with virtual fields. - @KronicDeth
v1.1.0
Enhancements
- #1 - Expose
attribute_to_field
that was used inCalcinator.Resources.Sort
as it is useful in other places instead of usingString.to_existing_atom
, which doesn’t handle the hyphenation and can fail if the atom hasn’t been loaded yet. - @KronicDeth
Bug Fixes
-
Add missing top-level files to extras:
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE.md