useragent 0.4.12 → 0.4.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,14 +24,17 @@ class UserAgent
24
24
  compatibility == "compatible"
25
25
  end
26
26
 
27
+ def compatibility_view?
28
+ version == "7.0" && application.comment.detect { |c| c['Trident/'] }
29
+ end
30
+
27
31
  # Before version 4.0, Chrome Frame declared itself (unversioned) in a comment;
28
32
  # as of 4.0 it can declare itself versioned in a comment
29
33
  # or as a separate product with a version
30
-
31
34
  def chromeframe
32
35
  cf = application.comment.include?("chromeframe") || detect_product("chromeframe")
33
36
  return cf if cf
34
- cf_comment = application.comment.detect{|c| c['chromeframe/']}
37
+ cf_comment = application.comment.detect { |c| c['chromeframe/'] }
35
38
  cf_comment ? UserAgent.new(*cf_comment.split('/', 2)) : nil
36
39
  end
37
40
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: useragent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.12
4
+ version: 0.4.13
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-10-12 00:00:00.000000000 Z
12
+ date: 2012-11-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake