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
@@ -1,162 +1,193 @@
1
- -
1
+ ---
2
+ -
2
3
  user_agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20130316 Songbird/1.12.1 (20140112193149)
3
4
  client:
4
5
  type: mediaplayer
5
6
  name: Songbird
6
7
  version: "1.12.1"
7
- -
8
+ -
8
9
  user_agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20130316 Nightingale/1.12.2 (20140112193149)
9
10
  client:
10
11
  type: mediaplayer
11
12
  name: Nightingale
12
13
  version: "1.12.2"
13
- -
14
+ -
14
15
  user_agent: iTunes/10.2.1 (Macintosh; Intel Mac OS X 10.7) AppleWebKit/534.20.8
15
16
  client:
16
17
  type: mediaplayer
17
18
  name: iTunes
18
19
  version: "10.2.1"
19
- -
20
+ -
20
21
  user_agent: iTunes/10.2.1 (Windows; Microsoft Windows 7 Enterprise Edition Service Pack 1 (Build 7601)) AppleWebKit/533.20.25
21
22
  client:
22
23
  type: mediaplayer
23
24
  name: iTunes
24
25
  version: "10.2.1"
25
- -
26
+ -
26
27
  user_agent: VLC/2.1.0 LibVLC/2.1.0
27
28
  client:
28
29
  type: mediaplayer
29
30
  name: VLC
30
31
  version: "2.1.0"
31
- -
32
+ -
32
33
  user_agent: LibVLC/2.2.3 (LIVE555 Streaming Media v2015.10.12)
33
34
  client:
34
35
  type: mediaplayer
35
36
  name: VLC
36
37
  version: "2.2.3"
37
- -
38
+ -
38
39
  user_agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; FunWebProducts; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; Windows-Media-Player/10.00.00.3990)
39
40
  client:
40
41
  type: mediaplayer
41
42
  name: Windows Media Player
42
43
  version: "10.00.00.3990"
43
- -
44
+ -
44
45
  user_agent: Windows-Media-Player/11.0.6001.7000
45
46
  client:
46
47
  type: mediaplayer
47
48
  name: Windows Media Player
48
49
  version: "11.0.6001.7000"
49
- -
50
+ -
50
51
  user_agent: SAMSUNG-GT-S3850/S3850CXKD1 SHP/VPP/R5 Dolfin/2.0 NexPlayer/3.0 SMM-MMS/1.2.0 profile/MIDP-2.1 configuration/CLDC-1.1 OPN-B
51
52
  client:
52
53
  type: mediaplayer
53
54
  name: NexPlayer
54
55
  version: "3.0"
