mobile-fu 1.2.2 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a81168505f5f8394e5c595c3391c27809962fc62
4
- data.tar.gz: 4272d8e4cdc87f6179c59675be21c31d3b2b479a
3
+ metadata.gz: 5309d8902dbf7d1aa12e3cf931d133ef4046683b
4
+ data.tar.gz: faa015702c18a7ed51f55d81231c9c8163e0f176
5
5
  SHA512:
6
- metadata.gz: ce7530078c06045c2d2b17f352e6259ab6acb7517b6d7643898e880c2c8e04c4bdebfc290eae701eac4ba129cc90fb5d966062450e0812ab3d6bc9db8a07ee5f
7
- data.tar.gz: 5d1952efd5a5ef22e74441439f050db580339c071395f062a300e7abb5cfe6ee9280b90f8ed75efe7fec55f32fe2dec3b4a6fd7b175f83cdc1aed02e95a409b8
6
+ metadata.gz: 6d4e64fed59f212cdc78ccbe8b659da2f80992df048e9c5132eb9f9dba62bd36847c99bb906cc1238fa9634efc45babdd649e2c2bc653a8261670710ccc01b7a
7
+ data.tar.gz: 224acde9a1da4e1fdddabd50af69a24369dea137ff27b7707a40d9dec52ec6052c0429ef1d71e64f65b0f518e15d5edeb2cb6a401aec08204476084ce03678b3
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in mobile-fu.gemspec
4
+ gemspec
@@ -0,0 +1,102 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ mobile-fu (1.3.1)
5
+ rack-mobile-detect
6
+ rails
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ actionmailer (4.0.2)
12
+ actionpack (= 4.0.2)
13
+ mail (~> 2.5.4)
14
+ actionpack (4.0.2)
15
+ activesupport (= 4.0.2)
16
+ builder (~> 3.1.0)
17
+ erubis (~> 2.7.0)
18
+ rack (~> 1.5.2)
19
+ rack-test (~> 0.6.2)
20
+ activemodel (4.0.2)
21
+ activesupport (= 4.0.2)
22
+ builder (~> 3.1.0)
23
+ activerecord (4.0.2)
24
+ activemodel (= 4.0.2)
25
+ activerecord-deprecated_finders (~> 1.0.2)
26
+ activesupport (= 4.0.2)
27
+ arel (~> 4.0.0)
28
+ activerecord-deprecated_finders (1.0.3)
29
+ activesupport (4.0.2)
30
+ i18n (~> 0.6, >= 0.6.4)
31
+ minitest (~> 4.2)
32
+ multi_json (~> 1.3)
33
+ thread_safe (~> 0.1)
34
+ tzinfo (~> 0.3.37)
35
+ arel (4.0.1)
36
+ atomic (1.1.14)
37
+ builder (3.1.4)
38
+ erubis (2.7.0)
39
+ hike (1.2.3)
40
+ httparty (0.11.0)
41
+ multi_json (~> 1.0)
42
+ multi_xml (>= 0.5.2)
43
+ i18n (0.6.9)
44
+ json (1.6.4)
45
+ mail (2.5.4)
46
+ mime-types (~> 1.16)
47
+ treetop (~> 1.4.8)
48
+ metaclass (0.0.2)
49
+ mime-types (1.25.1)
50
+ minitest (4.7.5)
51
+ mocha (1.0.0)
52
+ metaclass (~> 0.0.1)
53
+ multi_json (1.8.4)
54
+ multi_xml (0.5.5)
55
+ polyglot (0.3.3)
56
+ rack (1.5.2)
57
+ rack-mobile-detect (0.4.0)
58
+ rack
59
+ rack-test (0.6.2)
60
+ rack (>= 1.0)
61
+ rails (4.0.2)
62
+ actionmailer (= 4.0.2)
63
+ actionpack (= 4.0.2)
64
+ activerecord (= 4.0.2)
65
+ activesupport (= 4.0.2)
66
+ bundler (>= 1.3.0, < 2.0)
67
+ railties (= 4.0.2)
68
+ sprockets-rails (~> 2.0.0)
69
+ railties (4.0.2)
70
+ actionpack (= 4.0.2)
71
+ activesupport (= 4.0.2)
72
+ rake (>= 0.8.7)
73
+ thor (>= 0.18.1, < 2.0)
74
+ rake (10.1.1)
75
+ rdoc (3.12)
76
+ json (~> 1.4)
77
+ sprockets (2.10.1)
78
+ hike (~> 1.2)
79
+ multi_json (~> 1.0)
80
+ rack (~> 1.0)
81
+ tilt (~> 1.1, != 1.3.0)
82
+ sprockets-rails (2.0.1)
83
+ actionpack (>= 3.0)
84
+ activesupport (>= 3.0)
85
+ sprockets (~> 2.8)
86
+ thor (0.18.1)
87
+ thread_safe (0.1.3)
88
+ atomic
89
+ tilt (1.4.1)
90
+ treetop (1.4.15)
91
+ polyglot
92
+ polyglot (>= 0.3.1)
93
+ tzinfo (0.3.38)
94
+
95
+ PLATFORMS
96
+ ruby
97
+
98
+ DEPENDENCIES
99
+ httparty
100
+ mobile-fu!
101
+ mocha
102
+ rdoc
data/README.md CHANGED
@@ -22,7 +22,7 @@ class ApplicationController < ActionController::Base
22
22
  end
