sinatra-support icon indicating copy to clipboard operation
sinatra-support copied to clipboard

Moves UserAgent into Sinatra::UserAgentHelper namespace to fix collisions with other libraries

Open anglinb opened this issue 7 years ago • 0 comments

Previously the UserAgent class in the lib/sinatra/support/useragenthelpers.rb file was not included in the Sinatra::UserAgentHelpers namespace which caused collisions in other libraries. Most recently, the lack of namespace cause issues with twitter/secureheaders: Issue 335

I simply moved the UserAgent class into the namespace. I ran the tests and they passed. The UserAgent class is actually only ever used in the lib/sinatra/support/useragenthelpers.rb file so this should be a non-breaking change for most usages of this library.

anglinb avatar Jun 26 '17 03:06 anglinb