Skip to content

Conversation

@denisdefreyne
Copy link
Contributor

The benchmark gem has been extracted from the Ruby standard library, and will soon be removed from the Ruby standard library.

This solves the following test failure:

  1) Reporter::Terminal report reports as-links accurately
     Failure/Error: expect(output).to(match(msg))

       expected "Running 1 check (LinkCheck) on [\"www.github.com\", \"http://asdadsadsasdadaf.biz/\"] ...\n\n\nCheck... too many requests at once also breaks things. (status code 0)\n\n\nHTML-Proofer found 1 failure!\n" to match "Running 1 check (LinkCheck) on [\"www.github.com\", \"http://asdadsadsasdadaf.biz/\"] ...\n\n\nChecking 2 external links\n\nFor the Links > External check, the following failures were found:\n\n* External link http://asdadsadsasdadaf.biz/ failed with something very wrong.\nIt's possible libcurl couldn't connect to the server, or perhaps the request timed out.\nSometimes, making too many requests at once also breaks things. (status code 0)\n\n\nHTML-Proofer found 1 failure!\n"
       Diff:
       @@ -3,6 +3,8 @@

        Checking 2 external links

       +exe/htmlproofer:9: warning: benchmark was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
       +You can add benchmark to your Gemfile or gemspec to silence this warning.
        For the Links > External check, the following failures were found:

        * External link http://asdadsadsasdadaf.biz/ failed with something very wrong.

     # ./spec/html-proofer/reporter/terminal_spec.rb:104:in 'block (3 levels) in <top (required)>'

The `benchmark` gem has been extracted from the Ruby standard library, and will soon be removed from the Ruby standard library.
@gjtorikian gjtorikian merged commit 0a551ea into gjtorikian:main Nov 3, 2025
1 check passed
@gjtorikian
Copy link
Owner

Thanks!

@maxjacobson
Copy link

FWIW: this warning is printed for users of the gem still:

$ bin/htmlproofer --version
/Users/mjacobson/.cache/rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/html-proofer-5.1.0/exe/htmlproofer:9: warning: benchmark was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add benchmark to your Gemfile or gemspec to silence this warning.
5.1.0

If this gem depends on benchmark, I think it would be appropriate to add benchmark to the gem's gemspec and make it a runtime dependency. Adding it to the Gemfile prevents the warning from occurring while developing the gem, but doesn't affect users of the tool.

@gjtorikian
Copy link
Owner

Good call. 5.1.1 resolves it.

@maxjacobson
Copy link

🔥 thanks

@denisdefreyne
Copy link
Contributor Author

Thanks for taking care of it!

@denisdefreyne denisdefreyne deleted the denis/benchmark-gem branch November 18, 2025 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants