muxinc / mux-ruby

Official Mux API wrapper for ruby projects, supporting both Mux Data and Mux Video.
MIT License
51 stars 14 forks source link

Ruby 2.7.1 - URI.escape is obsolete #12

Closed myxoh closed 4 years ago

myxoh commented 4 years ago

Here's an article explaining why the method was deprecated and some solutions:

https://docs.knapsackpro.com/2020/uri-escape-is-obsolete-percent-encoding-your-query-string

dylanjha commented 4 years ago

@myxoh @fidalgo @nikz

I'm working on a patch here, but want to make sure I don't have a regression. Can you try this in your Gemfile:

gem 'mux_ruby', :git => 'git://github.com/muxinc/mux-ruby.git', :branch => 'dj/uri-escape'

Please only do this in development and/or in testing -- DO NOT do this in production. Please let me know:

  1. Does this fix the deprecation warning in Ruby 2.7.1
  2. Do you find any regressions? In other words, do all your API calls still work as expected?

Thanks for surfacing this issue!

nikz commented 4 years ago

Works fine for me - clears the deprecation warning, and no regressions that I can see immediately!

dylanjha commented 4 years ago

This fix was released in 1.5.1

https://rubygems.org/gems/mux_ruby

nikz commented 4 years ago

Thanks @dylanjha !