Skip to content

Commit

Permalink
added detection of Doogee smartphones
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Jun 15, 2014
1 parent 507c33e commit e68be12
Show file tree
Hide file tree
Showing 4 changed files with 160 additions and 102 deletions.
1 change: 1 addition & 0 deletions Parser/Device/DeviceParserAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ abstract class DeviceParserAbstract extends ParserAbstract
'DI' => 'Dicam',
'DL' => 'Dell',
'DM' => 'DMM',
'DO' => 'Doogee',
'DP' => 'Dopod',
'EC' => 'Ericsson',
'EI' => 'Ezio',
Expand Down
204 changes: 102 additions & 102 deletions Tests/fixtures/desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -458,108 +458,6 @@
model:
os_family: GNU/Linux
browser_family: Firefox
-
user_agent: Mozilla/5.0 (BeOS; U; Haiku BePC; en-US; rv:1.8.1.21pre) Gecko/20090218 BonEcho/2.0.0.21pre
os:
name: Haiku OS
short_name: HAI
version:
client:
type: browser
name: Firefox
short_name: FF
version: BonEcho (2.0)
device:
type: desktop
brand:
model:
os_family: BeOS
browser_family: Firefox
-
user_agent: Mozilla/5.0 (compatible; U; Webpositive/533.4; Haiku) AppleWebkit/533.4 (KHTML, like gecko) Chrome/5.0.375.55 Safari/533.4
os:
name: Haiku OS
short_name: HAI
version:
client:
type: browser
name: WebPositive
short_name: WE
version:
device:
type: desktop
brand:
model:
os_family: BeOS
browser_family: Unknown
-
user_agent: Mozilla/4.08 (Charon; Inferno)
os:
name: Inferno
short_name: INF
version:
client:
type: browser
name: Charon
short_name: CX
version:
device:
type: desktop
brand:
model:
os_family: Unix
browser_family: Unknown
-
user_agent: 'Mozilla/4.04 [en] (X11; I; IRIX 5.3 IP22)'
os:
name: IRIX
short_name: IRI
version: 5.3
client:
type: UNK
name: UNK
short_name: UNK
version: UNK
device:
type: desktop
brand:
model:
os_family: Unix
browser_family: Unknown
-
user_agent: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Kubuntu)
os:
name: Kubuntu
short_name: KBT
version:
client:
type: browser
name: Konqueror
short_name: KO
version: 3.5
device:
type: desktop
brand:
model:
os_family: GNU/Linux
browser_family: Konqueror
-
user_agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008072820 Kubuntu/8.04 (hardy) Firefox/3.0.1
os:
name: Kubuntu
short_name: KBT
version: 8.04
client:
type: browser
name: Firefox
short_name: FF
version: 3.0
device:
type: desktop
brand:
model:
os_family: GNU/Linux
browser_family: Firefox
-
user_agent: Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 conkeror/1.0pre
os:
Expand Down Expand Up @@ -900,6 +798,108 @@
model:
os_family: GNU/Linux
browser_family: Unknown
-
user_agent: Mozilla/5.0 (BeOS; U; Haiku BePC; en-US; rv:1.8.1.21pre) Gecko/20090218 BonEcho/2.0.0.21pre
os:
name: Haiku OS
short_name: HAI
version:
client:
type: browser
name: Firefox
short_name: FF
version: BonEcho (2.0)
device:
type: desktop
brand:
model:
os_family: BeOS
browser_family: Firefox
-
user_agent: Mozilla/5.0 (compatible; U; Webpositive/533.4; Haiku) AppleWebkit/533.4 (KHTML, like gecko) Chrome/5.0.375.55 Safari/533.4
os:
name: Haiku OS
short_name: HAI
version:
client:
type: browser
name: WebPositive
short_name: WE
version:
device:
type: desktop
brand:
model:
os_family: BeOS
browser_family: Unknown
-
user_agent: Mozilla/4.08 (Charon; Inferno)
os:
name: Inferno
short_name: INF
version:
client:
type: browser
name: Charon
short_name: CX
version:
device:
type: desktop
brand:
model:
os_family: Unix
browser_family: Unknown
-
user_agent: 'Mozilla/4.04 [en] (X11; I; IRIX 5.3 IP22)'
os:
name: IRIX
short_name: IRI
version: 5.3
client:
type: UNK
name: UNK
short_name: UNK
version: UNK
device:
type: desktop
brand:
model:
os_family: Unix
browser_family: Unknown
-
user_agent: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Kubuntu)
os:
name: Kubuntu
short_name: KBT
version:
client:
type: browser
name: Konqueror
short_name: KO
version: 3.5
device:
type: desktop
brand:
model:
os_family: GNU/Linux
browser_family: Konqueror
-
user_agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008072820 Kubuntu/8.04 (hardy) Firefox/3.0.1
os:
name: Kubuntu
short_name: KBT
version: 8.04
client:
type: browser
name: Firefox
short_name: FF
version: 3.0
device:
type: desktop
brand:
model:
os_family: GNU/Linux
browser_family: Firefox
-
user_agent: 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US) AppleWebKit/532.1 (KHTML, like Gecko) Arora/0.10.1 (Git: 1329 e5385f3) Safari/532.1'
os:
Expand Down
51 changes: 51 additions & 0 deletions Tests/fixtures/smartphone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1597,6 +1597,57 @@
model: Venue Pro
os_family: Windows Mobile
browser_family: Internet Explorer
-
user_agent: Mozilla/5.0 (Linux; Android 4.2.1; Discovery DG500 Build/JOP40D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.2
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 34.0
device:
type: smartphone
brand: DO
model: Discovery DG500
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.2.9; fr-fr; TURBO DG2014 Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
os:
name: Android
short_name: AND
version: 4.2
client:
type: browser
name: Android Browser
short_name: AN
version:
device:
type: smartphone
brand: DO
model: TURBO DG2014
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.2.2; fr-be; VOYAGER DG300 Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
os:
name: Android
short_name: AND
version: 4.2
client:
type: browser
name: Android Browser
short_name: AN
version:
device:
type: smartphone
brand: DO
model: VOYAGER DG300
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; U; Android 2.3.6; ru-ru; FLY IQ256 Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 Maxthon/4.1.4.2000
os:
Expand Down
6 changes: 6 additions & 0 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,12 @@ DoCoMo:
- regex: 'KGT/1\.0 ([a-z0-9]+)'
model: '$1'

# Doogee
Doogee:
regex: '((?:BIGBOY|COLLO[23]?|DAGGER|DISCOVERY|FIND|HOTWIND|LATTE|MAX|MINT|MOON|PIXELS|RAINBOX|TURBO|VALENCIA|VOYAGER) DG[0-9]+) Build'
device: 'smartphone'
model: '$1'

# Dopod
Dopod:
regex: 'Dopod(?: )?([a-z0-9]+)'
Expand Down

0 comments on commit e68be12

Please sign in to comment.