device_detector 1.0.2 → 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 (112) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +49 -0
  3. data/.ruby-version +1 -0
  4. data/.travis.yml +5 -6
  5. data/CHANGELOG.md +11 -0
  6. data/README.md +8 -7
  7. data/Rakefile +7 -4
  8. data/device_detector.gemspec +1 -0
  9. data/lib/device_detector/bot.rb +2 -2
  10. data/lib/device_detector/browser.rb +364 -0
  11. data/lib/device_detector/client.rb +11 -2
  12. data/lib/device_detector/device.rb +1168 -22
  13. data/lib/device_detector/memory_cache.rb +5 -5
  14. data/lib/device_detector/metadata_extractor.rb +7 -8
  15. data/lib/device_detector/model_extractor.rb +3 -3
  16. data/lib/device_detector/name_extractor.rb +2 -2
  17. data/lib/device_detector/os.rb +148 -116
  18. data/lib/device_detector/parser.rb +22 -9
  19. data/lib/device_detector/version.rb +1 -1
  20. data/lib/device_detector/version_extractor.rb +10 -2
  21. data/lib/device_detector.rb +73 -40
  22. data/regexes/bots.yml +909 -59
  23. data/regexes/client/browser_engine.yml +14 -2
  24. data/regexes/client/browsers.yml +1356 -241
  25. data/regexes/client/feed_readers.yml +10 -10
  26. data/regexes/client/libraries.yml +75 -1
  27. data/regexes/client/mediaplayers.yml +39 -3
  28. data/regexes/client/mobile_apps.yml +524 -45
  29. data/regexes/client/pim.yml +55 -2
  30. data/regexes/device/cameras.yml +6 -6
  31. data/regexes/device/car_browsers.yml +23 -3
  32. data/regexes/device/consoles.yml +9 -3
  33. data/regexes/device/mobiles.yml +16903 -3199
  34. data/regexes/device/notebooks.yml +114 -0
  35. data/regexes/device/portable_media_player.yml +20 -3
  36. data/regexes/device/shell_tv.yml +117 -0
  37. data/regexes/device/televisions.yml +440 -35
  38. data/regexes/oss.yml +603 -165
  39. data/regexes/vendorfragments.yml +6 -2
  40. data/spec/device_detector/concrete_user_agent_spec.rb +38 -51
  41. data/spec/device_detector/detector_fixtures_spec.rb +36 -37
  42. data/spec/device_detector/device_spec.rb +52 -56
  43. data/spec/device_detector/memory_cache_spec.rb +19 -19
  44. data/spec/device_detector/model_extractor_spec.rb +3 -3
  45. data/spec/device_detector/version_extractor_spec.rb +5 -6
  46. data/spec/device_detector_spec.rb +26 -26
  47. data/spec/fixtures/client/browser.yml +2617 -555
  48. data/spec/fixtures/client/feed_reader.yml +34 -52
  49. data/spec/fixtures/client/library.yml +129 -38
  50. data/spec/fixtures/client/mediaplayer.yml +59 -28
  51. data/spec/fixtures/client/mobile_app.yml +589 -20
  52. data/spec/fixtures/client/pim.yml +92 -19
  53. data/spec/fixtures/detector/bots.yml +1749 -458
  54. data/spec/fixtures/detector/camera.yml +30 -24
  55. data/spec/fixtures/detector/car_browser.yml +199 -3
  56. data/spec/fixtures/detector/console.yml +107 -45
  57. data/spec/fixtures/detector/desktop.yml +3216 -758
  58. data/spec/fixtures/detector/feature_phone.yml +935 -181
  59. data/spec/fixtures/detector/feed_reader.yml +181 -193
  60. data/spec/fixtures/detector/mediaplayer.yml +157 -60
  61. data/spec/fixtures/detector/mobile_apps.yml +914 -136
  62. data/spec/fixtures/detector/peripheral.yml +271 -0
  63. data/spec/fixtures/detector/phablet.yml +5593 -1533
  64. data/spec/fixtures/detector/portable_media_player.yml +398 -32
  65. data/spec/fixtures/detector/smart_display.yml +183 -9
  66. data/spec/fixtures/detector/smart_speaker.yml +60 -0
  67. data/spec/fixtures/detector/smartphone-1.yml +3930 -4239
  68. data/spec/fixtures/detector/smartphone-10.yml +3985 -7366
  69. data/spec/fixtures/detector/smartphone-11.yml +5083 -3784
  70. data/spec/fixtures/detector/smartphone-12.yml +8989 -0
  71. data/spec/fixtures/detector/smartphone-13.yml +9412 -0
  72. data/spec/fixtures/detector/smartphone-14.yml +9477 -0
  73. data/spec/fixtures/detector/smartphone-15.yml +9281 -0
  74. data/spec/fixtures/detector/smartphone-16.yml +9678 -0
  75. data/spec/fixtures/detector/smartphone-17.yml +9965 -0
  76. data/spec/fixtures/detector/smartphone-18.yml +9806 -0
  77. data/spec/fixtures/detector/smartphone-19.yml +9965 -0
  78. data/spec/fixtures/detector/smartphone-2.yml +6670 -4375
  79. data/spec/fixtures/detector/smartphone-20.yml +9710 -0
  80. data/spec/fixtures/detector/smartphone-21.yml +8693 -0
  81. data/spec/fixtures/detector/smartphone-22.yml +10178 -0
  82. data/spec/fixtures/detector/smartphone-23.yml +9453 -0
  83. data/spec/fixtures/detector/smartphone-24.yml +9843 -0
  84. data/spec/fixtures/detector/smartphone-25.yml +9703 -0
  85. data/spec/fixtures/detector/smartphone-26.yml +10007 -0
  86. data/spec/fixtures/detector/smartphone-27.yml +4927 -0
  87. data/spec/fixtures/detector/smartphone-3.yml +4656 -4711
  88. data/spec/fixtures/detector/smartphone-4.yml +3518 -4479
  89. data/spec/fixtures/detector/smartphone-5.yml +3805 -4803
  90. data/spec/fixtures/detector/smartphone-6.yml +3745 -4693
  91. data/spec/fixtures/detector/smartphone-7.yml +3721 -4645
  92. data/spec/fixtures/detector/smartphone-8.yml +4564 -4699
  93. data/spec/fixtures/detector/smartphone-9.yml +3897 -4888
  94. data/spec/fixtures/detector/smartphone.yml +3154 -4141
  95. data/spec/fixtures/detector/tablet-1.yml +4742 -4576
  96. data/spec/fixtures/detector/tablet-2.yml +3803 -4731
  97. data/spec/fixtures/detector/tablet-3.yml +6210 -2309
  98. data/spec/fixtures/detector/tablet-4.yml +9062 -0
  99. data/spec/fixtures/detector/tablet-5.yml +9273 -0
  100. data/spec/fixtures/detector/tablet-6.yml +4588 -0
  101. data/spec/fixtures/detector/tablet.yml +3629 -4613
  102. data/spec/fixtures/detector/tv-1.yml +2501 -0
  103. data/spec/fixtures/detector/tv.yml +8856 -2064
  104. data/spec/fixtures/detector/unknown.yml +412 -587
  105. data/spec/fixtures/detector/wearable.yml +915 -0
  106. data/spec/fixtures/device/camera.yml +4 -3
  107. data/spec/fixtures/device/car_browser.yml +9 -2
  108. data/spec/fixtures/device/console.yml +15 -14
  109. data/spec/fixtures/device/notebook.yml +7 -0
  110. data/spec/fixtures/parser/oss.yml +1392 -21
  111. data/spec/fixtures/parser/vendorfragments.yml +57 -51
  112. metadata +70 -4
