device_detector 0.9.1 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +49 -0
  3. data/.ruby-version +1 -0
  4. data/.travis.yml +5 -9
  5. data/CHANGELOG.md +16 -3
  6. data/README.md +7 -9
  7. data/Rakefile +19 -13
  8. data/device_detector.gemspec +1 -0
  9. data/lib/device_detector.rb +32 -28
  10. data/lib/device_detector/bot.rb +2 -2
  11. data/lib/device_detector/client.rb +3 -2
  12. data/lib/device_detector/device.rb +44 -21
  13. data/lib/device_detector/memory_cache.rb +26 -19
  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 +121 -111
  18. data/lib/device_detector/parser.rb +22 -9
  19. data/lib/device_detector/version.rb +3 -1
  20. data/lib/device_detector/version_extractor.rb +2 -3
  21. data/regexes/bots.yml +840 -20
  22. data/regexes/client/browser_engine.yml +11 -2
  23. data/regexes/client/browsers.yml +909 -108
  24. data/regexes/client/feed_readers.yml +38 -2
  25. data/regexes/client/libraries.yml +76 -2
  26. data/regexes/client/mediaplayers.yml +25 -5
  27. data/regexes/client/mobile_apps.yml +167 -2
  28. data/regexes/client/pim.yml +10 -1
  29. data/regexes/device/cameras.yml +1 -1
  30. data/regexes/device/car_browsers.yml +7 -3
  31. data/regexes/device/consoles.yml +3 -3
  32. data/regexes/device/mobiles.yml +10123 -465
  33. data/regexes/device/portable_media_player.yml +4 -6
  34. data/regexes/device/televisions.yml +18 -4
  35. data/regexes/oss.yml +115 -21
  36. data/regexes/vendorfragments.yml +6 -2
  37. data/spec/device_detector/concrete_user_agent_spec.rb +16 -17
  38. data/spec/device_detector/detector_fixtures_spec.rb +51 -11
  39. data/spec/device_detector/device_spec.rb +28 -48
  40. data/spec/device_detector/memory_cache_spec.rb +60 -28
  41. data/spec/device_detector/model_extractor_spec.rb +3 -3
  42. data/spec/device_detector/version_extractor_spec.rb +5 -6
  43. data/spec/device_detector_spec.rb +60 -69
  44. data/spec/fixtures/client/browser.yml +1785 -262
  45. data/spec/fixtures/client/feed_reader.yml +47 -35
  46. data/spec/fixtures/client/library.yml +112 -3
  47. data/spec/fixtures/client/mediaplayer.yml +32 -37
  48. data/spec/fixtures/client/mobile_app.yml +193 -6
  49. data/spec/fixtures/client/pim.yml +37 -18
  50. data/spec/fixtures/detector/bots.yml +1426 -118
  51. data/spec/fixtures/detector/camera.yml +36 -10
  52. data/spec/fixtures/detector/car_browser.yml +64 -3
  53. data/spec/fixtures/detector/console.yml +80 -26
  54. data/spec/fixtures/detector/desktop.yml +2222 -1589
  55. data/spec/fixtures/detector/feature_phone.yml +151 -42
  56. data/spec/fixtures/detector/feed_reader.yml +186 -121
  57. data/spec/fixtures/detector/mediaplayer.yml +113 -39
  58. data/spec/fixtures/detector/mobile_apps.yml +366 -21
  59. data/spec/fixtures/detector/phablet.yml +2597 -570
  60. data/spec/fixtures/detector/portable_media_player.yml +41 -16
  61. data/spec/fixtures/detector/smart_display.yml +8 -5
  62. data/spec/fixtures/detector/smart_speaker.yml +55 -0
  63. data/spec/fixtures/detector/smartphone-1.yml +5468 -5010
  64. data/spec/fixtures/detector/smartphone-10.yml +9977 -0
  65. data/spec/fixtures/detector/smartphone-11.yml +9891 -0
  66. data/spec/fixtures/detector/smartphone-12.yml +9906 -0
  67. data/spec/fixtures/detector/smartphone-13.yml +9920 -0
  68. data/spec/fixtures/detector/smartphone-14.yml +2662 -0
  69. data/spec/fixtures/detector/smartphone-2.yml +5213 -4635
  70. data/spec/fixtures/detector/smartphone-3.yml +5082 -4533
  71. data/spec/fixtures/detector/smartphone-4.yml +6806 -2625
  72. data/spec/fixtures/detector/smartphone-5.yml +9914 -0
  73. data/spec/fixtures/detector/smartphone-6.yml +9962 -0
  74. data/spec/fixtures/detector/smartphone-7.yml +9899 -0
  75. data/spec/fixtures/detector/smartphone-8.yml +9931 -0
  76. data/spec/fixtures/detector/smartphone-9.yml +9899 -0
  77. data/spec/fixtures/detector/smartphone.yml +5225 -4652
  78. data/spec/fixtures/detector/tablet-1.yml +4691 -4191
  79. data/spec/fixtures/detector/tablet-2.yml +9800 -71
  80. data/spec/fixtures/detector/tablet-3.yml +9959 -0
  81. data/spec/fixtures/detector/tablet-4.yml +4528 -0
  82. data/spec/fixtures/detector/tablet.yml +4664 -4177
  83. data/spec/fixtures/detector/tv.yml +3399 -1048
  84. data/spec/fixtures/detector/unknown.yml +1017 -977
  85. data/spec/fixtures/detector/wearable.yml +61 -0
  86. data/spec/fixtures/device/camera.yml +4 -3
  87. data/spec/fixtures/device/car_browser.yml +9 -2
  88. data/spec/fixtures/device/console.yml +15 -14
  89. data/spec/fixtures/parser/oss.yml +284 -2
  90. data/spec/fixtures/parser/vendorfragments.yml +8 -2
  91. metadata +50 -7
@@ -26,10 +26,10 @@
26
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
27
  vendor: CQ
28
28
  -
29
- user_agent: 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)
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
30
  vendor: CQ
31
31
  -
32
- user_agent: 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)
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
33
  vendor: CQ
34
34
  -
35
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)
@@ -160,3 +160,9 @@
160
160
  -
161
161
  useragent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; Touch; TAJB; rv:11.0) like Gecko
162
162
  vendor: TS
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: OS
166
+ -
167
+ useragent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0 webissimo3/3.7.30+svn32090
168
+ vendor: OS
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: device_detector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mati Sójka
8
8
  - Ben Zimmer
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-09-02 00:00:00.000000000 Z
12
+ date: 2020-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
@@ -53,6 +53,20 @@ dependencies:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0.10'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rubocop
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - '='
61
+ - !ruby/object:Gem::Version
62
+ version: 0.85.1
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - '='
68
+ - !ruby/object:Gem::Version
69
+ version: 0.85.1
56
70
  description: Precise and fast user agent parser and device detector, backed by the
57
71
  largest and most up-to-date agent and device database
58
72
  email:
@@ -62,6 +76,8 @@ extensions: []
62
76
  extra_rdoc_files: []
63
77
  files:
64
78
  - ".gitignore"
79
+ - ".rubocop.yml"
80
+ - ".ruby-version"
65
81
  - ".travis.yml"
66
82
  - CHANGELOG.md
67
83
  - Gemfile
@@ -126,16 +142,30 @@ files:
126
142
  - spec/fixtures/detector/phablet.yml
127
143
  - spec/fixtures/detector/portable_media_player.yml
128
144
  - spec/fixtures/detector/smart_display.yml
145
+ - spec/fixtures/detector/smart_speaker.yml
129
146
  - spec/fixtures/detector/smartphone-1.yml
147
+ - spec/fixtures/detector/smartphone-10.yml
148
+ - spec/fixtures/detector/smartphone-11.yml
149
+ - spec/fixtures/detector/smartphone-12.yml
150
+ - spec/fixtures/detector/smartphone-13.yml
151
+ - spec/fixtures/detector/smartphone-14.yml
130
152
  - spec/fixtures/detector/smartphone-2.yml
131
153
  - spec/fixtures/detector/smartphone-3.yml
132
154
  - spec/fixtures/detector/smartphone-4.yml
155
+ - spec/fixtures/detector/smartphone-5.yml
156
+ - spec/fixtures/detector/smartphone-6.yml
157
+ - spec/fixtures/detector/smartphone-7.yml
158
+ - spec/fixtures/detector/smartphone-8.yml
159
+ - spec/fixtures/detector/smartphone-9.yml
133
160
  - spec/fixtures/detector/smartphone.yml
134
161
  - spec/fixtures/detector/tablet-1.yml
135
162
  - spec/fixtures/detector/tablet-2.yml
163
+ - spec/fixtures/detector/tablet-3.yml
164
+ - spec/fixtures/detector/tablet-4.yml
136
165
  - spec/fixtures/detector/tablet.yml
137
166
  - spec/fixtures/detector/tv.yml
138
167
  - spec/fixtures/detector/unknown.yml
168
+ - spec/fixtures/detector/wearable.yml
139
169
  - spec/fixtures/device/camera.yml
140
170
  - spec/fixtures/device/car_browser.yml
141
171
  - spec/fixtures/device/console.yml
@@ -146,7 +176,7 @@ homepage: http://podigee.github.io/device_detector
146
176
  licenses:
147
177
  - LGPL-3.0
148
178
  metadata: {}
149
- post_install_message:
179
+ post_install_message:
150
180
  rdoc_options: []
151
181
  require_paths:
152
182
  - lib
@@ -161,9 +191,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
191
  - !ruby/object:Gem::Version
162
192
  version: '0'
163
193
  requirements: []
164
- rubyforge_project:
165
- rubygems_version: 2.5.1
166
- signing_key:
194
+ rubygems_version: 3.0.3
195
+ signing_key:
167
196
  specification_version: 4
168
197
  summary: Precise and fast user agent parser and device detector
169
198
  test_files:
@@ -196,16 +225,30 @@ test_files:
196
225
  - spec/fixtures/detector/phablet.yml
197
226
  - spec/fixtures/detector/portable_media_player.yml
198
227
  - spec/fixtures/detector/smart_display.yml
228
+ - spec/fixtures/detector/smart_speaker.yml
199
229
  - spec/fixtures/detector/smartphone-1.yml
230
+ - spec/fixtures/detector/smartphone-10.yml
231
+ - spec/fixtures/detector/smartphone-11.yml
232
+ - spec/fixtures/detector/smartphone-12.yml
233
+ - spec/fixtures/detector/smartphone-13.yml
234
+ - spec/fixtures/detector/smartphone-14.yml
200
235
  - spec/fixtures/detector/smartphone-2.yml
201
236
  - spec/fixtures/detector/smartphone-3.yml
202
237
  - spec/fixtures/detector/smartphone-4.yml
238
+ - spec/fixtures/detector/smartphone-5.yml
239
+ - spec/fixtures/detector/smartphone-6.yml
240
+ - spec/fixtures/detector/smartphone-7.yml
241
+ - spec/fixtures/detector/smartphone-8.yml
242
+ - spec/fixtures/detector/smartphone-9.yml
203
243
  - spec/fixtures/detector/smartphone.yml
204
244
  - spec/fixtures/detector/tablet-1.yml
205
245
  - spec/fixtures/detector/tablet-2.yml
246
+ - spec/fixtures/detector/tablet-3.yml
247
+ - spec/fixtures/detector/tablet-4.yml
206
248
  - spec/fixtures/detector/tablet.yml
207
249
  - spec/fixtures/detector/tv.yml
208
250
  - spec/fixtures/detector/unknown.yml
251
+ - spec/fixtures/detector/wearable.yml
209
252
  - spec/fixtures/device/camera.yml
210
253
  - spec/fixtures/device/car_browser.yml
211
254
  - spec/fixtures/device/console.yml