Hi,
I have table with unique user agents. I store them as lowercased values. I wanted to do some analyses based on my data, but figure out that gem doesn't detected browser correct.
Browser.new("mozilla/5.0 (windows nt 10.0; win64; x64; rv:52.0) gecko/20100101 firefox/52.0").name
=> "Generic Browser"
then i checked logic detection and found that in most matchers strings are compared case sensitive https://github.com/fnando/browser/blob/main/lib/browser/firefox.rb#L18
So, when i changed one symbol it works as expected.
Browser.new("mozilla/5.0 (windows nt 10.0; win64; x64; rv:52.0) gecko/20100101 Firefox/52.0").name
=> "Firefox"
So, is it possible to add lowercase string support? Basically, if you compare strings above - it's same browser, but we have different results.
Software:
Hi,
I have table with unique user agents. I store them as lowercased values. I wanted to do some analyses based on my data, but figure out that gem doesn't detected browser correct.
then i checked logic detection and found that in most matchers strings are compared case sensitive https://github.com/fnando/browser/blob/main/lib/browser/firefox.rb#L18
So, when i changed one symbol it works as expected.
So, is it possible to add lowercase string support? Basically, if you compare strings above - it's same browser, but we have different results.
Software:
Rails Version: "6.0.3.2"
Browser gem version: "2.5.1"