device_detector 1.0.3 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +15 -0
- data/README.md +8 -7
- data/lib/device_detector/bot.rb +2 -2
- data/lib/device_detector/browser.rb +364 -0
- data/lib/device_detector/client.rb +11 -2
- data/lib/device_detector/device.rb +1247 -22
- data/lib/device_detector/memory_cache.rb +5 -5
- data/lib/device_detector/metadata_extractor.rb +7 -8
- data/lib/device_detector/model_extractor.rb +3 -3
- data/lib/device_detector/name_extractor.rb +2 -2
- data/lib/device_detector/os.rb +150 -116
- data/lib/device_detector/parser.rb +23 -10
- data/lib/device_detector/version.rb +1 -1
- data/lib/device_detector/version_extractor.rb +29 -2
- data/lib/device_detector.rb +73 -40
- data/regexes/bots.yml +868 -62
- data/regexes/client/browser_engine.yml +11 -2
- data/regexes/client/browsers.yml +1132 -112
- data/regexes/client/feed_readers.yml +5 -11
- data/regexes/client/libraries.yml +86 -2
- data/regexes/client/mediaplayers.yml +39 -3
- data/regexes/client/mobile_apps.yml +940 -66
- data/regexes/client/pim.yml +66 -3
- data/regexes/device/cameras.yml +6 -6
- data/regexes/device/car_browsers.yml +23 -3
- data/regexes/device/consoles.yml +15 -3
- data/regexes/device/mobiles.yml +18351 -3566
- data/regexes/device/notebooks.yml +114 -0
- data/regexes/device/portable_media_player.yml +36 -9
- data/regexes/device/shell_tv.yml +117 -0
- data/regexes/device/televisions.yml +440 -35
- data/regexes/oss.yml +635 -284
- data/regexes/vendorfragments.yml +5 -1
- metadata +21 -118
- data/.gitignore +0 -14
- data/.travis.yml +0 -14
- data/Gemfile +0 -8
- data/Rakefile +0 -96
- data/device_detector.gemspec +0 -26
- data/spec/device_detector/bot_fixtures_spec.rb +0 -30
- data/spec/device_detector/client_fixtures_spec.rb +0 -31
- data/spec/device_detector/concrete_user_agent_spec.rb +0 -135
- data/spec/device_detector/detector_fixtures_spec.rb +0 -100
- data/spec/device_detector/device_fixtures_spec.rb +0 -36
- data/spec/device_detector/device_spec.rb +0 -151
- data/spec/device_detector/memory_cache_spec.rb +0 -148
- data/spec/device_detector/model_extractor_spec.rb +0 -63
- data/spec/device_detector/os_fixtures_spec.rb +0 -26
- data/spec/device_detector/version_extractor_spec.rb +0 -79
- data/spec/device_detector_spec.rb +0 -189
- data/spec/fixtures/client/browser.yml +0 -2206
- data/spec/fixtures/client/feed_reader.yml +0 -199
- data/spec/fixtures/client/library.yml +0 -175
- data/spec/fixtures/client/mediaplayer.yml +0 -163
- data/spec/fixtures/client/mobile_app.yml +0 -193
- data/spec/fixtures/client/pim.yml +0 -115
- data/spec/fixtures/detector/bots.yml +0 -3260
- data/spec/fixtures/detector/camera.yml +0 -121
- data/spec/fixtures/detector/car_browser.yml +0 -21
- data/spec/fixtures/detector/console.yml +0 -281
- data/spec/fixtures/detector/desktop.yml +0 -5361
- data/spec/fixtures/detector/feature_phone.yml +0 -891
- data/spec/fixtures/detector/feed_reader.yml +0 -551
- data/spec/fixtures/detector/mediaplayer.yml +0 -210
- data/spec/fixtures/detector/mobile_apps.yml +0 -456
- data/spec/fixtures/detector/phablet.yml +0 -3785
- data/spec/fixtures/detector/portable_media_player.yml +0 -178
- data/spec/fixtures/detector/smart_display.yml +0 -61
- data/spec/fixtures/detector/smartphone-1.yml +0 -9953
- data/spec/fixtures/detector/smartphone-10.yml +0 -9924
- data/spec/fixtures/detector/smartphone-11.yml +0 -9889
- data/spec/fixtures/detector/smartphone-12.yml +0 -8655
- data/spec/fixtures/detector/smartphone-2.yml +0 -9967
- data/spec/fixtures/detector/smartphone-3.yml +0 -9887
- data/spec/fixtures/detector/smartphone-4.yml +0 -9911
- data/spec/fixtures/detector/smartphone-5.yml +0 -9933
- data/spec/fixtures/detector/smartphone-6.yml +0 -9923
- data/spec/fixtures/detector/smartphone-7.yml +0 -9892
- data/spec/fixtures/detector/smartphone-8.yml +0 -9896
- data/spec/fixtures/detector/smartphone-9.yml +0 -9928
- data/spec/fixtures/detector/smartphone.yml +0 -9984
- data/spec/fixtures/detector/tablet-1.yml +0 -10023
- data/spec/fixtures/detector/tablet-2.yml +0 -9968
- data/spec/fixtures/detector/tablet-3.yml +0 -7787
- data/spec/fixtures/detector/tablet.yml +0 -9951
- data/spec/fixtures/detector/tv.yml +0 -3333
- data/spec/fixtures/detector/unknown.yml +0 -3283
- data/spec/fixtures/device/camera.yml +0 -19
- data/spec/fixtures/device/car_browser.yml +0 -7
- data/spec/fixtures/device/console.yml +0 -79
- data/spec/fixtures/parser/oss.yml +0 -1047
- data/spec/fixtures/parser/vendorfragments.yml +0 -162
- data/spec/spec_helper.rb +0 -9
@@ -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
|
4
|
+
# @link https://matomo.org
|
5
5
|
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
6
6
|
###############
|
7
7
|
|
@@ -9,18 +9,20 @@ Apple:
|
|
9
9
|
regex: '(?:Apple-)?iPod'
|
10
10
|
device: 'portable media player'
|
11
11
|
models:
|
12
|
-
- regex: '(?:Apple-)?iPod1[C,]1'
|
12
|
+
- regex: '(?:Apple-)?iPod1[C,_]?1'
|
13
13
|
model: 'iPod Touch 1G'
|
14
|
-
- regex: '(?:Apple-)?iPod2[C,]1'
|
14
|
+
- regex: '(?:Apple-)?iPod2[C,_]?1'
|
15
15
|
model: 'iPod Touch 2G'
|
16
|
-
- regex: '(?:Apple-)?iPod3[C,]1'
|
16
|
+
- regex: '(?:Apple-)?iPod3[C,_]?1'
|
17
17
|
model: 'iPod Touch 3'
|
18
|
-
- regex: '(?:Apple-)?iPod4[C,]1'
|
18
|
+
- regex: '(?:Apple-)?iPod4[C,_]?1'
|
19
19
|
model: 'iPod Touch 4'
|
20
|
-
- regex: '(?:Apple-)?iPod5[C,]1'
|
20
|
+
- regex: '(?:Apple-)?iPod5[C,_]?1'
|
21
21
|
model: 'iPod Touch 5'
|
22
|
-
- regex: '(?:Apple-)?iPod7[C,]1'
|
22
|
+
- regex: '(?:Apple-)?iPod7[C,_]?1'
|
23
23
|
model: 'iPod Touch 6'
|
24
|
+
- regex: '(?:Apple-)?iPod9[C,_]?1'
|
25
|
+
model: 'iPod Touch 7'
|
24
26
|
- regex: '(?:Apple-)?iPod'
|
25
27
|
model: 'iPod Touch'
|
26
28
|
|
@@ -29,14 +31,22 @@ Cowon:
|
|
29
31
|
device: 'portable media player'
|
30
32
|
model: '$1'
|
31
33
|
|
34
|
+
# FiiO (https://www.fiio.com/)
|
35
|
+
FiiO:
|
36
|
+
regex: 'FiiO'
|
37
|
+
device: 'portable media player'
|
38
|
+
models:
|
39
|
+
- regex: 'M15'
|
40
|
+
model: 'M15'
|
41
|
+
|
32
42
|
Microsoft:
|
33
43
|
regex: 'Microsoft ZuneHD'
|
34
44
|
device: 'portable media player'
|
35
45
|
model: 'Zune HD'
|
36
46
|
|
37
47
|
Panasonic:
|
38
|
-
device: 'portable media player'
|
39
48
|
regex: '(SV-MV100)'
|
49
|
+
device: 'portable media player'
|
40
50
|
model: '$1'
|
41
51
|
|
42
52
|
Samsung:
|
@@ -52,8 +62,25 @@ Samsung:
|
|
52
62
|
- regex: 'YP-GI1'
|
53
63
|
model: 'Galaxy Player 4.2'
|
54
64
|
- regex: 'YP-GP1'
|
55
|
-
model: 'Galaxy Player 5.8
|
65
|
+
model: 'Galaxy Player 5.8'
|
56
66
|
- regex: 'YP-G50'
|
57
67
|
model: 'Galaxy Player 50'
|
58
68
|
- regex: 'YP-GB70D'
|
59
69
|
model: 'Galaxy Player 70 Plus'
|
70
|
+
|
71
|
+
Wizz:
|
72
|
+
regex: '(DV-PTB1080)(?:[);/ ]|$)'
|
73
|
+
device: 'portable media player'
|
74
|
+
model: '$1'
|
75
|
+
|
76
|
+
# Sonos (sonos.com)
|
77
|
+
SONOS:
|
78
|
+
regex: 'Sonos/.+\((?:ZP.+)\)|Sonos;'
|
79
|
+
device: 'portable media player'
|
80
|
+
models:
|
81
|
+
- regex: '\((ZPS(?:[13569]|1[1-578]|2[03])|ZP90)\)'
|
82
|
+
model: '$1'
|
83
|
+
- regex: 'Sonos;Play5;'
|
84
|
+
model: 'Play:5'
|
85
|
+
- regex: 'Sonos;One;'
|
86
|
+
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: ''
|