metricfu / metric_fu

A fist full of code metrics
http://metricfu.github.com/metric_fu
MIT License
624 stars 96 forks source link

Make metric_fu compatible with Ruby 3.0 #323

Closed etagwerker closed 2 years ago

etagwerker commented 2 years ago

Hi there,

This fixes a part of the #322 issue: This PR fixes #322.

bundle exec rspec spec
"setting timeout 15.0 seconds"
Run options:
  include {:focus=>true}
  exclude {:slow=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 9651
***..................................................................................................................................................................................*................................................................................................................................................................................../Users/etagwerker/Projects/fastruby/metric_fu/spec/metric_fu/formatter/html_spec.rb:128: warning: URI.escape is obsolete
/Users/etagwerker/Projects/fastruby/metric_fu/lib/metric_fu/formatter/html.rb:91: warning: URI.escape is obsolete
........../Users/etagwerker/Projects/fastruby/metric_fu/spec/metric_fu/formatter/html_spec.rb:83: warning: URI.escape is obsolete
/Users/etagwerker/Projects/fastruby/metric_fu/lib/metric_fu/formatter/html.rb:91: warning: URI.escape is obsolete
.........

In order to test this you would have to run the test suite with Ruby 2.7.x. and 3.0.x

Found this solution over here: https://stackoverflow.com/a/67618304

Please check it out.

Thanks!