useragent 0.4.8 → 0.4.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/user_agent/browsers/webkit.rb +10 -2
  2. metadata +5 -7
@@ -81,9 +81,11 @@ class UserAgent
81
81
  if application.nil?
82
82
  nil
83
83
  elsif application.comment[0] =~ /Symbian/
84
- 'Symbian'
84
+ 'Symbian'
85
85
  elsif application.comment[0] =~ /webOS/
86
86
  'webOS'
87
+ elsif application.comment[0] =~ /Windows/
88
+ 'Windows'
87
89
  else
88
90
  application.comment[0]
89
91
  end
@@ -103,7 +105,13 @@ class UserAgent
103
105
  elsif platform == 'Symbian'
104
106
  application.comment[0]
105
107
  elsif application
106
- application.comment[2].nil? ? OperatingSystems.normalize_os(application.comment[1]) : OperatingSystems.normalize_os(application.comment[2])
108
+ if application.comment[0] =~ /Windows NT/
109
+ OperatingSystems.normalize_os(application.comment[0])
110
+ elsif application.comment[2].nil?
111
+ OperatingSystems.normalize_os(application.comment[1])
112
+ else
113
+ OperatingSystems.normalize_os(application.comment[2])
114
+ end
107
115
  else
108
116
  nil
109
117
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: useragent
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 8
10
- version: 0.4.8
9
+ - 9
10
+ version: 0.4.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Joshua Peek
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-28 00:00:00 -05:00
19
- default_executable:
18
+ date: 2012-05-06 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: rake
@@ -68,7 +67,6 @@ files:
68
67
  - lib/useragent.rb
69
68
  - LICENSE
70
69
  - README.rdoc
71
- has_rdoc: true
72
70
  homepage: http://github.com/josh/useragent
73
71
  licenses: []
74
72
 
@@ -98,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
96
  requirements: []
99
97
 
100
98
  rubyforge_project:
101
- rubygems_version: 1.6.2
99
+ rubygems_version: 1.8.15
102
100
  signing_key:
103
101
  specification_version: 3
104
102
  summary: HTTP User Agent parser