device_detector 1.0.2 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +49 -0
- data/.ruby-version +1 -0
- data/.travis.yml +5 -6
- data/CHANGELOG.md +11 -0
- data/README.md +8 -7
- data/Rakefile +7 -4
- data/device_detector.gemspec +1 -0
- data/lib/device_detector/bot.rb +2 -2
- data/lib/device_detector/browser.rb +364 -0
- data/lib/device_detector/client.rb +11 -2
- data/lib/device_detector/device.rb +1168 -22
- data/lib/device_detector/memory_cache.rb +5 -5
- data/lib/device_detector/metadata_extractor.rb +7 -8
- data/lib/device_detector/model_extractor.rb +3 -3
- data/lib/device_detector/name_extractor.rb +2 -2
- data/lib/device_detector/os.rb +148 -116
- data/lib/device_detector/parser.rb +22 -9
- data/lib/device_detector/version.rb +1 -1
- data/lib/device_detector/version_extractor.rb +10 -2
- data/lib/device_detector.rb +73 -40
- data/regexes/bots.yml +909 -59
- data/regexes/client/browser_engine.yml +14 -2
- data/regexes/client/browsers.yml +1356 -241
- data/regexes/client/feed_readers.yml +10 -10
- data/regexes/client/libraries.yml +75 -1
- data/regexes/client/mediaplayers.yml +39 -3
- data/regexes/client/mobile_apps.yml +524 -45
- data/regexes/client/pim.yml +55 -2
- data/regexes/device/cameras.yml +6 -6
- data/regexes/device/car_browsers.yml +23 -3
- data/regexes/device/consoles.yml +9 -3
- data/regexes/device/mobiles.yml +16903 -3199
- data/regexes/device/notebooks.yml +114 -0
- data/regexes/device/portable_media_player.yml +20 -3
- data/regexes/device/shell_tv.yml +117 -0
- data/regexes/device/televisions.yml +440 -35
- data/regexes/oss.yml +603 -165
- data/regexes/vendorfragments.yml +6 -2
- data/spec/device_detector/concrete_user_agent_spec.rb +38 -51
- data/spec/device_detector/detector_fixtures_spec.rb +36 -37
- data/spec/device_detector/device_spec.rb +52 -56
- data/spec/device_detector/memory_cache_spec.rb +19 -19
- data/spec/device_detector/model_extractor_spec.rb +3 -3
- data/spec/device_detector/version_extractor_spec.rb +5 -6
- data/spec/device_detector_spec.rb +26 -26
- data/spec/fixtures/client/browser.yml +2617 -555
- data/spec/fixtures/client/feed_reader.yml +34 -52
- data/spec/fixtures/client/library.yml +129 -38
- data/spec/fixtures/client/mediaplayer.yml +59 -28
- data/spec/fixtures/client/mobile_app.yml +589 -20
- data/spec/fixtures/client/pim.yml +92 -19
- data/spec/fixtures/detector/bots.yml +1749 -458
- data/spec/fixtures/detector/camera.yml +30 -24
- data/spec/fixtures/detector/car_browser.yml +199 -3
- data/spec/fixtures/detector/console.yml +107 -45
- data/spec/fixtures/detector/desktop.yml +3216 -758
- data/spec/fixtures/detector/feature_phone.yml +935 -181
- data/spec/fixtures/detector/feed_reader.yml +181 -193
- data/spec/fixtures/detector/mediaplayer.yml +157 -60
- data/spec/fixtures/detector/mobile_apps.yml +914 -136
- data/spec/fixtures/detector/peripheral.yml +271 -0
- data/spec/fixtures/detector/phablet.yml +5593 -1533
- data/spec/fixtures/detector/portable_media_player.yml +398 -32
- data/spec/fixtures/detector/smart_display.yml +183 -9
- data/spec/fixtures/detector/smart_speaker.yml +60 -0
- data/spec/fixtures/detector/smartphone-1.yml +3930 -4239
- data/spec/fixtures/detector/smartphone-10.yml +3985 -7366
- data/spec/fixtures/detector/smartphone-11.yml +5083 -3784
- data/spec/fixtures/detector/smartphone-12.yml +8989 -0
- data/spec/fixtures/detector/smartphone-13.yml +9412 -0
- data/spec/fixtures/detector/smartphone-14.yml +9477 -0
- data/spec/fixtures/detector/smartphone-15.yml +9281 -0
- data/spec/fixtures/detector/smartphone-16.yml +9678 -0
- data/spec/fixtures/detector/smartphone-17.yml +9965 -0
- data/spec/fixtures/detector/smartphone-18.yml +9806 -0
- data/spec/fixtures/detector/smartphone-19.yml +9965 -0
- data/spec/fixtures/detector/smartphone-2.yml +6670 -4375
- data/spec/fixtures/detector/smartphone-20.yml +9710 -0
- data/spec/fixtures/detector/smartphone-21.yml +8693 -0
- data/spec/fixtures/detector/smartphone-22.yml +10178 -0
- data/spec/fixtures/detector/smartphone-23.yml +9453 -0
- data/spec/fixtures/detector/smartphone-24.yml +9843 -0
- data/spec/fixtures/detector/smartphone-25.yml +9703 -0
- data/spec/fixtures/detector/smartphone-26.yml +10007 -0
- data/spec/fixtures/detector/smartphone-27.yml +4927 -0
- data/spec/fixtures/detector/smartphone-3.yml +4656 -4711
- data/spec/fixtures/detector/smartphone-4.yml +3518 -4479
- data/spec/fixtures/detector/smartphone-5.yml +3805 -4803
- data/spec/fixtures/detector/smartphone-6.yml +3745 -4693
- data/spec/fixtures/detector/smartphone-7.yml +3721 -4645
- data/spec/fixtures/detector/smartphone-8.yml +4564 -4699
- data/spec/fixtures/detector/smartphone-9.yml +3897 -4888
- data/spec/fixtures/detector/smartphone.yml +3154 -4141
- data/spec/fixtures/detector/tablet-1.yml +4742 -4576
- data/spec/fixtures/detector/tablet-2.yml +3803 -4731
- data/spec/fixtures/detector/tablet-3.yml +6210 -2309
- data/spec/fixtures/detector/tablet-4.yml +9062 -0
- data/spec/fixtures/detector/tablet-5.yml +9273 -0
- data/spec/fixtures/detector/tablet-6.yml +4588 -0
- data/spec/fixtures/detector/tablet.yml +3629 -4613
- data/spec/fixtures/detector/tv-1.yml +2501 -0
- data/spec/fixtures/detector/tv.yml +8856 -2064
- data/spec/fixtures/detector/unknown.yml +412 -587
- data/spec/fixtures/detector/wearable.yml +915 -0
- data/spec/fixtures/device/camera.yml +4 -3
- data/spec/fixtures/device/car_browser.yml +9 -2
- data/spec/fixtures/device/console.yml +15 -14
- data/spec/fixtures/device/notebook.yml +7 -0
- data/spec/fixtures/parser/oss.yml +1392 -21
- data/spec/fixtures/parser/vendorfragments.yml +57 -51
- metadata +70 -4
data/regexes/client/pim.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
###############
|
2
2
|
# Device Detector - The Universal Device Detection library for parsing User Agents
|
3
3
|
#
|
4
|
-
# @link
|
4
|
+
# @link https://matomo.org
|
5
5
|
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
6
6
|
###############
|
7
7
|
|
@@ -43,4 +43,57 @@
|
|
43
43
|
|
44
44
|
- regex: 'DAVdroid(?:/(\d+[\.\d]+))?'
|
45
45
|
name: 'DAVdroid'
|
46
|
-
version: '$1'
|
46
|
+
version: '$1'
|
47
|
+
|
48
|
+
# SeaMonkey
|
49
|
+
- regex: '(?:SeaMonkey|Iceape)(?:/(\d+[\.\d]+))?'
|
50
|
+
name: 'SeaMonkey'
|
51
|
+
version: '$1'
|
52
|
+
|
53
|
+
# Live5ch
|
54
|
+
- regex: 'Live5ch/(\d+[\.\d]+)'
|
55
|
+
name: 'Live5ch'
|
56
|
+
version: '$1'
|
57
|
+
|
58
|
+
- regex: 'JaneView/'
|
59
|
+
name: 'JaneView'
|
60
|
+
version: ''
|
61
|
+
|
62
|
+
- regex: 'BathyScaphe/'
|
63
|
+
name: 'BathyScaphe'
|
64
|
+
version: ''
|
65
|
+
|
66
|
+
# Raindrop.io (https://raindrop.io/)
|
67
|
+
- regex: 'Raindrop.io/(\d+[\.\d]+)'
|
68
|
+
name: 'Raindrop.io'
|
69
|
+
version: '$1'
|
70
|
+
|
71
|
+
# Franz (https://meetfranz.com/)
|
72
|
+
- regex: 'Franz/(\d+[\.\d]+)'
|
73
|
+
name: 'Franz'
|
74
|
+
version: '$1'
|
75
|
+
|
76
|
+
# Mailspring (https://www.electronjs.org/apps/mailspring)
|
77
|
+
- regex: 'Mailspring/(\d+[\.\d]+)'
|
78
|
+
name: 'Mailspring'
|
79
|
+
version: '$1'
|
80
|
+
|
81
|
+
# Notion (https://www.notion.so/)
|
82
|
+
- regex: 'Notion/(\d+[\.\d]+)'
|
83
|
+
name: 'Notion'
|
84
|
+
version: '$1'
|
85
|
+
|
86
|
+
# Basecamp (https://basecamp.com/)
|
87
|
+
- regex: 'Basecamp[0-9]/?(\d+[\.\d]+)'
|
88
|
+
name: 'Basecamp'
|
89
|
+
version: '$1'
|
90
|
+
|
91
|
+
# Evernote (https://evernote.com/)
|
92
|
+
- regex: 'Evernote/?(\d+[\.\d]+)'
|
93
|
+
name: 'Evernote'
|
94
|
+
version: '$1'
|
95
|
+
|
96
|
+
# Rambox Pro (https://rambox.app/)
|
97
|
+
- regex: 'ramboxpro/(\d+\.[\.\d]+)?'
|
98
|
+
name: 'Rambox Pro'
|
99
|
+
version: '$1'
|
data/regexes/device/cameras.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
###############
|
2
2
|
# Device Detector - The Universal Device Detection library for parsing User Agents
|
3
3
|
#
|
4
|
-
# @link
|
4
|
+
# @link https://matomo.org
|
5
5
|
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
6
6
|
###############
|
7
7
|
|
@@ -17,12 +17,12 @@ Samsung:
|
|
17
17
|
device: 'camera'
|
18
18
|
models:
|
19
19
|
- regex: 'EK-GN120'
|
20
|
-
model: '
|
20
|
+
model: 'Galaxy NX'
|
21
21
|
- regex: 'EK-GC100'
|
22
|
-
model: '
|
22
|
+
model: 'Galaxy Camera'
|
23
23
|
- regex: 'EK-GC110'
|
24
|
-
model: '
|
24
|
+
model: 'Galaxy Camera WiFi only'
|
25
25
|
- regex: 'EK-GC200'
|
26
|
-
model: '
|
26
|
+
model: 'Galaxy Camera 2'
|
27
27
|
- regex: 'EK-GC([0-9]{3})'
|
28
|
-
model: '
|
28
|
+
model: 'Galaxy Camera $1'
|
@@ -1,12 +1,32 @@
|
|
1
1
|
###############
|
2
2
|
# Device Detector - The Universal Device Detection library for parsing User Agents
|
3
3
|
#
|
4
|
-
# @link
|
4
|
+
# @link https://matomo.org
|
5
5
|
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
6
6
|
###############
|
7
7
|
|
8
8
|
# Tesla Model S
|
9
9
|
Tesla:
|
10
|
-
regex: 'QtCarBrowser'
|
10
|
+
regex: '(?:Tesla/[0-9.]+|QtCarBrowser)'
|
11
11
|
device: 'car browser'
|
12
|
-
|
12
|
+
models:
|
13
|
+
- regex: 'QtCarBrowser'
|
14
|
+
model: 'Model S'
|
15
|
+
- regex: 'Tesla/[0-9.]+'
|
16
|
+
model: ''
|
17
|
+
|
18
|
+
# Mac Audio
|
19
|
+
MAC AUDIO:
|
20
|
+
regex: 'Mac Audio Spro'
|
21
|
+
device: 'car browser'
|
22
|
+
models:
|
23
|
+
- regex: 'Spro'
|
24
|
+
model: 'S Pro'
|
25
|
+
|
26
|
+
# Topway
|
27
|
+
Topway:
|
28
|
+
regex: 'sp9853i_1h10_vmm'
|
29
|
+
device: 'car browser'
|
30
|
+
models:
|
31
|
+
- regex: 'sp9853i_1h10_vmm'
|
32
|
+
model: 'TS9'
|
data/regexes/device/consoles.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
###############
|
2
2
|
# Device Detector - The Universal Device Detection library for parsing User Agents
|
3
3
|
#
|
4
|
-
# @link
|
4
|
+
# @link https://matomo.org
|
5
5
|
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
6
6
|
###############
|
7
7
|
|
@@ -14,13 +14,19 @@ Microsoft:
|
|
14
14
|
regex: 'Xbox'
|
15
15
|
device: 'console'
|
16
16
|
models:
|
17
|
+
- regex: 'Xbox Series X'
|
18
|
+
model: 'Xbox Series X'
|
19
|
+
- regex: 'Xbox One X'
|
20
|
+
model: 'Xbox One X'
|
17
21
|
- regex: 'Xbox One'
|
18
22
|
model: 'Xbox One'
|
23
|
+
- regex: 'XBOX_ONE_ED'
|
24
|
+
model: 'Xbox One S'
|
19
25
|
- regex: 'Xbox'
|
20
26
|
model: 'Xbox 360'
|
21
27
|
|
22
28
|
Nintendo:
|
23
|
-
regex: 'Nintendo (([3]?DS[i]?)|Wii[U]
|
29
|
+
regex: 'Nintendo (([3]?DS[i]?)|Wii[U]?|Switch)'
|
24
30
|
device: 'console'
|
25
31
|
model: '$1'
|
26
32
|
|
@@ -35,6 +41,6 @@ Sega:
|
|
35
41
|
model: 'Dreamcast'
|
36
42
|
|
37
43
|
Sony:
|
38
|
-
regex: 'PlayStation (3|4|Portable|Vita)'
|
44
|
+
regex: 'PlayStation (3|4 Pro|4|Portable|Vita)'
|
39
45
|
device: 'console'
|
40
46
|
model: 'PlayStation $1'
|