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.
Files changed (89) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +58 -4
  3. data/README.md +57 -21
  4. data/lib/device_detector/bot.rb +2 -2
  5. data/lib/device_detector/browser.rb +691 -0
  6. data/lib/device_detector/client.rb +11 -2
  7. data/lib/device_detector/client_hint.rb +249 -0
  8. data/lib/device_detector/device.rb +1954 -23
  9. data/lib/device_detector/memory_cache.rb +26 -19
  10. data/lib/device_detector/metadata_extractor.rb +7 -8
  11. data/lib/device_detector/model_extractor.rb +3 -3
  12. data/lib/device_detector/name_extractor.rb +2 -2
  13. data/lib/device_detector/os.rb +289 -112
  14. data/lib/device_detector/parser.rb +49 -13
  15. data/lib/device_detector/vendor_fragment.rb +25 -0
  16. data/lib/device_detector/version.rb +3 -1
  17. data/lib/device_detector/version_extractor.rb +29 -2
  18. data/lib/device_detector.rb +192 -44
  19. data/regexes/bots.yml +3399 -91
  20. data/regexes/client/browser_engine.yml +28 -4
  21. data/regexes/client/browsers.yml +2697 -408
  22. data/regexes/client/feed_readers.yml +60 -22
  23. data/regexes/client/hints/apps.yml +150 -0
  24. data/regexes/client/hints/browsers.yml +292 -0
  25. data/regexes/client/libraries.yml +598 -4
  26. data/regexes/client/mediaplayers.yml +110 -5
  27. data/regexes/client/mobile_apps.yml +2451 -14
  28. data/regexes/client/pim.yml +128 -3
  29. data/regexes/device/cameras.yml +6 -6
  30. data/regexes/device/car_browsers.yml +39 -3
  31. data/regexes/device/consoles.yml +40 -6
  32. data/regexes/device/mobiles.yml +38844 -2907
  33. data/regexes/device/notebooks.yml +127 -0
  34. data/regexes/device/portable_media_player.yml +75 -12
  35. data/regexes/device/shell_tv.yml +145 -0
  36. data/regexes/device/televisions.yml +981 -40
  37. data/regexes/oss.yml +1560 -311
  38. data/regexes/vendorfragments.yml +6 -2
  39. metadata +31 -105
  40. data/.gitignore +0 -14
  41. data/.travis.yml +0 -18
  42. data/Gemfile +0 -8
  43. data/Rakefile +0 -79
  44. data/device_detector.gemspec +0 -26
  45. data/spec/device_detector/bot_fixtures_spec.rb +0 -30
  46. data/spec/device_detector/client_fixtures_spec.rb +0 -31
  47. data/spec/device_detector/concrete_user_agent_spec.rb +0 -136
  48. data/spec/device_detector/detector_fixtures_spec.rb +0 -60
  49. data/spec/device_detector/device_fixtures_spec.rb +0 -36
  50. data/spec/device_detector/device_spec.rb +0 -151
  51. data/spec/device_detector/memory_cache_spec.rb +0 -116
  52. data/spec/device_detector/model_extractor_spec.rb +0 -63
  53. data/spec/device_detector/os_fixtures_spec.rb +0 -26
  54. data/spec/device_detector/version_extractor_spec.rb +0 -80
  55. data/spec/device_detector_spec.rb +0 -198
  56. data/spec/fixtures/client/browser.yml +0 -1313
  57. data/spec/fixtures/client/feed_reader.yml +0 -187
  58. data/spec/fixtures/client/library.yml +0 -84
  59. data/spec/fixtures/client/mediaplayer.yml +0 -168
  60. data/spec/fixtures/client/mobile_app.yml +0 -30
  61. data/spec/fixtures/client/pim.yml +0 -96
  62. data/spec/fixtures/detector/bots.yml +0 -2418
  63. data/spec/fixtures/detector/camera.yml +0 -115
  64. data/spec/fixtures/detector/car_browser.yml +0 -20
  65. data/spec/fixtures/detector/console.yml +0 -267
  66. data/spec/fixtures/detector/desktop.yml +0 -4828
  67. data/spec/fixtures/detector/feature_phone.yml +0 -782
  68. data/spec/fixtures/detector/feed_reader.yml +0 -486
  69. data/spec/fixtures/detector/mediaplayer.yml +0 -179
  70. data/spec/fixtures/detector/mobile_apps.yml +0 -149
  71. data/spec/fixtures/detector/phablet.yml +0 -2140
  72. data/spec/fixtures/detector/portable_media_player.yml +0 -153
  73. data/spec/fixtures/detector/smart_display.yml +0 -58
  74. data/spec/fixtures/detector/smartphone-1.yml +0 -9469
  75. data/spec/fixtures/detector/smartphone-2.yml +0 -9414
  76. data/spec/fixtures/detector/smartphone-3.yml +0 -9396
  77. data/spec/fixtures/detector/smartphone-4.yml +0 -5742
  78. data/spec/fixtures/detector/smartphone.yml +0 -9411
  79. data/spec/fixtures/detector/tablet-1.yml +0 -9495
  80. data/spec/fixtures/detector/tablet-2.yml +0 -248
  81. data/spec/fixtures/detector/tablet.yml +0 -9484
  82. data/spec/fixtures/detector/tv.yml +0 -2582
  83. data/spec/fixtures/detector/unknown.yml +0 -3196
  84. data/spec/fixtures/device/camera.yml +0 -18
  85. data/spec/fixtures/device/car_browser.yml +0 -6
  86. data/spec/fixtures/device/console.yml +0 -78
  87. data/spec/fixtures/parser/oss.yml +0 -800
  88. data/spec/fixtures/parser/vendorfragments.yml +0 -162
  89. data/spec/spec_helper.rb +0 -9
@@ -0,0 +1,127 @@
1
+ ###############
2
+ # Device Detector - The Universal Device Detection library for parsing User Agents
3
+ #
4
+ # @link https://matomo.org
5
+ # @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
6
+ ###############
7
+
8
+ Acer:
9
+ regex: 'FBMD/(?:Aspire E5-421G|Z5WAL|One S1003);'
10
+ device: 'desktop'
11
+ models:
12
+ - regex: 'FBMD/Aspire E5-421G;'
13
+ model: 'Aspire E5-421G'
14
+ - regex: 'FBMD/Z5WAL;'
15
+ model: 'Aspire E5-511'
16
+ - regex: 'FBMD/One S1003;'
17
+ model: 'One 10'
18
+
19
+ Asus:
20
+ regex: 'FBMD/(?:K50IN|K54L|T100HAN|T103HAF|UX360CAK|X550LB|X553MA|X555LN|X556UQK);'
21
+ device: 'desktop'
22
+ models:
23
+ - regex: 'FBMD/K50IN;'
24
+ model: 'K50IN'
25
+ - regex: 'FBMD/K54L;'
26
+ model: 'K54L'
27
+ - regex: 'FBMD/T100HAN;'
28
+ model: 'Transformer Book'
29
+ - regex: 'FBMD/T103HAF;'
30
+ model: 'Transformer Mini'
31
+ - regex: 'FBMD/UX360CAK;'
32
+ model: 'ZenBook Flip'
33
+ - regex: 'FBMD/X550LB;'
34
+ model: 'X550LB'
35
+ - regex: 'FBMD/X553MA;'
36
+ model: 'X553MA'
37
+ - regex: 'FBMD/X555LN;'
38
+ model: 'X555LN'
39
+ - regex: 'FBMD/X556UQK;'
40
+ model: 'X556UQK'
41
+
42
+ Alienware:
43
+ regex: 'FBMD/(?:Alienware [0-9]{2,3}R[0-9]{1,2}|Area-51m|R3|R4|Alienware Aurora R[0-9]+(:? [0-9]+)?);'
44
+ device: 'desktop'
45
+ models:
46
+ - regex: 'Alienware 15R3;'
47
+ model: 'Alienware 15 R3'
48
+ - regex: 'Alienware 17R4;'
49
+ model: 'Alienware 17 R4'
50
+ - regex: 'Area-51m;'
51
+ model: 'Area-51m'
52
+ - regex: 'Aurora (R[0-9]+)'
53
+ model: 'Aurora $1'
54
+
55
+ Dell:
56
+ regex: 'FBMD/(?:Latitude E4300|Inspiron 3541|XPS 15 95[35]0);'
57
+ device: 'desktop'
58
+ models:
59
+ - regex: 'Latitude E4300'
60
+ model: 'Latitude E4300'
61
+ - regex: 'Inspiron 3541'
62
+ model: 'Inspiron 3541'
63
+ - regex: 'XPS 15 9530'
64
+ model: 'XPS 15 9530'
65
+ - regex: 'XPS 15 9550'
66
+ model: 'XPS 15 9550'
67
+
68
+ HP:
69
+ regex: 'FBMD/((?:Compaq|HP) |23-f364)'
70
+ device: 'desktop'
71
+ models:
72
+ - regex: 'Compaq Presario CQ61 Notebook PC'
73
+ model: 'Compaq Presario CQ61'
74
+ - regex: 'HP Pavilion x2 Detachable'
75
+ model: 'Pavilion x2'
76
+ - regex: 'HP Laptop 15-bs0xx'
77
+ model: '15 Laptop PC'
78
+ - regex: 'HP ENVY x360 Convertible 15-bp0xx'
79
+ model: 'ENVY x360 Convertible PC'
80
+ - regex: 'HP EliteBook (25[67]0p)'
81
+ model: 'EliteBook $1'
82
+ - regex: 'HP ProBook (440 G5|6[35]60b)'
83
+ model: 'ProBook $1'
84
+ - regex: 'HP Pavilion dv6 Notebook PC'
85
+ model: 'Pavilion dv6'
86
+ - regex: 'HP Pavilion Notebook'
87
+ model: 'Pavilion'
88
+ - regex: 'HP Spectre x360 Convertible'
89
+ model: 'Spectre x360'
90
+ - regex: 'HP Pavilion All-in-One 24-r0xx'
91
+ model: 'Pavilion 24-r0xx All-in-One Desktop PC'
92
+ device: 'desktop'
93
+ - regex: '23-f364'
94
+ model: 'Pavilion TouchSmart 23-f364 All-in-One Desktop PC'
95
+ device: 'desktop'
96
+
97
+ Lenovo:
98
+ regex: 'FBMD/(?:37021C5|80E5|80SM|80VR);'
99
+ device: 'desktop'
100
+ models:
101
+ - regex: 'FBMD/37021C5;'
102
+ model: 'ThinkPad Helix 3702'
103
+ - regex: 'FBMD/80E5;'
104
+ model: 'G50-80'
105
+ - regex: 'FBMD/80SM;'
106
+ model: 'Ideapad 310-15ISK'
107
+ - regex: 'FBMD/80VR;'
108
+ model: 'Legion Y720'
109
+
110
+ Schneider:
111
+ regex: 'FBMD/SCL141CTP;'
112
+ device: 'desktop'
113
+ model: 'Notebook 14" Cherry Trail'
114
+
115
+ Thomson:
116
+ regex: 'FBMD/TH360R12\.32CTW;'
117
+ device: 'desktop'
118
+ model: 'Prestige TH-360R12.32CTW'
119
+
120
+ Toshiba:
121
+ regex: 'FBMD/Satellite '
122
+ device: 'desktop'
123
+ models:
124
+ - regex: 'Satellite (A[25]00|C650|C855|L650|S855)'
125
+ model: 'Satellite $1'
126
+ - regex: 'Satellite ([^;\)]+);'
127
+ model: 'Satellite $1'
@@ -1,7 +1,7 @@
1
1
  ###############
