user_agent_parser 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of user_agent_parser might be problematic. Click here for more details.

data/Readme.md CHANGED
@@ -1,12 +1,12 @@
1
- # UserAgentParser
1
+ # UserAgentParser [![Build Status](https://secure.travis-ci.org/toolmantim/user_agent_parser.png?branch=master)](http://travis-ci.org/toolmantim/user_agent_parser)
2
2
 
3
- UserAgentParser is a simple, comprehensive Ruby gem for parsing user agent strings. It utilises [BrowserScope](http://www.browserscope.org/)'s UA parser via the most excellent [ua-parser project](https://github.com/tobie/ua-parser) by [Tobie Langel](https://github.com/tobie/).
3
+ UserAgentParser is a simple, comprehensive Ruby gem for parsing user agent strings. It uses [BrowserScope](http://www.browserscope.org/)'s parsing patterns via the most excellent [ua-parser project](https://github.com/tobie/ua-parser) by [Tobie Langel](https://github.com/tobie/).
4
4
 
5
5
  ## Requirements
6
6
 
7
7
  * Ruby >= 1.9.2
8
8
 
9
- Ruby 1.8.7 is not supported due to the requirement for the newer psych YAML parser. If you can get it working on 1.8.7 please send a pull request.
9
+ Note: Ruby 1.8.7 is not supported due to the requirement for the newer psych YAML parser. If you can get it working on 1.8.7 please send a pull request.
10
10
 
11
11
  ## Installation
12
12
 
@@ -58,10 +58,10 @@ Finished tests in 144.220280s, 89.0027 tests/s, 234.9739 assertions/s.
58
58
 
59
59
  ## Limitations
60
60
 
61
- Unlike the original Browserscope code there's no support for providing overrides from Javascript user agent detection. There's no current intention of adding support as the Javascript overrides were only necessary for IE 9 Platform Preview and older versions of [Chrome Frame](https://developers.google.com/chrome/chrome-frame/).
62
-
63
61
  Chrome Frame detection is not yet included, but once [ua-parser issue #14](https://github.com/tobie/ua-parser/issues/14) is resolved this gem will be updated along with it.
64
62
 
63
+ There's no support for providing overrides from Javascript user agent detection like there is with original BrowserScope library. The Javascript overrides were only necessary for detecting IE 9 Platform Preview and older versions of [Chrome Frame](https://developers.google.com/chrome/chrome-frame/).
64
+
65
65
  ## Contributing
66
66
 
67
67
  1. Fork
@@ -13,7 +13,7 @@ module UserAgentParser
13
13
  private
14
14
 
15
15
  def all_patterns
16
- @all_patterns ||= YAML.load(File.read(UserAgentParser.patterns_path))
16
+ @all_patterns ||= YAML.load_file(UserAgentParser.patterns_path)
17
17
  end
18
18
 
19
19
  def patterns type
@@ -114,6 +114,10 @@ user_agent_parsers:
114
114
  - regex: '(CrMo)/(\d+)\.(\d+)\.(\d+)\.(\d+)'
115
115
  family_replacement: 'Chrome Mobile'
116
116
 
117
+ # Chrome Frame must come before MSIE.
118
+ - regex: '(chromeframe)/(\d+)\.(\d+)\.(\d+)'
119
+ family_replacement: 'Chrome Frame'
120
+
117
121
  # UC Browser
118
122
  - regex: '(UC Browser)(\d+)\.(\d+)\.(\d+)'
119
123
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: user_agent_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
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-05-02 00:00:00.000000000 Z
12
+ date: 2012-05-06 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A simple, comprehensive Ruby gem for parsing user agent strings with
15
15
  the help of BrowserScope's UA database
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
47
47
  version: '0'
48
48
  segments:
49
49
  - 0
50
- hash: 1405063737909332599
50
+ hash: -1400916062182303731
51
51
  requirements: []
52
52
  rubyforge_project:
53
53
  rubygems_version: 1.8.23