Skip to content

Conversation

@Krapaince
Copy link
Contributor

@Krapaince Krapaince commented Dec 8, 2025

  • Rewrite project's documentation
  • Run mix format
  • Remove dead code
  • Add documentation on handlers macro from Ewebmachine.Builder.Handlers dropped because Code.fetch_docs only works once .beam files are written to disk which happens only when all modules are compiled
  • Add missing documentation for body processing and creation handlers

and other commits cleaning the project

Add it to you git config via
> git config blame.ignoreRevsFile .git-blame-ignore-revs
Add references, fix tabulations, improve code examples
Who uses this format? Why should I wait to generate something not needed
The macro `Ewebmachine.Builder.Handlers.ping/1` and the function
`Ewebmachine.Handlers.ping/2` were/are both intended for testing
however were public for no reason.

Moreover, the decision tree now only calls the ping handler when
`Mix.env()` returns test, removing a useless handler call for production
code.
Ewebmachine is now only compatible with version 1.13.4 or later
therefore this compatibility layer with version 1.4.0 is no longer
needed.
Inline the macro's content as there is only one call site and its
content is only two imports.
Ewebmachine.Events module shouldn't be visible as their only purpose is
for internal usage.
Enough with having a partial documentation where I need to read the
whole moduledoc to find what I need.

Let's use ex_doc group feature for module and function to ease the
navigation and have a README which explains core concepts.

resolve #45
Let's have the same order everywhere for this attribute. I want to know
quickly if the module is visible or not and avoid searching this
information beneath implementation comments.
This function should be private as its only for internal usage.
Make the implicit stands out as explicit especially by replacing the
usage of the Access protocol by the `Keyword.fun` dedicated function.

Also checks that given option are what they should be, a nice
improvements that will halt the compiler on invalid options values.
Use function head matching instead of using if which nest the
implementation for nothing.
This handler shouldn't exist in the first place but it's there for some
reason.

Removing it would introduced a breaking change as content_types_provided
would have no function to make a body.

Changing its content-type to text/plain could be a solution but it
changes the behaviour of every resource which uses the default handler.

Therefore we are kind of stuck with this for now.
This dependency shouldn't be added by Ewebmachine but by the consumer of
the library itself (even though there is only two options in the wild
for now).
@Krapaince Krapaince self-assigned this Dec 8, 2025
Now that the documentation explains the concept in a way that a newcomer
can understand the concepts, we no longer need an example project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants