From 79b3395572be39b0002985445f03db3b88141bde Mon Sep 17 00:00:00 2001 From: sgiehl Date: Wed, 17 Oct 2018 22:29:51 +0200 Subject: [PATCH] Adds detection for GoMobile devices --- Parser/Device/DeviceParserAbstract.php | 1 + Tests/fixtures/smartphone-1.yml | 60 ++++++++++++++++++++++++++ regexes/device/mobiles.yml | 10 +++++ 3 files changed, 71 insertions(+) diff --git a/Parser/Device/DeviceParserAbstract.php b/Parser/Device/DeviceParserAbstract.php index dcb45ca8a0..10d787043a 100644 --- a/Parser/Device/DeviceParserAbstract.php +++ b/Parser/Device/DeviceParserAbstract.php @@ -178,6 +178,7 @@ abstract class DeviceParserAbstract extends ParserAbstract 'GC' => 'GOCLEVER', 'GL' => 'Goly', 'GO' => 'Google', + 'G1' => 'GoMobile', 'GR' => 'Gradiente', 'GU' => 'Grundig', 'HA' => 'Haier', diff --git a/Tests/fixtures/smartphone-1.yml b/Tests/fixtures/smartphone-1.yml index 9a8515808f..cf2abc3caf 100644 --- a/Tests/fixtures/smartphone-1.yml +++ b/Tests/fixtures/smartphone-1.yml @@ -90,6 +90,66 @@ model: Alumini 2 os_family: Android browser_family: Unknown +- + user_agent: Mozilla/5.0 (Linux; Android 7.0; GO Onyx Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.98 Mobile Safari/537.36 + os: + name: Android + short_name: AND + version: "7.0" + platform: "" + client: + type: browser + name: Chrome Mobile + short_name: CM + version: 61.0.3163.98 + engine: Blink + engine_version: "" + device: + type: smartphone + brand: G1 + model: Go Onyx + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 6.0; GO503 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.116 Mobile Safari/537.36 + os: + name: Android + short_name: AND + version: "6.0" + platform: "" + client: + type: browser + name: Chrome Mobile + short_name: CM + version: 60.0.3112.116 + engine: Blink + engine_version: "" + device: + type: smartphone + brand: G1 + model: Go503 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 5.1; GO1402 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.107 Mobile Safari/537.36 + os: + name: Android + short_name: AND + version: "5.1" + platform: "" + client: + type: browser + name: Chrome Mobile + short_name: CM + version: 60.0.3112.107 + engine: Blink + engine_version: "" + device: + type: smartphone + brand: G1 + model: Go1402 + os_family: Android + browser_family: Chrome - user_agent: Mozilla/5.0 (Linux; Android 7.0; U PULSE Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/67.0.3396.87 Mobile Safari/537.36 Instagram 51.0.0.20.85 Android (24/7.0; 320dpi; 720x1184; WIKO; U PULSE; v3961; mt6735; fr_FR; 115211358) os: diff --git a/regexes/device/mobiles.yml b/regexes/device/mobiles.yml index 8878d78ea7..44e3a8df26 100644 --- a/regexes/device/mobiles.yml +++ b/regexes/device/mobiles.yml @@ -2576,6 +2576,7 @@ Gigaset: model: '$1' - regex: 'Gigaset ([^;/)]+)[);/ ]' model: '$1' + # Gionee Gionee: regex: '(?:GIO-)?GIONEE[ _-]?[a-z0-9]+|(?:Dream_D1|V188S?|GN[0-9]{3,4}[a-z]?)[);/ ]|F103(?: Pro)? Build|P5 mini Build' @@ -2653,6 +2654,15 @@ GOCLEVER: model: 'Libra 97' device: 'tablet' +# GoMobile +GoMobile: + regex: 'GO Onyx|GO[0-9]{3,4}' + device: 'smartphone' + models: + - regex: 'GO Onyx' + model: 'Go Onyx' + - regex: 'GO([0-9]{3,4})' + model: 'Go$1' # Goly Goly: