zendesk / sunshine-conversations-ruby

Smooch API Library for Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove URI.encode from v5.+ to support Ruby 3.0

hartsick opened this issue · comments

Hi there. Right now the gem release supporting v1.1 of the API (v 5.x) is incompatible with Ruby 3.0, which is the oldest version of Ruby with security updates.

The line causing an issue is here:
https://github.com/zendesk/sunshine-conversations-ruby/blob/5.34.1/lib/smooch-api/configuration.rb#L178, and I assume here, though I haven't received an error from it yet: https://github.com/zendesk/sunshine-conversations-ruby/blob/5.34.1/lib/smooch-api/api_client.rb#L255.

And, as an example, results in a NoMethodError: undefined method 'encode' for URI:Module exception when SmoochApi::ConversationApi.new(<client>).post_message is called.

Could you all replace URI.encode, which has been removed from Ruby in 3.0, and cut a new release? This commit was enough to cover our use case, in case it's useful as reference.

Thanks!