No commit activity in last 3 years
No release in over 3 years
UserAgent is a Ruby library that parses and compares HTTP User Agents. This is a fork from josh-useragent with fixes for Stella (http://github.com/solutious/stella).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme
UserAgent
=========

UserAgent is a Ruby library that parses and compares HTTP User Agents.


Example
=======

  Browser = Struct.new(:browser, :version)
  SupportedBrowsers = [
    Browser.new("Safari", "3.1.1"),
    Browser.new("Firefox", "2.0.0.14"),
    Browser.new("Internet Explorer", "7.0")
  ]

  user_agent = UserAgent.parse(request.user_agent)
  SupportedBrowsers.detect { |browser| user_agent >= browser }


Copyright (c) 2008 Joshua Peek, released under the MIT license