Skip to content

Add support for Ruby 4.0 - #152

Merged
jamtur01 merged 4 commits into
mainfrom
ruby-4.0
Apr 5, 2026
Merged

Add support for Ruby 4.0#152
jamtur01 merged 4 commits into
mainfrom
ruby-4.0

Conversation

@smortex

@smortex smortex commented Apr 5, 2026

Copy link
Copy Markdown
Member

smortex added 3 commits June 30, 2024 18:27
The lockfile allow reproducible build, which are awesome.  However, we
also want to support multiple versions of Ruby, and a lockfile is
unfortunately not a one-size-fit-all solution in this case:

  * Older versions of bundler cannot run on recent versions of Ruby;
  * Recent versions of bundler cannot run on older versions of Ruby;
  * Some dependencies are available for some versions of Ruby but not
    all the ones we support, so a version of Ruby may be unable to run
    the bundle generated by another version of Ruby.

The lock file is only used when someone clone the repository and run
`bundle install`.  When installing with `gem install riemann-dash` (the
way recommanded in the README), the dependencies only have to be in the
bounds of what is authorized in the gemspec file, so this will only
affect a fraction of our users which are probably aware of what they are
doing.

This allows us to run the test suite on all supported versions of Ruby.
When a large table is displayed and is larger than the screen size, it
is not possible to scroll to see *all* the data.  One can zoom-out to
have a accomodate more data, but this does not fix the issue as:
  1. The displayed data is smaller, making it harder to read it beyond
     checking the color that represent the state of the metric;
  2. Zooming out is limited and at some point more data is still out of
     sight.

This make the table scrollable in its container.  Both horizontal and
vertical headers stick to their position to make it easier to track what
is being viewed.
When viewing details of events with a long TTL, it is not
straightforward to check if it is about to expire or not.

Instead of displayer the raw TTL as a number of seconds, format it by
using an appropriate unit of time and fixed precision:
  * 42 => "42 seconds"
  * 420 => "7.0 minutes"
  * 4200 => "70.0 minutes"
  * 42000 => "11.7 hours"
  * 420000 => "4.9 days"
@smortex smortex changed the title ruby 4.0 Add support for Ruby 4.0 Apr 5, 2026
@smortex
smortex force-pushed the ruby-4.0 branch 4 times, most recently from a534c18 to 60377b1 Compare April 5, 2026 04:53
@smortex smortex added the enhancement New feature or request label Apr 5, 2026
Ruby 4.0 removed some gems from its standard library (e.g. ostruct),
used by Rack.  This is fixed in newer versions of Rack, but this require
a newer version of Sinatra, which is currently restricted in the
gemspec.

Bump the minimum version of Sinatra so that we have a version of Rack
that includ the fix.  Provide appropriate fix to the code, and also
include rackup and a webserver that used to be bundled with rack but is
not anymore in the Gemfile (so that other components can be used by end
users to serve riemann-dash).

While here, prevent usage of minitest 6.0 which has some breaking
changes we do not cope with (yet).
@jamtur01
jamtur01 merged commit 82ff64f into main Apr 5, 2026
6 checks passed
@jamtur01

jamtur01 commented Apr 5, 2026

Copy link
Copy Markdown
Member

Thanks @smortex!

@smortex smortex added backwards-incompatible This change will lead to a major version bump for the next release and removed enhancement New feature or request labels Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards-incompatible This change will lead to a major version bump for the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants