device_detector 1.0.5 → 1.0.6

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.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -6
  3. data/lib/device_detector/browser.rb +364 -0
  4. data/lib/device_detector/client.rb +8 -0
  5. data/lib/device_detector/device.rb +1124 -4
  6. data/lib/device_detector/os.rb +36 -11
  7. data/lib/device_detector/version.rb +1 -1
  8. data/lib/device_detector/version_extractor.rb +9 -0
  9. data/lib/device_detector.rb +57 -13
  10. data/regexes/bots.yml +551 -58
  11. data/regexes/client/browser_engine.yml +7 -1
  12. data/regexes/client/browsers.yml +594 -71
  13. data/regexes/client/feed_readers.yml +4 -10
  14. data/regexes/client/libraries.yml +47 -2
  15. data/regexes/client/mediaplayers.yml +25 -1
  16. data/regexes/client/mobile_apps.yml +447 -77
  17. data/regexes/client/pim.yml +49 -1
  18. data/regexes/device/cameras.yml +5 -5
  19. data/regexes/device/car_browsers.yml +16 -0
  20. data/regexes/device/consoles.yml +6 -0
  21. data/regexes/device/mobiles.yml +12905 -4561
  22. data/regexes/device/portable_media_player.yml +20 -3
  23. data/regexes/device/shell_tv.yml +117 -0
  24. data/regexes/device/televisions.yml +426 -35
  25. data/regexes/oss.yml +567 -139
  26. data/spec/device_detector/concrete_user_agent_spec.rb +30 -42
  27. data/spec/device_detector/detector_fixtures_spec.rb +9 -5
  28. data/spec/device_detector/device_spec.rb +26 -10
  29. data/spec/fixtures/client/browser.yml +1463 -391
  30. data/spec/fixtures/client/feed_reader.yml +0 -12
  31. data/spec/fixtures/client/library.yml +91 -37
  32. data/spec/fixtures/client/mediaplayer.yml +30 -0
  33. data/spec/fixtures/client/mobile_app.yml +498 -45
  34. data/spec/fixtures/client/pim.yml +60 -0
  35. data/spec/fixtures/detector/bots.yml +1189 -568
  36. data/spec/fixtures/detector/camera.yml +12 -26
  37. data/spec/fixtures/detector/car_browser.yml +151 -15
  38. data/spec/fixtures/detector/console.yml +70 -48
  39. data/spec/fixtures/detector/desktop.yml +2041 -916
  40. data/spec/fixtures/detector/feature_phone.yml +895 -189
  41. data/spec/fixtures/detector/feed_reader.yml +50 -77
  42. data/spec/fixtures/detector/mediaplayer.yml +79 -26
  43. data/spec/fixtures/detector/mobile_apps.yml +726 -72
  44. data/spec/fixtures/detector/peripheral.yml +271 -0
  45. data/spec/fixtures/detector/phablet.yml +3635 -1596
  46. data/spec/fixtures/detector/portable_media_player.yml +355 -46
  47. data/spec/fixtures/detector/smart_display.yml +183 -9
  48. data/spec/fixtures/detector/smart_speaker.yml +13 -8
  49. data/spec/fixtures/detector/smartphone-1.yml +4002 -4286
  50. data/spec/fixtures/detector/smartphone-10.yml +3771 -4763
  51. data/spec/fixtures/detector/smartphone-11.yml +3615 -4692
  52. data/spec/fixtures/detector/smartphone-12.yml +3856 -4764
  53. data/spec/fixtures/detector/smartphone-13.yml +4213 -4713
  54. data/spec/fixtures/detector/smartphone-14.yml +4039 -4497
  55. data/spec/fixtures/detector/smartphone-15.yml +5642 -2956
  56. data/spec/fixtures/detector/smartphone-16.yml +4739 -5082
  57. data/spec/fixtures/detector/smartphone-17.yml +4832 -4275
  58. data/spec/fixtures/detector/smartphone-18.yml +9806 -0
  59. data/spec/fixtures/detector/smartphone-19.yml +9965 -0
  60. data/spec/fixtures/detector/smartphone-2.yml +4842 -2589
  61. data/spec/fixtures/detector/smartphone-20.yml +9710 -0
  62. data/spec/fixtures/detector/smartphone-21.yml +8693 -0
  63. data/spec/fixtures/detector/smartphone-22.yml +10178 -0
  64. data/spec/fixtures/detector/smartphone-23.yml +9453 -0
  65. data/spec/fixtures/detector/smartphone-24.yml +9843 -0
  66. data/spec/fixtures/detector/smartphone-25.yml +9703 -0
  67. data/spec/fixtures/detector/smartphone-26.yml +10007 -0
  68. data/spec/fixtures/detector/smartphone-27.yml +4927 -0
  69. data/spec/fixtures/detector/smartphone-3.yml +4387 -4427
  70. data/spec/fixtures/detector/smartphone-4.yml +3597 -4582
  71. data/spec/fixtures/detector/smartphone-5.yml +4066 -5022
  72. data/spec/fixtures/detector/smartphone-6.yml +3455 -4621
  73. data/spec/fixtures/detector/smartphone-7.yml +3574 -4574
  74. data/spec/fixtures/detector/smartphone-8.yml +4617 -4704
  75. data/spec/fixtures/detector/smartphone-9.yml +4080 -5035
  76. data/spec/fixtures/detector/smartphone.yml +3244 -4234
  77. data/spec/fixtures/detector/tablet-1.yml +4652 -4492
  78. data/spec/fixtures/detector/tablet-2.yml +3515 -4434
  79. data/spec/fixtures/detector/tablet-3.yml +3418 -4351
  80. data/spec/fixtures/detector/tablet-4.yml +5149 -3200
  81. data/spec/fixtures/detector/tablet-5.yml +9273 -0
  82. data/spec/fixtures/detector/tablet-6.yml +4588 -0
  83. data/spec/fixtures/detector/tablet.yml +1621 -2613
  84. data/spec/fixtures/detector/tv-1.yml +2501 -0
  85. data/spec/fixtures/detector/tv.yml +7826 -3114
  86. data/spec/fixtures/detector/unknown.yml +370 -531
  87. data/spec/fixtures/detector/wearable.yml +863 -9
  88. data/spec/fixtures/parser/oss.yml +1350 -21
  89. data/spec/fixtures/parser/vendorfragments.yml +53 -53
  90. metadata +35 -5
