Skip to content

Commit

Permalink
Detect Land Rover devices (#5993)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchezzzhak authored and sgiehl committed Jul 22, 2019
1 parent 68d886d commit 648537d
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 0 deletions.
1 change: 1 addition & 0 deletions Parser/Device/DeviceParserAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ abstract class DeviceParserAbstract extends ParserAbstract
'KE' => 'Krüger&Matz',
'LQ' => 'LAIQ',
'L2' => 'Landvo',
'L6' => 'Land Rover',
'LV' => 'Lava',
'LA' => 'Lanix',
'LC' => 'LCT',
Expand Down
161 changes: 161 additions & 0 deletions Tests/fixtures/smartphone-11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
---
-
user_agent: Mozilla/5.0 Linux; Android 7.0; Land Rover X17 AppleWebKit/537.36 KHTML, like Gecko Chrome/70.0.3538.64 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "7.0"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 70.0.3538.64
engine: Blink
engine_version: ""
device:
type: smartphone
brand: L6
model: X17
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 Linux; Android 7.0; Land Roverd X18 AppleWebKit/537.36 KHTML, like Gecko Chrome/72.0.3626.96 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "7.0"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 72.0.3626.96
engine: Blink
engine_version: ""
device:
type: smartphone
brand: L6
model: X18
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 Linux; Android 7.0; Land Rover X Build/Land_Rover_X AppleWebKit/537.36 KHTML, like Gecko Chrome/42.0.2311.111 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "7.0"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 42.0.2311.111
engine: Blink
engine_version: ""
device:
type: smartphone
brand: L6
model: X
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 Linux; Android 7.1.1; Land Rover Explore AppleWebKit/537.36 KHTML, like Gecko Chrome/75.0.3770.101 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 7.1.1
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 75.0.3770.101
engine: Blink
engine_version: ""
device:
type: smartphone
brand: L6
model: Explore
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 Linux; U; Android 4.2.2; ru-ru; LAND ROVER L15+ Build/JDQ39 AppleWebKit/534.30 KHTML, like Gecko Version/4.0 Mobile Safari/534.30
os:
name: Android
short_name: AND
version: 4.2.2
platform: ""
client:
type: browser
name: Android Browser
short_name: AN
version: ""
engine: WebKit
engine_version: "534.30"
device:
type: smartphone
brand: L6
model: L15+
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 Linux; U; Android 4.2.2; ru-ru; Landrover V6 Build/JDQ39 AppleWebKit/534.30 KHTML, like Gecko Version/4.0 Mobile Safari/534.30
os:
name: Android
short_name: AND
version: 4.2.2
platform: ""
client:
type: browser
name: Android Browser
short_name: AN
version: ""
engine: WebKit
engine_version: "534.30"
device:
type: smartphone
brand: L6
model: V6
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 Linux; U; Android 4.2.2; ru-ru; LANDROVER V8 Build/JDQ39 AppleWebKit/534.30 KHTML, like Gecko Version/4.0 Mobile Safari/534.30
os:
name: Android
short_name: AND
version: 4.2.2
platform: ""
client:
type: browser
name: Android Browser
short_name: AN
version: ""
engine: WebKit
engine_version: "534.30"
device:
type: smartphone
brand: L6
model: V8
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 Linux; Android 7.0.99; Land Rover T878 Build/NRD90M AppleWebKit/537.36 KHTML, like Gecko Chrome/58.0.3029.83 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 7.0.99
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 58.0.3029.83
engine: Blink
engine_version: ""
device:
type: smartphone
brand: L6
model: T878
os_family: Android
browser_family: Chrome
6 changes: 6 additions & 0 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5199,6 +5199,12 @@ Landvo:
- regex: 'XM([123])00([^/;]*) Build'
model: 'XM$100$2'

# Land Rover
Land Rover:
regex: 'Land[ ]?Rover[d]? (X1[0-9]|Explore|T878|L15\+|V[68]|X)[;/) ]'
device: 'smartphone'
model: '$1'

# lanix
Lanix:
regex: 'LANIX-([a-z0-9]+)|Ilium[ _]|X120C'
Expand Down

0 comments on commit 648537d

Please sign in to comment.