cel 0.4.0 has been released.
cel is a pure Ruby implementation of Google Common Expression Language,
https://opensource.google/projects/cel.
The
Common Expression Language (CEL) implements common semantics for
expression evaluation, enabling different applications to more easily
interoperate.
```ruby
require "cel"
# set the environment
env = Cel::Environment.new(name: :string, group: :string)
# parse
ast = env.compile('name.startsWith("/groups/" + group)')
# or do it all in one go
```
Here are the updates since the last release:
## [0.4.0] - 2025-11-18
### Features
`cel-ruby` supports the defined set of [CEL extensions](
https://github.com/google/cel-go/blob/master/ext/README.md): math, string, bind and encoders.
```ruby
Cel::Environment.new.evaluate("math.bitShiftLeft(1, 2) ") #=> returns 4
```
### Improvements
When the `tzinfo-data` gem is loaded, expressions will support human-friendly timezones, such as "US/Central", for timestamps.
## [0.3.1] - 2025-08-01
### Improvements
* Support for depth protection, using the defaults from the spec (ex: recursion depth of 32, nesting depth of 32), and supporting API to override them (ex: `Cel::Environment.new(max_recursion_depth: 42))`).
* lazy-evaluating bindings to avoid upfront costly transformations of ruby objects into cel objects which are ultimately not used in expressions.
### Bugfixes
* `has()` macro correctly works for maps.