Releases: alexocode/brex
Fix behaviour of Brex.none
Changed
- BREAKING:
Brex.none
now only succeeds if every rule fails (before it only already succeeded when a single rule failed)
Make compatible with Elixir 1.10
See #5 for details, much thanks to @lorenzosinisi
Fix critical compilation issue
Version v0.2.1 failed to compile due to the version
file missing from the hex package. This version includes the file in the package and also loads it into a module attribute instead of loading it at runtime.
Fix Brex.none/1 behaviour for empty lists
The behaviour of Brex.none/1
was confusing for an empty list of rules, due to simply inverting the result of Brex.all/1
. This release introduces a special handling for an empty list of rules:
Before
iex> rules |> Brex.none() |> Brex.satisfies?(:whatever)
false
After
iex> rules |> Brex.none() |> Brex.satisfies?(:whatever)
true
Simplify custom operator creation
This release introduces a greatly simplified Operator generation. I've realised that the former implementation basically was reimplementing structs in a shitty manner. As such the Brex.Operator
is now simply a struct with an aggregator
and a clauses
field.
For details take a look at the Brex.Operator
moduledocs.