Skip to content

Commit

Permalink
Adds Ubuntu and Debian detection
Browse files Browse the repository at this point in the history
  • Loading branch information
matiaskorhonen committed Oct 14, 2012
1 parent 924714e commit 9e0bf9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/user_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ module OS
WindowsPhone = /windows (ce|phone|mobile)( os)?/i
Windows = /windows/i
OSX = /os x (\d+)[._](\d+)/i
Ubuntu = /ubuntu/i
Debian = /debian/i
Linux = /linux/i
Wii = /wii/i
PS3 = /playstation 3/i
Expand Down Expand Up @@ -143,6 +145,8 @@ def self.os(string)
when OS::Windows2000 then 'Windows 2000'
when OS::Windows then 'Windows'
when OS::OSX then "OS X #{$1}.#{$2}"
when OS::Ubuntu then 'Ubuntu'
when OS::Debian then 'Debian'
when OS::Linux then 'Linux'
when OS::Wii then 'Wii'
when OS::PS3 then 'Playstation'
Expand Down

0 comments on commit 9e0bf9d

Please sign in to comment.