55
- -
56
+ -
56
57
  user_agent: Banshee 1.5.1 (http://banshee-project.org/)
57
58
  client:
58
59
  type: mediaplayer
59
60
  name: Banshee
60
61
  version: "1.5.1"
61
- -
62
+ -
62
63
  user_agent: Banshee/2.6.2 (http://banshee-project.org/)
63
64
  client:
64
65
  type: mediaplayer
65
66
  name: Banshee
66
67
  version: "2.6.2"
67
- -
68
+ -
68
69
  user_agent: QuickTime/7.6.6 (qtver=7.6.6;cpu=IA32;os=Mac 10.6.8)
69
70
  client:
70
71
  type: mediaplayer
71
72
  name: QuickTime
72
73
  version: "7.6.6"
73
- -
74
+ -
74
75
  user_agent: QuickTime.7.7.4 (qtver=7.7.4;os=Windows NT 6.0Service Pack 2)
75
76
  client:
76
77
  type: mediaplayer
77
78
  name: QuickTime
78
79
  version: "7.7.4"
79
- -
80
+ -
80
81
  user_agent: QuickTime (qtver=7.0.2a26;os=Windows NT 6.0)
81
82
  client:
82
83
  type: mediaplayer
83
84
  name: QuickTime
84
85
  version: "7.0.2"
85
- -
86
+ -
86
87
  user_agent: QuickTime E-/7.7.5 (qtver=7.7.5;os=Windows NT 6.1)
87
88
  client:
88
89
  type: mediaplayer
89
90
  name: QuickTime
90
91
  version: "7.7.5"
91
- -
92
+ -
92
93
  user_agent: FlyCast/1.34 (BlackBerry; 8330/4.5.0.131 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/-1)
93
94
  client:
94
95
  type: mediaplayer
95
96
  name: FlyCast
96
97
  version: "1.34"
97
- -
98
+ -
98
99
  user_agent: XBMC/9.04 r19840 (Mac OS X; Darwin 9.6.0; http://www.xbmc.org)
99
100
  client:
100
101
  type: mediaplayer
101
102
  name: XBMC
102
103
  version: "9.04"
103
- -
104
+ -
104
105
  user_agent: XBMC/9.04-beta1 r19639 (Windows; Windows XP Professional Service Pack 2 build 2600; http://www.xbmc.org)
105
106
  client:
106
107
  type: mediaplayer
107
108
  name: XBMC
108
109
  version: "9.04"
109
- -
110
+ -
110
111
  user_agent: SubStream/0.7 CFNetwork/485.12.30 Darwin/10.4.0
111
112
  client:
112
113
  type: mediaplayer
113
114
  name: SubStream
114
115
  version: "0.7"
115
- -
116
+ -
116
117
  user_agent: MediaMonkey 4.1.1.1703
117
118
  client:
118
119
  type: mediaplayer
119
120
  name: MediaMonkey
120
121
  version: "4.1.1.1703"
121
- -
122
+ -
122
123
  user_agent: Clementine 1.2.2
123
124
  client:
124
125
  type: mediaplayer
125
126
  name: Clementine
126
127
  version: "1.2.2"
127
- -
128
+ -
128
129
  user_agent: WAFA/1.2.10 (Linux; Android 4.1; Winamp) Replicant/1.0
129
130
  client:
130
131
  type: mediaplayer
131
132
  name: Winamp
132
- version:
133
- -
133
+ version: ""
134
+ -
134
135
  user_agent: WinampMPEG/5.66, Ultravox/2.1
135
136
  client:
136
137
  type: mediaplayer
137
138
  name: Winamp
138
139
  version: "5.66"
139
- -
140
+ -
140
141
  user_agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko Miro/2.0.4 (http://www.getmiro.com/)
141
142
  client:
142
143
  type: mediaplayer
143
144
  name: Miro
144
145
  version: "2.0.4"
145
- -
146
+ -
146
147
  user_agent: Miro/3.0.1 (http://www.getmiro.com/; Darwin 8.11.1 i386)
147
148
  client:
148
149
  type: mediaplayer
149
150
  name: Miro
150
151
  version: "3.0.1"
151
- -
152
+ -
152
153
  user_agent: Kodi/14.0 (Macintosh; Intel Mac OS X 10_10_3) App_Bitness/64 Version/14.0-Git:2014-12-23-ad747d9-dirty
153
154
  client:
154
155
  type: mediaplayer
155
156
  name: Kodi
156
157
  version: "14.0"
157
- -
158
+ -
158
159
  user_agent: foobar2000/1.3.10
159
160
  client:
160
161
  type: mediaplayer
161
162
  name: Foobar2000
162
163
  version: "1.3.10"
164
+ -
165
+ user_agent: Linux UPnP/1.0 Sonos/61.1-83220 (ZPS1)
166
+ client:
167
+ type: mediaplayer
168
+ name: SONOS
169
+ version: 61.1
170
+ -
171
+ user_agent: Linux UPnP/1.0 Sonos/57.4-83220 (ZP120)
172
+ client:
173
+ type: mediaplayer
174
+ name: SONOS
175
+ version: 57.4
176
+ -
177
+ user_agent: Linux UPnP/1.0 Sonos/61.1-83220 (ZPS3)
178
+ client:
179
+ type: mediaplayer
180
+ name: SONOS
181
+ version: 61.1
182
+ -
183
+ user_agent: HTC Streaming Player htc / 1.0 / o2_de / 4.2.2
184
+ client:
185
+ type: mediaplayer
186
+ name: HTC Streaming Player
187
+ version: ""
188
+ -
189
+ user_agent: MPlayer 1.1-4.6
190
+ client:
191
+ type: mediaplayer
192
+ name: MPlayer
193
+ version: "1.1"