Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ipod/ipad

  • Loading branch information...
commit e471cc2193ce0e8610b147b819d8e9976101a844 1 parent 4baccd2
@ambs ambs authored
View
1  Changes
@@ -3,6 +3,7 @@ Revision history for Dancer-Plugin-MobileDevice
0.03 2011-...
[ Alberto Simões ]
* Fix access to setting on a test
+ * Add support to iPad/iPod
0.02 2010-12-13, Alexis Sukrieh
[ Franck Cuny ]
View
2  lib/Dancer/Plugin/MobileDevice.pm
@@ -9,7 +9,7 @@ use Dancer::Plugin;
register 'is_mobile_device' => sub {
return request->user_agent =~
- /(iPhone|Android|BlackBerry|Mobile|Palm)/
+ /(?:iP(?:ad|od|hone)|Android|BlackBerry|Mobile|Palm)/
? 1 : 0;
};
View
2  t/01-is-mobile-device.t
@@ -3,7 +3,7 @@ use warnings;
use Test::More import => ['!pass'];
-my @mobile_devices = qw(iPhone Android BlackBerry PalmOS);
+my @mobile_devices = qw(iPhone iPod iPad Android BlackBerry PalmOS);
plan tests => scalar(@mobile_devices) + 1;
Please sign in to comment.
Something went wrong with that request. Please try again.