mime_fallback 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mime_fallback/mime_negotiation.rb +14 -14
  3. data/lib/mime_fallback/version.rb +1 -1
  4. data/test/dummy/app/controllers/test_controller.rb +18 -0
  5. data/test/dummy/app/views/test/html_only.html.erb +1 -0
  6. data/test/dummy/app/views/test/mobile_only.mobile.erb +1 -0
  7. data/test/dummy/config/application.rb +1 -1
  8. data/test/dummy/config/environments/test.rb +1 -1
  9. data/test/dummy/config/initializers/mime_types.rb +1 -0
  10. data/test/dummy/config/routes.rb +3 -0
  11. data/test/responds_test.rb +43 -0
  12. data/test/test_helper.rb +2 -0
  13. metadata +23 -40
  14. data/test/dummy/db/test.sqlite3 +0 -0
  15. data/test/dummy/log/test.log +0 -356
  16. data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  17. data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  18. data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  19. data/test/dummy/tmp/cache/assets/test/sprockets/6b36a21a75ddb9a45aa6e9133c79a3c7 +0 -0
  20. data/test/dummy/tmp/cache/assets/test/sprockets/c360bf7b66d29ebdf71b5814574b5fed +0 -0
  21. data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  22. data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  23. data/test/dummy/tmp/cache/assets/test/sprockets/e0ac75c1efdaac1b74d439c004c3b09f +0 -0
  24. data/test/dummy/tmp/cache/assets/test/sprockets/ec2d15616d5d09eb1693b761c72948ce +0 -0
  25. data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6becf0be23c41284570b5062bc354122a8ed3c52
4
- data.tar.gz: a8373245f4f0d32a4b5fadbab3b335ec4a0e6008
3
+ metadata.gz: b5b32702f752118e75b84c18aee691f19f202edb
4
+ data.tar.gz: b96b4b31ad96629b2450e026b75c76b96d334127
5
5
  SHA512:
6
- metadata.gz: 67b05bcd555d94bcbb017883223f776fc639393bfbb13f9fffb9695d3af1a297ef1d3e292d5ccea2695629da3b7edbb2a2421be364c648a1bae6febb2f1ba06f
7
- data.tar.gz: 2376454189c823d9a2cf2e85aaee0c76e70714cc1a9fdeec0c5581c33a17ccef4a4a9150eecaed9b375d3050c7031c73fbb9f55a8482b8a6de353c63b0e2dea7
6
+ metadata.gz: 4101592c81d41985edff955a1f0b8d274d365225c76fc936126af2b1b875f9ab89e88232179e9c9ae4a1fb74ea81de44c01608422506db229f5dc422225e59e9
7
+ data.tar.gz: ca041cb2cd764ac20f8a658adbc40b232dee6b1fbcbef36851b7a97fe9de7166e19bd655549af91ca6f386e1bb24a780064fb43ac0e0d98c5d35c8d5cd54cfb7
@@ -7,22 +7,22 @@ module ActionDispatch
7
7
 
8
8
  # Override to support mime type fallbacks
9
9
  def negotiate_mime(order)
10
+ # make search easier later
11
+ responding_formats = order.index_by(&:to_sym)
12
+
13
+ # formats are the request's formats
10
14
  formats.each do |priority|
11
- if priority == Mime::ALL
12
- return order.first
13
- else
14
- # Try to find an exact match to what we're responding to
15
- types = Array(priority) + MimeFallback::Type.fallbacks(priority.to_sym)
16
- types.each do |fallback|
17
- return fallback if order.map(&:to_sym).include?(fallback.to_sym)
18
- end
19
-
20
- if order.include?(priority)
21
- return priority
22
- end
23
- end
15
+ return order.first if priority == Mime::ALL
16
+
17
+ # Try to find an exact match to what we're responding to
18
+ types = Array(priority) + MimeFallback::Type.fallbacks(priority.to_sym)
19
+ fallback = types.detect{|type| responding_formats.has_key?(type.to_sym)}
20
+ return fallback if fallback
21
+
22
+ # we've found an exact match
23
+ return priority if responding_formats.has_key?(priority.to_sym)
24
24
  end
25
-
25
+
26
26
  order.include?(Mime::ALL) ? formats.first : nil
27
27
  end
28
28
  end
