device_detector 1.0.4 → 1.0.7

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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/README.md +8 -7
  4. data/lib/device_detector/browser.rb +364 -0
  5. data/lib/device_detector/client.rb +8 -0
  6. data/lib/device_detector/device.rb +1204 -2
  7. data/lib/device_detector/os.rb +39 -12
  8. data/lib/device_detector/parser.rb +1 -1
  9. data/lib/device_detector/version.rb +1 -1
  10. data/lib/device_detector/version_extractor.rb +28 -0
  11. data/lib/device_detector.rb +57 -13
  12. data/regexes/bots.yml +651 -61
  13. data/regexes/client/browser_engine.yml +7 -1
  14. data/regexes/client/browsers.yml +774 -78
  15. data/regexes/client/feed_readers.yml +4 -10
  16. data/regexes/client/libraries.yml +71 -2
  17. data/regexes/client/mediaplayers.yml +25 -1
  18. data/regexes/client/mobile_apps.yml +923 -73
  19. data/regexes/client/pim.yml +65 -2
  20. data/regexes/device/cameras.yml +5 -5
  21. data/regexes/device/car_browsers.yml +16 -0
  22. data/regexes/device/consoles.yml +13 -1
  23. data/regexes/device/mobiles.yml +17029 -3889
  24. data/regexes/device/notebooks.yml +114 -0
  25. data/regexes/device/portable_media_player.yml +36 -9
  26. data/regexes/device/shell_tv.yml +117 -0
  27. data/regexes/device/televisions.yml +439 -34
  28. data/regexes/oss.yml +620 -284
  29. metadata +9 -131
  30. data/.gitignore +0 -14
  31. data/.rubocop.yml +0 -49
  32. data/.ruby-version +0 -1
  33. data/.travis.yml +0 -14
  34. data/Gemfile +0 -8
  35. data/Rakefile +0 -85
  36. data/device_detector.gemspec +0 -27
  37. data/spec/device_detector/bot_fixtures_spec.rb +0 -30
  38. data/spec/device_detector/client_fixtures_spec.rb +0 -31
  39. data/spec/device_detector/concrete_user_agent_spec.rb +0 -135
  40. data/spec/device_detector/detector_fixtures_spec.rb +0 -100
  41. data/spec/device_detector/device_fixtures_spec.rb +0 -36
  42. data/spec/device_detector/device_spec.rb +0 -131
  43. data/spec/device_detector/memory_cache_spec.rb +0 -148
  44. data/spec/device_detector/model_extractor_spec.rb +0 -63
  45. data/spec/device_detector/os_fixtures_spec.rb +0 -26
  46. data/spec/device_detector/version_extractor_spec.rb +0 -79
  47. data/spec/device_detector_spec.rb +0 -189
  48. data/spec/fixtures/client/browser.yml +0 -2836
  49. data/spec/fixtures/client/feed_reader.yml +0 -199
  50. data/spec/fixtures/client/library.yml +0 -193
  51. data/spec/fixtures/client/mediaplayer.yml +0 -163
  52. data/spec/fixtures/client/mobile_app.yml +0 -217
  53. data/spec/fixtures/client/pim.yml +0 -115
  54. data/spec/fixtures/detector/bots.yml +0 -3726
  55. data/spec/fixtures/detector/camera.yml +0 -141
  56. data/spec/fixtures/detector/car_browser.yml +0 -81
  57. data/spec/fixtures/detector/console.yml +0 -321
  58. data/spec/fixtures/detector/desktop.yml +0 -5461
  59. data/spec/fixtures/detector/feature_phone.yml +0 -891
  60. data/spec/fixtures/detector/feed_reader.yml +0 -551
  61. data/spec/fixtures/detector/mediaplayer.yml +0 -253
  62. data/spec/fixtures/detector/mobile_apps.yml +0 -494
  63. data/spec/fixtures/detector/phablet.yml +0 -4167
  64. data/spec/fixtures/detector/portable_media_player.yml +0 -178
  65. data/spec/fixtures/detector/smart_display.yml +0 -61
  66. data/spec/fixtures/detector/smart_speaker.yml +0 -55
  67. data/spec/fixtures/detector/smartphone-1.yml +0 -9927
  68. data/spec/fixtures/detector/smartphone-10.yml +0 -9977
  69. data/spec/fixtures/detector/smartphone-11.yml +0 -9891
  70. data/spec/fixtures/detector/smartphone-12.yml +0 -9906
  71. data/spec/fixtures/detector/smartphone-13.yml +0 -9920
  72. data/spec/fixtures/detector/smartphone-14.yml +0 -2662
  73. data/spec/fixtures/detector/smartphone-2.yml +0 -9992
  74. data/spec/fixtures/detector/smartphone-3.yml +0 -9945
  75. data/spec/fixtures/detector/smartphone-4.yml +0 -9923
  76. data/spec/fixtures/detector/smartphone-5.yml +0 -9914
  77. data/spec/fixtures/detector/smartphone-6.yml +0 -9962
  78. data/spec/fixtures/detector/smartphone-7.yml +0 -9899
  79. data/spec/fixtures/detector/smartphone-8.yml +0 -9931
  80. data/spec/fixtures/detector/smartphone-9.yml +0 -9899
  81. data/spec/fixtures/detector/smartphone.yml +0 -9984
  82. data/spec/fixtures/detector/tablet-1.yml +0 -9995
  83. data/spec/fixtures/detector/tablet-2.yml +0 -9977
  84. data/spec/fixtures/detector/tablet-3.yml +0 -9959
  85. data/spec/fixtures/detector/tablet-4.yml +0 -4528
  86. data/spec/fixtures/detector/tablet.yml +0 -9971
  87. data/spec/fixtures/detector/tv.yml +0 -4933
  88. data/spec/fixtures/detector/unknown.yml +0 -3236
  89. data/spec/fixtures/detector/wearable.yml +0 -61
  90. data/spec/fixtures/device/camera.yml +0 -19
  91. data/spec/fixtures/device/car_browser.yml +0 -13
  92. data/spec/fixtures/device/console.yml +0 -79
  93. data/spec/fixtures/parser/oss.yml +0 -1082
  94. data/spec/fixtures/parser/vendorfragments.yml +0 -168
  95. data/spec/spec_helper.rb +0 -9
@@ -0,0 +1,114 @@
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
+ Dell:
43
+ regex: 'FBMD/(?:Latitude E4300|Inspiron 3541|XPS 15 95[35]0);'
44
+ device: 'desktop'
45
+ models:
46
+ - regex: 'Latitude E4300'
47
+ model: 'Latitude E4300'
48
+ - regex: 'Inspiron 3541'
49
+ model: 'Inspiron 3541'
50
+ - regex: 'XPS 15 9530'
51
+ model: 'XPS 15 9530'
52
+ - regex: 'XPS 15 9550'
53
+ model: 'XPS 15 9550'
54
+
55
+ HP:
56
+ regex: 'FBMD/((?:Compaq|HP) |23-f364)'
57
+ device: 'desktop'
58
+ models:
59
+ - regex: 'Compaq Presario CQ61 Notebook PC'
60
+ model: 'Compaq Presario CQ61'
61
+ - regex: 'HP Pavilion x2 Detachable'
62
+ model: 'Pavilion x2'
63
+ - regex: 'HP Laptop 15-bs0xx'
64
+ model: '15 Laptop PC'
65
+ - regex: 'HP ENVY x360 Convertible 15-bp0xx'
66
+ model: 'ENVY x360 Convertible PC'
67
+ - regex: 'HP EliteBook (25[67]0p)'
68
+ model: 'EliteBook $1'
69
+ - regex: 'HP ProBook (440 G5|6[35]60b)'
70
+ model: 'ProBook $1'
71
+ - regex: 'HP Pavilion dv6 Notebook PC'
72
+ model: 'Pavilion dv6'
73
+ - regex: 'HP Pavilion Notebook'
74
+ model: 'Pavilion'
75
+ - regex: 'HP Spectre x360 Convertible'
76
+ model: 'Spectre x360'
77
+ - regex: 'HP Pavilion All-in-One 24-r0xx'
78
+ model: 'Pavilion 24-r0xx All-in-One Desktop PC'
79
+ device: 'desktop'
80
+ - regex: '23-f364'
81
+ model: 'Pavilion TouchSmart 23-f364 All-in-One Desktop PC'
82
+ device: 'desktop'
83
+
84
+ Lenovo:
85
+ regex: 'FBMD/(?:37021C5|80E5|80SM|80VR);'
86
+ device: 'desktop'
87
+ models:
88
+ - regex: 'FBMD/37021C5;'
89
+ model: 'ThinkPad Helix 3702'
90
+ - regex: 'FBMD/80E5;'
91
+ model: 'G50-80'
92
+ - regex: 'FBMD/80SM;'
93
+ model: 'Ideapad 310-15ISK'
94
+ - regex: 'FBMD/80VR;'
95
+ model: 'Legion Y720'
96
+
97
+ Schneider:
98
+ regex: 'FBMD/SCL141CTP;'
99
+ device: 'desktop'
100
+ model: 'Notebook 14" Cherry Trail'
101
+
102
+ Thomson:
103
+ regex: 'FBMD/TH360R12.32CTW;'
104
+ device: 'desktop'
105
+ model: 'Prestige TH-360R12.32CTW'
106
+
107
+ Toshiba:
108
+ regex: 'FBMD/Satellite '
109
+ device: 'desktop'
110
+ models:
111
+ - regex: 'Satellite (A[25]00|C650|C855|L650|S855)'
112
+ model: 'Satellite $1'
113
+ - regex: 'Satellite ([^;\)]+);'
114
+ model: 'Satellite $1'
@@ -9,18 +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-)?iPod7[C,]1'
22
+ - regex: '(?:Apple-)?iPod7[C,_]?1'
23
23
  model: 'iPod Touch 6'
24
+ - regex: '(?:Apple-)?iPod9[C,_]?1'
25
+ model: 'iPod Touch 7'
24
26
  - regex: '(?:Apple-)?iPod'
25
27
  model: 'iPod Touch'
26
28
 
@@ -29,14 +31,22 @@ Cowon:
29
31
  device: 'portable media player'
30
32
  model: '$1'
31
33
 
34
+ # FiiO (https://www.fiio.com/)
35
+ FiiO:
36
+ regex: 'FiiO'
37
+ device: 'portable media player'
38
+ models:
39
+ - regex: 'M15'
40
+ model: 'M15'
41
+
32
42
  Microsoft:
33
43
  regex: 'Microsoft ZuneHD'
34
44
  device: 'portable media player'
35
45
  model: 'Zune HD'
36
46
 
37
47
  Panasonic:
38
- device: 'portable media player'
39
48
  regex: '(SV-MV100)'
49
+ device: 'portable media player'
40
50
  model: '$1'
41
51
 
42
52
  Samsung:
@@ -52,8 +62,25 @@ Samsung:
52
62
  - regex: 'YP-GI1'
53
63
  model: 'Galaxy Player 4.2'
54
64
  - regex: 'YP-GP1'
55
- model: 'Galaxy Player 5.8 '
65
+ model: 'Galaxy Player 5.8'
56
66
  - regex: 'YP-G50'
57
67
  model: 'Galaxy Player 50'
58
68
  - regex: 'YP-GB70D'
59
- model: 'Galaxy Player 70 Plus'
69
+ model: 'Galaxy Player 70 Plus'
70
+
71
+ Wizz:
72
+ regex: '(DV-PTB1080)(?:[);/ ]|$)'
73
+ device: 'portable media player'
74
+ model: '$1'
75
+
76
+ # Sonos (sonos.com)
77
+ SONOS:
78
+ regex: 'Sonos/.+\((?:ZP.+)\)|Sonos;'
79
+ device: 'portable media player'
80
+ models:
81
+ - regex: '\((ZPS(?:[13569]|1[1-578]|2[03])|ZP90)\)'
82
+ model: '$1'
83
+ - regex: 'Sonos;Play5;'
84
+ model: 'Play:5'
85
+ - regex: 'Sonos;One;'
86
+ model: 'One'
@@ -0,0 +1,117 @@
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
+ # Yuno (yuno.bbk.ru)
114
+ Yuno:
115
+ regex: 'Yuno Shell'
116
+ device: 'tv'
117
+ model: ''