device_detector 1.0.6 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/README.md +26 -5
  4. data/lib/device_detector/browser.rb +178 -5
  5. data/lib/device_detector/client_hint.rb +166 -0
  6. data/lib/device_detector/device.rb +372 -4
  7. data/lib/device_detector/os.rb +36 -4
  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 +20 -1
  11. data/lib/device_detector.rb +50 -15
  12. data/regexes/bots.yml +641 -20
  13. data/regexes/client/browsers.yml +502 -54
  14. data/regexes/client/hints/apps.yml +102 -0
  15. data/regexes/client/hints/browsers.yml +190 -0
  16. data/regexes/client/libraries.yml +219 -3
  17. data/regexes/client/mediaplayers.yml +2 -2
  18. data/regexes/client/mobile_apps.yml +766 -24
  19. data/regexes/client/pim.yml +31 -1
  20. data/regexes/device/car_browsers.yml +1 -1
  21. data/regexes/device/consoles.yml +12 -1
  22. data/regexes/device/mobiles.yml +10966 -2251
  23. data/regexes/device/portable_media_player.yml +32 -6
  24. data/regexes/device/shell_tv.yml +11 -0
  25. data/regexes/device/televisions.yml +26 -4
  26. data/regexes/oss.yml +691 -496
  27. metadata +11 -169
  28. data/.gitignore +0 -14
  29. data/.rubocop.yml +0 -49
  30. data/.ruby-version +0 -1
  31. data/.travis.yml +0 -14
  32. data/Gemfile +0 -8
  33. data/Rakefile +0 -86
  34. data/device_detector.gemspec +0 -27
  35. data/spec/device_detector/bot_fixtures_spec.rb +0 -30
  36. data/spec/device_detector/client_fixtures_spec.rb +0 -31
  37. data/spec/device_detector/concrete_user_agent_spec.rb +0 -123
  38. data/spec/device_detector/detector_fixtures_spec.rb +0 -99
  39. data/spec/device_detector/device_fixtures_spec.rb +0 -36
  40. data/spec/device_detector/device_spec.rb +0 -147
  41. data/spec/device_detector/memory_cache_spec.rb +0 -148
  42. data/spec/device_detector/model_extractor_spec.rb +0 -63
  43. data/spec/device_detector/os_fixtures_spec.rb +0 -26
  44. data/spec/device_detector/version_extractor_spec.rb +0 -79
  45. data/spec/device_detector_spec.rb +0 -189
  46. data/spec/fixtures/client/browser.yml +0 -3935
  47. data/spec/fixtures/client/feed_reader.yml +0 -187
  48. data/spec/fixtures/client/library.yml +0 -253
  49. data/spec/fixtures/client/mediaplayer.yml +0 -193
  50. data/spec/fixtures/client/mobile_app.yml +0 -703
  51. data/spec/fixtures/client/pim.yml +0 -175
  52. data/spec/fixtures/detector/bots.yml +0 -4434
  53. data/spec/fixtures/detector/camera.yml +0 -127
  54. data/spec/fixtures/detector/car_browser.yml +0 -217
  55. data/spec/fixtures/detector/console.yml +0 -343
  56. data/spec/fixtures/detector/desktop.yml +0 -7580
  57. data/spec/fixtures/detector/feature_phone.yml +0 -1597
  58. data/spec/fixtures/detector/feed_reader.yml +0 -524
  59. data/spec/fixtures/detector/mediaplayer.yml +0 -306
  60. data/spec/fixtures/detector/mobile_apps.yml +0 -1233
  61. data/spec/fixtures/detector/peripheral.yml +0 -271
  62. data/spec/fixtures/detector/phablet.yml +0 -7366
  63. data/spec/fixtures/detector/portable_media_player.yml +0 -527
  64. data/spec/fixtures/detector/smart_display.yml +0 -235
  65. data/spec/fixtures/detector/smart_speaker.yml +0 -60
  66. data/spec/fixtures/detector/smartphone-1.yml +0 -9622
  67. data/spec/fixtures/detector/smartphone-10.yml +0 -8981
  68. data/spec/fixtures/detector/smartphone-11.yml +0 -8938
  69. data/spec/fixtures/detector/smartphone-12.yml +0 -8989
  70. data/spec/fixtures/detector/smartphone-13.yml +0 -9412
  71. data/spec/fixtures/detector/smartphone-14.yml +0 -9477
  72. data/spec/fixtures/detector/smartphone-15.yml +0 -9281
  73. data/spec/fixtures/detector/smartphone-16.yml +0 -9678
  74. data/spec/fixtures/detector/smartphone-17.yml +0 -9965
  75. data/spec/fixtures/detector/smartphone-18.yml +0 -9806
  76. data/spec/fixtures/detector/smartphone-19.yml +0 -9965
  77. data/spec/fixtures/detector/smartphone-2.yml +0 -12242
  78. data/spec/fixtures/detector/smartphone-20.yml +0 -9710
  79. data/spec/fixtures/detector/smartphone-21.yml +0 -8693
  80. data/spec/fixtures/detector/smartphone-22.yml +0 -10178
  81. data/spec/fixtures/detector/smartphone-23.yml +0 -9453
  82. data/spec/fixtures/detector/smartphone-24.yml +0 -9843
  83. data/spec/fixtures/detector/smartphone-25.yml +0 -9703
  84. data/spec/fixtures/detector/smartphone-26.yml +0 -10007
  85. data/spec/fixtures/detector/smartphone-27.yml +0 -4927
  86. data/spec/fixtures/detector/smartphone-3.yml +0 -9909
  87. data/spec/fixtures/detector/smartphone-4.yml +0 -8954
  88. data/spec/fixtures/detector/smartphone-5.yml +0 -8981
  89. data/spec/fixtures/detector/smartphone-6.yml +0 -8948
  90. data/spec/fixtures/detector/smartphone-7.yml +0 -8975
  91. data/spec/fixtures/detector/smartphone-8.yml +0 -9810
  92. data/spec/fixtures/detector/smartphone-9.yml +0 -8925
  93. data/spec/fixtures/detector/smartphone.yml +0 -9001
  94. data/spec/fixtures/detector/tablet-1.yml +0 -10155
  95. data/spec/fixtures/detector/tablet-2.yml +0 -9064
  96. data/spec/fixtures/detector/tablet-3.yml +0 -9035
  97. data/spec/fixtures/detector/tablet-4.yml +0 -9062
  98. data/spec/fixtures/detector/tablet-5.yml +0 -9273
  99. data/spec/fixtures/detector/tablet-6.yml +0 -4588
  100. data/spec/fixtures/detector/tablet.yml +0 -8979
  101. data/spec/fixtures/detector/tv-1.yml +0 -2501
  102. data/spec/fixtures/detector/tv.yml +0 -10045
  103. data/spec/fixtures/detector/unknown.yml +0 -3071
  104. data/spec/fixtures/detector/wearable.yml +0 -915
  105. data/spec/fixtures/device/camera.yml +0 -19
  106. data/spec/fixtures/device/car_browser.yml +0 -13
  107. data/spec/fixtures/device/console.yml +0 -79
  108. data/spec/fixtures/device/notebook.yml +0 -7
  109. data/spec/fixtures/parser/oss.yml +0 -2418
  110. data/spec/fixtures/parser/vendorfragments.yml +0 -168
  111. data/spec/spec_helper.rb +0 -9
