sendgrid / sendgrid-ruby

The Official Twilio SendGrid Led, Community Driven Ruby API Library
https://sendgrid.com
MIT License
620 stars 324 forks source link

Ruby 3 support #450

Closed teoljungberg closed 3 years ago

teoljungberg commented 3 years ago

Issue Summary

With the ever closer release of Ruby 3, companies are preparing for their respective upgrade work to be on the latest and greatest version of Ruby.

The last test failure at our company is tied to Sendgrid (and, incidentally with ruby-http-client).

I am still ironing out where the problem lies, but the stacktrace we get is connected to ruby-http-client, but that is in turn called from this gem. I suspect the method_missing dance in ruby-http-client is to blame (https://github.com/sendgrid/ruby-http-client/blob/e5574b3efba4064ea71f916a0e3105c8fad274ee/lib/ruby_http_client.rb#L275).

As *args are now not capturing all args - but only the positional arguments and the keyword ones have to be captured separately.

I have not gotten any test suspicious test failures on Ruby 3 for ruby-http-client, but I have a smattering of them on this gem.

Steps to Reproduce

  1. Run test suite with Ruby 3.
  2. No failures, or regressions, should occur.
teoljungberg commented 3 years ago

After closer inspection, the test failure in our application was connected to the generated content from the Sengrid mailer had changed between the two Ruby versions (2.7.2 and 3.0.0-rc1).

Any ideas as to why?

teoljungberg commented 3 years ago

I tracked this down to a regression in our PDF generation library, sorry for opening this issue up prematurely.

Closing.