useragent 0.15.2 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/user_agent.rb +1 -1
- data/lib/user_agent/browsers.rb +4 -1
- data/lib/user_agent/browsers/gecko.rb +11 -7
- 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: 751d90d864d4d4274012b45b1e90926759d7004d
|
|
4
|
+
data.tar.gz: eb86f15579cb8d21ba4475e6f6142b54d8546c1d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5a805566294d8832eb6def73486f653dd371dfe8690de198e772d661deea02f7d654bd8a4e71fd3e152f458ad761a0c8c93995428d206ba9658e9eb6e7bfac35
|
|
7
|
+
data.tar.gz: 24baeef26f95ba6a0af1226f815f7e82b7b22dbd98421099849ed8ea52d9ec9ce370f2f3eca9e9bbb8f9af9a924c0ab920aa3e12050dd9b05e415c8019ff30ce
|
data/lib/user_agent.rb
CHANGED
|
@@ -51,7 +51,7 @@ class UserAgent
|
|
|
51
51
|
|
|
52
52
|
include Comparable
|
|
53
53
|
|
|
54
|
-
# Any
|
|
54
|
+
# Any comparison between two user agents with different products will
|
|
55
55
|
# always return false.
|
|
56
56
|
def <=>(other)
|
|
57
57
|
if @product == other.product
|
data/lib/user_agent/browsers.rb
CHANGED
|
@@ -9,6 +9,8 @@ require 'user_agent/browsers/windows_media_player'
|
|
|
9
9
|
require 'user_agent/browsers/itunes'
|
|
10
10
|
require 'user_agent/browsers/apple_core_media'
|
|
11
11
|
require 'user_agent/browsers/libavformat'
|
|
12
|
+
require 'user_agent/browsers/playstation'
|
|
13
|
+
require 'user_agent/browsers/podcast_addict'
|
|
12
14
|
|
|
13
15
|
class UserAgent
|
|
14
16
|
module Browsers
|
|
@@ -19,7 +21,8 @@ class UserAgent
|
|
|
19
21
|
}.freeze
|
|
20
22
|
|
|
21
23
|
def self.all
|
|
22
|
-
[Edge, InternetExplorer, Opera, Chrome, ITunes,
|
|
24
|
+
[Edge, InternetExplorer, Opera, Chrome, ITunes, PlayStation, PodcastAddict, Webkit, Gecko,
|
|
25
|
+
WindowsMediaPlayer, AppleCoreMedia, Libavformat]
|
|
23
26
|
end
|
|
24
27
|
|
|
25
28
|
def self.extend(array)
|
|
@@ -24,7 +24,7 @@ class UserAgent
|
|
|
24
24
|
|
|
25
25
|
def platform
|
|
26
26
|
if comment = application.comment
|
|
27
|
-
if comment[0] == 'compatible'
|
|
27
|
+
if comment[0] == 'compatible' || comment[0] == 'Mobile'
|
|
28
28
|
nil
|
|
29
29
|
elsif /^Windows / =~ comment[0]
|
|
30
30
|
'Windows'
|
|
@@ -41,13 +41,17 @@ class UserAgent
|
|
|
41
41
|
def os
|
|
42
42
|
if comment = application.comment
|
|
43
43
|
i = if comment[1] == 'U'
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
2
|
|
45
|
+
elsif /^Windows / =~ comment[0] || /^Android/ =~ comment[0]
|
|
46
|
+
0
|
|
47
|
+
elsif comment[0] == 'Mobile'
|
|
48
|
+
nil
|
|
49
|
+
else
|
|
50
|
+
1
|
|
51
|
+
end
|
|
50
52
|
|
|
53
|
+
return nil if i.nil?
|
|
54
|
+
|
|
51
55
|
OperatingSystems.normalize_os(comment[i])
|
|
52
56
|
end
|
|
53
57
|
end
|
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
|
+
version: 0.16.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joshua Peek
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-
|
|
12
|
+
date: 2015-10-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rake
|