Skip to content

Commit

Permalink
added detection of AmigaOS
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Feb 4, 2014
1 parent 8d83f12 commit 135d641
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 3 deletions.
Expand Up @@ -145,6 +145,7 @@ class UserAgentParserEnhanced
public static $osShorts = array(
'AIX' => 'AIX',
'Android' => 'AND',
'AmigaOS' => 'AMG',
'Apple TV' => 'ATV',
'Arch Linux' => 'ARL',
'BackTrack' => 'BTR',
Expand Down Expand Up @@ -221,9 +222,10 @@ class UserAgentParserEnhanced
'palmOS' => 'POS',
'webOS' => 'WOS'
);
protected static $desktopOsArray = array('IBM', 'Linux', 'Mac', 'Unix', 'Windows');
protected static $desktopOsArray = array('AmigaOS', 'IBM', 'Linux', 'Mac', 'Unix', 'Windows');
public static $osFamilies = array(
'Android' => array('AND'),
'AmigaOS' => array('AMG'),
'Apple TV' => array('ATV'),
'BlackBerry' => array('BLB'),
'Bot' => array('BOT'),
Expand Down
Expand Up @@ -196,7 +196,7 @@
version: '$1'

#Amiga Aweb
- regex: 'Amiga-Aweb/(\d+\.\d+)'
- regex: 'Amiga-Aweb(?:/(\d+\.\d+))?'
name: 'Amiga Aweb'
version: '$1'

Expand Down
13 changes: 12 additions & 1 deletion plugins/DevicesDetection/UserAgentParserEnhanced/regexes/oss.yml
Expand Up @@ -39,7 +39,18 @@
version: ''



##########
# AmigaOS
##########
- regex: 'AmigaOS[ ]?(\d+\.\d+)'
name: 'AmigaOS'
version: '$1'

- regex: 'AmigaOS|AmigaVoyager|Amiga-AWeb'
name: 'AmigaOS'
version: ''


##########
# Linux
##########
Expand Down
Binary file added plugins/UserSettings/images/os/AMG.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions tests/PHPUnit/Fixtures/userAgentParserEnhancedFixtures.yml
Expand Up @@ -11918,3 +11918,51 @@
model: Fire HD 8.9" 4G
os_family: Android
browser_family: Chrome
-
user_agent: AmigaVoyager/3.2 (AmigaOS/MC680x0)
os:
name: AmigaOS
short_name: AMG
version:
browser:
name: Amiga Voyager
short_name: AV
version: 3.2
device:
type: desktop
brand:
model:
os_family: AmigaOS
browser_family: Unknown
-
user_agent: Mozilla/5.0 (AmigaOS; U; AmigaOS 1.3; en-US; rv:1.8.1.21) Gecko/20090303 SeaMonkey/1.1.15
os:
name: AmigaOS
short_name: AMG
version: 1.3
browser:
name: SeaMonkey
short_name: SM
version: 1.1
device:
type: desktop
brand:
model:
os_family: AmigaOS
browser_family: Unknown
-
user_agent: Mozilla/6.0 (Macintosh; U; Amiga-AWeb) Safari 3.1
os:
name: AmigaOS
short_name: AMG
version:
browser:
name: Amiga Aweb
short_name: AW
version:
device:
type: desktop
brand:
model:
os_family: AmigaOS
browser_family: Unknown

0 comments on commit 135d641

Please sign in to comment.