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
@@ -185,15 +185,3 @@
185
185
  type: feed reader
186
186
  name: Stringer
187
187
  version: ""
188
- -
189
- user_agent: 'Downcast/1241 CFNetwork/673.4 Darwin/13.3.0 (x86_64) (MacBookAir4%2C2)'
190
- client:
191
- type: feed reader
192
- name: Downcast
193
- version: "1241"
194
- -
195
- user_agent: iTunes/10.7 Downcast/2.8.24.1002
196
- client:
197
- type: feed reader
198
- name: Downcast
199
- version: "2.8.24.1002"
@@ -1,199 +1,253 @@
1
1
  ---
2
- -
2
+ -
3
3
  user_agent: Wget/1.10+devel
4
4
  client:
5
5
  type: library
6
6
  name: Wget
7
7
  version: "1.10"
8
- -
8
+ -
9
9
  user_agent: Wget/1.11.4 Red Hat modified
10
10
  client:
11
11
  type: library
12
12
  name: Wget
13
13
  version: "1.11.4"
14
- -
14
+ -
15
15
  user_agent: Wget/ (linux-gnu)
16
16
  client:
17
17
  type: library
18
18
  name: Wget
19
19
  version: ""
20
- -
20
+ -
21
21
  user_agent: curl/7.21.0 (i386-redhat-linux-gnu) libcurl/7.21.0 NSS/3.12.10.0 zlib/1.2.5 libidn/1.18 libssh2/1.2.4
22
22
  client:
23
23
  type: library
24
24
  name: curl
25
25
  version: "7.21.0"
26
- -
26
+ -
27
27
  user_agent: PycURL/7.19.3.1 libcurl/7.26.0 GnuTLS/2.12.20 zlib/1.2.7 libidn/1.25 libssh2/1.4.2 librtmp/2.3
28
28
  client:
29
29
  type: library
30
30
  name: curl
31
31
  version: "7.26.0"
32
- -
32
+ -
33
33
  user_agent: python-requests/1.2.0 CPython/2.7.3 Linux/3.8.0-33-generic
34
34
  client:
35
35
  type: library
36
36
  name: Python Requests
37
37
  version: "1.2.0"
38
- -
38
+ -
39
39
  user_agent: python-requests/1.2.0 CPython/2.7.5 Windows/7
40
40
  client:
41
41
  type: library
42
42
  name: Python Requests
43
43
  version: "1.2.0"
44
- -
44
+ -
45
45
  user_agent: Python-urllib/2.6
46
46
  client:
47
47
  type: library
48
48
  name: Python urllib
49
49
  version: "2.6"
50
- -
50
+ -
51
51
  user_agent: Mozilla/5.0 (Python-urllib2)
52
52
  client:
53
53
  type: library
54
54
  name: Python urllib
55
55
  version: ""
56
- -
56
+ -
57
57
  user_agent: Java/1.7.0_51
58
58
  client:
59
59
  type: library
60
60
  name: Java
61
61
  version: "1.7.0"
62
- -
62
+ -
63
63
  user_agent: Java1.1.4
64
64
  client:
65
65
  type: library
66
66
  name: Java
67
67
  version: "1.1.4"
68
- -
68
+ -
69
69
  user_agent: libwww-perl/5.69
70
70
  client:
71
71
  type: library
72
72
  name: Perl
73
73
  version: "5.69"
74
- -
74
+ -
75
75
  user_agent: perlclient/1.0
76
76
  client:
77
77
  type: library
78
78
  name: Perl
79
79
  version: "1.0"
80
- -
80
+ -
81
81
  user_agent: Guzzle/3.9.3 curl/7.38.0 PHP/5.6.14-0+deb8u1
82
82
  client:
83
83
  type: library
84
84
  name: Guzzle (PHP HTTP Client)
85
85
  version: "3.9.3"
