Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 16 additions and 0 deletions.
  1. +16 −0 lib/user_agent.rb
View
16 lib/user_agent.rb
@@ -13,14 +13,17 @@ module Engines
end
module Versions
+ Epiphany = /epiphany\/([\d\w\.\-]+)/i
Chrome = /chrome\/([\d\w\.\-]+)/i
Safari = /version\/([\d\w\.\-]+)/i
Ps3 = /([\d\w\.\-]+)\)\s*$/i
Psp = /([\d\w\.\-]+)\)?\s*$/i
Lotus = /Lotus-Notes\/([\w.]+)/i
+ ELinks = /ELinks\/([\d\w\.\-]+)/i
end
module Browsers
+ Epiphany = /epiphany/i
Konqueror = /konqueror/i
Chrome = /chrome/i
Safari = /safari/i
@@ -36,6 +39,7 @@ module Browsers
Outlook = /microsoft.outlook/i
Evolution = /evolution/i
IEMobile = /iemobile|windows phone/i
+ ELinks = /elinks/i
end
module OS
@@ -47,6 +51,9 @@ module OS
WindowsPhone = /windows (ce|phone|mobile)( os)?/i
Windows = /windows/i
OSX = /os x (\d+)[._](\d+)/i
+ Darwin = /darwin/i
+ Ubuntu = /ubuntu/i
+ Debian = /debian/i
Linux = /linux/i
Wii = /wii/i
PS3 = /playstation 3/i
@@ -96,6 +103,7 @@ def self.engine_version(string)
def self.browser_name(string)
case string
+ when Browsers::Epiphany then :epiphany
when Browsers::Konqueror then :konqueror
when Browsers::Chrome then :chrome
when Browsers::Safari then :safari
@@ -111,6 +119,7 @@ def self.browser_name(string)
when Browsers::Evolution then :evolution
when Browsers::IEMobile then :iemobile
when Browsers::IE then :ie
+ when Browsers::ELinks then :elinks
else
:unknown
end
@@ -118,6 +127,8 @@ def self.browser_name(string)
def self.browser_version(string)
case name = browser_name(string)
+ when :epiphany
+ $1 if string =~ Versions::Epiphany
when :chrome
$1 if string =~ Versions::Chrome
when :safari
@@ -128,6 +139,8 @@ def self.browser_version(string)
$1 if string =~ Versions::Psp
when :lotus
$1 if string =~ Versions::Lotus
+ when :elinks
+ $1 if string =~ Versions::ELinks
else
$1 if string =~ /#{name}[\/ ]([\d\w\.\-]+)/i
end
@@ -143,6 +156,9 @@ 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::Darwin then 'Darwin'
+ 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'

No commit comments for this range

Something went wrong with that request. Please try again.