Skip to content

Fallback to kicks gem for version check in SneakersSpy - #1655

Merged
smith merged 3 commits into
elastic:mainfrom
vlado:ruby_4_sneakers_kicks
Aug 3, 2026
Merged

smith merged 3 commits into
elastic:mainfrom
vlado:ruby_4_sneakers_kicks

Conversation

@vlado

@vlado vlado commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

What does this pull request do?

After #1650 got merged we experienced issue with sneakers spy in our app.

Sneakers gem was abandoned and does not work with Ruby 4. It was replaced by the kicks gem.

Kicks gem still uses sneakers namespace so it will load SneakersSpy which fails because Gem.loaded_specs['sneakers'] returns nil. We fix it by adding fallback to Gem.loaded_specs['kicks'].
Last sneakers version is 2.12.0 and kicks starts from 3.0.0 so this should work properly.

I've added Gemfile switch so we can run specs with kicks gem (SNEAKERS_GEM=kicks bundle install && bundle exec rspec.) on demand.

Checklist

  • I have signed the Contributor License Agreement.
  • My code follows the style guidelines of this project (See .rubocop.yml)
  • I have rebased my changes on top of the latest main branch
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have made corresponding changes to the documentation
  • I have updated docs/release-notes/index.md
  • I have updated docs/reference/supported-technologies.md
  • Added an API method or config option? Document in which version this will be introduced

@vlado
vlado marked this pull request as draft July 28, 2026 15:49
@vlado
vlado marked this pull request as ready for review July 29, 2026 11:44
@smith
smith enabled auto-merge (squash) August 3, 2026 16:49
@smith
smith merged commit 7de1bac into elastic:main Aug 3, 2026
55 checks passed
smedrick pushed a commit to smedrick/apm-agent-ruby that referenced this pull request Aug 3, 2026
* Fallback to kicks gem for version check in SneakersSpy

* Add specs for sneaker spy changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants