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
@@ -3,19 +3,17 @@
|
|
3
3
|
user_agent: Mozilla/5.0 (Linux; Android 4.1.1; ARCHOS GAMEPAD Build/JRO03H) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19
|
4
4
|
os:
|
5
5
|
name: Android
|
6
|
-
short_name: AND
|
7
6
|
version: "4.1.1"
|
8
7
|
platform: ""
|
9
8
|
client:
|
10
9
|
type: browser
|
11
10
|
name: Chrome
|
12
|
-
short_name: CH
|
13
11
|
version: "18.0.1025.166"
|
14
12
|
engine: WebKit
|
15
13
|
engine_version: "535.19"
|
16
14
|
device:
|
17
15
|
type: console
|
18
|
-
brand:
|
16
|
+
brand: Archos
|
19
17
|
model: Gamepad
|
20
18
|
os_family: Android
|
21
19
|
browser_family: Chrome
|
@@ -23,19 +21,17 @@
|
|
23
21
|
user_agent: Mozilla/5.0 (Linux; U; Android 4.2.2; fr-fr; ARCHOS GAMEPAD2 Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
|
24
22
|
os:
|
25
23
|
name: Android
|
26
|
-
short_name: AND
|
27
24
|
version: "4.2.2"
|
28
25
|
platform: ""
|
29
26
|
client:
|
30
27
|
type: browser
|
31
28
|
name: Android Browser
|
32
|
-
short_name: AN
|
33
29
|
version: ""
|
34
30
|
engine: WebKit
|
35
31
|
engine_version: "534.30"
|
36
32
|
device:
|
37
33
|
type: console
|
38
|
-
brand:
|
34
|
+
brand: Archos
|
39
35
|
model: Gamepad 2
|
40
36
|
os_family: Android
|
41
37
|
browser_family: Android Browser
|
@@ -43,19 +39,17 @@
|
|
43
39
|
user_agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; Xbox)
|
44
40
|
os:
|
45
41
|
name: Windows
|
46
|
-
short_name: WIN
|
47
42
|
version: "7"
|
48
43
|
platform: ""
|
49
44
|
client:
|
50
45
|
type: browser
|
51
46
|
name: Internet Explorer
|
52
|
-
short_name: IE
|
53
47
|
version: "9.0"
|
54
48
|
engine: Trident
|
55
49
|
engine_version: "5.0"
|
56
50
|
device:
|
57
51
|
type: console
|
58
|
-
brand:
|
52
|
+
brand: Microsoft
|
59
53
|
model: Xbox 360
|
60
54
|
os_family: Windows
|
61
55
|
browser_family: Internet Explorer
|
@@ -63,19 +57,17 @@
|
|
63
57
|
user_agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; Xbox; Xbox One)
|
64
58
|
os:
|
65
59
|
name: Windows
|
66
|
-
short_name: WIN
|
67
60
|
version: "8"
|
68
61
|
platform: ""
|
69
62
|
client:
|
70
63
|
type: browser
|
71
64
|
name: Internet Explorer
|
72
|
-
short_name: IE
|
73
65
|
version: "10.0"
|
74
66
|
engine: Trident
|
75
67
|
engine_version: "6.0"
|
76
68
|
device:
|
77
69
|
type: console
|
78
|
-
brand:
|
70
|
+
brand: Microsoft
|
79
71
|
model: Xbox One
|
80
72
|
os_family: Windows
|
81
73
|
browser_family: Internet Explorer
|
@@ -83,19 +75,17 @@
|
|
83
75
|
user_agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; Xbox; Xbox One)
|
84
76
|
os:
|
85
77
|
name: Windows Phone
|
86
|
-
short_name: WPH
|
87
78
|
version: "8.0"
|
88
79
|
platform: ""
|
89
80
|
client:
|
90
81
|
type: browser
|
91
82
|
name: IE Mobile
|
92
|
-
short_name: IM
|
93
83
|
version: "10.0"
|
94
84
|
engine: Trident
|
95
85
|
engine_version: "6.0"
|
96
86
|
device:
|
97
87
|
type: console
|
98
|
-
brand:
|
88
|
+
brand: Microsoft
|
99
89
|
model: Xbox One
|
100
90
|
os_family: Windows Mobile
|
101
91
|
browser_family: Internet Explorer
|
@@ -103,19 +93,17 @@
|
|
103
93
|
user_agent: Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7498.EU
|
104
94
|
os:
|
105
95
|
name: Nintendo Mobile
|
106
|
-
short_name: NDS
|
107
96
|
version: "3DS"
|
108
97
|
platform: ""
|
109
98
|
client:
|
110
99
|
type: browser
|
111
100
|
name: NetFront
|
112
|
-
short_name: NF
|
113
101
|
version: ""
|
114
102
|
engine: ""
|
115
103
|
engine_version: ""
|
116
104
|
device:
|
117
105
|
type: console
|
118
|
-
brand:
|
106
|
+
brand: Nintendo
|
119
107
|
model: 3DS
|
120
108
|
os_family: Mobile Gaming Console
|
121
109
|
browser_family: NetFront
|
@@ -123,39 +111,53 @@
|
|
123
111
|
user_agent: Bunjalloo/0.7.6(Nintendo DS;U;en)
|
124
112
|
os:
|
125
113
|
name: Nintendo Mobile
|
126
|
-
short_name: NDS
|
127
114
|
version: "DS"
|
128
115
|
platform: ""
|
129
116
|
client:
|
130
117
|
type: browser
|
131
118
|
name: Bunjalloo
|
132
|
-
short_name: BJ
|
133
119
|
version: "0.7.6"
|
134
120
|
engine: ""
|
135
121
|
engine_version: ""
|
136
122
|
device:
|
137
123
|
type: console
|
138
|
-
brand:
|
124
|
+
brand: Nintendo
|
139
125
|
model: DS
|
140
126
|
os_family: Mobile Gaming Console
|
141
127
|
browser_family: Unknown
|
128
|
+
-
|
129
|
+
user_agent: Mozilla/5.0 (Nintendo Switch; WifiWebAuthApplet) AppleWebKit/601.6 (KHTML, like Gecko) NF/4.0.0.7.9 NintendoBrowser/5.1.0.15785
|
130
|
+
os:
|
131
|
+
name: Nintendo
|
132
|
+
version: "Switch"
|
133
|
+
platform: ""
|
134
|
+
client:
|
135
|
+
type: browser
|
136
|
+
name: NetFront
|
137
|
+
version: ""
|
138
|
+
engine: WebKit
|
139
|
+
engine_version: "601.6"
|
140
|
+
device:
|
141
|
+
type: console
|
142
|
+
brand: Nintendo
|
143
|
+
model: Switch
|
144
|
+
os_family: Gaming Console
|
145
|
+
browser_family: NetFront
|
142
146
|
-
|
143
147
|
user_agent: Opera/9.30 (Nintendo Wii; U; ; 3642; en)
|
144
148
|
os:
|
145
149
|
name: Nintendo
|
146
|
-
short_name: WII
|
147
150
|
version: "Wii"
|
148
151
|
platform: ""
|
149
152
|
client:
|
150
153
|
type: browser
|
151
154
|
name: Opera
|
152
|
-
short_name: OP
|
153
155
|
version: "9.30"
|
154
156
|
engine: Presto
|
155
157
|
engine_version: ""
|
156
158
|
device:
|
157
159
|
type: console
|
158
|
-
brand:
|
160
|
+
brand: Nintendo
|
159
161
|
model: Wii
|
160
162
|
os_family: Gaming Console
|
161
163
|
browser_family: Opera
|
@@ -163,19 +165,17 @@
|
|
163
165
|
user_agent: Mozilla/5.0 (Nintendo WiiU) AppleWebKit/534.52 (KHTML, like Gecko) NX/2.1.0.8.21 NintendoBrowser/1.0.0.7494.US
|
164
166
|
os:
|
165
167
|
name: Nintendo
|
166
|
-
short_name: WII
|
167
168
|
version: "Wii"
|
168
169
|
platform: ""
|
169
170
|
client:
|
170
171
|
type: browser
|
171
172
|
name: NetFront
|
172
|
-
short_name: NF
|
173
173
|
version: ""
|
174
174
|
engine: WebKit
|
175
175
|
engine_version: "534.52"
|
176
176
|
device:
|
177
177
|
type: console
|
178
|
-
brand:
|
178
|
+
brand: Nintendo
|
179
179
|
model: WiiU
|
180
180
|
os_family: Gaming Console
|
181
181
|
browser_family: NetFront
|
@@ -183,19 +183,17 @@
|
|
183
183
|
user_agent: Mozilla/5.0 (Linux; U; Android OUYA 4.1.2; en-us; OUYA Build/JZO54L-OUYA) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
|
184
184
|
os:
|
185
185
|
name: Android
|
186
|
-
short_name: AND
|
187
186
|
version: "4.1.2"
|
188
187
|
platform: ""
|
189
188
|
client:
|
190
189
|
type: browser
|
191
190
|
name: Android Browser
|
192
|
-
short_name: AN
|
193
191
|
version: ""
|
194
192
|
engine: WebKit
|
195
193
|
engine_version: "534.30"
|
196
194
|
device:
|
197
195
|
type: console
|
198
|
-
brand:
|
196
|
+
brand: OUYA
|
199
197
|
model: OUYA
|
200
198
|
os_family: Android
|
201
199
|
browser_family: Android Browser
|
@@ -203,19 +201,17 @@
|
|
203
201
|
user_agent: Mozilla/5.0 (PLAYSTATION 3 4.46) AppleWebKit/531.22.8 (KHTML, like Gecko)
|
204
202
|
os:
|
205
203
|
name: PlayStation
|
206
|
-
short_name: PS3
|
207
204
|
version: "3"
|
208
205
|
platform: ""
|
209
206
|
client:
|
210
207
|
type: browser
|
211
208
|
name: NetFront
|
212
|
-
short_name: NF
|
213
209
|
version: ""
|
214
210
|
engine: WebKit
|
215
211
|
engine_version: "531.22.8"
|
216
212
|
device:
|
217
213
|
type: console
|
218
|
-
brand:
|
214
|
+
brand: Sony
|
219
215
|
model: PlayStation 3
|
220
216
|
os_family: Gaming Console
|
221
217
|
browser_family: NetFront
|
@@ -223,39 +219,53 @@
|
|
223
219
|
user_agent: Mozilla/5.0 (PlayStation 4 1.52) AppleWebKit/536.26 (KHTML, like Gecko)
|
224
220
|
os:
|
225
221
|
name: PlayStation
|
226
|
-
short_name: PS3
|
227
222
|
version: "4"
|
228
223
|
platform: ""
|
229
224
|
client:
|
230
225
|
type: browser
|
231
226
|
name: NetFront
|
232
|
-
short_name: NF
|
233
227
|
version: ""
|
234
228
|
engine: WebKit
|
235
229
|
engine_version: "536.26"
|
236
230
|
device:
|
237
231
|
type: console
|
238
|
-
brand:
|
232
|
+
brand: Sony
|
239
233
|
model: PlayStation 4
|
240
234
|
os_family: Gaming Console
|
241
235
|
browser_family: NetFront
|
236
|
+
-
|
237
|
+
user_agent: Mozilla/5.0 (PlayStation 4 Pro 5.0)
|
238
|
+
os:
|
239
|
+
name: PlayStation
|
240
|
+
version: "4"
|
241
|
+
platform: ""
|
242
|
+
client:
|
243
|
+
type: browser
|
244
|
+
name: NetFront
|
245
|
+
version: ""
|
246
|
+
engine: ""
|
247
|
+
engine_version: ""
|
248
|
+
device:
|
249
|
+
type: console
|
250
|
+
brand: Sony
|
251
|
+
model: PlayStation 4 Pro
|
252
|
+
os_family: Gaming Console
|
253
|
+
browser_family: NetFront
|
242
254
|
-
|
243
255
|
user_agent: Mozilla/4.0 (PlayStation Portable); 2.00)
|
244
256
|
os:
|
245
257
|
name: PlayStation Portable
|
246
|
-
short_name: PSP
|
247
258
|
version: "Portable"
|
248
259
|
platform: ""
|
249
260
|
client:
|
250
261
|
type: browser
|
251
262
|
name: NetFront
|
252
|
-
short_name: NF
|
253
263
|
version: ""
|
254
264
|
engine: ""
|
255
265
|
engine_version: ""
|
256
266
|
device:
|
257
267
|
type: console
|
258
|
-
brand:
|
268
|
+
brand: Sony
|
259
269
|
model: PlayStation Portable
|
260
270
|
os_family: Mobile Gaming Console
|
261
271
|
browser_family: NetFront
|
@@ -263,19 +273,71 @@
|
|
263
273
|
user_agent: Mozilla/5.0 (PlayStation Vita 3.01) AppleWebKit/536.26 (KHTML, like Gecko) Silk/3.2
|
264
274
|
os:
|
265
275
|
name: PlayStation Portable
|
266
|
-
short_name: PSP
|
267
276
|
version: "Vita"
|
268
277
|
platform: ""
|
269
278
|
client:
|
270
279
|
type: browser
|
271
280
|
name: Mobile Silk
|
272
|
-
short_name: MS
|
273
281
|
version: "3.2"
|
274
|
-
engine:
|
275
|
-
engine_version: ""
|
282
|
+
engine: WebKit
|
283
|
+
engine_version: "536.26"
|
276
284
|
device:
|
277
285
|
type: console
|
278
|
-
brand:
|
286
|
+
brand: Sony
|
279
287
|
model: PlayStation Vita
|
280
288
|
os_family: Mobile Gaming Console
|
281
|
-
browser_family:
|
289
|
+
browser_family: Chrome
|
290
|
+
-
|
291
|
+
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; XBOX_ONE_ED) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393
|
292
|
+
os:
|
293
|
+
name: Windows
|
294
|
+
version: "10"
|
295
|
+
platform: x64
|
296
|
+
client:
|
297
|
+
type: browser
|
298
|
+
name: Microsoft Edge
|
299
|
+
version: "14.14393"
|
300
|
+
engine: Edge
|
301
|
+
engine_version: "14.14393"
|
302
|
+
device:
|
303
|
+
type: console
|
304
|
+
brand: Microsoft
|
305
|
+
model: Xbox One S
|
306
|
+
os_family: Windows
|
307
|
+
browser_family: Internet Explorer
|
308
|
+
-
|
309
|
+
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; Xbox; Xbox One X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36 Edge/20.02
|
310
|
+
os:
|
311
|
+
name: Windows
|
312
|
+
version: "10"
|
313
|
+
platform: x64
|
314
|
+
client:
|
315
|
+
type: browser
|
316
|
+
name: Microsoft Edge
|
317
|
+
version: "20.02"
|
318
|
+
engine: Edge
|
319
|
+
engine_version: "20.02"
|
320
|
+
device:
|
321
|
+
type: console
|
322
|
+
brand: Microsoft
|
323
|
+
model: Xbox One X
|
324
|
+
os_family: Windows
|
325
|
+
browser_family: Internet Explorer
|
326
|
+
-
|
327
|
+
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; Xbox; Xbox Series X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36 Edge/20.02
|
328
|
+
os:
|
329
|
+
name: Windows
|
330
|
+
version: "10"
|
331
|
+
platform: x64
|
332
|
+
client:
|
333
|
+
type: browser
|
334
|
+
name: Microsoft Edge
|
335
|
+
version: "20.02"
|
336
|
+
engine: Edge
|
337
|
+
engine_version: "20.02"
|
338
|
+
device:
|
339
|
+
type: console
|
340
|
+
brand: Microsoft
|
341
|
+
model: Xbox Series X
|
342
|
+
os_family: Windows
|
343
|
+
browser_family: Internet Explorer
|