device_detector 1.0.2 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -1,16 +1,17 @@
1
- -
1
+ ---
2
+ -
2
3
  user_agent: Mozilla/5.0 (Linux; U; Android 4.0; de-DE; EK-GC100 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
3
4
  device:
4
5
  type: 8
5
6
  brand: SA
6
7
  model: GALAXY Camera
7
- -
8
+ -
8
9
  user_agent: Mozilla/5.0 (Linux; Android 4.1.2; EK-GC100 Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.63 Mobile Safari/537.36 OPR/15.0.1162.60140
9
10
  device:
10
11
  type: 8
11
12
  brand: SA
12
13
  model: GALAXY Camera
13
- -
14
+ -
14
15
  user_agent: Mozilla/5.0 (Linux; U; Android 2.3.3; ja-jp; COOLPIX S800c Build/CP01_WW) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
15
16
  device:
16
17
  type: 8
@@ -1,6 +1,13 @@
1
- -
1
+ ---
2
+ -
2
3
  user_agent: Mozilla/5.0 (X11; u; Linux; C) AppleWebKit /533.3 (Khtml, like Gheko) QtCarBrowser Safari/533.3
3
4
  device:
4
5
  type: 6
5
6
  brand: TA
6
- model: Model S
7
+ model: Model S
8
+ -
9
+ user_agent: Mozilla/5.0 (X11; GNU/Linux) AppleWebKit/537.36 (KHTML, like Gecko) Chromium/75.0.3770.100 Chrome/75.0.3770.100 Safari/537.36 Tesla/2019.40.50.7-ad132c7b057e
10
+ device:
11
+ type: 6
12
+ brand: TA
13
+ model: ""
@@ -1,78 +1,79 @@
1
- -
1
+ ---
2
+ -
2
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
3
4
  device:
4
5
  type: 4
5
6
  brand: AR
6
7
  model: Gamepad
7
- -
8
+ -
8
9
  user_agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; Xbox)
9
10
  device:
10
11
  type: 4
11
12
  brand: MS
12
13
  model: Xbox 360
13
- -
14
+ -
14
15
  user_agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; Xbox; Xbox One)
15
16
  device:
16
17
  type: 4
17
18
  brand: MS
18
19
  model: Xbox One
19
- -
20
+ -
20
21
  user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; Xbox; Xbox One) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
21
22
  device:
22
23
  type: 4
23
24
  brand: MS
24
25
  model: Xbox One
25
- -
26
+ -
26
27
  user_agent: Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7498.EU
27
28
  device:
28
29
  type: 4
29
30
  brand: NI
30
31
  model: 3DS
31
- -
32
+ -
32
33
  user_agent: Bunjalloo/0.7.6(Nintendo DS;U;en)
33
34
  device:
34
35
  type: 4
35
36
  brand: NI
36
37
  model: DS
37
- -
38
+ -
38
39
  user_agent: Opera/9.30 (Nintendo Wii; U; ; 3642; en)
39
40
  device:
40
41
  type: 4
41
42
  brand: NI
42
43
  model: Wii
43
- -
44
+ -
44
45
  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
45
46
  device:
46
47
  type: 4
47
48
  brand: NI
48
49
  model: WiiU
49
- -
50
+ -
50
51
  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
51
52
  device:
52
53
  type: 4
53
54
  brand: OU
54
55
  model: OUYA
55
- -
56
+ -
56
57
  user_agent: Mozilla/5.0 (PLAYSTATION 3 4.46) AppleWebKit/531.22.8 (KHTML, like Gecko)
57
58
  device:
58
59
  type: 4
59
60
  brand: SO
60
61
  model: PlayStation 3
61
- -
62
+ -
62
63
  user_agent: Mozilla/5.0 (PlayStation 4 1.52) AppleWebKit/536.26 (KHTML, like Gecko)
63
64
  device:
64
65
  type: 4
65
66
  brand: SO
66
67
  model: PlayStation 4
67
- -
68
+ -
68
69
  user_agent: Mozilla/4.0 (PlayStation Portable); 2.00)
69
70
  device:
70
71
  type: 4
71
72
  brand: SO
72
73
  model: PlayStation Portable
73
- -
74
+ -
74
75
  user_agent: Mozilla/5.0 (PlayStation Vita 3.01) AppleWebKit/536.26 (KHTML, like Gecko) Silk/3.2
75
76
  device:
76
77
  type: 4
77
78
  brand: SO
78
- model: PlayStation Vita
79
+ model: PlayStation Vita
@@ -0,0 +1,7 @@
1
+ ---
2
+ -
3
+ user_agent: Mozilla/5.0 (Windows NT 10.0.16299.125; osmeta 10.3.3308) AppleWebKit/602.1.1 (KHTML, like Gecko) Version/9.0 Safari/602.1.1 osmeta/10.3.3308 Build/3308 [FBAN/FBW;FBAV/140.0.0.232.179;FBBV/83145113;FBDV/WindowsDevice;FBMD/80VR;FBSN/Windows;FBSV/10.0.16299.371;FBSS/1;FBCR/;FBID/desktop;FBLC/ru_RU;FBOP/45;FBRV/0]
4
+ device:
5
+ type: 0
6
+ brand: LE
7
+ model: Legion Y720