@@ -1,3 +1,3 @@
1
1
  module MimeFallback
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -3,4 +3,22 @@ class TestController < ApplicationController
3
3
  def basic
4
4
  end
5
5
 
6
+ def responding
7
+ respond_to do |format|
8
+ format.json { render :json => {format: request.format.symbol, string: request.format.to_s} }
9
+ end
10
+ end
11
+
12
+ def mobile_only
13
+ respond_to do |format|
14
+ format.mobile
15
+ end
16
+ end
17
+
18
+ def html_only
19
+ respond_to do |format|
20
+ format.html
21
+ end
22
+ end
23
+
6
24
  end
@@ -0,0 +1 @@
1
+ <h1>HTML</h1>
@@ -0,0 +1 @@
1
+ <h1>Mobile</h1>
@@ -47,7 +47,7 @@ module Dummy
47
47
  # This will create an empty whitelist of attributes available for mass-assignment for all models
48
48
  # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
49
49
  # parameters by using an attr_accessible or attr_protected declaration.
50
- config.active_record.whitelist_attributes = true
50
+ # config.active_record.whitelist_attributes = true
51
51
 
52
52
  # Enable the asset pipeline
53
53
  config.assets.enabled = true
@@ -30,7 +30,7 @@ Dummy::Application.configure do
30
30
  config.action_mailer.delivery_method = :test
31
31
 
32
32
  # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
33
+ # config.active_record.mass_assignment_sanitizer = :strict
34
34
 
35
35
  # Print deprecation notices to the stderr
36
36
  config.active_support.deprecation = :stderr
@@ -5,6 +5,7 @@
5
5
  # Mime::Type.register_alias "text/html", :iphone
6
6
 
7
7
  MimeFallback::Type.register_alias "text/html", :mobile, [], :html
8
+ MimeFallback::Type.register_alias "application/json", :mobilejson, [], [:json, :js, :mobile, :html]
8
9
 
9
10
  # Rails doesn't handle wildcard mime types, so we need to hardcode
10
11
  # this as an alias to html so we don't 404.
@@ -1,3 +1,6 @@
1
1
  Dummy::Application.routes.draw do
2
2
  get 'test/basic', :to => 'test#basic'
3
+ get 'test/responding', :to => 'test#responding'
4
+ get 'test/mobile_only', :to => 'test#mobile_only'
5
+ get 'test/html_only', :to => 'test#html_only'
3
6
  end
@@ -0,0 +1,43 @@
1
+ require 'test_helper'
2
+
3
+ class RespondsTest < ActionDispatch::IntegrationTest
4
+ def test_respond_to_basic
5
+ get "/test/responding.json"
6
+ assert_response :success
7
+ resp = JSON.parse(@response.body)
8
+ assert_equal "json", resp["format"]
9
+ assert_equal "application/json", resp["string"]
10
+ end
11
+
12
+ def test_respond_to_fallbacks
13
+ get "/test/responding.mobilejson"
14
+ assert_response :success
15
+ resp = JSON.parse(@response.body)
16
+ assert_equal "mobilejson", resp["format"]
17
+ assert_equal "application/json", resp["string"]
18
+ end
19
+
20
+ def test_respond_to_mobile_only
21
+ get "/test/mobile_only.mobile"
22
+ assert_response :success
23
+
24
+ case Rails::VERSION::MAJOR
25
+ when 3
26
+ get "/test/mobile_only.html"
27
+ assert_response 406
28
+ else
29
+ assert_raises ActionController::UnknownFormat do
30
+ get "/test/mobile_only.html"
31
+ end
32
+ end
33
+ end
34
+
35
+ def test_respond_to_html_only_with_mobile_request
36
+ get "/test/html_only.html"
37
+ assert_response :success
38
+
39
+ # mobile is a more specific type of html, fallback
40
+ get "/test/html_only.mobile"
41
+ assert_response :success
42
+ end
43
+ end
data/test/test_helper.rb CHANGED
@@ -13,3 +13,5 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
13
13
  if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
14
  ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
15
  end
16
+
17
+ require 'pp'
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mime_fallback
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Ching
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-23 00:00:00.000000000 Z
11
+ date: 2014-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sqlite3
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Allows a rails format to act as a fallback for another format
@@ -45,16 +45,18 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
+ - MIT-LICENSE
49
+ - README.md
50
+ - Rakefile
51
+ - lib/mime_fallback.rb
48
52
  - lib/mime_fallback/mime_negotiation.rb
