device_detector 1.0.0 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +58 -4
- data/README.md +57 -21
- data/lib/device_detector/bot.rb +2 -2
- data/lib/device_detector/browser.rb +691 -0
- data/lib/device_detector/client.rb +11 -2
- data/lib/device_detector/client_hint.rb +249 -0
- data/lib/device_detector/device.rb +1954 -23
- data/lib/device_detector/memory_cache.rb +26 -19
- 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 +289 -112
- data/lib/device_detector/parser.rb +49 -13
- data/lib/device_detector/vendor_fragment.rb +25 -0
- data/lib/device_detector/version.rb +3 -1
- data/lib/device_detector/version_extractor.rb +29 -2
- data/lib/device_detector.rb +192 -44
- data/regexes/bots.yml +3399 -91
- data/regexes/client/browser_engine.yml +28 -4
- data/regexes/client/browsers.yml +2697 -408
- data/regexes/client/feed_readers.yml +60 -22
- data/regexes/client/hints/apps.yml +150 -0
- data/regexes/client/hints/browsers.yml +292 -0
- data/regexes/client/libraries.yml +598 -4
- data/regexes/client/mediaplayers.yml +110 -5
- data/regexes/client/mobile_apps.yml +2451 -14
- data/regexes/client/pim.yml +128 -3
- data/regexes/device/cameras.yml +6 -6
- data/regexes/device/car_browsers.yml +39 -3
- data/regexes/device/consoles.yml +40 -6
- data/regexes/device/mobiles.yml +38844 -2907
- data/regexes/device/notebooks.yml +127 -0
- data/regexes/device/portable_media_player.yml +75 -12
- data/regexes/device/shell_tv.yml +145 -0
- data/regexes/device/televisions.yml +981 -40
- data/regexes/oss.yml +1560 -311
- data/regexes/vendorfragments.yml +6 -2
- metadata +31 -105
- data/.gitignore +0 -14
- data/.travis.yml +0 -18
- data/Gemfile +0 -8
- data/Rakefile +0 -79
- data/device_detector.gemspec +0 -26
- data/spec/device_detector/bot_fixtures_spec.rb +0 -30
- data/spec/device_detector/client_fixtures_spec.rb +0 -31
- data/spec/device_detector/concrete_user_agent_spec.rb +0 -136
- data/spec/device_detector/detector_fixtures_spec.rb +0 -60
- data/spec/device_detector/device_fixtures_spec.rb +0 -36
- data/spec/device_detector/device_spec.rb +0 -151
- data/spec/device_detector/memory_cache_spec.rb +0 -116
- data/spec/device_detector/model_extractor_spec.rb +0 -63
- data/spec/device_detector/os_fixtures_spec.rb +0 -26
- data/spec/device_detector/version_extractor_spec.rb +0 -80
- data/spec/device_detector_spec.rb +0 -198
- data/spec/fixtures/client/browser.yml +0 -1313
- data/spec/fixtures/client/feed_reader.yml +0 -187
- data/spec/fixtures/client/library.yml +0 -84
- data/spec/fixtures/client/mediaplayer.yml +0 -168
- data/spec/fixtures/client/mobile_app.yml +0 -30
- data/spec/fixtures/client/pim.yml +0 -96
- data/spec/fixtures/detector/bots.yml +0 -2418
- data/spec/fixtures/detector/camera.yml +0 -115
- data/spec/fixtures/detector/car_browser.yml +0 -20
- data/spec/fixtures/detector/console.yml +0 -267
- data/spec/fixtures/detector/desktop.yml +0 -4828
- data/spec/fixtures/detector/feature_phone.yml +0 -782
- data/spec/fixtures/detector/feed_reader.yml +0 -486
- data/spec/fixtures/detector/mediaplayer.yml +0 -179
- data/spec/fixtures/detector/mobile_apps.yml +0 -149
- data/spec/fixtures/detector/phablet.yml +0 -2140
- data/spec/fixtures/detector/portable_media_player.yml +0 -153
- data/spec/fixtures/detector/smart_display.yml +0 -58
- data/spec/fixtures/detector/smartphone-1.yml +0 -9469
- data/spec/fixtures/detector/smartphone-2.yml +0 -9414
- data/spec/fixtures/detector/smartphone-3.yml +0 -9396
- data/spec/fixtures/detector/smartphone-4.yml +0 -5742
- data/spec/fixtures/detector/smartphone.yml +0 -9411
- data/spec/fixtures/detector/tablet-1.yml +0 -9495
- data/spec/fixtures/detector/tablet-2.yml +0 -248
- data/spec/fixtures/detector/tablet.yml +0 -9484
- data/spec/fixtures/detector/tv.yml +0 -2582
- data/spec/fixtures/detector/unknown.yml +0 -3196
- data/spec/fixtures/device/camera.yml +0 -18
- data/spec/fixtures/device/car_browser.yml +0 -6
- data/spec/fixtures/device/console.yml +0 -78
- data/spec/fixtures/parser/oss.yml +0 -800
- data/spec/fixtures/parser/vendorfragments.yml +0 -162
- data/spec/spec_helper.rb +0 -9
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
|
|
|
@@ -9,14 +9,29 @@
|
|
|
9
9
|
name: 'Outlook Express'
|
|
10
10
|
version: '$1'
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
# Outlook https://apps.apple.com/ru/app/microsoft-outlook/id951937596
|
|
13
|
+
- regex: '^Outlook-iOS/(?:.+\((\d+[\.\d]+)\)$)?'
|
|
13
14
|
name: 'Microsoft Outlook'
|
|
14
15
|
version: '$1'
|
|
15
16
|
|
|
17
|
+
- regex: '(?:(?:Microsoft )?Outlook|MacOutlook)(?:[/ ](\d+[\.\d]+))?'
|
|
18
|
+
name: 'Microsoft Outlook'
|
|
19
|
+
version: '$1'
|
|
20
|
+
|
|
21
|
+
# Default Mail Client for Windows
|
|
22
|
+
- regex: 'WindowsMail(?:/(\d+[\.\d]+))'
|
|
23
|
+
name: 'Windows Mail'
|
|
24
|
+
version: '$1'
|
|
25
|
+
|
|
16
26
|
- regex: '(?:Thunderbird|Icedove|Shredder)(?:/(\d+[\.\d]+))?'
|
|
17
27
|
name: 'Thunderbird'
|
|
18
28
|
version: '$1'
|
|
19
29
|
|
|
30
|
+
# Spicebird (http://www.spicebird.org/)
|
|
31
|
+
- regex: 'Spicebird/(\d+\.[\.\d]+)'
|
|
32
|
+
name: 'Spicebird'
|
|
33
|
+
version: '$1'
|
|
34
|
+
|
|
20
35
|
- regex: 'Airmail(?: (\d+[\.\d]+))?'
|
|
21
36
|
name: 'Airmail'
|
|
22
37
|
version: '$1'
|
|
@@ -39,4 +54,114 @@
|
|
|
39
54
|
|
|
40
55
|
- regex: 'The Bat!(?: Voyager)?(?:[/ ](\d+[\.\d]+))?'
|
|
41
56
|
name: 'The Bat!'
|
|
42
|
-
version: '$1'
|
|
57
|
+
version: '$1'
|
|
58
|
+
|
|
59
|
+
- regex: 'DAVdroid(?:/(\d+[\.\d]+))?'
|
|
60
|
+
name: 'DAVdroid'
|
|
61
|
+
version: '$1'
|
|
62
|
+
|
|
63
|
+
# SeaMonkey
|
|
64
|
+
- regex: '(?:SeaMonkey|Iceape)(?:/(\d+[\.\d]+))?'
|
|
65
|
+
name: 'SeaMonkey'
|
|
66
|
+
version: '$1'
|
|
67
|
+
|
|
68
|
+
# Live5ch
|
|
69
|
+
- regex: 'Live5ch/(\d+[\.\d]+)'
|
|
70
|
+
name: 'Live5ch'
|
|
71
|
+
version: '$1'
|
|
72
|
+
|
|
73
|
+
- regex: 'JaneView/'
|
|
74
|
+
name: 'JaneView'
|
|
75
|
+
version: ''
|
|
76
|
+
|
|
77
|
+
- regex: 'BathyScaphe/'
|
|
78
|
+
name: 'BathyScaphe'
|
|
79
|
+
version: ''
|
|
80
|
+
|
|
81
|
+
# Raindrop.io (https://raindrop.io/)
|
|
82
|
+
- regex: 'Raindrop\.io/(\d+[\.\d]+)'
|
|
83
|
+
name: 'Raindrop.io'
|
|
84
|
+
version: '$1'
|
|
85
|
+
|
|
86
|
+
# Franz (https://meetfranz.com/)
|
|
87
|
+
- regex: 'Franz/(\d+[\.\d]+)'
|
|
88
|
+
name: 'Franz'
|
|
89
|
+
version: '$1'
|
|
90
|
+
|
|
91
|
+
# Mailspring (https://www.electronjs.org/apps/mailspring)
|
|
92
|
+
- regex: 'Mailspring/(\d+[\.\d]+)'
|
|
93
|
+
name: 'Mailspring'
|
|
94
|
+
version: '$1'
|
|
95
|
+
|
|
96
|
+
# Notion (https://www.notion.so/)
|
|
97
|
+
- regex: 'Notion/(\d+[\.\d]+)'
|
|
98
|
+
name: 'Notion'
|
|
99
|
+
version: '$1'
|
|
100
|
+
|
|
101
|
+
# Basecamp (https://basecamp.com/)
|
|
102
|
+
- regex: 'Basecamp[0-9]/?(\d+[\.\d]+)'
|
|
103
|
+
name: 'Basecamp'
|
|
104
|
+
version: '$1'
|
|
105
|
+
|
|
106
|
+
# Evernote (https://evernote.com/)
|
|
107
|
+
- regex: 'Evernote/?(\d+[\.\d]+)'
|
|
108
|
+
name: 'Evernote'
|
|
109
|
+
version: '$1'
|
|
110
|
+
|
|
111
|
+
# Rambox Pro (https://rambox.app/)
|
|
112
|
+
- regex: 'ramboxpro/(\d+\.[\.\d]+)?'
|
|
113
|
+
name: 'Rambox Pro'
|
|
114
|
+
version: '$1'
|
|
115
|
+
|
|
116
|
+
# Mailbird (https://www.getmailbird.com/)
|
|
117
|
+
- regex: 'Mailbird/(\d+\.[\.\d]+)/'
|
|
118
|
+
name: 'Mailbird'
|
|
119
|
+
version: '$1'
|
|
120
|
+
|
|
121
|
+
# Yahoo Mail (https://apps.apple.com/us/app/yahoo-mail-organised-email/id577586159)
|
|
122
|
+
- regex: 'Yahoo%20Mail'
|
|
123
|
+
name: 'Yahoo Mail'
|
|
124
|
+
version: ''
|
|
125
|
+
|
|
126
|
+
# Yahoo! Mail (https://play.google.com/store/apps/details?id=jp.co.yahoo.android.ymail | https://apps.apple.com/jp/app/yahoo-%E3%83%A1%E3%83%BC%E3%83%AB/id669931877)
|
|
127
|
+
- regex: 'jp.co.yahoo.ymail/([\d\.]+)'
|
|
128
|
+
name: 'Yahoo! Mail'
|
|
129
|
+
version: '$1'
|
|
130
|
+
|
|
131
|
+
# eM Client (https://emclient.com/)
|
|
132
|
+
- regex: 'eM ?Client/(\d+\.[\.\d]+)'
|
|
133
|
+
name: 'eM Client'
|
|
134
|
+
version: '$1'
|
|
135
|
+
|
|
136
|
+
# NAVER Mail (https://play.google.com/store/apps/details?id=com.nhn.android.mail)
|
|
137
|
+
- regex: 'NaverMailApp/(\d+\.[\.\d]+)'
|
|
138
|
+
name: 'NAVER Mail'
|
|
139
|
+
version: '$1'
|
|
140
|
+
|
|
141
|
+
- regex: '^Mail/([\d\.]+)'
|
|
142
|
+
name: 'Apple Mail'
|
|
143
|
+
version: '$1'
|
|
144
|
+
|
|
145
|
+
# Foxmail (https://www.foxmail.com/)
|
|
146
|
+
- regex: 'Foxmail/(\d+[\.\d]+)'
|
|
147
|
+
name: 'Foxmail'
|
|
148
|
+
version: '$1'
|
|
149
|
+
|
|
150
|
+
# Mail Master (https://apps.apple.com/mw/app/mail-master-by-netease/id897003024)
|
|
151
|
+
- regex: 'MailMaster(?:PC)?/(\d+[\.\d]+)'
|
|
152
|
+
name: 'Mail Master'
|
|
153
|
+
version: '$1'
|
|
154
|
+
|
|
155
|
+
# BlueMail (https://bluemail.me/)
|
|
156
|
+
- regex: 'BlueMail/(\d+[\.\d]+)'
|
|
157
|
+
name: 'BlueMail'
|
|
158
|
+
version: '$1'
|
|
159
|
+
|
|
160
|
+
- regex: 'mailapp/(\d+\.[\.\d]+)'
|
|
161
|
+
name: 'mailapp'
|
|
162
|
+
version: '$1'
|
|
163
|
+
|
|
164
|
+
# Gmail
|
|
165
|
+
- regex: 'Android-Gmail'
|
|
166
|
+
name: 'Gmail'
|
|
167
|
+
version: ''
|
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,48 @@
|
|
|
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
|
+
# BMW (https://www.bmw.com/)
|
|
9
|
+
BMW:
|
|
10
|
+
regex: 'AFTLBT962E2(?:[);/ ]|$)'
|
|
11
|
+
device: 'car browser'
|
|
12
|
+
models:
|
|
13
|
+
- regex: 'AFTLBT962E2(?:[);/ ]|$)'
|
|
14
|
+
model: 'Car (2022)'
|
|
15
|
+
|
|
16
|
+
# Jeep (https://www.jeep.com/)
|
|
17
|
+
Jeep:
|
|
18
|
+
regex: 'AFTLFT962X3(?:[);/ ]|$)'
|
|
19
|
+
device: 'car browser'
|
|
20
|
+
models:
|
|
21
|
+
- regex: 'AFTLFT962X3(?:[);/ ]|$)'
|
|
22
|
+
model: 'Wagoneer'
|
|
23
|
+
|
|
8
24
|
# Tesla Model S
|
|
9
25
|
Tesla:
|
|
10
|
-
regex: 'QtCarBrowser'
|
|
26
|
+
regex: '(?:Tesla/(?:(?:develop|feature|terminal-das-fsd-eap)-)?[0-9.]+|QtCarBrowser)'
|
|
27
|
+
device: 'car browser'
|
|
28
|
+
models:
|
|
29
|
+
- regex: 'QtCarBrowser'
|
|
30
|
+
model: 'Model S'
|
|
31
|
+
- regex: 'Tesla/[0-9.]+'
|
|
32
|
+
model: ''
|
|
33
|
+
|
|
34
|
+
# Mac Audio
|
|
35
|
+
MAC AUDIO:
|
|
36
|
+
regex: 'Mac Audio Spro'
|
|
37
|
+
device: 'car browser'
|
|
38
|
+
models:
|
|
39
|
+
- regex: 'Spro'
|
|
40
|
+
model: 'S Pro'
|
|
41
|
+
|
|
42
|
+
# Topway
|
|
43
|
+
Topway:
|
|
44
|
+
regex: 'sp9853i_1h10_vmm'
|
|
11
45
|
device: 'car browser'
|
|
12
|
-
|
|
46
|
+
models:
|
|
47
|
+
- regex: 'sp9853i_1h10_vmm'
|
|
48
|
+
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|GameBoy)'
|
|
24
30
|
device: 'console'
|
|
25
31
|
model: '$1'
|
|
26
32
|
|
|
@@ -29,12 +35,40 @@ OUYA:
|
|
|
29
35
|
device: 'console'
|
|
30
36
|
model: 'OUYA'
|
|
31
37
|
|
|
38
|
+
Sanyo:
|
|
39
|
+
regex: 'Aplix_SANYO'
|
|
40
|
+
device: 'console'
|
|
41
|
+
model: '3DO TRY'
|
|
42
|
+
|
|
32
43
|
Sega:
|
|
33
|
-
regex: 'Dreamcast'
|
|
44
|
+
regex: 'Dreamcast|Aplix_SEGASATURN'
|
|
45
|
+
device: 'console'
|
|
46
|
+
models:
|
|
47
|
+
- regex: 'Dreamcast'
|
|
48
|
+
model: 'Dreamcast'
|
|
49
|
+
- regex: 'Aplix_SEGASATURN'
|
|
50
|
+
model: 'Saturn'
|
|
51
|
+
|
|
52
|
+
JXD:
|
|
53
|
+
regex: 'JXD_S601WIFI'
|
|
34
54
|
device: 'console'
|
|
35
|
-
model: '
|
|
55
|
+
model: 'S601 WiFi'
|
|
36
56
|
|
|
37
57
|
Sony:
|
|
38
|
-
regex: 'PlayStation (
|
|
58
|
+
regex: '(?:PlayStation ?(4 Pro|[2-5]|Portable|Vita)|sony_tv;ps5;|\(PS3\))'
|
|
59
|
+
device: 'console'
|
|
60
|
+
models:
|
|
61
|
+
- regex: 'sony_tv;ps5;'
|
|
62
|
+
model: 'PlayStation 5'
|
|
63
|
+
- regex: 'PlayStation 4 PRO'
|
|
64
|
+
model: 'PlayStation 4 Pro'
|
|
65
|
+
- regex: '\(PS3\)'
|
|
66
|
+
model: 'PlayStation 3'
|
|
67
|
+
- regex: 'PlayStation ?(4 Pro|[2-5]|Portable|Vita)'
|
|
68
|
+
model: 'PlayStation $1'
|
|
69
|
+
|
|
70
|
+
# Retroid Pocket (www.goretroid.com)
|
|
71
|
+
Retroid Pocket:
|
|
72
|
+
regex: 'Retroid Pocket 2(?:Plus|\+)'
|
|
39
73
|
device: 'console'
|
|
40
|
-
model: '
|
|
74
|
+
model: '2 Plus'
|