user_agent_parser 1.0.0 → 1.0.1

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
@@ -22,16 +22,18 @@ require 'user_agent_parser'
22
22
  ua = UserAgentParser.parse 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0;)'
23
23
  => #<UserAgentParser::UserAgent IE 9.0 (Windows Vista)>
24
24
  ua.to_s
25
- => "IE 9.0 (Windows Vista)"
25
+ => "IE 9.0"
26
26
  ua.family
27
27
  => "IE"
28
28
  ua.version.to_s
29
29
  => "9.0"
30
- ua.version[0]
30
+ ua.version.major
31
31
  => 9
32
- ua.version[1]
32
+ ua.version.minor
33
33
  => 0
34
- ua.os.name
34
+ os = ua.os
35
+ => #<UserAgentParser::OperatingSystem Windows Vista>
36
+ os.to_s
35
37
  => "Windows Vista"
36
38
  ```
37
39
 
@@ -17,7 +17,9 @@ module UserAgentParser
17
17
  end
18
18
 
19
19
  def inspect
20
- "#<#{self.class} #{to_s}>"
20
+ s = to_s
21
+ s += " (#{os})" if os
22
+ "#<#{self.class} #{s}>"
21
23
  end
22
24
 
23
25
  def ==(other)
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: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
47
47
  version: '0'
48
48
  segments:
49
49
  - 0
50
- hash: 2550516200831264271
50
+ hash: -2942024885060108428
51
51
  requirements: []
52
52
  rubyforge_project:
53
53
  rubygems_version: 1.8.23