useragent_parser 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/config/regexes.yaml +12 -0
- data/lib/useragent_parser/user_agent.rb +1 -0
- data/lib/useragent_parser/version.rb +1 -1
- data/spec/fixtures/pgts_browser_list.yaml +12 -12
- data/spec/fixtures/test_referrers.yaml +6 -0
- data/spec/fixtures/test_user_agent_parser.yaml +30 -0
- data/spec/fixtures/test_user_agent_parser_email.yaml +6 -0
- data/spec/user_agent_spec.rb +4 -0
- metadata +2 -2
data/config/regexes.yaml
CHANGED
@@ -150,6 +150,9 @@ user_agent_parsers:
|
|
150
150
|
- regex: '(chromeframe)/(\d+)\.(\d+)\.(\d+)'
|
151
151
|
family_replacement: 'Chrome Frame'
|
152
152
|
|
153
|
+
# AOL must come before MSIE.
|
154
|
+
- regex: '(AOL)/(\d+)\.(\d+)'
|
155
|
+
|
153
156
|
# UC Browser
|
154
157
|
- regex: '(UC Browser)(\d+)\.(\d+)\.(\d+)'
|
155
158
|
|
@@ -870,9 +873,15 @@ referrer_parsers:
|
|
870
873
|
- regex: '(mail\.yahoo\.com)'
|
871
874
|
referrer_replacement: 'Yahoo! Mail'
|
872
875
|
|
876
|
+
- regex: '(mail\.yahoo\.net)'
|
877
|
+
referrer_replacement: 'Yahoo! Mail'
|
878
|
+
|
873
879
|
- regex: '(email\.freenet\.de)'
|
874
880
|
referrer_replacement: 'WEB.DE'
|
875
881
|
|
882
|
+
- regex: '(webmail\.freenet\.de)'
|
883
|
+
referrer_replacement: 'WEB.DE'
|
884
|
+
|
876
885
|
- regex: '(mail\.aol\.com)'
|
877
886
|
referrer_replacement: 'AOL Webmail'
|
878
887
|
|
@@ -894,6 +903,9 @@ referrer_parsers:
|
|
894
903
|
- regex: '(communicator\.strato\.de)'
|
895
904
|
referrer_replacement: 'Strato'
|
896
905
|
|
906
|
+
- regex: '(www\.arcor-usercontent\.de)'
|
907
|
+
referrer_replacement: 'Arcor'
|
908
|
+
|
897
909
|
- regex: '.+'
|
898
910
|
referrer_replacement: 'Other'
|
899
911
|
|
@@ -150,9 +150,9 @@ test_cases:
|
|
150
150
|
minor:
|
151
151
|
patch:
|
152
152
|
- user_agent_string: "AOL/8.0 (Lindows 2003)"
|
153
|
-
family: "
|
154
|
-
major:
|
155
|
-
minor:
|
153
|
+
family: "AOL"
|
154
|
+
major: '8'
|
155
|
+
minor: '0'
|
156
156
|
patch:
|
157
157
|
- user_agent_string: "aolbrowser/1.1 InterCon-Web-Library/1.2"
|
158
158
|
family: "Other"
|
@@ -9190,9 +9190,9 @@ test_cases:
|
|
9190
9190
|
minor:
|
9191
9191
|
patch:
|
9192
9192
|
- user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20020730 AOL/7.0"
|
9193
|
-
family: "
|
9194
|
-
major:
|
9195
|
-
minor:
|
9193
|
+
family: "AOL"
|
9194
|
+
major: '7'
|
9195
|
+
minor: '0'
|
9196
9196
|
patch:
|
9197
9197
|
- user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20020909"
|
9198
9198
|
family: "Other"
|
@@ -13920,14 +13920,14 @@ test_cases:
|
|
13920
13920
|
minor:
|
13921
13921
|
patch:
|
13922
13922
|
- user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-GB; rv:1.0.2) Gecko/20020924 AOL/7.0"
|
13923
|
-
family: "
|
13924
|
-
major:
|
13925
|
-
minor:
|
13923
|
+
family: "AOL"
|
13924
|
+
major: "7"
|
13925
|
+
minor: "0"
|
13926
13926
|
patch:
|
13927
13927
|
- user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.2) Gecko/20020924 AOL/7.0"
|
13928
|
-
family: "
|
13929
|
-
major:
|
13930
|
-
minor:
|
13928
|
+
family: "AOL"
|
13929
|
+
major: "7"
|
13930
|
+
minor: "0"
|
13931
13931
|
patch:
|
13932
13932
|
- user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20030306 Camino/0.7"
|
13933
13933
|
family: "Camino"
|
@@ -6,9 +6,15 @@ test_cases:
|
|
6
6
|
- referrer_string: 'http://de.mc250.mail.yahoo.com/mc/welcome?.gx=1&.tm=1290672405&.rand=4rtrlgfb1p8na'
|
7
7
|
family: 'Yahoo! Mail'
|
8
8
|
|
9
|
+
- referrer_string: 'http://36ohk6dgmcd1n-c.c.yom.mail.yahoo.net/om/api/1.0/openmail.app.invoke'
|
10
|
+
family: 'Yahoo! Mail'
|
11
|
+
|
9
12
|
- referrer_string: 'http://email.freenet.de/Email/View/Body?msg=4681&folder=INBOX&showImages=0&showImages=1&updateShowImagesStatus=1'
|
10
13
|
family: 'WEB.DE'
|
11
14
|
|
15
|
+
- referrer_string: 'http://webmail.freenet.de/Email/View/Body?callType=html&account='
|
16
|
+
family: 'WEB.DE'
|
17
|
+
|
12
18
|
- referrer_string: 'http://webmail.aol.com/42951/aol/en-us/Suite.aspx'
|
13
19
|
family: 'AOL Webmail'
|
14
20
|
|
@@ -358,3 +358,33 @@ test_cases:
|
|
358
358
|
minor: '0'
|
359
359
|
patch: '660'
|
360
360
|
|
361
|
+
- user_agent_string: 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)'
|
362
|
+
family: 'IE'
|
363
|
+
major: '10'
|
364
|
+
minor: '0'
|
365
|
+
patch:
|
366
|
+
|
367
|
+
- user_agent_string: 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; Touch)'
|
368
|
+
family: 'IE'
|
369
|
+
major: '10'
|
370
|
+
minor: '0'
|
371
|
+
patch:
|
372
|
+
|
373
|
+
- user_agent_string: 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)'
|
374
|
+
family: 'IE'
|
375
|
+
major: '10'
|
376
|
+
minor: '0'
|
377
|
+
patch:
|
378
|
+
|
379
|
+
- user_agent_string: 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0)'
|
380
|
+
family: 'IE'
|
381
|
+
major: '10'
|
382
|
+
minor: '0'
|
383
|
+
patch:
|
384
|
+
|
385
|
+
- user_agent_string: 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0)'
|
386
|
+
family: 'IE'
|
387
|
+
major: '10'
|
388
|
+
minor: '0'
|
389
|
+
patch:
|
390
|
+
|
@@ -2187,3 +2187,9 @@ test_cases:
|
|
2187
2187
|
major:
|
2188
2188
|
minor:
|
2189
2189
|
patch:
|
2190
|
+
|
2191
|
+
- user_agent_string: '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; Tablet PC 2.0; InfoPath.3; BOIE9;ENIN; Microsoft Outlook 15.0.4128; ms-office; MSOffice 15)'
|
2192
|
+
family: 'Outlook'
|
2193
|
+
major: '15'
|
2194
|
+
minor:
|
2195
|
+
patch:
|
data/spec/user_agent_spec.rb
CHANGED
@@ -111,6 +111,10 @@ describe UseragentParser::UserAgent do
|
|
111
111
|
it "should should recognize Outlook 2010" do
|
112
112
|
UseragentParser.parse_with_referrer('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; InfoPath.3; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; ms-office; MSOffice 14)').email_version.should == 'Outlook 2010'
|
113
113
|
end
|
114
|
+
|
115
|
+
it "should should recognize Outlook 2013" do
|
116
|
+
UseragentParser.parse_with_referrer('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; Tablet PC 2.0; InfoPath.3; BOIE9;ENIN; Microsoft Outlook 15.0.4128; ms-office; MSOffice 15)').email_version.should == 'Outlook 2013'
|
117
|
+
end
|
114
118
|
end
|
115
119
|
|
116
120
|
describe "Apple Mail" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: useragent_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|