2
2
  # Device Detector - The Universal Device Detection library for parsing User Agents
3
3
  #
4
- # @link http://piwik.org
4
+ # @link https://matomo.org
5
5
  # @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
6
6
  ###############
7
7
 
@@ -9,20 +9,20 @@ Apple:
9
9
  regex: '(?:Apple-)?iPod'
10
10
  device: 'portable media player'
11
11
  models:
12
- - regex: '(?:Apple-)?iPod1[C,]1'
12
+ - regex: '(?:Apple-)?iPod1[C,_]?1'
13
13
  model: 'iPod Touch 1G'
14
- - regex: '(?:Apple-)?iPod2[C,]1'
14
+ - regex: '(?:Apple-)?iPod2[C,_]?1'
15
15
  model: 'iPod Touch 2G'
16
- - regex: '(?:Apple-)?iPod3[C,]1'
16
+ - regex: '(?:Apple-)?iPod3[C,_]?1'
17
17
  model: 'iPod Touch 3'
18
- - regex: '(?:Apple-)?iPod4[C,]1'
18
+ - regex: '(?:Apple-)?iPod4[C,_]?1'
19
19
  model: 'iPod Touch 4'
20
- - regex: '(?:Apple-)?iPod5[C,]1'
20
+ - regex: '(?:Apple-)?iPod5[C,_]?1'
21
21
  model: 'iPod Touch 5'
