Skip to content

Releases: alexocode/knigge

v1.4.1: Fix release upgrade building

03 Oct 12:28
Compare
Choose a tag to compare

Changed

  • #26: Fix upgrade building by tagging bunt as runtime: false

v1.4.0: Introduce the `default` option and fix handling of callbacks without brackets

26 Mar 14:11
Compare
Choose a tag to compare

Added

  • #18: Add default option to use Knigge (@NickNeck)
  • #22: Ease contributing by adding a CONTRIBUTING guide and a PULL_REQUEST_TEMPLATE (@sascha-wolf)

Changed

  • #19: Fix handling of callbacks without brackets (@NickNeck)

mix knigge.verify: Add the `--app` flag

27 Nov 14:23
Compare
Choose a tag to compare

Replace the existence check with `mix knigge.verify`

07 Sep 10:37
Compare
Choose a tag to compare

Avoid warning when callback is defined several times

13 Nov 20:19
Compare
Choose a tag to compare

Merge pull request #9 from alexcastano/master

Delegate at runtime in `test` per default

13 Nov 20:20
Compare
Choose a tag to compare

This release extends the delegate_at option to allow passing a list of environments similar to check_if_exists.

To be more clear on the intent delegate_at has been renamed to delegate_at_runtime? and check_if_exists to check_if_exists?. The old names are still accepted by Knigge but a deprecation warning is printed if they are being used.

With this done the default of delegate_at_runtime? has been set to [only: :test] which allowed to change the default of check_if_exists? to true.

Now Knigge will no longer generate compiler warnings in test when using Mox.defmock since the implementation will - as the this change suggests - be loaded at runtime instead of compile time.

Fix `check_if_exists` env spec

13 Nov 20:21
Compare
Choose a tag to compare

As it turns out Mix.env always returns :prod for dependencies. Knigge now determines the callers env and puts it into the Options struct to use it instead of a static @env module attribute.

Also add a section on compiler warnings which happen in :test due to the compiler not finding the module.

Control existence check on an env basis

13 Nov 20:22
Compare
Choose a tag to compare

Knigge now only checks if the given modules exist based on the value of the check_if_exists option, which accepts a number of values:

  • a boolean to switch the existence check fully on or off
  • an environment (atom) or list of environments (list of atoms)
  • only: <envs> or except: <envs> (single value keyword list)

For more information see the docs.

Fix a typo in Options

13 Nov 20:22
Compare
Choose a tag to compare

The typo made the usage of the otp_app option impossible and as it turned out the covering test didn't run. Oops ...

Fix a bug with multiple defdefaults for the same callback

13 Nov 20:22
Compare
Choose a tag to compare

Only the first defdefault for a callback was used during generation; now all defdefaults are being used to generated function clauses.