IMGKit icon indicating copy to clipboard operation
IMGKit copied to clipboard

Remove use of backtick execution

Open treacher opened this issue 2 years ago • 0 comments

Context

The current use of backticks doesn't pose an immediate risk, however in general it's best to avoid them where possible. One of the projects I'm working on blocks all exec calls using backticks which is part of the reason I'm raising this PR.

I'll leave this PR in draft in the hopes the following PR gets merged: https://github.com/csquared/IMGKit/pull/131 if it doesn't get merged I'm happy to update this PR to use the old version of RSpec.

Changes

  • Move to using IO.popen instead of backticks.
  • Update the tests accordingly.

Testing

Installed the gem locally and generated an image from HTML and observed that the image generated correctly.

treacher avatar Aug 29 '23 02:08 treacher