schmobile 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rack/schmobile/request_extension.rb +4 -0
- data/schmobile.gemspec +1 -1
- data/test/test_rack_request.rb +11 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/schmobile.gemspec
CHANGED
data/test/test_rack_request.rb
CHANGED
@@ -3,6 +3,17 @@ require 'helper'
|
|
3
3
|
class TestRackRequest < Test::Unit::TestCase
|
4
4
|
|
5
5
|
context "Rack::Request" do
|
6
|
+
context "#is_device?" do
|
7
|
+
should "match devices as part of the user agent case insensitively" do
|
8
|
+
assert request("HTTP_USER_AGENT" => ipad).is_device?("ipad")
|
9
|
+
assert !request("HTTP_USER_AGENT" => ipad).is_device?("blackberry")
|
10
|
+
assert request("HTTP_USER_AGENT" => blackberry).is_device?("blackberry")
|
11
|
+
assert !request("HTTP_USER_AGENT" => iphone).is_device?("blackberry")
|
12
|
+
assert request("HTTP_USER_AGENT" => iphone).is_device?("iphone")
|
13
|
+
assert !request("HTTP_USER_AGENT" => msie6).is_device?("iphone")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
6
17
|
context "#is_mobile?" do
|
7
18
|
context "without params" do
|
8
19
|
setup do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schmobile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Morten Primdahl
|