server-sdk-ruby icon indicating copy to clipboard operation
server-sdk-ruby copied to clipboard

Gem is loaded before rails environment and it overrides the ActiveSupport #stringify_keys

Open m-hukic opened this issue 1 year ago • 1 comments

Hello! Since it looks like this gem is not dependent on rails gem it gets loaded before the rails and overrides the default #stringify_keys method from rails which is causing very weird and almost untraceable issues especially in test environment!

Can we please add that dependency and ensure that it's not just overriding rails default behaviour or remove this monkey patch and switch to using #transform_keys(&:to_s) and #trasnform_values in one place where it's being used in the SDK. Here: https://github.com/livekit/server-sdk-ruby/blob/main/lib/livekit/grants.rb#L91

Using refinement should also limit the scope of the change of #stringify_keys

m-hukic avatar May 07 '24 19:05 m-hukic