Bump premailer to 1.27.0 to stop css_parser deprecation warnings
What does this MR do and why?
Since 19.4, every email that goes through premailer writes this line to stderr:
premailer-1.23.0/lib/premailer/adapter/nokogiri.rb:65: warning: [DEPRECATION] positional arguments are deprecated use keyword instead.css_parser (now 1.22.0 in our bundle) deprecated positional arguments, and premailer 1.23.0 still uses them. On GitLab Dedicated this produced millions of log lines a day and throttled the log pipeline (see the issue).
This bumps premailer from 1.23.0 to 1.27.0 in Gemfile.lock and Gemfile.next.lock. Premailer 1.26.0 moved to keyword arguments ("Bump css_parser to 1.19 to avoid deprecations"). 1.27.0 only adds multiline inline style support on top of that.
I picked 1.27.0 rather than the latest (1.32.0) to keep the change small and easy to backport to 19.4. 1.30.0 rewrote how the Nokogiri adapter folds styles, which is a bigger change for a fix like this.
premailer-rails 1.12.0 accepts premailer (~> 1.7, >= 1.7.9), so no other gem changes. The checksum matches rubygems.org.
References
Closes #636290 (closed)
How to set up and validate locally
I reproduced it outside the app with css_parser 1.22.0:
require "premailer"
Premailer.new("<html><head><style>p{color:red}</style></head><body><p>x</p></body></html>",
with_html_string: true, adapter: :nokogiri).to_inline_css- premailer 1.23.0: prints the deprecation warning above.
- premailer 1.27.0: no warning, same output.
In the app, bundle exec rspec spec/initializers/action_mailer_hooks_spec.rb passes with 1.27.0. I couldn't run the mailer specs locally (my setup can't compile the email stylesheets), so the CI mailer specs are the real check here.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.