Skip to content

Commit

Permalink
Merge pull request #264 from lihuanshuai/fix-gionee
Browse files Browse the repository at this point in the history
fixed some case on Gionee device
  • Loading branch information
commenthol authored Aug 30, 2017
2 parents 7c57743 + 5e03d3c commit a21120d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ user_agent_parsers:
# Slack desktop client (needs to be before Apple Mail, Electron, and Chrome as it gets wrongly detected on Mac OS otherwise)
- regex: '(Slack_SSB)/(\d+)\.(\d+)\.(\d+)'
family_replacement: 'Slack Desktop Client'

# HipChat provides a version on Mac, but not on Windows.
# Needs to be before Chrome on Windows, and AppleMail on Mac.
- regex: '(HipChat)/?(\d+)?'
Expand Down Expand Up @@ -1995,6 +1995,11 @@ device_parsers:
device_replacement: 'Gionee $1'
brand_replacement: 'Gionee'
model_replacement: '$1'
- regex: '\sGIONEE[-\s_](\w*)'
regex_flag: 'i'
device_replacement: 'Gionee $1'
brand_replacement: 'Gionee'
model_replacement: '$1'

#########
# GoClever
Expand Down
4 changes: 4 additions & 0 deletions tests/test_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79995,3 +79995,7 @@ test_cases:
brand: 'Nokia'
model: 'Lumia 920'

- user_agent_string: 'Mozilla/5.0 (Linux; U; Android 5.1; zh-cn; Build/LMY47D ) AppleWebKit/534.30 (KHTML,like Gecko) Version/5.1 Mobile Safari/534.30 GIONEE-GN3003/GN3003 RV/5.0.16 GNBR/5.1.0.cg Id/8D83E4532006ACCE31D712F4F73C8C70'
family: 'Gionee GN3003'
brand: 'Gionee'
model: 'GN3003'

0 comments on commit a21120d

Please sign in to comment.