49
53
  - lib/mime_fallback/railtie.rb
50
54
  - lib/mime_fallback/resolver.rb
51
55
  - lib/mime_fallback/type.rb
52
56
  - lib/mime_fallback/version.rb
53
- - lib/mime_fallback.rb
54
57
  - lib/tasks/mime_fallback_tasks.rake
55
- - MIT-LICENSE
56
- - Rakefile
57
- - README.md
58
+ - test/dummy/README.rdoc
59
+ - test/dummy/Rakefile
58
60
  - test/dummy/app/assets/javascripts/application.js
59
61
  - test/dummy/app/assets/stylesheets/application.css
60
62
  - test/dummy/app/controllers/application_controller.rb
@@ -66,6 +68,9 @@ files:
66
68
  - test/dummy/app/views/test/_split_again.mobile.erb
67
69
  - test/dummy/app/views/test/basic.html.erb
68
70
  - test/dummy/app/views/test/basic.mobile.erb
71
+ - test/dummy/app/views/test/html_only.html.erb
72
+ - test/dummy/app/views/test/mobile_only.mobile.erb
73
+ - test/dummy/config.ru
69
74
  - test/dummy/config/application.rb
70
75
  - test/dummy/config/boot.rb
71
76
  - test/dummy/config/database.yml
@@ -81,28 +86,14 @@ files:
81
86
  - test/dummy/config/initializers/wrap_parameters.rb
82
87
  - test/dummy/config/locales/en.yml
83
88
  - test/dummy/config/routes.rb
84
- - test/dummy/config.ru
85
- - test/dummy/db/test.sqlite3
86
- - test/dummy/log/test.log
87
89
  - test/dummy/memory
88
90
  - test/dummy/public/404.html
89
91
  - test/dummy/public/422.html
90
92
  - test/dummy/public/500.html
91
93
  - test/dummy/public/favicon.ico
92
- - test/dummy/Rakefile
93
- - test/dummy/README.rdoc
94
94
  - test/dummy/script/rails
95
- - test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
96
- - test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
97
- - test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
98
- - test/dummy/tmp/cache/assets/test/sprockets/6b36a21a75ddb9a45aa6e9133c79a3c7
99
- - test/dummy/tmp/cache/assets/test/sprockets/c360bf7b66d29ebdf71b5814574b5fed
100
- - test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
101
- - test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
102
- - test/dummy/tmp/cache/assets/test/sprockets/e0ac75c1efdaac1b74d439c004c3b09f
103
- - test/dummy/tmp/cache/assets/test/sprockets/ec2d15616d5d09eb1693b761c72948ce
104
- - test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
105
95
  - test/mime_fallback_test.rb
96
+ - test/responds_test.rb
106
97
  - test/test_controller_test.rb
107
98
  - test/test_helper.rb
108
99
  homepage: http://github.com/avvo/mime_fallback
@@ -115,17 +106,17 @@ require_paths:
115
106
  - lib
116
107
  required_ruby_version: !ruby/object:Gem::Requirement
117
108
  requirements:
118
- - - '>='
109
+ - - ">="
119
110
  - !ruby/object:Gem::Version
120
111
  version: '0'
121
112
  required_rubygems_version: !ruby/object:Gem::Requirement
122
113
  requirements:
123
- - - '>='
114
+ - - ">="
124
115
  - !ruby/object:Gem::Version
125
116
  version: '0'
126
117
  requirements: []
127
118
  rubyforge_project:
128
- rubygems_version: 2.0.3
119
+ rubygems_version: 2.2.2
129
120
  signing_key:
130
121
  specification_version: 4
131
122
  summary: Format fallbacks for rendering partials
@@ -141,6 +132,8 @@ test_files:
141
132
  - test/dummy/app/views/test/_split_again.mobile.erb
142
133
  - test/dummy/app/views/test/basic.html.erb
143
134
  - test/dummy/app/views/test/basic.mobile.erb
135
+ - test/dummy/app/views/test/html_only.html.erb
136
+ - test/dummy/app/views/test/mobile_only.mobile.erb
144
137
  - test/dummy/config/application.rb
145
138
  - test/dummy/config/boot.rb
146
139
  - test/dummy/config/database.yml
@@ -157,8 +150,6 @@ test_files:
157
150
  - test/dummy/config/locales/en.yml
158
151
  - test/dummy/config/routes.rb
159
152
  - test/dummy/config.ru
160
- - test/dummy/db/test.sqlite3
161
- - test/dummy/log/test.log
162
153
  - test/dummy/memory
163
154
  - test/dummy/public/404.html
164
155
  - test/dummy/public/422.html
@@ -167,16 +158,8 @@ test_files:
167
158
  - test/dummy/Rakefile
168
159
  - test/dummy/README.rdoc
169
160
  - test/dummy/script/rails
170
- - test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
171
- - test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
172
- - test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
173
- - test/dummy/tmp/cache/assets/test/sprockets/6b36a21a75ddb9a45aa6e9133c79a3c7
174
- - test/dummy/tmp/cache/assets/test/sprockets/c360bf7b66d29ebdf71b5814574b5fed
175
- - test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
176
- - test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
177
- - test/dummy/tmp/cache/assets/test/sprockets/e0ac75c1efdaac1b74d439c004c3b09f
178
- - test/dummy/tmp/cache/assets/test/sprockets/ec2d15616d5d09eb1693b761c72948ce
179
- - test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
180
161
  - test/mime_fallback_test.rb
162
+ - test/responds_test.rb
181
163
  - test/test_controller_test.rb
182
164
  - test/test_helper.rb
