mobylette 3.3.1 → 3.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -63,9 +63,7 @@ After that, you may start adding your .mobile. views.
63
63
  You can set the configuration with the mobylette_config method:
64
64
 
65
65
  mobylette_config do |config|
66
- config[:fallback_chains] = { mobile: [:mobile, :html] }
67
- config[:skip_xhr_requests] = false
68
- config[:mobile_user_agents] = proc { %r{iphone}i }
66
+ ... configuration
69
67
  end
70
68
 
71
69
  === Custom User Agents
@@ -154,6 +152,21 @@ This will force the mobile format rendering, no matter from where the user is re
154
152
 
155
153
  This will disable any override (default).
156
154
 
155
+ If you need to customize how mobile requests are identified you can override the `is_mobile_request?` method in your controller, with your own logic.
156
+ For example, if you want the mobile.app.com to render mobile views, and the app.com to render the normal views:
157
+
158
+ class ApplicationController << ActionController::Base
159
+ include Mobylette::RespondToMobileRequests
160
+
161
+ ...
162
+
163
+ private
164
+
165
+ def is_mobile_request?
166
+ request.host == "mobile.app.com"
167
+ end
168
+ end
169
+
157
170
  == Testing
158
171
 
159
172
  http://tscolari.github.com/mobylette/mobylette_images/helmet.jpg
@@ -22,7 +22,7 @@ module Mobylette
22
22
  request.user_agent = user_agent
23
23
  end
24
24
 
25
- # Reset the user_aget to the default ("Rails Testing")
25
+ # Reset the user_agent to the default ("Rails Testing")
26
26
  #
27
27
  # Remember to add it BEFORE the request
28
28
  #
@@ -72,6 +72,7 @@ module Mobylette
72
72
  maemo
73
73
  fennec
74
74
  silk
75
+ playbook
75
76
  )
76
77
  end
77
78
  end
@@ -1,3 +1,3 @@
1
1
  module Mobylette
2
- VERSION = "3.3.1"
2
+ VERSION = "3.3.2"
3
3
  end
File without changes
@@ -6,38 +6,3 @@ DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any
6
6
  DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
7
7
  DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
8
8
  DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
9
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
10
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
11
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
12
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
13
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
14
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
15
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
16
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
17
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
18
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
19
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
20
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
21
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
22
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
23
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
24
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
25
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
26
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
27
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
28
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
29
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
30
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
31
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
32
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
33
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
34
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
35
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
36
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
37
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
38
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
39
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
40
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
41
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
42
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
43
- DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobylette
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-27 00:00:00.000000000 Z
12
+ date: 2013-01-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -59,22 +59,6 @@ dependencies:
59
59
  - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
- - !ruby/object:Gem::Dependency
63
- name: debugger
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :development
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
62
  description: Adds the mobile format for rendering views for mobile device.
79
63
  email:
80
64
  - tscolari@gmail.com
@@ -149,6 +133,7 @@ files:
149
133
  - spec/dummy/config/routes.rb
150
134
  - spec/dummy/config.ru
151
135
  - spec/dummy/db/schema.rb
136
+ - spec/dummy/log/development.log
152
137
  - spec/dummy/log/test.log
153
138
  - spec/dummy/public/404.html
154
139
  - spec/dummy/public/422.html
@@ -177,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
177
162
  version: '0'
178
163
  segments:
179
164
  - 0
180
- hash: 2076300502211513819
165
+ hash: -1163345569487325581
181
166
  required_rubygems_version: !ruby/object:Gem::Requirement
182
167
  none: false
183
168
  requirements:
@@ -186,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
171
  version: '0'
187
172
  segments:
188
173
  - 0
189
- hash: 2076300502211513819
174
+ hash: -1163345569487325581
190
175
  requirements: []
191
176
  rubyforge_project:
192
177
  rubygems_version: 1.8.24
@@ -248,6 +233,7 @@ test_files:
248
233
  - spec/dummy/config/routes.rb
249
234
  - spec/dummy/config.ru
250
235
  - spec/dummy/db/schema.rb
236
+ - spec/dummy/log/development.log
251
237
  - spec/dummy/log/test.log
252
238
  - spec/dummy/public/404.html
253
239
  - spec/dummy/public/422.html