86
- -
86
+ -
87
87
  user_agent: HTTP_Request2/2.3.0 (http://pear.php.net/package/http_request2) PHP/5.3.3
88
88
  client:
89
89
  type: library
90
90
  name: HTTP_Request2
91
91
  version: "2.3.0"
92
- -
92
+ -
93
93
  user_agent: Mechanize/2.7.3 Ruby/1.9.3p551 (http://github.com/sparklemotion/mechanize/)
94
94
  client:
95
95
  type: library
96
96
  name: Mechanize
97
97
  version: "2.7.3"
98
- -
98
+ -
99
99
  user_agent: Python/3.5 aiohttp/1.0.5
100
100
  client:
101
101
  type: library
102
102
  name: aiohttp
103
103
  version: "1.0.5"
104
- -
104
+ -
105
105
  user_agent: Google-HTTP-Java-Client/1.17.0-rc (gzip)
106
106
  client:
107
107
  type: library
108
108
  name: Google HTTP Java Client
109
109
  version: "1.17.0-rc"
110
- -
110
+ -
111
111
  user_agent: WWW-Mechanize/1.73
112
112
  client:
113
113
  type: library
114
114
  name: WWW-Mechanize
115
115
  version: "1.73"
116
- -
116
+ -
117
117
  user_agent: Faraday v0.9.1
118
118
  client:
119
119
  type: library
120
120
  name: Faraday
121
121
  version: "0.9.1"
122
- -
122
+ -
123
123
  user_agent: Go-http-client/1.1
124
124
  client:
125
125
  type: library
126
126
  name: Go-http-client
127
127
  version: "1.1"
128
- -
128
+ -
129
129
  user_agent: Go-http-client/2.0
130
130
  client:
131
131
  type: library
132
132
  name: Go-http-client
133
133
  version: "2.0"
134
- -
134
+ -
135
135
  user_agent: Go 1.1 package http
136
136
  client:
137
137
  type: library
138
138
  name: Go-http-client
139
139
  version: "1.1"
140
- -
140
+ -
141
141
  user_agent: urlgrabber/3.9.1 yum/3.2.29
142
142
  client:
143
143
  type: library
144
144
  name: urlgrabber (yum)
145
145
  version: "3.9.1"
146
- -
146
+ -
147
147
  user_agent: urlgrabber/3.10 yum/3.4.3
148
148
  client:
149
149
  type: library
150
150
  name: urlgrabber (yum)
151
151
  version: "3.10"
152
- -
152
+ -
153
153
  user_agent: libdnf/0.11.1
154
154
  client:
155
155
  type: library
156
156
  name: libdnf
157
157
  version: "0.11.1"
158
- -
158
+ -
159
159
  user_agent: HTTPie/1.0.2
160
160
  client:
161
161
  type: library
162
162
  name: HTTPie
163
163
  version: "1.0.2"
164
- -
164
+ -
165
165
  user_agent: rest-client/2.0.2 (linux-gnu x86_64) ruby/2.5.3p105
166
166
  client:
167
167
  type: library
168
168
  name: REST Client for Ruby
169
169
  version: "2.0.2"
170
- -
170
+ -
171
171
  user_agent: RestSharp/106.2.1.0
172
172
  client:
173
173
  type: library
174
174
  name: RestSharp
175
175
  version: "106.2.1.0"
176
- -
176
+ -
177
177
  user_agent: scalaj-http/2.4.0
178
178
  client:
179
179
  type: library
180
180
  name: ScalaJ HTTP
181
181
  version: "2.4.0"
182
- -
182
+ -
183
183
  user_agent: REST::Client/273
184
184
  client:
185
185
  type: library
186
186
  name: Perl REST::Client
187
187
  version: "273"
188
- -
189
- user_agent: 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'
188
+ -
189
+ user_agent: node-fetch/1.0 (+https://github.com/bitinn/node-fetch)
190
190
  client:
191
191
  type: library
192
192
  name: Node Fetch
193
- version: '1.0'
194
- -
195
- user_agent: 'ReactorNetty/0.9.10.RELEASE'
193
+ version: "1.0"
194
+ -
195
+ user_agent: ReactorNetty/0.9.10.RELEASE
196
196
  client:
197
197
  type: library
198
198
  name: ReactorNetty
199
- version: '0.9.10'
199
+ version: "0.9.10"
200
+ -
201
+ user_agent: PostmanRuntime/7.9.1
202
+ client:
203
+ type: library
204
+ name: Postman Desktop
205
+ version: "7.9.1"
206
+ -
207
+ user_agent: Jakarta Commons-HttpClient/3.1
208
+ client:
209
+ type: library
210
+ name: Jakarta Commons HttpClient
211
+ version: "3.1"
212
+ -
213
+ user_agent: Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)
214
+ client:
215
+ type: library
216
+ name: WinHttp WinHttpRequest
217
+ version: "5"
218
+ -
219
+ user_agent: Embarcadero URI Client/1.0
220
+ client:
221
+ type: library
222
+ name: Embarcadero URI Client
223
+ version: "1.0"
224
+ -
225
+ user_agent: Mikrotik/6.x Fetch
226
+ client:
227
+ type: library
228
+ name: Mikrotik Fetch
229
+ version: "6"
230
+ -
231
+ user_agent: akka-http/10.1.11
232
+ client:
233
+ type: library
234
+ name: Akka HTTP
235
+ version: 10.1.11
236
+ -
237
+ user_agent: BTWebClient/2020(19648)
238
+ client:
239
+ type: library
240
+ name: uTorrent
241
+ version: ""
242
+
243
+ - user_agent: aria2/1.33.1
244
+ client:
245
+ type: library
246
+ name: Aria2
247
+ version: 1.33.1
248
+
249
+ - user_agent: gvfs/1.34.1
250
+ client:
251
+ type: library
252
+ name: gvfs
253
+ version: 1.34.1
@@ -161,3 +161,33 @@
161
161
  type: mediaplayer
162
162
  name: Foobar2000
163
163
  version: "1.3.10"
164
+ -
165
+ user_agent: Linux UPnP/1.0 Sonos/61.1-83220 (ZPS1)
166
+ client:
167
+ type: mediaplayer
168
+ name: SONOS
169
+ version: 61.1
170
+ -
171
+ user_agent: Linux UPnP/1.0 Sonos/57.4-83220 (ZP120)
172
+ client:
173
+ type: mediaplayer
174
+ name: SONOS
175
+ version: 57.4
176
+ -
177
+ user_agent: Linux UPnP/1.0 Sonos/61.1-83220 (ZPS3)
178
+ client:
179
+ type: mediaplayer
180
+ name: SONOS
181
+ version: 61.1
182
+ -
183
+ user_agent: HTC Streaming Player htc / 1.0 / o2_de / 4.2.2
184
+ client:
185
+ type: mediaplayer
186
+ name: HTC Streaming Player
187
+ version: ""
188
+ -
189
+ user_agent: MPlayer 1.1-4.6
190
+ client:
191
+ type: mediaplayer
192
+ name: MPlayer
193
+ version: "1.1"