22
- - regex: '(?:Apple-)?iPod1[C,]1'
23
- model: 'iPod Touch'
24
- - regex: '(?:Apple-)?iPod1[C,]1'
25
- model: 'iPod Touch'
22
+ - regex: '(?:Apple-)?iPod7[C,_]?1'
23
+ model: 'iPod Touch 6'
24
+ - regex: '(?:Apple-)?iPod9[C,_]?1|iPodTouch7'
25
+ model: 'iPod Touch 7'
26
26
  - regex: '(?:Apple-)?iPod'
27
27
  model: 'iPod Touch'
28
28
 
@@ -31,14 +31,24 @@ Cowon:
31
31
  device: 'portable media player'
32
32
  model: '$1'
33
33
 
34
+ # FiiO (https://www.fiio.com/)
35
+ FiiO:
36
+ regex: 'FiiO'
37
+ device: 'portable media player'
38
+ models:
39
+ - regex: 'M11 Plus LTD'
40
+ model: 'M11 Plus LTD'
41
+ - regex: 'FiiO M(1[157]|6)'
42
+ model: 'M$1'
43
+
34
44
  Microsoft:
35
45
  regex: 'Microsoft ZuneHD'
36
46
  device: 'portable media player'
37
47
  model: 'Zune HD'
38
48
 
39
49
  Panasonic:
40
- device: 'portable media player'
41
50
  regex: '(SV-MV100)'
51
+ device: 'portable media player'
42
52
  model: '$1'
43
53
 
44
54
  Samsung:
@@ -54,8 +64,61 @@ Samsung:
54
64
  - regex: 'YP-GI1'
55
65
  model: 'Galaxy Player 4.2'
56
66
  - regex: 'YP-GP1'
57
- model: 'Galaxy Player 5.8 '
67
+ model: 'Galaxy Player 5.8'
58
68
  - regex: 'YP-G50'
59
69
  model: 'Galaxy Player 50'
60
70
  - regex: 'YP-GB70D'
61
71
  model: 'Galaxy Player 70 Plus'
