railslove / rack-tracker

Tracking made easy: Donโ€™t fool around with adding tracking and analytics partials to your app and concentrate on the things that matter.
https://www.railslove.com/open-source
MIT License
647 stars 121 forks source link

dup response string in Rack::Tracker#inject to avoid RuntimeError #114

Closed zpfled closed 6 years ago

zpfled commented 6 years ago

Following up with issue #105 (RuntimeError: string modified), this PR ensures that when the response string is frozen, Rack::Tracker#inject does not cause a RuntimeError and still works as before.

In addition to using frozen strings in the gem specs, I used this version of rack-tracker locally in our app (referred to by @jblock in #105). Tests that were previously failing because of this change in Rails 5.2 are now passing.

Hopefully this is enough to resolve the issue!

DonSchado commented 6 years ago

thanks! ๐Ÿ‘

egze commented 6 years ago

Please release a new gem version! ๐Ÿ™