@@ -1,168 +0,0 @@
1
- -
2
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; Media Center PC 6.0; MAAR; Tablet PC 2.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
3
- vendor: Acer
4
- -
5
- useragent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; Touch; MAARJS)
6
- vendor: Acer
7
- -
8
- useragent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; MAAU; rv:11.0) like Gecko
9
- vendor: Asus
10
- -
11
- useragent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; ASU2JS; rv:11.0) like Gecko
12
- vendor: Asus
13
- -
14
- useragent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; NP06; rv:11.0) like Gecko
15
- vendor: Asus
16
- -
17
- useragent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; ASJB; rv:11.0) like Gecko
18
- vendor: Asus
19
- -
20
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; CPDTDF; .NET4.0C; InfoPath.3; .NET4.0E; Microsoft Outlook 14.0.7113; ms-office; MSOffice 14)
21
- vendor: Compaq
22
- -
23
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; CPNTDFJS)
24
- vendor: Compaq
25
- -
26
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; CMNTDF; InfoPath.2; .NET4.0C; .NET4.0E)
27
- vendor: Compaq
28
- -
29
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; CMDTDFJS; Tablet PC 2.0)
30
- vendor: Compaq
31
- -
32
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; CMDTDF; InfoPath.3)
33
- vendor: Compaq
34
- -
35
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDC; .NET4.0C; .NET4.0E)
36
- vendor: Dell
37
- -
38
- useragent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0; Touch; MDDCJS)
39
- vendor: Dell
40
- -
41
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDR)
42
- vendor: Dell
43
- -
44
- useragent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; MDDRJS)
45
- vendor: Dell
46
- -
47
- useragent: Mozilla/5.0 (Windows NT 6.1; Trident/7.0; MDDSJS; rv:11.0) like Gecko
48
- vendor: Dell
49
- -
50
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; McAfee; MDDSJS)
51
- vendor: Dell
52
- -
53
- useragent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; FSJB; rv:11.0) like Gecko
54
- vendor: Fujitsu
55
- -
56
- useragent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; MAFSJS)
57
- vendor: Fujitsu
58
- -
59
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MAFS; InfoPath.2; OfficeLiveConnector.1.5; OfficeLivePatch.1.3; MSOffice 12)
60
- vendor: Fujitsu
61
- -
62
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MAGW; .NET4.0C; .NET4.0E; Microsoft Outlook 14.0.7113; ms-office; MSOffice 14)
63
- vendor: Gateway
64
- -
65
- useragent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; MAGWJS)
66
- vendor: Gateway
67
- -
68
- useragent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; HPCMHP)
69
- vendor: HP
70
- -
71
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; HPDTDFJS)
72
- vendor: HP
73
- -
74
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; HPNTDFJS)
75
- vendor: HP
76
- -
77
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MANM; .NET4.0C; InfoPath.3; .NET4.0E)
78
- vendor: Hyrican
79
- -
80
- useragent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; MANMJS; rv:11.0) like Gecko
81
- vendor: Hyrican
82
- -
83
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; QQDownload 691; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MALC)
84
- vendor: Lenovo
85
- -
86
- useragent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; LEN2)
87
- vendor: Lenovo
88
- -
89
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; MALEJS)
90
- vendor: Lenovo
91
- -
92
- useragent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; LCJB; rv:11.0) like Gecko
93
- vendor: Lenovo
94
- -
95
- useragent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; Touch; MALCJS; WebView/1.0)
96
- vendor: Lenovo
97
- -
98
- useragent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0; Touch; MALNJS)
99
- vendor: Lenovo
100
- -
101
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; MALN)
102
- vendor: Lenovo
103
- -
104
- useragent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; MAMD)
105
- vendor: Medion
106
- -
107
- useragent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; MAM3; InfoPath.3; .NET4.0E; MAM3)
108
- vendor: MSI
109
- -
110
- useragent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; MAMI; rv:11.0) like Gecko
111
- vendor: MSI
112
- -
113
- useragent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; MAMIJS; rv:11.0) like Gecko
114
- vendor: MSI
115
- -
116
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MASM; .NET4.0C; .NET4.0E)
117
- vendor: Samsung
118
- -
119
- useragent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; MASMJS)
120
- vendor: Samsung
121
- -
122
- useragent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; SMJB)
123
- vendor: Samsung
124
- -
125
- useragent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; MASP)
126
- vendor: Sony
127
- -
128
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; Media Center PC 6.0; MASA)
129
- vendor: Sony
130
- -
131
- useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; Media Center PC 6.0; MASE)
132
- vendor: Sony
133
- -
134
- useragent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; Trident/7.0; MASAJS; rv:11.0) like Gecko
135
- vendor: Sony
136
- -
137
- useragent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0; Touch; MASPJS)
138
- vendor: Sony
139
- -
140
- useragent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0; MASEJS)
141
- vendor: Sony
142
- -
143
- useragent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; MATMJS)
144
- vendor: Toshiba
145
- -
146
- useragent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/7.0; MATM)
147
- vendor: Toshiba
148
- -
149
- useragent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/7.0; MATP)
150
- vendor: Toshiba
151
- -
152
- useragent: Mozilla/5.0 (MSIE 9.0; Windows NT 6.3; WOW64; Trident/7.0; MATBJS; rv:11.0) like Gecko
153
- vendor: Toshiba
154
- -
155
- useragent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; MATPJS; rv:11.0) like Gecko
156
- vendor: Toshiba
157
- -
158
- useragent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; TNJB; rv:11.0) like Gecko
159
- vendor: Toshiba
160
- -
161
- useragent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; Touch; TAJB; rv:11.0) like Gecko
162
- vendor: Toshiba
163
- -
164
- useragent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0 Ordissimo/3.8.6.6+svn37147
165
- vendor: Ordissimo
166
- -
167
- useragent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0 webissimo3/3.7.30+svn32090
168
- vendor: Ordissimo
data/spec/spec_helper.rb DELETED
@@ -1,9 +0,0 @@
1
- require 'minitest/autorun'
2
- require 'minitest/spec'
3
-
4
- $:.unshift(File.expand_path('../../lib', __FILE__))
5
- require 'device_detector'
6
- begin
7
- require "byebug"
8
- rescue LoadError
9
- end unless RUBY_VERSION < "2.0.0" || RUBY_ENGINE != "ruby"