72
+
73
+ Wizz:
74
+ regex: '(DV-PTB1080)(?:[);/ ]|$)'
75
+ device: 'portable media player'
76
+ model: '$1'
77
+
78
+ # Sonos (sonos.com)
79
+ SONOS:
80
+ regex: '(?:Sonos/.+\((?:ZP.+)\)|Sonos;)'
81
+ device: 'portable media player'
82
+ models:
83
+ - regex: '\((ZPS(?:[13569]|1[1-578]|2[03])|ZP90)\)'
84
+ model: '$1'
85
+ - regex: 'Sonos;Beam;'
86
+ model: 'Beam'
87
+ - regex: 'Sonos;Roam;'
88
+ model: 'Roam'
89
+ - regex: 'Sonos;Bookshelf;'
90
+ model: 'Bookshelf'
91
+ - regex: 'Sonos;Move;'
92
+ model: 'Move'
93
+ - regex: 'Sonos;Play(\d);'
94
+ model: 'Play:$1'
95
+ - regex: 'Sonos;One;'
96
+ model: 'One'
97
+ - regex: 'Sonos;OneSL'
98
+ model: 'OneSL'
99
+
100
+ # Shanling
101
+ Shanling:
102
+ regex: 'Shanling M6'
103
+ device: 'portable media player'
104
+ models:
105
+ - regex: 'Shanling (M6\(21\))'
106
+ model: '$1'
107
+
108
+ # Sylvania
109
+ Sylvania:
110
+ regex: '(SLTDVD102[34])'
111
+ device: 'portable media player'
112
+ model: '$1'
113
+
114
+ # KuGou
115
+ KuGou:
116
+ regex: 'KuGou[_ -](P5)'
117
+ device: 'portable media player'
118
+ model: '$1'
119
+
120
+ # Surfans
121
+ Surfans:
122
+ regex: '(Y57A)(?:[);/ ]|$)'
123
+ device: 'portable media player'
124
+ model: '$1'
@@ -0,0 +1,145 @@
1
+ ###############
2
+ # Device Detector - The Universal Device Detection library for parsing User Agents
3
+ #
4
+ # @link https://matomo.org
5
+ # @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
6
+ #
7
+ # ATTENTION: This file may only include tv user agents that contain '[a-z]+[ _]Shell[ _]\w{6}'
8
+ #
9
+ ###############
10
+
11
+ # Telefunken
12
+ Telefunken:
13
+ regex: 'Telefunken Shell'
14
+ device: 'tv'
15
+ model: ''
16
+
17
+ # JVC
18
+ JVC:
19
+ regex: 'JVC Shell'
20
+ device: 'tv'
21
+ model: ''
22
+
23
+ # Leff
24
+ Leff:
25
+ regex: 'Leff Shell'
26
+ device: 'tv'
27
+ model: ''
28
+
29
+ # Leben
30
+ Leben:
31
+ regex: 'Leben Shell'
32
+ device: 'tv'
33
+ model: ''
34
+
35
+ # Lumus
36
+ Lumus:
37
+ regex: 'LUMUS Shell'
38
+ device: 'tv'
39
+ model: ''
40
+
41
+ # Erisson
42
+ Erisson:
43
+ regex: 'Erisson[_ ]Shell'
44
+ device: 'tv'
45
+ model: ''
46
+
47
+ # BBK
48
+ BBK:
49
+ regex: 'BBK shell'
50
+ device: 'tv'
51
+ model: ''
52
+
53
+ # Novex
54
+ Novex:
55
+ regex: 'Novex shell'
56
+ device: 'tv'
57
+ model: ''
58
+
59
+ # Digma
60
+ Digma:
61
+ regex: 'Digma Shell'
62
+ device: 'tv'
63
+ model: ''
64
+
65
+ # AMCV
66
+ AMCV:
67
+ regex: 'AMCV Shell'
68
+ device: 'tv'
69
+ model: ''
70
+
71
+ # Mystery
72
+ Mystery:
73
+ regex: 'Mystery Shell'
74
+ device: 'tv'
75
+ model: ''
76
+
77
+ # ECON (econ.su)
78
+ ECON:
79
+ regex: 'ECON Shell'
80
+ device: 'tv'
81
+ model: ''
82
+
83
+ # Starwind (starwind.com.ru)
84
+ Starwind:
85
+ regex: 'Starwind Shell'
86
+ device: 'tv'
87
+ model: ''
88
+
89
+ # Kvant (tvkvant.ru)
90
+ Kvant:
91
+ regex: 'Kvant Shell'
92
+ device: 'tv'
93
+ model: ''
94
+
95
+ # Hi
96
+ Hi:
97
+ regex: 'Hi Shell'
98
+ device: 'tv'
99
+ model: ''
100
+
101
+ # AKIRA (myakira.com)
102
+ AKIRA:
103
+ regex: 'AKIRA Shell'
104
+ device: 'tv'
105
+ model: ''
106
+
107
+ # Loview
108
+ Loview:
109
+ regex: 'Loview Shell'
110
+ device: 'tv'
111
+ model: ''
112
+
113
+ # Supra
114
+ Supra:
115
+ regex: 'Supra Shell'
116
+ device: 'tv'
117
+ model: ''
118
+
119
+ # Yuno (yuno.bbk.ru)
120
+ Yuno:
121
+ regex: 'Yuno Shell'
122
+ device: 'tv'
123
+ model: ''
124
+
125
+ TCL:
126
+ regex: 'TCL/TCL-'
127
+ device: 'tv'
128
+ model: ''
129
+
130
+ # RCA Tablets (RCA) (https://www.rca.com/)
131
+ RCA Tablets:
132
+ regex: 'TCL/RCA-'
133
+ device: 'tv'
134
+ model: ''
135
+
136
+ # Thomson
137
+ Thomson:
138
+ regex: 'TCL/THOM-'
139
+ device: 'tv'
140
+ model: ''
141
+
142
+ DEXP:
143
+ regex: 'DEXP Shell'
144
+ device: 'tv'
145
+ model: ''