detect_browser_os 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/detect_browser_os/version.rb +1 -1
- data/lib/detect_browser_os.rb +2 -0
- metadata +24 -25
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cca0ee8db626587063c07c47301185da1e7ad1b2
|
4
|
+
data.tar.gz: a7c5f10413097c7f28a341c87720f67c9f38a44c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: dca40dd1131ba9a56f2550f7b12a7cd5ff70174b17ec45637b838fe00201449d53a52ed53dcde0c37407cf31c4309c9d1fdf642316024350c2f9a0a4d8933095
|
7
|
+
data.tar.gz: 245e37d56b9474e2097b65ba17bdac2ae5b2e3def3af7c326b4190be43d81349d0bd4133e32a0a1cace6772c150a988fed5fdb53532432936216b78faa3628c2
|
data/lib/detect_browser_os.rb
CHANGED
@@ -22,6 +22,7 @@ def detect_os(user_agent = request.user_agent)
|
|
22
22
|
nil
|
23
23
|
end
|
24
24
|
end
|
25
|
+
|
25
26
|
def detect_browser(user_agent = request.user_agent)
|
26
27
|
ua = (user_agent || "").downcase
|
27
28
|
case ua
|
@@ -31,6 +32,7 @@ def detect_browser(user_agent = request.user_agent)
|
|
31
32
|
o.join(" ")
|
32
33
|
when /webtv/ ; "gecko"
|
33
34
|
when /msie (\d+)/ ; "ie ie#{$1}"
|
35
|
+
when /trident/ ; "gecko ie#{(ua.match(/rv:(\d+)/) || ['',''])[1]}"
|
34
36
|
when %r{firefox/3.5} ; "gecko ff3 ff3_5"
|
35
37
|
when %r{firefox} ; "gecko ff#{(ua.match(/firefox\/(\d+)/) || ['',''])[1]}"
|
36
38
|
when /konqueror/ ; "konqueror"
|
metadata
CHANGED
@@ -1,38 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: detect_browser_os
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Ryan Sonnek
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-03-04 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: thoughtbot-shoulda
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: rake
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
|
-
- - =
|
31
|
+
- - '='
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: 0.9.2.2
|
33
34
|
type: :development
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.9.2.2
|
36
41
|
description: add css classes to your markup based on the end users browser and operating
|
37
42
|
system.
|
38
43
|
email:
|
@@ -41,8 +46,8 @@ executables: []
|
|
41
46
|
extensions: []
|
42
47
|
extra_rdoc_files: []
|
43
48
|
files:
|
44
|
-
- .document
|
45
|
-
- .gitignore
|
49
|
+
- ".document"
|
50
|
+
- ".gitignore"
|
46
51
|
- Gemfile
|
47
52
|
- LICENSE
|
48
53
|
- README.rdoc
|
@@ -54,34 +59,28 @@ files:
|
|
54
59
|
- test/test_detect_browser_os.rb
|
55
60
|
homepage: http://github.com/wireframe/detect_browser_os
|
56
61
|
licenses: []
|
62
|
+
metadata: {}
|
57
63
|
post_install_message:
|
58
64
|
rdoc_options: []
|
59
65
|
require_paths:
|
60
66
|
- lib
|
61
67
|
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
-
none: false
|
63
68
|
requirements:
|
64
|
-
- -
|
69
|
+
- - ">="
|
65
70
|
- !ruby/object:Gem::Version
|
66
71
|
version: '0'
|
67
|
-
segments:
|
68
|
-
- 0
|
69
|
-
hash: 3798864389589754663
|
70
72
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
-
none: false
|
72
73
|
requirements:
|
73
|
-
- -
|
74
|
+
- - ">="
|
74
75
|
- !ruby/object:Gem::Version
|
75
76
|
version: '0'
|
76
|
-
segments:
|
77
|
-
- 0
|
78
|
-
hash: 3798864389589754663
|
79
77
|
requirements: []
|
80
78
|
rubyforge_project: detect_browser_os
|
81
|
-
rubygems_version:
|
79
|
+
rubygems_version: 2.4.6
|
82
80
|
signing_key:
|
83
|
-
specification_version:
|
81
|
+
specification_version: 4
|
84
82
|
summary: detect end users browser and operating system.
|
85
83
|
test_files:
|
86
84
|
- test/helper.rb
|
87
85
|
- test/test_detect_browser_os.rb
|
86
|
+
has_rdoc:
|