useragent 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/user_agent/browsers/internet_explorer.rb +7 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 756a613a6bf15fa02a568deedcf0793efe787d94
|
4
|
+
data.tar.gz: e26e84bdf913d9f61cb6a9b3cee31534f4661e9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74bf4b404e15e94574f04636cf6ce784b9df02486c0d69c1652655db492996e1b7426ed6a546deeee27c3222334278845ca7365d8eca8356c24c3ae3b4874d62
|
7
|
+
data.tar.gz: d7382d205d07fa86149072d364427bd72cdc847904a06d725eac0c2687abee098ce4d210be0b8c69075ed7278faa9816317211ed8f68ad3ff72871137ace0e4b
|
@@ -3,9 +3,9 @@ class UserAgent
|
|
3
3
|
class InternetExplorer < Base
|
4
4
|
def self.extend?(agent)
|
5
5
|
agent.application &&
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
agent.application.comment &&
|
7
|
+
(agent.application.comment[1] =~ /MSIE/ ||
|
8
|
+
agent.application.comment.join('; ') =~ /Trident.+rv:/)
|
9
9
|
end
|
10
10
|
|
11
11
|
def browser
|
@@ -13,15 +13,9 @@ class UserAgent
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def version
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
def compatibility
|
20
|
-
application.comment[0]
|
21
|
-
end
|
22
|
-
|
23
|
-
def compatible?
|
24
|
-
compatibility == "compatible"
|
16
|
+
if version = application.comment.join('; ')[/(MSIE\s|rv:)([\d\.]+)/, 2]
|
17
|
+
Version.new(version)
|
18
|
+
end
|
25
19
|
end
|
26
20
|
|
27
21
|
def compatibility_view?
|
@@ -43,7 +37,7 @@ class UserAgent
|
|
43
37
|
end
|
44
38
|
|
45
39
|
def os
|
46
|
-
OperatingSystems.normalize_os(application.comment[
|
40
|
+
OperatingSystems.normalize_os(application.comment.join('; ').match(/Windows NT [\d\.]+|Windows Phone OS [\d\.]+/).to_s)
|
47
41
|
end
|
48
42
|
end
|
49
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: useragent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Peek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|