23
23
  ```
24
24
 
25
- Once this is in place, any request that comes from a mobile device will be be
25
+ Once this is in place, any request that comes from a mobile device will be
26
26
  set as :mobile format. It is up to you to determine how you want to handle
27
27
  these requests. It is also up to you to create the .mobile.erb versions of
28
28
  your views that are to be requested.
@@ -0,0 +1,41 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+ require 'json'
4
+ require 'httparty'
5
+
6
+ MOBILE_DETECT_JSON = 'https://raw.github.com/serbanghita/Mobile-Detect/master/Mobile_Detect.json'
7
+ TABLET_FILE = 'lib/mobile-fu/tablet.rb'
8
+
9
+ task :default => [:test]
10
+
11
+ Rake::TestTask.new do |t|
12
+ t.libs.push 'lib'
13
+ t.test_files = FileList['spec/*_spec.rb', 'spec/mobile-fu/*_spec.rb']
14
+ t.verbose = true
15
+ end
16
+
17
+ desc "Pull in data from Mobile Detect"
18
+ task :pull_mobile_detect_data do
19
+
20
+ # call out to Mobile Detect to get the data
21
+ content = HTTParty.get(MOBILE_DETECT_JSON).body
22
+
23
+ # build a new tablet regex
24
+ data = JSON.parse content
25
+ regexes = data['uaMatch']['tablets'].each.map { |_, v| v }
26
+ new_regex = regexes.join('|').downcase
27
+
28
+ # rewrite the tablet regex in our file
29
+ new_content = File.read(TABLET_FILE).gsub!(/TABLET_USER_AGENTS = \/.*\//, "TABLET_USER_AGENTS = \/#{new_regex}\/")
30
+ File.open(TABLET_FILE, 'w') { |f| f.write new_content }
31
+
32
+ end
33
+
34
+ # desc 'Generate documentation for the mobile_fu plugin.'
35
+ # Rake::RDocTask.new(:rdoc) do |rdoc|
36
+ # rdoc.rdoc_dir = 'rdoc'
37
+ # rdoc.title = 'MobileFu'
38
+ # rdoc.options << '--line-numbers' << '--inline-source'
39
+ # rdoc.rdoc_files.include('README')
40
+ # rdoc.rdoc_files.include('lib/**/*.rb')
41
+ # end
@@ -1,3 +1,4 @@
1
+ require 'mobile-fu/tablet'
1
2
  require 'rails'
2
3
  require 'rack/mobile-detect'
3
4
 
@@ -31,9 +32,6 @@ end
31
32
 
32
33
  module ActionController
33
34
  module MobileFu
34
- # These are various strings that can be found in tablet devices. Please feel free
35
- # to add on to this list.
36
- TABLET_USER_AGENTS = /ipad|android 3.0|xoom|sch-i800|gt-p1000|playbook|tablet|kindle|honeycomb|nexus 7/.freeze
37
35
 
38
36
  def self.included(base)
39
37
  base.extend ClassMethods
@@ -157,7 +155,7 @@ module ActionController
157
155
  # the device making the request is matched to a device in our regex.
158
156
 
159
157
  def is_tablet_device?
160
- !!(request.user_agent.to_s.downcase =~ ActionController::MobileFu::TABLET_USER_AGENTS)
158
+ ::MobileFu::Tablet.is_a_tablet_device? request.user_agent
161
159
  end
162
160
 
163
161
  def is_mobile_device?
@@ -0,0 +1,13 @@
1
+ module MobileFu
2
+
3
+ module Tablet
4
+
5
+ TABLET_USER_AGENTS = /ipad|ipad.*mobile|^.*android.*nexus(((?:(?!mobile))|(?:(\s(7|10).+))).)*$|samsung.*tablet|galaxy.*tab|sc-01c|gt-p1000|gt-p1003|gt-p1010|gt-p3105|gt-p6210|gt-p6800|gt-p6810|gt-p7100|gt-p7300|gt-p7310|gt-p7500|gt-p7510|sch-i800|sch-i815|sch-i905|sgh-i957|sgh-i987|sgh-t849|sgh-t859|sgh-t869|sph-p100|gt-p3100|gt-p3108|gt-p3110|gt-p5100|gt-p5110|gt-p6200|gt-p7320|gt-p7511|gt-n8000|gt-p8510|sgh-i497|sph-p500|sgh-t779|sch-i705|sch-i915|gt-n8013|gt-p3113|gt-p5113|gt-p8110|gt-n8010|gt-n8005|gt-n8020|gt-p1013|gt-p6201|gt-p7501|gt-n5100|gt-n5110|shv-e140k|shv-e140l|shv-e140s|shv-e150s|shv-e230k|shv-e230l|shv-e230s|shw-m180k|shw-m180l|shw-m180s|shw-m180w|shw-m300w|shw-m305w|shw-m380k|shw-m380s|shw-m380w|shw-m430w|shw-m480k|shw-m480s|shw-m480w|shw-m485w|shw-m486w|shw-m500w|gt-i9228|sch-p739|sch-i925|gt-i9200|gt-i9205|gt-p5200|gt-p5210|sm-t311|sm-t310|sm-t210|sm-t210r|sm-t211|sm-p600|sm-p601|sm-p605|sm-p900|sm-t217|sm-t217a|sm-t217s|sm-p6000|sm-t3100|sgh-i467|xe500|kindle|silk.*accelerated|android.*\b(kfot|kftt|kfjwi|kfjwa|kfote|kfsowi|kfthwi|kfthwa|kfapwi|kfapwa|wfjwae)\b|windows nt [0-9.]+; arm;|hp slate 7|hp elitepad 900|hp-tablet|elitebook.*touch|^.*padfone((?!mobile).)*$|transformer|tf101|tf101g|tf300t|tf300tg|tf300tl|tf700t|tf700kl|tf701t|tf810c|me171|me301t|me302c|me371mg|me370t|me372mg|me172v|me173x|me400c|slider sl101|playbook|rim tablet|htc flyer|htc jetstream|htc-p715a|htc evo view 4g|pg41200|xoom|sholest|mz615|mz605|mz505|mz601|mz602|mz603|mz604|mz606|mz607|mz608|mz609|mz615|mz616|mz617|android.*nook|nookcolor|nook browser|bnrv200|bnrv200a|bntv250|bntv250a|bntv400|bntv600|logicpd zoom2|android.*; \b(a100|a101|a110|a200|a210|a211|a500|a501|a510|a511|a700|a701|w500|w500p|w501|w501p|w510|w511|w700|g100|g100w|b1-a71|b1-710|b1-711|a1-810)\b|w3-810|android.*(at100|at105|at200|at205|at270|at275|at300|at305|at1s5|at500|at570|at700|at830)|toshiba.*folio|\bl-06c|lg-v900|lg-v909\b|android.*\b(f-01d|f-05e|f-10d|m532|q572)\b|pmp3170b|pmp3270b|pmp3470b|pmp7170b|pmp3370b|pmp3570c|pmp5870c|pmp3670b|pmp5570c|pmp5770d|pmp3970b|pmp3870c|pmp5580c|pmp5880d|pmp5780d|pmp5588c|pmp7280c|pmp7280|pmp7880d|pmp5597d|pmp5597|pmp7100d|per3464|per3274|per3574|per3884|per5274|per5474|pmp5097cpro|pmp5097|pmp7380d|pmp5297c|pmp5297c_quad|ideatab|s2110|s6000|k3011|a3000|a1000|a2107|a2109|a1107|thinkpad([ ]+)?tablet|android.*(tab210|tab211|tab224|tab250|tab260|tab264|tab310|tab360|tab364|tab410|tab411|tab420|tab424|tab450|tab460|tab461|tab464|tab465|tab467|tab468)|android.*\boyo\b|life.*(p9212|p9514|p9516|s9512)|lifetab|an10g2|an7bg3|an7fg3|an8g3|an8cg3|an7g3|an9g3|an7dg3|an7dg3st|an7dg3childpad|an10bg3|an10bg3dt|m702pro|megafon v9|\bzte v9\b|e-boda (supreme|impresspeed|izzycomm|essential)|allview.*(viva|alldro|city|speed|all tv|frenzy|quasar|shine|tx1|ax1|ax2)|\b(101g9|80g9|a101it)\b|qilive 97r|novo7|novo8|novo10|novo7aurora|novo7basic|novo7paladin|novo9-spark|sony.*tablet|xperia tablet|sony tablet s|so-03e|sgpt12|sgpt13|sgpt114|sgpt121|sgpt122|sgpt123|sgpt111|sgpt112|sgpt113|sgpt131|sgpt132|sgpt133|sgpt211|sgpt212|sgpt213|sgp311|sgp312|sgp321|ebrd1101|ebrd1102|ebrd1201|android.*(k8gt|u9gt|u10gt|u16gt|u17gt|u18gt|u19gt|u20gt|u23gt|u30gt)|cube u8gt|mid1042|mid1045|mid1125|mid1126|mid7012|mid7014|mid7015|mid7034|mid7035|mid7036|mid7042|mid7048|mid7127|mid8042|mid8048|mid8127|mid9042|mid9740|mid9742|mid7022|mid7010|m9701|m9000|m9100|m806|m1052|m806|t703|mid701|mid713|mid710|mid727|mid760|mid830|mid728|mid933|mid125|mid810|mid732|mid120|mid930|mid800|mid731|mid900|mid100|mid820|mid735|mid980|mid130|mid833|mid737|mid960|mid135|mid860|mid736|mid140|mid930|mid835|mid733|android.*(\bmid\b|mid-560|mtv-t1200|mtv-pnd531|mtv-p1101|mtv-pnd530)|android.*(rk2818|rk2808a|rk2918|rk3066)|rk2738|rk2808a|iq310|fly vision|bq.*(elcano|curie|edison|maxwell|kepler|pascal|tesla|hypatia|platon|newton|livingstone|cervantes|avant)|maxwell.*lite|maxwell.*plus|mediapad|ideos s7|s7-201c|s7-202u|s7-101|s7-103|s7-104|s7-105|s7-106|s7-201|s7-slim|\bn-06d|\bn-08d|pantech.*p4100|broncho.*(n701|n708|n802|a710)|touchpad.*[78910]|\btouchtab\b|z1000|z99 2g|z99|z930|z999|z990|z909|z919|z900|tb07sta|tb10sta|tb07fta|tb10fta|android.*\bnabi|kobo touch|\bk080\b|\bvox\b build|\barc\b build|dslide.*\b(700|701r|702|703r|704|802|970|971|972|973|974|1010|1012)\b|navipad|tb-772a|tm-7045|tm-7055|tm-9750|tm-7016|tm-7024|tm-7026|tm-7041|tm-7043|tm-7047|tm-8041|tm-9741|tm-9747|tm-9748|tm-9751|tm-7022|tm-7021|tm-7020|tm-7011|tm-7010|tm-7023|tm-7025|tm-7037w|tm-7038w|tm-7027w|tm-9720|tm-9725|tm-9737w|tm-1020|tm-9738w|tm-9740|tm-9743w|tb-807a|tb-771a|tb-727a|tb-725a|tb-719a|tb-823a|tb-805a|tb-723a|tb-715a|tb-707a|tb-705a|tb-709a|tb-711a|tb-890hd|tb-880hd|tb-790hd|tb-780hd|tb-770hd|tb-721hd|tb-710hd|tb-434hd|tb-860hd|tb-840hd|tb-760hd|tb-750hd|tb-740hd|tb-730hd|tb-722hd|tb-720hd|tb-700hd|tb-500hd|tb-470hd|tb-431hd|tb-430hd|tb-506|tb-504|tb-446|tb-436|tb-416|tb-146se|tb-126se|playstation.*(portable|vita)|android.*\bg1\b|funbook|micromax.*\b(p250|p560|p360|p362|p600|p300|p350|p500|p275)\b|android.*\b(a39|a37|a34|st8|st10|st7|smart tab3|smart tab2)\b|fine7 genius|fine7 shine|fine7 air|fine8 style|fine9 more|fine10 joy|fine11 wide|\b(pem63|plt1023g|plt1041|plt1044|plt1044g|plt1091|plt4311|plt4311pl|plt4315|plt7030|plt7033|plt7033d|plt7035|plt7035d|plt7044k|plt7045k|plt7045kb|plt7071kg|plt7072|plt7223g|plt7225g|plt7777g|plt7810k|plt7849g|plt7851g|plt7852g|plt8015|plt8031|plt8034|plt8036|plt8080k|plt8082|plt8088|plt8223g|plt8234g|plt8235g|plt8816k|plt9011|plt9045k|plt9233g|plt9735|plt9760g|plt9770g)\b|bq1078|bc1003|bc1077|rk9702|bc9730|bc9001|it9001|bc7008|bc7010|bc708|bc728|bc7012|bc7030|bc7027|bc7026|tpc7102|tpc7103|tpc7105|tpc7106|tpc7107|tpc7201|tpc7203|tpc7205|tpc7210|tpc7708|tpc7709|tpc7712|tpc7110|tpc8101|tpc8103|tpc8105|tpc8106|tpc8203|tpc8205|tpc8503|tpc9106|tpc9701|tpc97101|tpc97103|tpc97105|tpc97106|tpc97111|tpc97113|tpc97203|tpc97603|tpc97809|tpc97205|tpc10101|tpc10103|tpc10106|tpc10111|tpc10203|tpc10205|tpc10503|tx-a1301|tx-m9002|q702|tab-p506|tab-navi-7-3g-m|tab-p517|tab-p-527|tab-p701|tab-p703|tab-p721|tab-p731n|tab-p741|tab-p825|tab-p905|tab-p925|tab-pr945|tab-pl1015|tab-p1025|tab-pi1045|tab-p1325|tab-protab[0-9]+|tab-protab25|tab-protab26|tab-protab27|tab-protab26xl|tab-protab2-ips9|tab-protab30-ips9|tab-protab25xxl|tab-protab26-ips10|tab-protab30-ips10|ov-(steelcore|newbase|basecore|baseone|exellen|quattor|edutab|solution|action|basictab|teddytab|magictab|stream|tb-08|tb-09)|hcl.*tablet|connect-3g-2.0|connect-2g-2.0|me tablet u1|me tablet u2|me tablet g1|me tablet x1|me tablet y2|me tablet sync|dps dream 9|dps dual 7|v97 hd|i75 3g|visture v4( hd)?|visture v5( hd)?|visture v10|ctp(-)?810|ctp(-)?818|ctp(-)?828|ctp(-)?838|ctp(-)?888|ctp(-)?978|ctp(-)?980|ctp(-)?987|ctp(-)?988|ctp(-)?989|\bmt8125|mt8389|mt8135|mt8377\b|concorde([ ]+)?tab|concorde readman|goclever tab|a7goclever|m1042|m7841|m742|r1042bk|r1041|tab a975|tab a7842|tab a741|tab a741l|tab m723g|tab m721|tab a1021|tab i921|tab r721|tab i720|tab t76|tab r70|tab r76.2|tab r106|tab r83.2|tab m813g|tab i721|gcta722|tab i70|tab i71|tab s73|tab r73|tab r74|tab r93|tab r75|tab r76.1|tab a73|tab a93|tab a93.2|tab t72|tab r83|tab r974|tab r973|tab a101|tab a103|tab a104|tab a104.2|r105bk|m713g|a972bk|tab a971|tab r974.2|tab r104|tab r83.3|tab a1042|freetab 9000|freetab 7.4|freetab 7004|freetab 7800|freetab 2096|freetab 7.5|freetab 1014|freetab 1001 |freetab 8001|freetab 9706|freetab 9702|freetab 7003|freetab 7002|freetab 1002|freetab 7801|freetab 1331|freetab 1004|freetab 8002|freetab 8014|freetab 9704|freetab 1003|hudl ht7s3|t-hub2|android.*\b97d\b|tablet(?!.*pc)|viewpad7|bntv250a|mid-wcdma|logicpd zoom2|\ba7eb\b|catnova8|a1_07|ct704|ct1002|\bm721\b|rk30sdk|\bevotab\b|smarttabii10|smarttab10|m758a|et904/.freeze
6
+
7
+ def self.is_a_tablet_device? user_agent
8
+ !!(user_agent.to_s.downcase =~ TABLET_USER_AGENTS)
9
+ end
10
+
11
+ end
12
+
13
+ end
@@ -1,3 +1,3 @@
1
1
  module MobileFu
2
- VERSION = "1.2.2"
2
+ VERSION = "1.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobile-fu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brendan Lim
@@ -9,62 +9,76 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-22 00:00:00.000000000 Z
12
+ date: 2014-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rack-mobile-detect
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
- name: rspec
43
+ name: mocha
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rdoc
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: httparty
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
68
82
  - !ruby/object:Gem::Version
69
83
  version: '0'
70
84
  description: Want to automatically detect mobile devices that access your Rails application?
@@ -78,13 +92,15 @@ extensions: []
78
92
  extra_rdoc_files: []
79
93
  files:
80
94
  - CHANGELOG
95
+ - Gemfile
96
+ - Gemfile.lock
81
97
  - MIT-LICENSE
82
98
  - README.md
99
+ - Rakefile
83
100
  - lib/mobile-fu.rb
84
101
  - lib/mobile-fu/helper.rb
102
+ - lib/mobile-fu/tablet.rb
85
103
  - lib/mobile-fu/version.rb
86
- - spec/mobilized_styles_spec.rb
87
- - spec/spec_helper.rb
88
104
  homepage: https://github.com/benlangfeld/mobile-fu
89
105
  licenses: []
90
106
  metadata: {}
@@ -94,20 +110,18 @@ require_paths:
94
110
  - lib
95
111
  required_ruby_version: !ruby/object:Gem::Requirement
96
112
  requirements:
97
- - - '>='
113
+ - - ">="
98
114
  - !ruby/object:Gem::Version
99
115
  version: '0'
100
116
  required_rubygems_version: !ruby/object:Gem::Requirement
101
117
  requirements:
102
- - - '>='
118
+ - - ">="
103
119
  - !ruby/object:Gem::Version
104
120
  version: '0'
105
121
  requirements: []
106
122
  rubyforge_project: mobile-fu
107
- rubygems_version: 2.0.3
123
+ rubygems_version: 2.2.0
108
124
  signing_key:
109
125
  specification_version: 4
110
126
  summary: Automatically detect mobile requests from mobile devices in your Rails application.
111
- test_files:
112
- - spec/mobilized_styles_spec.rb
113
- - spec/spec_helper.rb
127
+ test_files: []
@@ -1,30 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe MobileFu::MobilizedStyles do
4
-
5
- before(:each) do
6
- @view = mock :ActionView
7
- @request = mock :ActionRequest
8
- @view.extend MobileFu::MobilizedStyles
9
- @view.stub!(:request).and_return @request
10
- @request.stub! :user_agent
11
- end
12
-
13
- def ua(str)
14
- @request.stub!(:user_agent).and_return str
15
- end
16
-
17
- it "will include a mobilized css file if it recognizes a string in the user agent" do
18
- ua "iphone"
19
- File.should_receive(:exist?).with("stylesheets/style_iphone.css").and_return true
20
- @view.should_receive(:stylesheet_link_tag).with "style", "style_iphone"
21
- @view.stylesheet_link_tag_with_mobilization "style"
22
- end
23
-
24
- it "includes mobiziled css files whether or not the original call to stylesheet_link_tag used a file extension" do
25
- ua "blackberry"
26
- File.should_receive(:exist?).with("stylesheets/style_blackberry.css").and_return true
27
- @view.should_receive(:stylesheet_link_tag).with "style.css", "style_blackberry"
28
- @view.stylesheet_link_tag_with_mobilization "style.css"
29
- end
30
- end
@@ -1 +0,0 @@
1
- require 'mobile-fu'