Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[Suggestion] Create built-in parser for user-agent info #43
I'm currently using latest version of impressionist in my project to register views and I'm also using it to save user-agent data from users.
In one of my controller, I use the following method:
Impressionist saves the User Agent info into message variable.
Two example of the user agent info saved in the variables are:
The issue with it is that it's hard to parse such information. There are thousand of user agent info and it would be great if there's a way to categorize them automatically by Impressionist.
This would make Impressionist much more powerful ruby gem and eventually, it would also parse the IP address by country.
I'll write the geocoding part and submit it to see what people think - certainly it would be some good extra information to include. As far as the UA Parser goes, that's a bit harder as there is a chunk that can be extracted - would people want platform, browser, browser version? just browser? It also increases the storage requirements again, and this gem already fills space quickly - that isn't an issue if self-hosting a database, but if you are using a SaaS one or on shared (eeek!) hosting then that might be a serious consideration.