165
+ has_rdoc:
File without changes
@@ -1,356 +0,0 @@
1
- Connecting to database specified by database.yml
2
-  (0.2ms) begin transaction
3
-  (0.0ms) rollback transaction
4
- Connecting to database specified by database.yml
5
-  (0.2ms) begin transaction
6
-  (0.0ms) rollback transaction
7
-  (0.0ms) begin transaction
8
-  (0.1ms) rollback transaction
9
-  (0.0ms) begin transaction
10
-  (0.0ms) rollback transaction
11
- Connecting to database specified by database.yml
12
-  (0.2ms) begin transaction
13
-  (0.0ms) rollback transaction
14
-  (0.0ms) begin transaction
15
- Processing by TestController#basic as HTML
16
- Rendered test/_split_again.html.erb (0.2ms)
17
- Rendered test/_shared.html.erb (1.0ms)
18
- Rendered test/basic.html.erb within layouts/application (4.3ms)
19
- Completed 200 OK in 13.9ms (Views: 13.5ms | ActiveRecord: 0.0ms)
20
-  (0.1ms) rollback transaction
21
-  (0.0ms) begin transaction
22
- Processing by TestController#basic as MOBILE
23
- Completed 500 Internal Server Error in 4.9ms
24
-  (0.1ms) rollback transaction
25
- Connecting to database specified by database.yml
26
-  (0.2ms) begin transaction
27
-  (0.0ms) rollback transaction
28
-  (0.0ms) begin transaction
29
- Processing by TestController#basic as HTML
30
- Rendered test/_split_again.html.erb (0.2ms)
31
- Rendered test/_shared.html.erb (0.8ms)
32
- Rendered test/basic.html.erb within layouts/application (2.9ms)
33
- Completed 200 OK in 7.7ms (Views: 7.5ms | ActiveRecord: 0.0ms)
34
-  (0.1ms) rollback transaction
35
-  (0.0ms) begin transaction
36
- Processing by TestController#basic as MOBILE
37
- Completed 500 Internal Server Error in 3.6ms
38
-  (0.0ms) rollback transaction
39
- Connecting to database specified by database.yml
40
-  (0.2ms) begin transaction
41
-  (0.0ms) rollback transaction
42
-  (0.0ms) begin transaction
43
- Processing by TestController#basic as HTML
44
- Rendered test/_split_again.html.erb (0.2ms)
45
- Rendered test/_shared.html.erb (0.8ms)
46
- Rendered test/basic.html.erb within layouts/application (3.0ms)
47
- Completed 200 OK in 8.1ms (Views: 7.9ms | ActiveRecord: 0.0ms)
48
-  (0.1ms) rollback transaction
49
-  (0.0ms) begin transaction
50
- Processing by TestController#basic as MOBILE
51
- Completed 500 Internal Server Error in 3.4ms
52
-  (0.0ms) rollback transaction
53
- Connecting to database specified by database.yml
54
-  (0.2ms) begin transaction
55
-  (0.0ms) rollback transaction
56
-  (0.0ms) begin transaction
57
- Processing by TestController#basic as HTML
58
- Rendered test/_split_again.html.erb (0.2ms)
59
- Rendered test/_shared.html.erb (0.8ms)
60
- Rendered test/basic.html.erb within layouts/application (2.8ms)
61
- Completed 200 OK in 7.6ms (Views: 7.4ms | ActiveRecord: 0.0ms)
62
-  (0.0ms) rollback transaction
63
-  (0.0ms) begin transaction
64
- Processing by TestController#basic as MOBILE
65
- Completed 500 Internal Server Error in 3.8ms
66
-  (0.0ms) rollback transaction
67
- Connecting to database specified by database.yml
68
-  (0.2ms) begin transaction
69
-  (0.0ms) rollback transaction
70
-  (0.0ms) begin transaction
71
- Processing by TestController#basic as HTML
72
- Rendered test/_split_again.html.erb (0.2ms)
73
- Rendered test/_shared.html.erb (0.8ms)
74
- Rendered test/basic.html.erb within layouts/application (2.7ms)
75
- Completed 200 OK in 7.4ms (Views: 7.2ms | ActiveRecord: 0.0ms)
76
-  (0.1ms) rollback transaction
77
-  (0.0ms) begin transaction
78
- Processing by TestController#basic as HTML
79
- Parameters: {"mobile"=>"true"}
80
- Rendered test/_split_again.html.erb (0.0ms)
81
- Rendered test/_shared.html.erb (0.2ms)
82
- Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms)
83
-  (0.0ms) rollback transaction
84
- Connecting to database specified by database.yml
85
-  (0.2ms) begin transaction
86
-  (0.0ms) rollback transaction
87
-  (0.0ms) begin transaction
88
- Processing by TestController#basic as HTML
89
- Rendered test/_split_again.html.erb (0.2ms)
90
- Rendered test/_shared.html.erb (0.8ms)
91
- Rendered test/basic.html.erb within layouts/application (2.8ms)
92
- Completed 200 OK in 7.6ms (Views: 7.4ms | ActiveRecord: 0.0ms)
93
-  (0.1ms) rollback transaction
94
-  (0.0ms) begin transaction
95
- Processing by TestController#basic as HTML
96
- Parameters: {"mobile"=>"true"}
97
- Completed 500 Internal Server Error in 0.9ms
98
-  (0.0ms) rollback transaction
99
- Connecting to database specified by database.yml
100
-  (0.2ms) begin transaction
101
-  (0.0ms) rollback transaction
102
-  (0.0ms) begin transaction
103
- Processing by TestController#basic as HTML
104
- Rendered test/_split_again.html.erb (0.2ms)
105
- Rendered test/_shared.html.erb (0.8ms)
106
- Rendered test/basic.html.erb within layouts/application (2.7ms)
107
- Completed 200 OK in 7.6ms (Views: 7.4ms | ActiveRecord: 0.0ms)
108
-  (0.1ms) rollback transaction
109
-  (0.0ms) begin transaction
110
- Processing by TestController#basic as HTML
111
- Parameters: {"mobile"=>"true"}
112
- Rendered test/_split_again.html.erb (0.0ms)
113
- Rendered test/_shared.html.erb (0.2ms)
114
- Completed 200 OK in 1.6ms (Views: 1.4ms | ActiveRecord: 0.0ms)
115
-  (0.0ms) rollback transaction
116
- Connecting to database specified by database.yml
117
-  (0.2ms) begin transaction
118
-  (0.0ms) rollback transaction
119
-  (0.0ms) begin transaction
120
- Processing by TestController#basic as HTML
121
- Rendered test/_split_again.html.erb (0.3ms)
122
- Rendered test/_shared.html.erb (1.3ms)
123
- Rendered test/basic.html.erb within layouts/application (4.8ms)
124
- Completed 200 OK in 12.0ms (Views: 11.6ms | ActiveRecord: 0.0ms)
125
-  (0.1ms) rollback transaction
126
-  (0.0ms) begin transaction
127
- Processing by TestController#basic as HTML
128
- Parameters: {"mobile"=>"true"}
129
- Completed 500 Internal Server Error in 6.5ms
130
-  (0.1ms) rollback transaction
131
- Connecting to database specified by database.yml
132
-  (0.2ms) begin transaction
133
-  (0.0ms) rollback transaction
134
-  (0.0ms) begin transaction
135
- Processing by TestController#basic as HTML
136
- Rendered test/_split_again.html.erb (0.3ms)
137
- Rendered test/_shared.html.erb (2.0ms)
138
- Rendered test/basic.html.erb within layouts/application (16.5ms)
139
- Completed 200 OK in 35.2ms (Views: 34.9ms | ActiveRecord: 0.0ms)
140
-  (0.1ms) rollback transaction
141
-  (0.0ms) begin transaction
142
- Processing by TestController#basic as HTML
143
- Parameters: {"mobile"=>"true"}
144
- Completed 500 Internal Server Error in 5.1ms
145
-  (0.0ms) rollback transaction
146
- Connecting to database specified by database.yml
147
-  (0.2ms) begin transaction
148
-  (0.0ms) rollback transaction
149
-  (0.0ms) begin transaction
150
- Processing by TestController#basic as HTML
151
- Rendered test/_split_again.html.erb (0.2ms)
152
- Rendered test/_shared.html.erb (0.8ms)
153
- Rendered test/basic.html.erb within layouts/application (2.8ms)
154
- Completed 200 OK in 7.5ms (Views: 7.3ms | ActiveRecord: 0.0ms)
155
-  (0.1ms) rollback transaction
156
-  (0.0ms) begin transaction
157
- Processing by TestController#basic as HTML
158
- Parameters: {"mobile"=>"true"}
159
- Completed 500 Internal Server Error in 4.4ms
160
-  (0.0ms) rollback transaction
161
- Connecting to database specified by database.yml
162
-  (0.2ms) begin transaction
163
-  (0.0ms) rollback transaction
164
-  (0.0ms) begin transaction
165
- Processing by TestController#basic as HTML
166
- Rendered test/_split_again.html.erb (0.2ms)
167
- Rendered test/_shared.html.erb (0.8ms)
168
- Rendered test/basic.html.erb within layouts/application (2.8ms)
169
- Completed 200 OK in 7.6ms (Views: 7.4ms | ActiveRecord: 0.0ms)
170
-  (0.1ms) rollback transaction
171
-  (0.0ms) begin transaction
172
- Processing by TestController#basic as HTML
173
- Parameters: {"mobile"=>"true"}
174
- Completed 500 Internal Server Error in 3.8ms
175
-  (0.0ms) rollback transaction
176
- Connecting to database specified by database.yml
177
-  (0.2ms) begin transaction
178
-  (0.0ms) rollback transaction
179
-  (0.0ms) begin transaction
180
- Processing by TestController#basic as HTML
181
- Rendered test/_split_again.html.erb (0.2ms)
182
- Rendered test/_shared.html.erb (0.8ms)
183
- Rendered test/basic.html.erb within layouts/application (2.6ms)
184
- Completed 200 OK in 7.5ms (Views: 7.2ms | ActiveRecord: 0.0ms)
185
-  (0.0ms) rollback transaction
186
-  (0.0ms) begin transaction
187
- Processing by TestController#basic as HTML
188
- Parameters: {"mobile"=>"true"}
189
- Completed 500 Internal Server Error in 3.5ms
190
-  (0.0ms) rollback transaction
191
- Connecting to database specified by database.yml
192
-  (0.2ms) begin transaction
193
-  (0.0ms) rollback transaction
194
-  (0.0ms) begin transaction
195
- Processing by TestController#basic as HTML
196
- Rendered test/_split_again.html.erb (0.2ms)
197
- Rendered test/_shared.html.erb (0.8ms)
198
- Rendered test/basic.html.erb within layouts/application (2.6ms)
199
- Completed 200 OK in 7.4ms (Views: 7.2ms | ActiveRecord: 0.0ms)
200
-  (0.1ms) rollback transaction
201
-  (0.0ms) begin transaction
202
- Processing by TestController#basic as HTML
203
- Parameters: {"mobile"=>"true"}
204
- Completed 500 Internal Server Error in 4.5ms
205
-  (0.1ms) rollback transaction
206
- Connecting to database specified by database.yml
207
-  (0.2ms) begin transaction
208
-  (0.0ms) rollback transaction
209
-  (0.0ms) begin transaction
210
- Processing by TestController#basic as HTML
211
- Rendered test/_split_again.html.erb (0.2ms)
212
- Rendered test/_shared.html.erb (0.8ms)
213
- Rendered test/basic.html.erb within layouts/application (2.7ms)
214
- Completed 200 OK in 7.9ms (Views: 7.7ms | ActiveRecord: 0.0ms)
215
-  (0.1ms) rollback transaction
216
-  (0.0ms) begin transaction
217
- Processing by TestController#basic as HTML
218
- Parameters: {"mobile"=>"true"}
219
- Completed 500 Internal Server Error in 5.2ms
220
-  (0.0ms) rollback transaction
221
- Connecting to database specified by database.yml
222
-  (0.2ms) begin transaction
223
-  (0.0ms) rollback transaction
224
-  (0.0ms) begin transaction
225
- Processing by TestController#basic as HTML
226
- Rendered test/_split_again.html.erb (0.2ms)
227
- Rendered test/_shared.html.erb (0.8ms)
228
- Rendered test/basic.html.erb within layouts/application (2.7ms)
229
- Completed 200 OK in 7.9ms (Views: 7.7ms | ActiveRecord: 0.0ms)
230
-  (0.0ms) rollback transaction
231
-  (0.0ms) begin transaction
232
- Processing by TestController#basic as HTML
233
- Parameters: {"mobile"=>"true"}
234
- Completed 500 Internal Server Error in 0.2ms
235
-  (0.0ms) rollback transaction
236
- Connecting to database specified by database.yml
237
-  (0.2ms) begin transaction
238
-  (0.0ms) rollback transaction
239
-  (0.0ms) begin transaction
240
- Processing by TestController#basic as HTML
241
- Rendered test/_split_again.html.erb (0.2ms)
242
- Rendered test/_shared.html.erb (0.8ms)
243
- Rendered test/basic.html.erb within layouts/application (2.8ms)
244
- Completed 200 OK in 8.0ms (Views: 7.8ms | ActiveRecord: 0.0ms)
245
-  (0.1ms) rollback transaction
246
-  (0.0ms) begin transaction
247
- Processing by TestController#basic as HTML
248
- Parameters: {"mobile"=>"true"}
249
- Completed 500 Internal Server Error in 5.1ms
250
-  (0.0ms) rollback transaction
251
- Connecting to database specified by database.yml
252
-  (0.2ms) begin transaction
253
-  (0.0ms) rollback transaction
254
-  (0.0ms) begin transaction
255
- Processing by TestController#basic as HTML
256
- Rendered test/_split_again.html.erb (0.3ms)
257
- Rendered test/_shared.html.erb (1.1ms)
258
- Rendered test/basic.html.erb within layouts/application (4.0ms)
259
- Completed 200 OK in 10.1ms (Views: 9.8ms | ActiveRecord: 0.0ms)
260
-  (0.0ms) rollback transaction
261
-  (0.0ms) begin transaction
262
- Processing by TestController#basic as HTML
263
- Parameters: {"mobile"=>"true"}
264
- Completed 500 Internal Server Error in 5.2ms
265
-  (0.0ms) rollback transaction
266
- Connecting to database specified by database.yml
267
-  (0.2ms) begin transaction
268
-  (0.0ms) rollback transaction
269
-  (0.0ms) begin transaction
270
- Processing by TestController#basic as HTML
271
- Rendered test/_split_again.html.erb (0.2ms)
272
- Rendered test/_shared.html.erb (0.8ms)
273
- Rendered test/basic.html.erb within layouts/application (2.8ms)
274
- Completed 200 OK in 8.5ms (Views: 8.3ms | ActiveRecord: 0.0ms)
275
-  (0.1ms) rollback transaction
276
-  (0.0ms) begin transaction
277
- Processing by TestController#basic as HTML
278
- Parameters: {"mobile"=>"true"}
279
- Completed 500 Internal Server Error in 11.5ms
280
-  (0.1ms) rollback transaction
281
- Connecting to database specified by database.yml
282
-  (0.2ms) begin transaction
283
-  (0.0ms) rollback transaction
284
-  (0.0ms) begin transaction
285
- Processing by TestController#basic as HTML
286
- Rendered test/_split_again.html.erb (0.2ms)
287
- Rendered test/_shared.html.erb (0.8ms)
288
- Rendered test/basic.html.erb within layouts/application (2.8ms)
289
- Completed 200 OK in 8.6ms (Views: 8.3ms | ActiveRecord: 0.0ms)
290
-  (0.1ms) rollback transaction
291
-  (0.0ms) begin transaction
292
- Processing by TestController#basic as HTML
293
- Parameters: {"mobile"=>"true"}
294
- Rendered test/_split_again.mobile.erb (0.4ms)
295
- Rendered test/_shared.html.erb (3.5ms)
296
- Completed 200 OK in 11.3ms (Views: 11.0ms | ActiveRecord: 0.0ms)
297
-  (0.1ms) rollback transaction
298
- Connecting to database specified by database.yml
299
-  (0.2ms) begin transaction
300
-  (0.0ms) rollback transaction
301
-  (0.0ms) begin transaction
302
- Processing by TestController#basic as HTML
303
- Rendered test/_split_again.html.erb (0.2ms)
304
- Rendered test/_shared.html.erb (0.8ms)
305
- Rendered test/basic.html.erb within layouts/application (2.7ms)
306
- Completed 200 OK in 7.8ms (Views: 7.5ms | ActiveRecord: 0.0ms)
307
-  (0.1ms) rollback transaction
308
-  (0.0ms) begin transaction
309
- Processing by TestController#basic as HTML
310
- Parameters: {"mobile"=>"true"}
311
- Rendered test/_split_again.mobile.erb (0.2ms)
312
- Rendered test/_shared.html.erb (0.8ms)
313
- Completed 200 OK in 3.9ms (Views: 3.8ms | ActiveRecord: 0.0ms)
314
-  (0.0ms) rollback transaction
315
- Connecting to database specified by database.yml
316
-  (0.2ms) begin transaction
317
-  (0.0ms) rollback transaction
318
-  (0.0ms) begin transaction
319
- Processing by TestController#basic as HTML
320
- Rendered test/_split_again.html.erb (0.2ms)
321
- Rendered test/_shared.html.erb (0.8ms)
322
- Rendered test/basic.html.erb within layouts/application (2.8ms)
323
- Completed 200 OK in 7.5ms (Views: 7.2ms | ActiveRecord: 0.0ms)
324
-  (0.1ms) rollback transaction
325
-  (0.0ms) begin transaction
326
- Processing by TestController#basic as HTML
327
- Parameters: {"mobile"=>"true"}
328
- Rendered test/_split_again.mobile.erb (0.2ms)
329
- Rendered test/_shared.html.erb (0.8ms)
330
- Completed 200 OK in 3.9ms (Views: 3.8ms | ActiveRecord: 0.0ms)
331
-  (0.0ms) rollback transaction
332
-  (0.2ms) begin transaction
333
- ----------------------------
334
- MimeFallbackTest: test_truth
335
- ----------------------------
336
-  (0.0ms) rollback transaction
337
-  (0.0ms) begin transaction
338
- ---------------------------------------
339
- TestControllerTest: test_rendering_html
340
- ---------------------------------------
341
- Processing by TestController#basic as HTML
342
- Rendered test/_split_again.html.erb (0.2ms)
343
- Rendered test/_shared.html.erb (0.9ms)
344
- Rendered test/basic.html.erb within layouts/application (1.7ms)
345
- Completed 200 OK in 56ms (Views: 55.8ms | ActiveRecord: 0.0ms)
346
-  (0.1ms) rollback transaction
347
-  (0.0ms) begin transaction
348
- -----------------------------------------
349
- TestControllerTest: test_rendering_mobile
350
- -----------------------------------------
351
- Processing by TestController#basic as HTML
352
- Parameters: {"mobile"=>"true"}
353
- Rendered test/_split_again.mobile.erb (0.3ms)
354
- Rendered test/_shared.html.erb (1.0ms)
355
- Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.0ms)
356
-  (0.1ms) rollback transaction