@@ -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: AR
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: AR
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: MS
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: MS
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: MS
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: NI
106
+ brand: Nintendo
119
107
  model: 3DS
120
108
  os_family: Mobile Gaming Console
121
109
  browser_family: NetFront
@@ -123,19 +111,17 @@
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: NI
124
+ brand: Nintendo
139
125
  model: DS
140
126
  os_family: Mobile Gaming Console
141
127
  browser_family: Unknown
@@ -143,19 +129,17 @@
143
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
144
130
  os:
145
131
  name: Nintendo
146
- short_name: WII
147
132
  version: "Switch"
148
133
  platform: ""
149
134
  client:
150
135
  type: browser
151
136
  name: NetFront
152
- short_name: NF
153
137
  version: ""
154
138
  engine: WebKit
155
139
  engine_version: "601.6"
156
140
  device:
157
141
  type: console
158
- brand: NI
142
+ brand: Nintendo
159
143
  model: Switch
160
144
  os_family: Gaming Console
161
145
  browser_family: NetFront
@@ -163,19 +147,17 @@
163
147
  user_agent: Opera/9.30 (Nintendo Wii; U; ; 3642; en)
164
148
  os:
165
149
  name: Nintendo
166
- short_name: WII
167
150
  version: "Wii"
168
151
  platform: ""
169
152
  client:
170
153
  type: browser
171
154
  name: Opera
172
- short_name: OP
173
155
  version: "9.30"
174
156
  engine: Presto
175
157
  engine_version: ""
176
158
  device:
177
159
  type: console
178
- brand: NI
160
+ brand: Nintendo
179
161
  model: Wii
180
162
  os_family: Gaming Console
181
163
  browser_family: Opera
@@ -183,19 +165,17 @@
183
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
184
166
  os:
185
167
  name: Nintendo
186
- short_name: WII
187
168
  version: "Wii"
188
169
  platform: ""
189
170
  client:
190
171
  type: browser
191
172
  name: NetFront
192
- short_name: NF
193
173
  version: ""
194
174
  engine: WebKit
195
175
  engine_version: "534.52"
196
176
  device:
197
177
  type: console
198
- brand: NI
178
+ brand: Nintendo
199
179
  model: WiiU
