Skip to content

Commit

Permalink
add support for mac os detection when agent is macoutlook
Browse files Browse the repository at this point in the history
  • Loading branch information
Gurvinder Singh committed May 28, 2018
1 parent 906604e commit 0b89ab5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,11 @@ os_parsers:
##########
- regex: '((?:Mac[ +]?|; )OS[ +]X)[\s+/](?:(\d+)[_.](\d+)(?:[_.](\d+))?|Mach-O)'
os_replacement: 'Mac OS X'
- regex: '(\w+\s+Mac OS X\s+\w+\s+(\d+).(\d+).(\d+).*)'
os_replacement: 'Mac OS X'
os_v1_replacement: '$2'
os_v2_replacement: '$3'
os_v3_replacement: '$4'
# Leopard
- regex: ' (Dar)(win)/(9).(\d+).*\((?:i386|x86_64|Power Macintosh)\)'
os_replacement: 'Mac OS X'
Expand Down
7 changes: 7 additions & 0 deletions tests/test_os.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,13 @@ test_cases:
patch:
patch_minor:

- user_agent_string: 'MacOutlook/16.12.0.180401 (Intelx64 Mac OS X Version 10.12.6 (build 16G29))'
family: 'Mac OS X'
major: '10'
minor: '12'
patch: '6'
patch_minor:

- user_agent_string: 'Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13'
family: 'MeeGo'
major:
Expand Down

0 comments on commit 0b89ab5

Please sign in to comment.