@@ -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'
@@ -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
 
@@ -35,8 +35,8 @@ Microsoft:
35
35
  model: 'Zune HD'
36
36
 
37
37
  Panasonic:
38
- device: 'portable media player'
39
38
  regex: '(SV-MV100)'
39
+ device: 'portable media player'
40
40
  model: '$1'
41
41
 
42
42
  Samsung:
@@ -52,8 +52,25 @@ Samsung:
52
52
  - regex: 'YP-GI1'
53
53
  model: 'Galaxy Player 4.2'
54
54
  - regex: 'YP-GP1'
55
- model: 'Galaxy Player 5.8 '
55
+ model: 'Galaxy Player 5.8'
56
56
  - regex: 'YP-G50'
57
57
  model: 'Galaxy Player 50'
58
58
  - regex: 'YP-GB70D'
59
59
  model: 'Galaxy Player 70 Plus'
60
+
61
+ Wizz:
62
+ regex: '(DV-PTB1080)(?:[);/ ]|$)'
63
+ device: 'portable media player'
64
+ model: '$1'
65
+
66
+ # Sonos (sonos.com)
67
+ SONOS:
68
+ regex: 'Sonos/.+\((?:ZP.+)\)|Sonos;'
69
+ device: 'portable media player'
70
+ models:
71
+ - regex: '\((ZPS(?:[13569]|1[1-578]|2[03])|ZP90)\)'
72
+ model: '$1'
73
+ - regex: 'Sonos;Play5;'
74
+ model: 'Play:5'
75
+ - regex: 'Sonos;One;'
76
+ 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: ''