200
180
  os_family: Gaming Console
201
181
  browser_family: NetFront
@@ -203,19 +183,17 @@
203
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
204
184
  os:
205
185
  name: Android
206
- short_name: AND
207
186
  version: "4.1.2"
208
187
  platform: ""
209
188
  client:
210
189
  type: browser
211
190
  name: Android Browser
212
- short_name: AN
213
191
  version: ""
214
192
  engine: WebKit
215
193
  engine_version: "534.30"
216
194
  device:
217
195
  type: console
218
- brand: OU
196
+ brand: OUYA
219
197
  model: OUYA
220
198
  os_family: Android
221
199
  browser_family: Android Browser
@@ -223,19 +201,17 @@
223
201
  user_agent: Mozilla/5.0 (PLAYSTATION 3 4.46) AppleWebKit/531.22.8 (KHTML, like Gecko)
224
202
  os:
225
203
  name: PlayStation
226
- short_name: PS3
227
204
  version: "3"
228
205
  platform: ""
229
206
  client:
230
207
  type: browser
231
208
  name: NetFront
232
- short_name: NF
233
209
  version: ""
234
210
  engine: WebKit
235
211
  engine_version: "531.22.8"
236
212
  device:
237
213
  type: console
238
- brand: SO
214
+ brand: Sony
239
215
  model: PlayStation 3
240
216
  os_family: Gaming Console
241
217
  browser_family: NetFront
@@ -243,19 +219,17 @@
243
219
  user_agent: Mozilla/5.0 (PlayStation 4 1.52) AppleWebKit/536.26 (KHTML, like Gecko)
244
220
  os:
245
221
  name: PlayStation
246
- short_name: PS3
247
222
  version: "4"
248
223
  platform: ""
249
224
  client:
250
225
  type: browser
251
226
  name: NetFront
252
- short_name: NF
253
227
  version: ""
254
228
  engine: WebKit
255
229
  engine_version: "536.26"
256
230
  device:
257
231
  type: console
258
- brand: SO
232
+ brand: Sony
259
233
  model: PlayStation 4
260
234
  os_family: Gaming Console
261
235
  browser_family: NetFront
@@ -263,19 +237,17 @@
263
237
  user_agent: Mozilla/5.0 (PlayStation 4 Pro 5.0)
264
238
  os:
265
239
  name: PlayStation
266
- short_name: PS3
267
240
  version: "4"
268
241
  platform: ""
269
242
  client:
270
243
  type: browser
271
244
  name: NetFront
272
- short_name: NF
273
245
  version: ""
274
246
  engine: ""
275
247
  engine_version: ""
276
248
  device:
277
249
  type: console
278
- brand: SO
250
+ brand: Sony
279
251
  model: PlayStation 4 Pro
280
252
  os_family: Gaming Console
281
253
  browser_family: NetFront
@@ -283,19 +255,17 @@
283
255
  user_agent: Mozilla/4.0 (PlayStation Portable); 2.00)
284
256
  os:
285
257
  name: PlayStation Portable
286
- short_name: PSP
287
258
  version: "Portable"
288
259
  platform: ""
289
260
  client:
290
261
  type: browser
291
262
  name: NetFront
292
- short_name: NF
293
263
  version: ""
294
264
  engine: ""
295
265
  engine_version: ""
296
266
  device:
297
267
  type: console
298
- brand: SO
268
+ brand: Sony
299
269
  model: PlayStation Portable
300
270
  os_family: Mobile Gaming Console
301
271
  browser_family: NetFront
@@ -303,19 +273,71 @@
303
273
  user_agent: Mozilla/5.0 (PlayStation Vita 3.01) AppleWebKit/536.26 (KHTML, like Gecko) Silk/3.2
304
274
  os:
305
275
  name: PlayStation Portable
306
- short_name: PSP
307
276
  version: "Vita"
308
277
  platform: ""
309
278
  client:
310
279
  type: browser
311
280
  name: Mobile Silk
312
- short_name: MS
313
281
  version: "3.2"
314
282
  engine: WebKit
315
283
  engine_version: "536.26"
316
284
  device:
317
285
  type: console
318
- brand: SO
286
+ brand: Sony
319
287
  model: PlayStation Vita
320
288
  os_family: Mobile Gaming Console
321
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