jets 1.9.7 → 1.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1156) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +0 -6
  3. data/CHANGELOG.md +5 -0
  4. data/Rakefile +3 -0
  5. data/jets.gemspec +3 -2
  6. data/lib/jets.rb +5 -66
  7. data/lib/jets/application.rb +29 -112
  8. data/lib/jets/application/default_config.rb +95 -0
  9. data/lib/jets/autoloaders.rb +96 -0
  10. data/lib/jets/aws_services.rb +0 -4
  11. data/lib/jets/booter.rb +24 -127
  12. data/lib/jets/builders/code_builder.rb +1 -1
  13. data/lib/jets/builders/code_size.rb +1 -1
  14. data/lib/jets/builders/gem_replacer.rb +1 -1
  15. data/lib/jets/builders/handler_generator.rb +1 -1
  16. data/lib/jets/builders/lambda_layer.rb +1 -1
  17. data/lib/jets/builders/md5.rb +1 -1
  18. data/lib/jets/builders/md5_zip.rb +1 -1
  19. data/lib/jets/builders/purger.rb +1 -1
  20. data/lib/jets/builders/rack_packager.rb +1 -1
  21. data/lib/jets/builders/reconfigure_rails.rb +1 -1
  22. data/lib/jets/builders/ruby_packager.rb +1 -1
  23. data/lib/jets/builders/tidy.rb +1 -1
  24. data/lib/jets/builders/util.rb +1 -1
  25. data/lib/jets/bundle.rb +59 -0
  26. data/lib/jets/cfn/builders/api_deployment_builder.rb +1 -1
  27. data/lib/jets/cfn/builders/api_gateway_builder.rb +1 -1
  28. data/lib/jets/cfn/builders/base_child_builder.rb +1 -1
  29. data/lib/jets/cfn/builders/controller_builder.rb +1 -1
  30. data/lib/jets/cfn/builders/function_builder.rb +1 -1
  31. data/lib/jets/cfn/builders/interface.rb +1 -1
  32. data/lib/jets/cfn/builders/job_builder.rb +1 -1
  33. data/lib/jets/cfn/builders/parent_builder.rb +1 -1
  34. data/lib/jets/cfn/builders/rule_builder.rb +1 -1
  35. data/lib/jets/cfn/builders/shared_builder.rb +1 -1
  36. data/lib/jets/cfn/ship.rb +2 -6
  37. data/lib/jets/cfn/status.rb +1 -1
  38. data/lib/jets/cfn/upload.rb +1 -1
  39. data/lib/jets/cli.rb +39 -34
  40. data/lib/jets/commands/base.rb +12 -30
  41. data/lib/jets/commands/call.rb +0 -5
  42. data/lib/jets/commands/clean.rb +0 -4
  43. data/lib/jets/commands/console.rb +0 -1
  44. data/lib/jets/commands/db.rb +0 -2
  45. data/lib/jets/commands/dynamodb.rb +0 -3
  46. data/lib/jets/commands/help/call.md +3 -3
  47. data/lib/jets/commands/import.rb +1 -7
  48. data/lib/jets/commands/import/{rail.rb → rails.rb} +1 -1
  49. data/lib/jets/commands/main.rb +3 -1
  50. data/lib/jets/commands/new.rb +1 -1
  51. data/lib/jets/commands/rake_tasks.rb +2 -1
  52. data/lib/jets/commands/runner.rb +0 -2
  53. data/lib/jets/controller.rb +0 -14
  54. data/lib/jets/controller/base.rb +1 -1
  55. data/lib/jets/controller/cookies.rb +0 -2
  56. data/lib/jets/controller/middleware/local.rb +0 -4
  57. data/lib/jets/controller/rendering.rb +0 -1
  58. data/lib/jets/controller/rendering/rack_renderer.rb +1 -2
  59. data/lib/jets/core.rb +2 -7
  60. data/lib/jets/core_ext/kernel.rb +9 -52
  61. data/lib/jets/internal/app/jobs/jets/preheat_job.rb +8 -0
  62. data/lib/jets/{mailer.rb → internal/turbines/jets/mailer.rb} +0 -0
  63. data/lib/jets/job/base.rb +1 -3
  64. data/lib/jets/job/dsl.rb +0 -9
  65. data/lib/jets/logger.rb +0 -3
  66. data/lib/jets/mega/request.rb +0 -1
  67. data/lib/jets/middleware.rb +0 -5
  68. data/lib/jets/poly_fun.rb +0 -9
  69. data/lib/jets/resource.rb +0 -18
  70. data/lib/jets/resource/api_gateway/rest_api.rb +0 -4
  71. data/lib/jets/resource/api_gateway/rest_api/routes.rb +0 -4
  72. data/lib/jets/resource/api_gateway/rest_api/routes/change.rb +0 -4
  73. data/lib/jets/resource/api_gateway/rest_api/routes/collision.rb +0 -2
  74. data/lib/jets/resource/iot/topic_rule.rb +1 -1
  75. data/lib/jets/resource/lambda/function.rb +0 -1
  76. data/lib/jets/router.rb +0 -2
  77. data/lib/jets/rule/base.rb +1 -1
  78. data/lib/jets/spec_helpers.rb +1 -4
  79. data/lib/jets/stack.rb +1 -24
  80. data/lib/jets/stack/depends.rb +0 -2
  81. data/lib/jets/stack/main.rb +0 -1
  82. data/lib/jets/stack/main/dsl.rb +0 -7
  83. data/lib/jets/stack/main/{extensions → dsl}/base.rb +0 -0
  84. data/lib/jets/stack/main/{extensions → dsl}/cloudwatch.rb +0 -0
  85. data/lib/jets/stack/main/{extensions → dsl}/iam.rb +0 -0
  86. data/lib/jets/stack/main/{extensions → dsl}/lambda.rb +0 -0
  87. data/lib/jets/stack/main/{extensions → dsl}/s3.rb +0 -0
  88. data/lib/jets/stack/main/{extensions → dsl}/sns.rb +0 -0
  89. data/lib/jets/stack/main/{extensions → dsl}/sqs.rb +0 -0
  90. data/lib/jets/stack/output.rb +0 -3
  91. data/lib/jets/stack/parameter.rb +0 -1
  92. data/lib/jets/stack/resource.rb +0 -1
  93. data/lib/jets/turbo.rb +11 -4
  94. data/lib/jets/turbo/{rail.rb → rails.rb} +1 -1
  95. data/lib/jets/version.rb +1 -1
  96. metadata +58 -1075
  97. data/lib/jets/builders.rb +0 -16
  98. data/lib/jets/builders/shim_vars.rb +0 -5
  99. data/lib/jets/cfn.rb +0 -6
  100. data/lib/jets/cfn/builders.rb +0 -20
  101. data/lib/jets/commands.rb +0 -27
  102. data/lib/jets/commands/markdown.rb +0 -8
  103. data/lib/jets/controller/middleware.rb +0 -5
  104. data/lib/jets/controller/rack.rb +0 -5
  105. data/lib/jets/io.rb +0 -14
  106. data/lib/jets/job.rb +0 -4
  107. data/lib/jets/job/helpers.rb +0 -5
  108. data/lib/jets/lambda.rb +0 -18
  109. data/lib/jets/mega.rb +0 -7
  110. data/lib/jets/processors.rb +0 -4
  111. data/lib/jets/resource/api_gateway.rb +0 -9
  112. data/lib/jets/resource/api_gateway/base_path.rb +0 -5
  113. data/lib/jets/resource/child_stack.rb +0 -7
  114. data/lib/jets/resource/config.rb +0 -4
  115. data/lib/jets/resource/events.rb +0 -3
  116. data/lib/jets/resource/iam.rb +0 -8
  117. data/lib/jets/resource/iot.rb +0 -3
  118. data/lib/jets/resource/lambda.rb +0 -6
  119. data/lib/jets/resource/logs.rb +0 -3
  120. data/lib/jets/resource/route53.rb +0 -3
  121. data/lib/jets/resource/s3.rb +0 -3
  122. data/lib/jets/resource/sns.rb +0 -5
  123. data/lib/jets/resource/sqs.rb +0 -3
  124. data/lib/jets/rule.rb +0 -4
  125. data/vendor/jets-gems/Gemfile +0 -6
  126. data/vendor/jets-gems/LICENSE.txt +0 -21
  127. data/vendor/jets-gems/README.md +0 -19
  128. data/vendor/jets-gems/Rakefile +0 -6
  129. data/vendor/jets-gems/bin/console +0 -14
  130. data/vendor/jets-gems/bin/setup +0 -8
  131. data/vendor/jets-gems/jets-gems.gemspec +0 -30
  132. data/vendor/jets-gems/lib/jets-gems.rb +0 -1
  133. data/vendor/jets-gems/lib/jets/gems.rb +0 -17
  134. data/vendor/jets-gems/lib/jets/gems/agree.rb +0 -60
  135. data/vendor/jets-gems/lib/jets/gems/check.rb +0 -190
  136. data/vendor/jets-gems/lib/jets/gems/exist.rb +0 -56
  137. data/vendor/jets-gems/lib/jets/gems/extract.rb +0 -7
  138. data/vendor/jets-gems/lib/jets/gems/extract/base.rb +0 -74
  139. data/vendor/jets-gems/lib/jets/gems/extract/gem.rb +0 -105
  140. data/vendor/jets-gems/lib/jets/gems/extract/ruby.rb +0 -71
  141. data/vendor/jets-gems/lib/jets/gems/report.rb +0 -69
  142. data/vendor/jets-gems/lib/jets/gems/version.rb +0 -5
  143. data/vendor/jets-gems/spec/jets/gems_spec.rb +0 -5
  144. data/vendor/jets-gems/spec/spec_helper.rb +0 -14
  145. data/vendor/rails/Brewfile +0 -13
  146. data/vendor/rails/CODE_OF_CONDUCT.md +0 -12
  147. data/vendor/rails/CONTRIBUTING.md +0 -49
  148. data/vendor/rails/Gemfile +0 -174
  149. data/vendor/rails/MIT-LICENSE +0 -20
  150. data/vendor/rails/RAILS_VERSION +0 -1
  151. data/vendor/rails/README.md +0 -97
  152. data/vendor/rails/RELEASING_RAILS.md +0 -225
  153. data/vendor/rails/Rakefile +0 -72
  154. data/vendor/rails/actionpack/CHANGELOG.md +0 -407
  155. data/vendor/rails/actionpack/MIT-LICENSE +0 -21
  156. data/vendor/rails/actionpack/README.rdoc +0 -57
  157. data/vendor/rails/actionpack/Rakefile +0 -40
  158. data/vendor/rails/actionpack/actionpack.gemspec +0 -38
  159. data/vendor/rails/actionpack/bin/test +0 -5
  160. data/vendor/rails/actionpack/lib/abstract_controller.rb +0 -27
  161. data/vendor/rails/actionpack/lib/abstract_controller/asset_paths.rb +0 -12
  162. data/vendor/rails/actionpack/lib/abstract_controller/base.rb +0 -265
  163. data/vendor/rails/actionpack/lib/abstract_controller/caching.rb +0 -66
  164. data/vendor/rails/actionpack/lib/abstract_controller/caching/fragments.rb +0 -166
  165. data/vendor/rails/actionpack/lib/abstract_controller/callbacks.rb +0 -212
  166. data/vendor/rails/actionpack/lib/abstract_controller/collector.rb +0 -43
  167. data/vendor/rails/actionpack/lib/abstract_controller/error.rb +0 -6
  168. data/vendor/rails/actionpack/lib/abstract_controller/helpers.rb +0 -194
  169. data/vendor/rails/actionpack/lib/abstract_controller/logger.rb +0 -14
  170. data/vendor/rails/actionpack/lib/abstract_controller/railties/routes_helpers.rb +0 -20
  171. data/vendor/rails/actionpack/lib/abstract_controller/rendering.rb +0 -127
  172. data/vendor/rails/actionpack/lib/abstract_controller/translation.rb +0 -31
  173. data/vendor/rails/actionpack/lib/abstract_controller/url_for.rb +0 -35
  174. data/vendor/rails/actionpack/lib/action_controller.rb +0 -66
  175. data/vendor/rails/actionpack/lib/action_controller/api.rb +0 -149
  176. data/vendor/rails/actionpack/lib/action_controller/api/api_rendering.rb +0 -16
  177. data/vendor/rails/actionpack/lib/action_controller/base.rb +0 -276
  178. data/vendor/rails/actionpack/lib/action_controller/caching.rb +0 -46
  179. data/vendor/rails/actionpack/lib/action_controller/form_builder.rb +0 -50
  180. data/vendor/rails/actionpack/lib/action_controller/log_subscriber.rb +0 -78
  181. data/vendor/rails/actionpack/lib/action_controller/metal.rb +0 -256
  182. data/vendor/rails/actionpack/lib/action_controller/metal/basic_implicit_render.rb +0 -13
  183. data/vendor/rails/actionpack/lib/action_controller/metal/conditional_get.rb +0 -274
  184. data/vendor/rails/actionpack/lib/action_controller/metal/content_security_policy.rb +0 -52
  185. data/vendor/rails/actionpack/lib/action_controller/metal/cookies.rb +0 -16
  186. data/vendor/rails/actionpack/lib/action_controller/metal/data_streaming.rb +0 -152
  187. data/vendor/rails/actionpack/lib/action_controller/metal/etag_with_flash.rb +0 -18
  188. data/vendor/rails/actionpack/lib/action_controller/metal/etag_with_template_digest.rb +0 -57
  189. data/vendor/rails/actionpack/lib/action_controller/metal/exceptions.rb +0 -53
  190. data/vendor/rails/actionpack/lib/action_controller/metal/flash.rb +0 -61
  191. data/vendor/rails/actionpack/lib/action_controller/metal/force_ssl.rb +0 -99
  192. data/vendor/rails/actionpack/lib/action_controller/metal/head.rb +0 -60
  193. data/vendor/rails/actionpack/lib/action_controller/metal/helpers.rb +0 -123
  194. data/vendor/rails/actionpack/lib/action_controller/metal/http_authentication.rb +0 -519
  195. data/vendor/rails/actionpack/lib/action_controller/metal/implicit_render.rb +0 -73
  196. data/vendor/rails/actionpack/lib/action_controller/metal/instrumentation.rb +0 -107
  197. data/vendor/rails/actionpack/lib/action_controller/metal/live.rb +0 -312
  198. data/vendor/rails/actionpack/lib/action_controller/metal/mime_responds.rb +0 -313
  199. data/vendor/rails/actionpack/lib/action_controller/metal/parameter_encoding.rb +0 -51
  200. data/vendor/rails/actionpack/lib/action_controller/metal/params_wrapper.rb +0 -293
  201. data/vendor/rails/actionpack/lib/action_controller/metal/redirecting.rb +0 -133
  202. data/vendor/rails/actionpack/lib/action_controller/metal/renderers.rb +0 -181
  203. data/vendor/rails/actionpack/lib/action_controller/metal/rendering.rb +0 -122
  204. data/vendor/rails/actionpack/lib/action_controller/metal/request_forgery_protection.rb +0 -445
  205. data/vendor/rails/actionpack/lib/action_controller/metal/rescue.rb +0 -28
  206. data/vendor/rails/actionpack/lib/action_controller/metal/streaming.rb +0 -223
  207. data/vendor/rails/actionpack/lib/action_controller/metal/strong_parameters.rb +0 -1086
  208. data/vendor/rails/actionpack/lib/action_controller/metal/testing.rb +0 -16
  209. data/vendor/rails/actionpack/lib/action_controller/metal/url_for.rb +0 -58
  210. data/vendor/rails/actionpack/lib/action_controller/railtie.rb +0 -89
  211. data/vendor/rails/actionpack/lib/action_controller/railties/helpers.rb +0 -24
  212. data/vendor/rails/actionpack/lib/action_controller/renderer.rb +0 -117
  213. data/vendor/rails/actionpack/lib/action_controller/template_assertions.rb +0 -11
  214. data/vendor/rails/actionpack/lib/action_controller/test_case.rb +0 -629
  215. data/vendor/rails/actionpack/lib/action_dispatch.rb +0 -112
  216. data/vendor/rails/actionpack/lib/action_dispatch/http/cache.rb +0 -220
  217. data/vendor/rails/actionpack/lib/action_dispatch/http/content_security_policy.rb +0 -272
  218. data/vendor/rails/actionpack/lib/action_dispatch/http/filter_parameters.rb +0 -84
  219. data/vendor/rails/actionpack/lib/action_dispatch/http/filter_redirect.rb +0 -37
  220. data/vendor/rails/actionpack/lib/action_dispatch/http/headers.rb +0 -132
  221. data/vendor/rails/actionpack/lib/action_dispatch/http/mime_negotiation.rb +0 -170
  222. data/vendor/rails/actionpack/lib/action_dispatch/http/mime_type.rb +0 -342
  223. data/vendor/rails/actionpack/lib/action_dispatch/http/mime_types.rb +0 -50
  224. data/vendor/rails/actionpack/lib/action_dispatch/http/parameter_filter.rb +0 -86
  225. data/vendor/rails/actionpack/lib/action_dispatch/http/parameters.rb +0 -126
  226. data/vendor/rails/actionpack/lib/action_dispatch/http/rack_cache.rb +0 -63
  227. data/vendor/rails/actionpack/lib/action_dispatch/http/request.rb +0 -430
  228. data/vendor/rails/actionpack/lib/action_dispatch/http/response.rb +0 -520
  229. data/vendor/rails/actionpack/lib/action_dispatch/http/upload.rb +0 -84
  230. data/vendor/rails/actionpack/lib/action_dispatch/http/url.rb +0 -350
  231. data/vendor/rails/actionpack/lib/action_dispatch/journey.rb +0 -7
  232. data/vendor/rails/actionpack/lib/action_dispatch/journey/formatter.rb +0 -189
  233. data/vendor/rails/actionpack/lib/action_dispatch/journey/gtg/builder.rb +0 -164
  234. data/vendor/rails/actionpack/lib/action_dispatch/journey/gtg/simulator.rb +0 -41
  235. data/vendor/rails/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb +0 -158
  236. data/vendor/rails/actionpack/lib/action_dispatch/journey/nfa/builder.rb +0 -78
  237. data/vendor/rails/actionpack/lib/action_dispatch/journey/nfa/dot.rb +0 -36
  238. data/vendor/rails/actionpack/lib/action_dispatch/journey/nfa/simulator.rb +0 -49
  239. data/vendor/rails/actionpack/lib/action_dispatch/journey/nfa/transition_table.rb +0 -120
  240. data/vendor/rails/actionpack/lib/action_dispatch/journey/nodes/node.rb +0 -140
  241. data/vendor/rails/actionpack/lib/action_dispatch/journey/parser.rb +0 -199
  242. data/vendor/rails/actionpack/lib/action_dispatch/journey/parser.y +0 -50
  243. data/vendor/rails/actionpack/lib/action_dispatch/journey/parser_extras.rb +0 -31
  244. data/vendor/rails/actionpack/lib/action_dispatch/journey/path/pattern.rb +0 -198
  245. data/vendor/rails/actionpack/lib/action_dispatch/journey/route.rb +0 -203
  246. data/vendor/rails/actionpack/lib/action_dispatch/journey/router.rb +0 -156
  247. data/vendor/rails/actionpack/lib/action_dispatch/journey/router/utils.rb +0 -102
  248. data/vendor/rails/actionpack/lib/action_dispatch/journey/routes.rb +0 -82
  249. data/vendor/rails/actionpack/lib/action_dispatch/journey/scanner.rb +0 -64
  250. data/vendor/rails/actionpack/lib/action_dispatch/journey/visitors.rb +0 -268
  251. data/vendor/rails/actionpack/lib/action_dispatch/journey/visualizer/fsm.css +0 -30
  252. data/vendor/rails/actionpack/lib/action_dispatch/journey/visualizer/fsm.js +0 -134
  253. data/vendor/rails/actionpack/lib/action_dispatch/journey/visualizer/index.html.erb +0 -52
  254. data/vendor/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb +0 -36
  255. data/vendor/rails/actionpack/lib/action_dispatch/middleware/cookies.rb +0 -685
  256. data/vendor/rails/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb +0 -205
  257. data/vendor/rails/actionpack/lib/action_dispatch/middleware/debug_locks.rb +0 -124
  258. data/vendor/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb +0 -147
  259. data/vendor/rails/actionpack/lib/action_dispatch/middleware/executor.rb +0 -21
  260. data/vendor/rails/actionpack/lib/action_dispatch/middleware/flash.rb +0 -300
  261. data/vendor/rails/actionpack/lib/action_dispatch/middleware/public_exceptions.rb +0 -57
  262. data/vendor/rails/actionpack/lib/action_dispatch/middleware/reloader.rb +0 -12
  263. data/vendor/rails/actionpack/lib/action_dispatch/middleware/remote_ip.rb +0 -183
  264. data/vendor/rails/actionpack/lib/action_dispatch/middleware/request_id.rb +0 -43
  265. data/vendor/rails/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb +0 -92
  266. data/vendor/rails/actionpack/lib/action_dispatch/middleware/session/cache_store.rb +0 -54
  267. data/vendor/rails/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb +0 -117
  268. data/vendor/rails/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb +0 -28
  269. data/vendor/rails/actionpack/lib/action_dispatch/middleware/show_exceptions.rb +0 -62
  270. data/vendor/rails/actionpack/lib/action_dispatch/middleware/ssl.rb +0 -150
  271. data/vendor/rails/actionpack/lib/action_dispatch/middleware/stack.rb +0 -116
  272. data/vendor/rails/actionpack/lib/action_dispatch/middleware/static.rb +0 -130
  273. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb +0 -22
  274. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb +0 -23
  275. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/_source.html.erb +0 -27
  276. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/_source.text.erb +0 -8
  277. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb +0 -52
  278. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb +0 -9
  279. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb +0 -16
  280. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb +0 -9
  281. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb +0 -21
  282. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb +0 -13
  283. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb +0 -161
  284. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb +0 -11
  285. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_template.text.erb +0 -3
  286. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb +0 -32
  287. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.text.erb +0 -11
  288. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb +0 -20
  289. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.text.erb +0 -7
  290. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/unknown_action.html.erb +0 -6
  291. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/unknown_action.text.erb +0 -3
  292. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/routes/_route.html.erb +0 -16
  293. data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb +0 -200
  294. data/vendor/rails/actionpack/lib/action_dispatch/railtie.rb +0 -55
  295. data/vendor/rails/actionpack/lib/action_dispatch/request/session.rb +0 -234
  296. data/vendor/rails/actionpack/lib/action_dispatch/request/utils.rb +0 -78
  297. data/vendor/rails/actionpack/lib/action_dispatch/routing.rb +0 -260
  298. data/vendor/rails/actionpack/lib/action_dispatch/routing/endpoint.rb +0 -17
  299. data/vendor/rails/actionpack/lib/action_dispatch/routing/inspector.rb +0 -225
  300. data/vendor/rails/actionpack/lib/action_dispatch/routing/mapper.rb +0 -2267
  301. data/vendor/rails/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb +0 -352
  302. data/vendor/rails/actionpack/lib/action_dispatch/routing/redirection.rb +0 -201
  303. data/vendor/rails/actionpack/lib/action_dispatch/routing/route_set.rb +0 -890
  304. data/vendor/rails/actionpack/lib/action_dispatch/routing/routes_proxy.rb +0 -69
  305. data/vendor/rails/actionpack/lib/action_dispatch/routing/url_for.rb +0 -236
  306. data/vendor/rails/actionpack/lib/action_dispatch/system_test_case.rb +0 -147
  307. data/vendor/rails/actionpack/lib/action_dispatch/system_testing/browser.rb +0 -49
  308. data/vendor/rails/actionpack/lib/action_dispatch/system_testing/driver.rb +0 -59
  309. data/vendor/rails/actionpack/lib/action_dispatch/system_testing/server.rb +0 -31
  310. data/vendor/rails/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb +0 -96
  311. data/vendor/rails/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb +0 -31
  312. data/vendor/rails/actionpack/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb +0 -26
  313. data/vendor/rails/actionpack/lib/action_dispatch/testing/assertion_response.rb +0 -47
  314. data/vendor/rails/actionpack/lib/action_dispatch/testing/assertions.rb +0 -24
  315. data/vendor/rails/actionpack/lib/action_dispatch/testing/assertions/response.rb +0 -107
  316. data/vendor/rails/actionpack/lib/action_dispatch/testing/assertions/routing.rb +0 -222
  317. data/vendor/rails/actionpack/lib/action_dispatch/testing/integration.rb +0 -652
  318. data/vendor/rails/actionpack/lib/action_dispatch/testing/request_encoder.rb +0 -55
  319. data/vendor/rails/actionpack/lib/action_dispatch/testing/test_process.rb +0 -50
  320. data/vendor/rails/actionpack/lib/action_dispatch/testing/test_request.rb +0 -71
  321. data/vendor/rails/actionpack/lib/action_dispatch/testing/test_response.rb +0 -53
  322. data/vendor/rails/actionpack/lib/action_pack.rb +0 -26
  323. data/vendor/rails/actionpack/lib/action_pack/gem_version.rb +0 -17
  324. data/vendor/rails/actionpack/lib/action_pack/version.rb +0 -10
  325. data/vendor/rails/actionpack/test/abstract/callbacks_test.rb +0 -270
  326. data/vendor/rails/actionpack/test/abstract/collector_test.rb +0 -65
  327. data/vendor/rails/actionpack/test/abstract/translation_test.rb +0 -79
  328. data/vendor/rails/actionpack/test/abstract_unit.rb +0 -457
  329. data/vendor/rails/actionpack/test/assertions/response_assertions_test.rb +0 -141
  330. data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +0 -493
  331. data/vendor/rails/actionpack/test/controller/api/conditional_get_test.rb +0 -59
  332. data/vendor/rails/actionpack/test/controller/api/data_streaming_test.rb +0 -28
  333. data/vendor/rails/actionpack/test/controller/api/force_ssl_test.rb +0 -22
  334. data/vendor/rails/actionpack/test/controller/api/implicit_render_test.rb +0 -17
  335. data/vendor/rails/actionpack/test/controller/api/params_wrapper_test.rb +0 -28
  336. data/vendor/rails/actionpack/test/controller/api/redirect_to_test.rb +0 -21
  337. data/vendor/rails/actionpack/test/controller/api/renderers_test.rb +0 -50
  338. data/vendor/rails/actionpack/test/controller/api/url_for_test.rb +0 -22
  339. data/vendor/rails/actionpack/test/controller/api/with_cookies_test.rb +0 -23
  340. data/vendor/rails/actionpack/test/controller/api/with_helpers_test.rb +0 -44
  341. data/vendor/rails/actionpack/test/controller/base_test.rb +0 -323
  342. data/vendor/rails/actionpack/test/controller/caching_test.rb +0 -511
  343. data/vendor/rails/actionpack/test/controller/content_type_test.rb +0 -169
  344. data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/admin/user_controller.rb +0 -0
  345. data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/user_controller.rb +0 -0
  346. data/vendor/rails/actionpack/test/controller/controller_fixtures/vendor/plugins/bad_plugin/lib/plugin_controller.rb +0 -0
  347. data/vendor/rails/actionpack/test/controller/default_url_options_with_before_action_test.rb +0 -28
  348. data/vendor/rails/actionpack/test/controller/filters_test.rb +0 -1050
  349. data/vendor/rails/actionpack/test/controller/flash_hash_test.rb +0 -216
  350. data/vendor/rails/actionpack/test/controller/flash_test.rb +0 -373
  351. data/vendor/rails/actionpack/test/controller/force_ssl_test.rb +0 -333
  352. data/vendor/rails/actionpack/test/controller/form_builder_test.rb +0 -19
  353. data/vendor/rails/actionpack/test/controller/helper_test.rb +0 -295
  354. data/vendor/rails/actionpack/test/controller/http_basic_authentication_test.rb +0 -179
  355. data/vendor/rails/actionpack/test/controller/http_digest_authentication_test.rb +0 -282
  356. data/vendor/rails/actionpack/test/controller/http_token_authentication_test.rb +0 -216
  357. data/vendor/rails/actionpack/test/controller/integration_test.rb +0 -1136
  358. data/vendor/rails/actionpack/test/controller/live_stream_test.rb +0 -518
  359. data/vendor/rails/actionpack/test/controller/localized_templates_test.rb +0 -48
  360. data/vendor/rails/actionpack/test/controller/log_subscriber_test.rb +0 -371
  361. data/vendor/rails/actionpack/test/controller/metal/renderers_test.rb +0 -50
  362. data/vendor/rails/actionpack/test/controller/metal_test.rb +0 -32
  363. data/vendor/rails/actionpack/test/controller/mime/accept_format_test.rb +0 -94
  364. data/vendor/rails/actionpack/test/controller/mime/respond_to_test.rb +0 -843
  365. data/vendor/rails/actionpack/test/controller/new_base/bare_metal_test.rb +0 -184
  366. data/vendor/rails/actionpack/test/controller/new_base/base_test.rb +0 -131
  367. data/vendor/rails/actionpack/test/controller/new_base/content_negotiation_test.rb +0 -28
  368. data/vendor/rails/actionpack/test/controller/new_base/content_type_test.rb +0 -116
  369. data/vendor/rails/actionpack/test/controller/new_base/middleware_test.rb +0 -112
  370. data/vendor/rails/actionpack/test/controller/new_base/render_action_test.rb +0 -314
  371. data/vendor/rails/actionpack/test/controller/new_base/render_body_test.rb +0 -172
  372. data/vendor/rails/actionpack/test/controller/new_base/render_context_test.rb +0 -54
  373. data/vendor/rails/actionpack/test/controller/new_base/render_file_test.rb +0 -72
  374. data/vendor/rails/actionpack/test/controller/new_base/render_html_test.rb +0 -192
  375. data/vendor/rails/actionpack/test/controller/new_base/render_implicit_action_test.rb +0 -59
  376. data/vendor/rails/actionpack/test/controller/new_base/render_layout_test.rb +0 -128
  377. data/vendor/rails/actionpack/test/controller/new_base/render_partial_test.rb +0 -62
  378. data/vendor/rails/actionpack/test/controller/new_base/render_plain_test.rb +0 -170
  379. data/vendor/rails/actionpack/test/controller/new_base/render_streaming_test.rb +0 -116
  380. data/vendor/rails/actionpack/test/controller/new_base/render_template_test.rb +0 -240
  381. data/vendor/rails/actionpack/test/controller/new_base/render_test.rb +0 -142
  382. data/vendor/rails/actionpack/test/controller/new_base/render_xml_test.rb +0 -12
  383. data/vendor/rails/actionpack/test/controller/output_escaping_test.rb +0 -17
  384. data/vendor/rails/actionpack/test/controller/parameter_encoding_test.rb +0 -52
  385. data/vendor/rails/actionpack/test/controller/parameters/accessors_test.rb +0 -324
  386. data/vendor/rails/actionpack/test/controller/parameters/always_permitted_parameters_test.rb +0 -30
  387. data/vendor/rails/actionpack/test/controller/parameters/dup_test.rb +0 -67
  388. data/vendor/rails/actionpack/test/controller/parameters/log_on_unpermitted_params_test.rb +0 -70
  389. data/vendor/rails/actionpack/test/controller/parameters/multi_parameter_attributes_test.rb +0 -39
  390. data/vendor/rails/actionpack/test/controller/parameters/mutators_test.rb +0 -122
  391. data/vendor/rails/actionpack/test/controller/parameters/nested_parameters_permit_test.rb +0 -184
  392. data/vendor/rails/actionpack/test/controller/parameters/parameters_permit_test.rb +0 -516
  393. data/vendor/rails/actionpack/test/controller/parameters/raise_on_unpermitted_params_test.rb +0 -33
  394. data/vendor/rails/actionpack/test/controller/parameters/serialization_test.rb +0 -55
  395. data/vendor/rails/actionpack/test/controller/params_wrapper_test.rb +0 -422
  396. data/vendor/rails/actionpack/test/controller/permitted_params_test.rb +0 -27
  397. data/vendor/rails/actionpack/test/controller/redirect_test.rb +0 -395
  398. data/vendor/rails/actionpack/test/controller/render_js_test.rb +0 -36
  399. data/vendor/rails/actionpack/test/controller/render_json_test.rb +0 -137
  400. data/vendor/rails/actionpack/test/controller/render_test.rb +0 -843
  401. data/vendor/rails/actionpack/test/controller/render_xml_test.rb +0 -102
  402. data/vendor/rails/actionpack/test/controller/renderer_test.rb +0 -136
  403. data/vendor/rails/actionpack/test/controller/renderers_test.rb +0 -91
  404. data/vendor/rails/actionpack/test/controller/request/test_request_test.rb +0 -42
  405. data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +0 -1013
  406. data/vendor/rails/actionpack/test/controller/required_params_test.rb +0 -100
  407. data/vendor/rails/actionpack/test/controller/rescue_test.rb +0 -364
  408. data/vendor/rails/actionpack/test/controller/resources_test.rb +0 -1369
  409. data/vendor/rails/actionpack/test/controller/routing_test.rb +0 -2108
  410. data/vendor/rails/actionpack/test/controller/runner_test.rb +0 -24
  411. data/vendor/rails/actionpack/test/controller/send_file_test.rb +0 -259
  412. data/vendor/rails/actionpack/test/controller/show_exceptions_test.rb +0 -114
  413. data/vendor/rails/actionpack/test/controller/streaming_test.rb +0 -28
  414. data/vendor/rails/actionpack/test/controller/test_case_test.rb +0 -1157
  415. data/vendor/rails/actionpack/test/controller/url_for_integration_test.rb +0 -192
  416. data/vendor/rails/actionpack/test/controller/url_for_test.rb +0 -519
  417. data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +0 -92
  418. data/vendor/rails/actionpack/test/controller/webservice_test.rb +0 -135
  419. data/vendor/rails/actionpack/test/dispatch/callbacks_test.rb +0 -47
  420. data/vendor/rails/actionpack/test/dispatch/content_security_policy_test.rb +0 -525
  421. data/vendor/rails/actionpack/test/dispatch/cookies_test.rb +0 -1345
  422. data/vendor/rails/actionpack/test/dispatch/debug_exceptions_test.rb +0 -502
  423. data/vendor/rails/actionpack/test/dispatch/debug_locks_test.rb +0 -38
  424. data/vendor/rails/actionpack/test/dispatch/exception_wrapper_test.rb +0 -120
  425. data/vendor/rails/actionpack/test/dispatch/executor_test.rb +0 -136
  426. data/vendor/rails/actionpack/test/dispatch/header_test.rb +0 -169
  427. data/vendor/rails/actionpack/test/dispatch/live_response_test.rb +0 -98
  428. data/vendor/rails/actionpack/test/dispatch/mapper_test.rb +0 -210
  429. data/vendor/rails/actionpack/test/dispatch/middleware_stack_test.rb +0 -115
  430. data/vendor/rails/actionpack/test/dispatch/mime_type_test.rb +0 -187
  431. data/vendor/rails/actionpack/test/dispatch/mount_test.rb +0 -95
  432. data/vendor/rails/actionpack/test/dispatch/prefix_generation_test.rb +0 -463
  433. data/vendor/rails/actionpack/test/dispatch/rack_cache_test.rb +0 -23
  434. data/vendor/rails/actionpack/test/dispatch/reloader_test.rb +0 -167
  435. data/vendor/rails/actionpack/test/dispatch/request/json_params_parsing_test.rb +0 -207
  436. data/vendor/rails/actionpack/test/dispatch/request/multipart_params_parsing_test.rb +0 -202
  437. data/vendor/rails/actionpack/test/dispatch/request/query_string_parsing_test.rb +0 -176
  438. data/vendor/rails/actionpack/test/dispatch/request/session_test.rb +0 -165
  439. data/vendor/rails/actionpack/test/dispatch/request/url_encoded_params_parsing_test.rb +0 -181
  440. data/vendor/rails/actionpack/test/dispatch/request_id_test.rb +0 -75
  441. data/vendor/rails/actionpack/test/dispatch/request_test.rb +0 -1307
  442. data/vendor/rails/actionpack/test/dispatch/response_test.rb +0 -542
  443. data/vendor/rails/actionpack/test/dispatch/routing/concerns_test.rb +0 -124
  444. data/vendor/rails/actionpack/test/dispatch/routing/custom_url_helpers_test.rb +0 -333
  445. data/vendor/rails/actionpack/test/dispatch/routing/inspector_test.rb +0 -425
  446. data/vendor/rails/actionpack/test/dispatch/routing/ipv6_redirect_test.rb +0 -46
  447. data/vendor/rails/actionpack/test/dispatch/routing/route_set_test.rb +0 -166
  448. data/vendor/rails/actionpack/test/dispatch/routing_assertions_test.rb +0 -209
  449. data/vendor/rails/actionpack/test/dispatch/routing_test.rb +0 -5112
  450. data/vendor/rails/actionpack/test/dispatch/runner_test.rb +0 -19
  451. data/vendor/rails/actionpack/test/dispatch/session/abstract_store_test.rb +0 -58
  452. data/vendor/rails/actionpack/test/dispatch/session/cache_store_test.rb +0 -183
  453. data/vendor/rails/actionpack/test/dispatch/session/cookie_store_test.rb +0 -417
  454. data/vendor/rails/actionpack/test/dispatch/session/mem_cache_store_test.rb +0 -205
  455. data/vendor/rails/actionpack/test/dispatch/session/test_session_test.rb +0 -65
  456. data/vendor/rails/actionpack/test/dispatch/show_exceptions_test.rb +0 -138
  457. data/vendor/rails/actionpack/test/dispatch/ssl_test.rb +0 -228
  458. data/vendor/rails/actionpack/test/dispatch/static_test.rb +0 -318
  459. data/vendor/rails/actionpack/test/dispatch/system_testing/driver_test.rb +0 -54
  460. data/vendor/rails/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb +0 -81
  461. data/vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb +0 -32
  462. data/vendor/rails/actionpack/test/dispatch/system_testing/system_test_case_test.rb +0 -84
  463. data/vendor/rails/actionpack/test/dispatch/test_request_test.rb +0 -131
  464. data/vendor/rails/actionpack/test/dispatch/test_response_test.rb +0 -37
  465. data/vendor/rails/actionpack/test/dispatch/uploaded_file_test.rb +0 -113
  466. data/vendor/rails/actionpack/test/dispatch/url_generation_test.rb +0 -141
  467. data/vendor/rails/actionpack/test/fixtures/_top_level_partial_only.erb +0 -1
  468. data/vendor/rails/actionpack/test/fixtures/alternate_helpers/foo_helper.rb +0 -5
  469. data/vendor/rails/actionpack/test/fixtures/bad_customers/_bad_customer.html.erb +0 -1
  470. data/vendor/rails/actionpack/test/fixtures/collection_cache/index.html.erb +0 -1
  471. data/vendor/rails/actionpack/test/fixtures/company.rb +0 -11
  472. data/vendor/rails/actionpack/test/fixtures/customers/_commented_customer.html.erb +0 -5
  473. data/vendor/rails/actionpack/test/fixtures/customers/_customer.html.erb +0 -4
  474. data/vendor/rails/actionpack/test/fixtures/filter_test/implicit_actions/edit.html.erb +0 -1
  475. data/vendor/rails/actionpack/test/fixtures/filter_test/implicit_actions/show.html.erb +0 -1
  476. data/vendor/rails/actionpack/test/fixtures/functional_caching/_formatted_partial.html.erb +0 -1
  477. data/vendor/rails/actionpack/test/fixtures/functional_caching/_partial.erb +0 -3
  478. data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.html.erb +0 -3
  479. data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.xml.builder +0 -5
  480. data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached_with_variant.html+phone.erb +0 -3
  481. data/vendor/rails/actionpack/test/fixtures/functional_caching/fragment_cached.html.erb +0 -3
  482. data/vendor/rails/actionpack/test/fixtures/functional_caching/fragment_cached_with_options.html.erb +0 -3
  483. data/vendor/rails/actionpack/test/fixtures/functional_caching/fragment_cached_without_digest.html.erb +0 -3
  484. data/vendor/rails/actionpack/test/fixtures/functional_caching/html_fragment_cached_with_partial.html.erb +0 -1
  485. data/vendor/rails/actionpack/test/fixtures/functional_caching/inline_fragment_cached.html.erb +0 -2
  486. data/vendor/rails/actionpack/test/fixtures/functional_caching/xml_fragment_cached_with_html_partial.xml.builder +0 -5
  487. data/vendor/rails/actionpack/test/fixtures/helpers/abc_helper.rb +0 -5
  488. data/vendor/rails/actionpack/test/fixtures/helpers/fun/games_helper.rb +0 -7
  489. data/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +0 -7
  490. data/vendor/rails/actionpack/test/fixtures/helpers/just_me_helper.rb +0 -5
  491. data/vendor/rails/actionpack/test/fixtures/helpers/me_too_helper.rb +0 -5
  492. data/vendor/rails/actionpack/test/fixtures/helpers1_pack/pack1_helper.rb +0 -7
  493. data/vendor/rails/actionpack/test/fixtures/helpers2_pack/pack2_helper.rb +0 -7
  494. data/vendor/rails/actionpack/test/fixtures/helpers_typo/admin/users_helper.rb +0 -6
  495. data/vendor/rails/actionpack/test/fixtures/implicit_render_test/empty_action_with_mobile_variant.html+mobile.erb +0 -1
  496. data/vendor/rails/actionpack/test/fixtures/implicit_render_test/empty_action_with_template.html.erb +0 -1
  497. data/vendor/rails/actionpack/test/fixtures/layouts/_customers.erb +0 -1
  498. data/vendor/rails/actionpack/test/fixtures/layouts/block_with_layout.erb +0 -3
  499. data/vendor/rails/actionpack/test/fixtures/layouts/builder.builder +0 -3
  500. data/vendor/rails/actionpack/test/fixtures/layouts/partial_with_layout.erb +0 -3
  501. data/vendor/rails/actionpack/test/fixtures/layouts/standard.html.erb +0 -1
  502. data/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.erb +0 -2
  503. data/vendor/rails/actionpack/test/fixtures/layouts/with_html_partial.html.erb +0 -1
  504. data/vendor/rails/actionpack/test/fixtures/layouts/xhr.html.erb +0 -2
  505. data/vendor/rails/actionpack/test/fixtures/layouts/yield.erb +0 -2
  506. data/vendor/rails/actionpack/test/fixtures/load_me.rb +0 -4
  507. data/vendor/rails/actionpack/test/fixtures/localized/hello_world.de.html +0 -1
  508. data/vendor/rails/actionpack/test/fixtures/localized/hello_world.en.html +0 -1
  509. data/vendor/rails/actionpack/test/fixtures/localized/hello_world.it.erb +0 -1
  510. data/vendor/rails/actionpack/test/fixtures/multipart/binary_file +0 -0
  511. data/vendor/rails/actionpack/test/fixtures/multipart/boundary_problem_file +0 -10
  512. data/vendor/rails/actionpack/test/fixtures/multipart/bracketed_param +0 -5
  513. data/vendor/rails/actionpack/test/fixtures/multipart/bracketed_utf8_param +0 -5
  514. data/vendor/rails/actionpack/test/fixtures/multipart/empty +0 -10
  515. data/vendor/rails/actionpack/test/fixtures/multipart/hello.txt +0 -1
  516. data/vendor/rails/actionpack/test/fixtures/multipart/large_text_file +0 -10
  517. data/vendor/rails/actionpack/test/fixtures/multipart/mixed_files +0 -0
  518. data/vendor/rails/actionpack/test/fixtures/multipart/none +0 -9
  519. data/vendor/rails/actionpack/test/fixtures/multipart/ruby_on_rails.jpg +0 -0
  520. data/vendor/rails/actionpack/test/fixtures/multipart/single_parameter +0 -5
  521. data/vendor/rails/actionpack/test/fixtures/multipart/single_utf8_param +0 -5
  522. data/vendor/rails/actionpack/test/fixtures/multipart/text_file +0 -10
  523. data/vendor/rails/actionpack/test/fixtures/multipart/utf8_filename +0 -10
  524. data/vendor/rails/actionpack/test/fixtures/namespaced/implicit_render_test/hello_world.erb +0 -1
  525. data/vendor/rails/actionpack/test/fixtures/old_content_type/render_default_content_types_for_respond_to.xml.erb +0 -1
  526. data/vendor/rails/actionpack/test/fixtures/old_content_type/render_default_for_builder.builder +0 -1
  527. data/vendor/rails/actionpack/test/fixtures/old_content_type/render_default_for_erb.erb +0 -1
  528. data/vendor/rails/actionpack/test/fixtures/post_test/layouts/post.html.erb +0 -1
  529. data/vendor/rails/actionpack/test/fixtures/post_test/layouts/super_post.iphone.erb +0 -1
  530. data/vendor/rails/actionpack/test/fixtures/post_test/post/index.html.erb +0 -1
  531. data/vendor/rails/actionpack/test/fixtures/post_test/post/index.iphone.erb +0 -1
  532. data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.html.erb +0 -1
  533. data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.iphone.erb +0 -1
  534. data/vendor/rails/actionpack/test/fixtures/public/400.html +0 -1
  535. data/vendor/rails/actionpack/test/fixtures/public/404.html +0 -1
  536. data/vendor/rails/actionpack/test/fixtures/public/500.da.html +0 -1
  537. data/vendor/rails/actionpack/test/fixtures/public/500.html +0 -1
  538. data/vendor/rails/actionpack/test/fixtures/public/bar.html +0 -1
  539. data/vendor/rails/actionpack/test/fixtures/public/bar/index.html +0 -1
  540. data/vendor/rails/actionpack/test/fixtures/public/foo/bar.html +0 -1
  541. data/vendor/rails/actionpack/test/fixtures/public/foo/baz.css +0 -3
  542. data/vendor/rails/actionpack/test/fixtures/public/foo/index.html +0 -1
  543. data/vendor/rails/actionpack/test/fixtures/public/foo/other-index.html +0 -1
  544. data/vendor/rails/actionpack/test/fixtures/public/foo//343/201/223/343/202/223/343/201/253/343/201/241/343/201/257.html +0 -1
  545. data/vendor/rails/actionpack/test/fixtures/public/foo//343/201/225/343/202/210/343/201/206/343/201/252/343/202/211.html +0 -1
  546. data/vendor/rails/actionpack/test/fixtures/public/foo//343/201/225/343/202/210/343/201/206/343/201/252/343/202/211.html.gz +0 -0
  547. data/vendor/rails/actionpack/test/fixtures/public/gzip/application-a71b3024f80aea3181c09774ca17e712.js +0 -4
  548. data/vendor/rails/actionpack/test/fixtures/public/gzip/application-a71b3024f80aea3181c09774ca17e712.js.gz +0 -0
  549. data/vendor/rails/actionpack/test/fixtures/public/gzip/foo.zoo +0 -4
  550. data/vendor/rails/actionpack/test/fixtures/public/gzip/foo.zoo.gz +0 -0
  551. data/vendor/rails/actionpack/test/fixtures/public/index.html +0 -1
  552. data/vendor/rails/actionpack/test/fixtures/public/other-index.html +0 -1
  553. data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.html.erb +0 -1
  554. data/vendor/rails/actionpack/test/fixtures/respond_to/custom_constant_handling_without_block.mobile.erb +0 -1
  555. data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.html.erb +0 -1
  556. data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb +0 -1
  557. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/missing.html.erb +0 -1
  558. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.html.erb +0 -1
  559. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.iphone.erb +0 -1
  560. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.html.erb +0 -1
  561. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.xml.builder +0 -1
  562. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_all.html.erb +0 -1
  563. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.html.erb +0 -1
  564. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.xml.builder +0 -1
  565. data/vendor/rails/actionpack/test/fixtures/respond_to/variant_any_implicit_render.html+phablet.erb +0 -1
  566. data/vendor/rails/actionpack/test/fixtures/respond_to/variant_any_implicit_render.html+tablet.erb +0 -1
  567. data/vendor/rails/actionpack/test/fixtures/respond_to/variant_inline_syntax_without_block.html+phone.erb +0 -1
  568. data/vendor/rails/actionpack/test/fixtures/respond_to/variant_plus_none_for_format.html.erb +0 -1
  569. data/vendor/rails/actionpack/test/fixtures/respond_to/variant_with_implicit_template_rendering.html+mobile.erb +0 -1
  570. data/vendor/rails/actionpack/test/fixtures/ruby_template.ruby +0 -2
  571. data/vendor/rails/actionpack/test/fixtures/session_autoload_test/session_autoload_test/foo.rb +0 -12
  572. data/vendor/rails/actionpack/test/fixtures/shared.html.erb +0 -1
  573. data/vendor/rails/actionpack/test/fixtures/star_star_mime/index.js.erb +0 -1
  574. data/vendor/rails/actionpack/test/fixtures/test/_partial.erb +0 -1
  575. data/vendor/rails/actionpack/test/fixtures/test/_partial.html.erb +0 -1
  576. data/vendor/rails/actionpack/test/fixtures/test/_partial.js.erb +0 -1
  577. data/vendor/rails/actionpack/test/fixtures/test/dot.directory/render_file_with_ivar.erb +0 -1
  578. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.builder +0 -1
  579. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.html.erb +0 -1
  580. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.xml.erb +0 -1
  581. data/vendor/rails/actionpack/test/fixtures/test/hello/hello.erb +0 -1
  582. data/vendor/rails/actionpack/test/fixtures/test/hello_world.erb +0 -1
  583. data/vendor/rails/actionpack/test/fixtures/test/hello_world_with_partial.html.erb +0 -2
  584. data/vendor/rails/actionpack/test/fixtures/test/hello_xml_world.builder +0 -11
  585. data/vendor/rails/actionpack/test/fixtures/test/implicit_content_type.atom.builder +0 -2
  586. data/vendor/rails/actionpack/test/fixtures/test/render_file_with_ivar.erb +0 -1
  587. data/vendor/rails/actionpack/test/fixtures/test/render_file_with_locals.erb +0 -1
  588. data/vendor/rails/actionpack/test/fixtures/test/with_implicit_template.erb +0 -1
  589. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/bar.html +0 -1
  590. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/bar/index.html +0 -1
  591. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo/bar.html +0 -1
  592. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo/baz.css +0 -3
  593. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo/index.html +0 -1
  594. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo/other-index.html +0 -1
  595. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo//343/201/223/343/202/223/343/201/253/343/201/241/343/201/257.html +0 -1
  596. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo//343/201/225/343/202/210/343/201/206/343/201/252/343/202/211.html +0 -1
  597. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo//343/201/225/343/202/210/343/201/206/343/201/252/343/202/211.html.gz +0 -0
  598. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/gzip/application-a71b3024f80aea3181c09774ca17e712.js +0 -4
  599. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/gzip/application-a71b3024f80aea3181c09774ca17e712.js.gz +0 -0
  600. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/gzip/foo.zoo +0 -4
  601. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/gzip/foo.zoo.gz +0 -0
  602. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/index.html +0 -1
  603. data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/other-index.html +0 -1
  604. data/vendor/rails/actionpack/test/journey/gtg/builder_test.rb +0 -81
  605. data/vendor/rails/actionpack/test/journey/gtg/transition_table_test.rb +0 -125
  606. data/vendor/rails/actionpack/test/journey/nfa/simulator_test.rb +0 -100
  607. data/vendor/rails/actionpack/test/journey/nfa/transition_table_test.rb +0 -74
  608. data/vendor/rails/actionpack/test/journey/nodes/symbol_test.rb +0 -19
  609. data/vendor/rails/actionpack/test/journey/path/pattern_test.rb +0 -286
  610. data/vendor/rails/actionpack/test/journey/route/definition/parser_test.rb +0 -112
  611. data/vendor/rails/actionpack/test/journey/route/definition/scanner_test.rb +0 -71
  612. data/vendor/rails/actionpack/test/journey/route_test.rb +0 -113
  613. data/vendor/rails/actionpack/test/journey/router/utils_test.rb +0 -48
  614. data/vendor/rails/actionpack/test/journey/router_test.rb +0 -544
  615. data/vendor/rails/actionpack/test/journey/routes_test.rb +0 -62
  616. data/vendor/rails/actionpack/test/lib/controller/fake_controllers.rb +0 -37
  617. data/vendor/rails/actionpack/test/lib/controller/fake_models.rb +0 -79
  618. data/vendor/rails/actionpack/test/routing/helper_test.rb +0 -33
  619. data/vendor/rails/actionview/CHANGELOG.md +0 -122
  620. data/vendor/rails/actionview/MIT-LICENSE +0 -21
  621. data/vendor/rails/actionview/README.rdoc +0 -38
  622. data/vendor/rails/actionview/RUNNING_UJS_TESTS.rdoc +0 -8
  623. data/vendor/rails/actionview/RUNNING_UNIT_TESTS.rdoc +0 -26
  624. data/vendor/rails/actionview/Rakefile +0 -136
  625. data/vendor/rails/actionview/actionview.gemspec +0 -38
  626. data/vendor/rails/actionview/app/assets/javascripts/MIT-LICENSE +0 -20
  627. data/vendor/rails/actionview/app/assets/javascripts/README.md +0 -55
  628. data/vendor/rails/actionview/app/assets/javascripts/rails-ujs.coffee +0 -39
  629. data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/BANNER.js +0 -5
  630. data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/features/confirm.coffee +0 -26
  631. data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/features/disable.coffee +0 -82
  632. data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/features/method.coffee +0 -34
  633. data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/features/remote.coffee +0 -90
  634. data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/start.coffee +0 -71
  635. data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/utils/ajax.coffee +0 -97
  636. data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/utils/csp.coffee +0 -4
  637. data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/utils/csrf.coffee +0 -25
  638. data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/utils/dom.coffee +0 -35
  639. data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/utils/event.coffee +0 -68
  640. data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/utils/form.coffee +0 -36
  641. data/vendor/rails/actionview/bin/test +0 -5
  642. data/vendor/rails/actionview/blade.yml +0 -11
  643. data/vendor/rails/actionview/coffeelint.json +0 -135
  644. data/vendor/rails/actionview/lib/action_view.rb +0 -97
  645. data/vendor/rails/actionview/lib/action_view/base.rb +0 -215
  646. data/vendor/rails/actionview/lib/action_view/buffers.rb +0 -52
  647. data/vendor/rails/actionview/lib/action_view/context.rb +0 -36
  648. data/vendor/rails/actionview/lib/action_view/dependency_tracker.rb +0 -175
  649. data/vendor/rails/actionview/lib/action_view/digestor.rb +0 -136
  650. data/vendor/rails/actionview/lib/action_view/flows.rb +0 -76
  651. data/vendor/rails/actionview/lib/action_view/gem_version.rb +0 -17
  652. data/vendor/rails/actionview/lib/action_view/helpers.rb +0 -68
  653. data/vendor/rails/actionview/lib/action_view/helpers/active_model_helper.rb +0 -55
  654. data/vendor/rails/actionview/lib/action_view/helpers/asset_tag_helper.rb +0 -511
  655. data/vendor/rails/actionview/lib/action_view/helpers/asset_url_helper.rb +0 -469
  656. data/vendor/rails/actionview/lib/action_view/helpers/atom_feed_helper.rb +0 -205
  657. data/vendor/rails/actionview/lib/action_view/helpers/cache_helper.rb +0 -263
  658. data/vendor/rails/actionview/lib/action_view/helpers/capture_helper.rb +0 -212
  659. data/vendor/rails/actionview/lib/action_view/helpers/controller_helper.rb +0 -36
  660. data/vendor/rails/actionview/lib/action_view/helpers/csp_helper.rb +0 -24
  661. data/vendor/rails/actionview/lib/action_view/helpers/csrf_helper.rb +0 -35
  662. data/vendor/rails/actionview/lib/action_view/helpers/date_helper.rb +0 -1156
  663. data/vendor/rails/actionview/lib/action_view/helpers/debug_helper.rb +0 -36
  664. data/vendor/rails/actionview/lib/action_view/helpers/form_helper.rb +0 -2337
  665. data/vendor/rails/actionview/lib/action_view/helpers/form_options_helper.rb +0 -887
  666. data/vendor/rails/actionview/lib/action_view/helpers/form_tag_helper.rb +0 -917
  667. data/vendor/rails/actionview/lib/action_view/helpers/javascript_helper.rb +0 -94
  668. data/vendor/rails/actionview/lib/action_view/helpers/number_helper.rb +0 -451
  669. data/vendor/rails/actionview/lib/action_view/helpers/output_safety_helper.rb +0 -70
  670. data/vendor/rails/actionview/lib/action_view/helpers/record_tag_helper.rb +0 -23
  671. data/vendor/rails/actionview/lib/action_view/helpers/rendering_helper.rb +0 -99
  672. data/vendor/rails/actionview/lib/action_view/helpers/sanitize_helper.rb +0 -177
  673. data/vendor/rails/actionview/lib/action_view/helpers/tag_helper.rb +0 -313
  674. data/vendor/rails/actionview/lib/action_view/helpers/tags.rb +0 -44
  675. data/vendor/rails/actionview/lib/action_view/helpers/tags/base.rb +0 -192
  676. data/vendor/rails/actionview/lib/action_view/helpers/tags/check_box.rb +0 -66
  677. data/vendor/rails/actionview/lib/action_view/helpers/tags/checkable.rb +0 -18
  678. data/vendor/rails/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb +0 -36
  679. data/vendor/rails/actionview/lib/action_view/helpers/tags/collection_helpers.rb +0 -119
  680. data/vendor/rails/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb +0 -31
  681. data/vendor/rails/actionview/lib/action_view/helpers/tags/collection_select.rb +0 -30
  682. data/vendor/rails/actionview/lib/action_view/helpers/tags/color_field.rb +0 -27
  683. data/vendor/rails/actionview/lib/action_view/helpers/tags/date_field.rb +0 -15
  684. data/vendor/rails/actionview/lib/action_view/helpers/tags/date_select.rb +0 -74
  685. data/vendor/rails/actionview/lib/action_view/helpers/tags/datetime_field.rb +0 -32
  686. data/vendor/rails/actionview/lib/action_view/helpers/tags/datetime_local_field.rb +0 -21
  687. data/vendor/rails/actionview/lib/action_view/helpers/tags/datetime_select.rb +0 -10
  688. data/vendor/rails/actionview/lib/action_view/helpers/tags/email_field.rb +0 -10
  689. data/vendor/rails/actionview/lib/action_view/helpers/tags/file_field.rb +0 -10
  690. data/vendor/rails/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb +0 -31
  691. data/vendor/rails/actionview/lib/action_view/helpers/tags/hidden_field.rb +0 -10
  692. data/vendor/rails/actionview/lib/action_view/helpers/tags/label.rb +0 -81
  693. data/vendor/rails/actionview/lib/action_view/helpers/tags/month_field.rb +0 -15
  694. data/vendor/rails/actionview/lib/action_view/helpers/tags/number_field.rb +0 -20
  695. data/vendor/rails/actionview/lib/action_view/helpers/tags/password_field.rb +0 -14
  696. data/vendor/rails/actionview/lib/action_view/helpers/tags/placeholderable.rb +0 -24
  697. data/vendor/rails/actionview/lib/action_view/helpers/tags/radio_button.rb +0 -33
  698. data/vendor/rails/actionview/lib/action_view/helpers/tags/range_field.rb +0 -10
  699. data/vendor/rails/actionview/lib/action_view/helpers/tags/search_field.rb +0 -27
  700. data/vendor/rails/actionview/lib/action_view/helpers/tags/select.rb +0 -43
  701. data/vendor/rails/actionview/lib/action_view/helpers/tags/tel_field.rb +0 -10
  702. data/vendor/rails/actionview/lib/action_view/helpers/tags/text_area.rb +0 -24
  703. data/vendor/rails/actionview/lib/action_view/helpers/tags/text_field.rb +0 -34
  704. data/vendor/rails/actionview/lib/action_view/helpers/tags/time_field.rb +0 -15
  705. data/vendor/rails/actionview/lib/action_view/helpers/tags/time_select.rb +0 -10
  706. data/vendor/rails/actionview/lib/action_view/helpers/tags/time_zone_select.rb +0 -22
  707. data/vendor/rails/actionview/lib/action_view/helpers/tags/translator.rb +0 -44
  708. data/vendor/rails/actionview/lib/action_view/helpers/tags/url_field.rb +0 -10
  709. data/vendor/rails/actionview/lib/action_view/helpers/tags/week_field.rb +0 -15
  710. data/vendor/rails/actionview/lib/action_view/helpers/text_helper.rb +0 -486
  711. data/vendor/rails/actionview/lib/action_view/helpers/translation_helper.rb +0 -141
  712. data/vendor/rails/actionview/lib/action_view/helpers/url_helper.rb +0 -676
  713. data/vendor/rails/actionview/lib/action_view/layouts.rb +0 -433
  714. data/vendor/rails/actionview/lib/action_view/locale/en.yml +0 -56
  715. data/vendor/rails/actionview/lib/action_view/log_subscriber.rb +0 -96
  716. data/vendor/rails/actionview/lib/action_view/lookup_context.rb +0 -274
  717. data/vendor/rails/actionview/lib/action_view/model_naming.rb +0 -14
  718. data/vendor/rails/actionview/lib/action_view/path_set.rb +0 -100
  719. data/vendor/rails/actionview/lib/action_view/railtie.rb +0 -82
  720. data/vendor/rails/actionview/lib/action_view/record_identifier.rb +0 -112
  721. data/vendor/rails/actionview/lib/action_view/renderer/abstract_renderer.rb +0 -55
  722. data/vendor/rails/actionview/lib/action_view/renderer/partial_renderer.rb +0 -552
  723. data/vendor/rails/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb +0 -57
  724. data/vendor/rails/actionview/lib/action_view/renderer/renderer.rb +0 -56
  725. data/vendor/rails/actionview/lib/action_view/renderer/streaming_template_renderer.rb +0 -105
  726. data/vendor/rails/actionview/lib/action_view/renderer/template_renderer.rb +0 -102
  727. data/vendor/rails/actionview/lib/action_view/rendering.rb +0 -151
  728. data/vendor/rails/actionview/lib/action_view/routing_url_for.rb +0 -145
  729. data/vendor/rails/actionview/lib/action_view/tasks/cache_digests.rake +0 -25
  730. data/vendor/rails/actionview/lib/action_view/template.rb +0 -361
  731. data/vendor/rails/actionview/lib/action_view/template/error.rb +0 -141
  732. data/vendor/rails/actionview/lib/action_view/template/handlers.rb +0 -66
  733. data/vendor/rails/actionview/lib/action_view/template/handlers/builder.rb +0 -25
  734. data/vendor/rails/actionview/lib/action_view/template/handlers/erb.rb +0 -74
  735. data/vendor/rails/actionview/lib/action_view/template/handlers/erb/erubi.rb +0 -83
  736. data/vendor/rails/actionview/lib/action_view/template/handlers/html.rb +0 -11
  737. data/vendor/rails/actionview/lib/action_view/template/handlers/raw.rb +0 -11
  738. data/vendor/rails/actionview/lib/action_view/template/html.rb +0 -34
  739. data/vendor/rails/actionview/lib/action_view/template/resolver.rb +0 -391
  740. data/vendor/rails/actionview/lib/action_view/template/text.rb +0 -33
  741. data/vendor/rails/actionview/lib/action_view/template/types.rb +0 -57
  742. data/vendor/rails/actionview/lib/action_view/test_case.rb +0 -300
  743. data/vendor/rails/actionview/lib/action_view/testing/resolvers.rb +0 -54
  744. data/vendor/rails/actionview/lib/action_view/version.rb +0 -10
  745. data/vendor/rails/actionview/lib/action_view/view_paths.rb +0 -105
  746. data/vendor/rails/actionview/package.json +0 -36
  747. data/vendor/rails/actionview/test/abstract_unit.rb +0 -236
  748. data/vendor/rails/actionview/test/actionpack/abstract/abstract_controller_test.rb +0 -292
  749. data/vendor/rails/actionview/test/actionpack/abstract/helper_test.rb +0 -128
  750. data/vendor/rails/actionview/test/actionpack/abstract/layouts_test.rb +0 -568
  751. data/vendor/rails/actionview/test/actionpack/abstract/render_test.rb +0 -103
  752. data/vendor/rails/actionview/test/actionpack/abstract/views/abstract_controller/testing/me3/formatted.html.erb +0 -1
  753. data/vendor/rails/actionview/test/actionpack/abstract/views/abstract_controller/testing/me3/index.erb +0 -1
  754. data/vendor/rails/actionview/test/actionpack/abstract/views/abstract_controller/testing/me4/index.erb +0 -1
  755. data/vendor/rails/actionview/test/actionpack/abstract/views/action_with_ivars.erb +0 -1
  756. data/vendor/rails/actionview/test/actionpack/abstract/views/helper_test.erb +0 -1
  757. data/vendor/rails/actionview/test/actionpack/abstract/views/index.erb +0 -1
  758. data/vendor/rails/actionview/test/actionpack/abstract/views/layouts/abstract_controller/testing/me4.erb +0 -1
  759. data/vendor/rails/actionview/test/actionpack/abstract/views/layouts/application.erb +0 -1
  760. data/vendor/rails/actionview/test/actionpack/abstract/views/naked_render.erb +0 -1
  761. data/vendor/rails/actionview/test/actionpack/controller/capture_test.rb +0 -83
  762. data/vendor/rails/actionview/test/actionpack/controller/layout_test.rb +0 -270
  763. data/vendor/rails/actionview/test/actionpack/controller/render_test.rb +0 -1294
  764. data/vendor/rails/actionview/test/actionpack/controller/view_paths_test.rb +0 -174
  765. data/vendor/rails/actionview/test/active_record_unit.rb +0 -92
  766. data/vendor/rails/actionview/test/activerecord/controller_runtime_test.rb +0 -95
  767. data/vendor/rails/actionview/test/activerecord/debug_helper_test.rb +0 -19
  768. data/vendor/rails/actionview/test/activerecord/form_helper_activerecord_test.rb +0 -90
  769. data/vendor/rails/actionview/test/activerecord/polymorphic_routes_test.rb +0 -780
  770. data/vendor/rails/actionview/test/activerecord/relation_cache_test.rb +0 -23
  771. data/vendor/rails/actionview/test/activerecord/render_partial_with_record_identification_test.rb +0 -188
  772. data/vendor/rails/actionview/test/fixtures/_top_level_partial.html.erb +0 -1
  773. data/vendor/rails/actionview/test/fixtures/_top_level_partial_only.erb +0 -1
  774. data/vendor/rails/actionview/test/fixtures/actionpack/bad_customers/_bad_customer.html.erb +0 -1
  775. data/vendor/rails/actionview/test/fixtures/actionpack/customers/_customer.html.erb +0 -1
  776. data/vendor/rails/actionview/test/fixtures/actionpack/fun/games/_form.erb +0 -1
  777. data/vendor/rails/actionview/test/fixtures/actionpack/fun/games/hello_world.erb +0 -1
  778. data/vendor/rails/actionview/test/fixtures/actionpack/good_customers/_good_customer.html.erb +0 -1
  779. data/vendor/rails/actionview/test/fixtures/actionpack/hello.html +0 -1
  780. data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/alt/layouts/alt.erb +0 -1
  781. data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/layouts/controller_name_space/nested.erb +0 -1
  782. data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/layouts/item.erb +0 -1
  783. data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/layouts/layout_test.erb +0 -1
  784. data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/layouts/multiple_extensions.html.erb +0 -1
  785. data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/layouts/symlinked/symlinked_layout.erb +0 -5
  786. data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/layouts/third_party_template_library.mab +0 -1
  787. data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/views/goodbye.erb +0 -1
  788. data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/views/hello.erb +0 -1
  789. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/_column.html.erb +0 -2
  790. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/_customers.erb +0 -1
  791. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/_partial_and_yield.erb +0 -2
  792. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/_yield_only.erb +0 -1
  793. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/_yield_with_params.erb +0 -1
  794. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/block_with_layout.erb +0 -3
  795. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/builder.builder +0 -3
  796. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/partial_with_layout.erb +0 -3
  797. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/standard.html.erb +0 -1
  798. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/standard.text.erb +0 -1
  799. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/streaming.erb +0 -4
  800. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/talk_from_action.erb +0 -2
  801. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/with_html_partial.html.erb +0 -1
  802. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/xhr.html.erb +0 -2
  803. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/yield.erb +0 -2
  804. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/yield_with_render_inline_inside.erb +0 -2
  805. data/vendor/rails/actionview/test/fixtures/actionpack/layouts/yield_with_render_partial_inside.erb +0 -2
  806. data/vendor/rails/actionview/test/fixtures/actionpack/quiz/questions/_question.html.erb +0 -1
  807. data/vendor/rails/actionview/test/fixtures/actionpack/shared.html.erb +0 -1
  808. data/vendor/rails/actionview/test/fixtures/actionpack/test/_changing_priority.html.erb +0 -1
  809. data/vendor/rails/actionview/test/fixtures/actionpack/test/_changing_priority.json.erb +0 -1
  810. data/vendor/rails/actionview/test/fixtures/actionpack/test/_counter.html.erb +0 -1
  811. data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer.erb +0 -1
  812. data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer_counter.erb +0 -1
  813. data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer_counter_with_as.erb +0 -1
  814. data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer_greeting.erb +0 -1
  815. data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer_iteration.erb +0 -1
  816. data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer_iteration_with_as.erb +0 -1
  817. data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer_with_var.erb +0 -1
  818. data/vendor/rails/actionview/test/fixtures/actionpack/test/_directory/_partial_with_locales.html.erb +0 -1
  819. data/vendor/rails/actionview/test/fixtures/actionpack/test/_first_json_partial.json.erb +0 -1
  820. data/vendor/rails/actionview/test/fixtures/actionpack/test/_form.erb +0 -1
  821. data/vendor/rails/actionview/test/fixtures/actionpack/test/_hash_greeting.erb +0 -1
  822. data/vendor/rails/actionview/test/fixtures/actionpack/test/_hash_object.erb +0 -2
  823. data/vendor/rails/actionview/test/fixtures/actionpack/test/_hello.builder +0 -1
  824. data/vendor/rails/actionview/test/fixtures/actionpack/test/_json_change_priority.json.erb +0 -0
  825. data/vendor/rails/actionview/test/fixtures/actionpack/test/_labelling_form.erb +0 -1
  826. data/vendor/rails/actionview/test/fixtures/actionpack/test/_layout_for_partial.html.erb +0 -3
  827. data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial.erb +0 -1
  828. data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial.html.erb +0 -1
  829. data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial.js.erb +0 -1
  830. data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial_for_use_in_layout.html.erb +0 -1
  831. data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial_html_erb.html.erb +0 -1
  832. data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial_name_local_variable.erb +0 -1
  833. data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial_only.erb +0 -1
  834. data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial_only_html.html +0 -1
  835. data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial_with_partial.erb +0 -2
  836. data/vendor/rails/actionview/test/fixtures/actionpack/test/_person.erb +0 -2
  837. data/vendor/rails/actionview/test/fixtures/actionpack/test/_raise_indentation.html.erb +0 -13
  838. data/vendor/rails/actionview/test/fixtures/actionpack/test/_second_json_partial.json.erb +0 -1
  839. data/vendor/rails/actionview/test/fixtures/actionpack/test/action_talk_to_layout.erb +0 -2
  840. data/vendor/rails/actionview/test/fixtures/actionpack/test/calling_partial_with_layout.html.erb +0 -1
  841. data/vendor/rails/actionview/test/fixtures/actionpack/test/capturing.erb +0 -4
  842. data/vendor/rails/actionview/test/fixtures/actionpack/test/change_priority.html.erb +0 -2
  843. data/vendor/rails/actionview/test/fixtures/actionpack/test/content_for.erb +0 -1
  844. data/vendor/rails/actionview/test/fixtures/actionpack/test/content_for_concatenated.erb +0 -3
  845. data/vendor/rails/actionview/test/fixtures/actionpack/test/content_for_with_parameter.erb +0 -2
  846. data/vendor/rails/actionview/test/fixtures/actionpack/test/dot.directory/render_file_with_ivar.erb +0 -1
  847. data/vendor/rails/actionview/test/fixtures/actionpack/test/formatted_html_erb.html.erb +0 -1
  848. data/vendor/rails/actionview/test/fixtures/actionpack/test/formatted_xml_erb.builder +0 -1
  849. data/vendor/rails/actionview/test/fixtures/actionpack/test/formatted_xml_erb.html.erb +0 -1
  850. data/vendor/rails/actionview/test/fixtures/actionpack/test/formatted_xml_erb.xml.erb +0 -1
  851. data/vendor/rails/actionview/test/fixtures/actionpack/test/greeting.html.erb +0 -1
  852. data/vendor/rails/actionview/test/fixtures/actionpack/test/greeting.xml.erb +0 -1
  853. data/vendor/rails/actionview/test/fixtures/actionpack/test/hello,world.erb +0 -1
  854. data/vendor/rails/actionview/test/fixtures/actionpack/test/hello.builder +0 -4
  855. data/vendor/rails/actionview/test/fixtures/actionpack/test/hello/hello.erb +0 -1
  856. data/vendor/rails/actionview/test/fixtures/actionpack/test/hello_world.erb +0 -1
  857. data/vendor/rails/actionview/test/fixtures/actionpack/test/hello_world_container.builder +0 -3
  858. data/vendor/rails/actionview/test/fixtures/actionpack/test/hello_world_from_rxml.builder +0 -3
  859. data/vendor/rails/actionview/test/fixtures/actionpack/test/hello_world_with_layout_false.erb +0 -1
  860. data/vendor/rails/actionview/test/fixtures/actionpack/test/hello_world_with_partial.html.erb +0 -2
  861. data/vendor/rails/actionview/test/fixtures/actionpack/test/hello_xml_world.builder +0 -11
  862. data/vendor/rails/actionview/test/fixtures/actionpack/test/html_template.html.erb +0 -1
  863. data/vendor/rails/actionview/test/fixtures/actionpack/test/hyphen-ated.erb +0 -1
  864. data/vendor/rails/actionview/test/fixtures/actionpack/test/implicit_content_type.atom.builder +0 -2
  865. data/vendor/rails/actionview/test/fixtures/actionpack/test/list.erb +0 -1
  866. data/vendor/rails/actionview/test/fixtures/actionpack/test/non_erb_block_content_for.builder +0 -4
  867. data/vendor/rails/actionview/test/fixtures/actionpack/test/potential_conflicts.erb +0 -4
  868. data/vendor/rails/actionview/test/fixtures/actionpack/test/proper_block_detection.erb +0 -1
  869. data/vendor/rails/actionview/test/fixtures/actionpack/test/render_file_from_template.html.erb +0 -1
  870. data/vendor/rails/actionview/test/fixtures/actionpack/test/render_file_with_ivar.erb +0 -1
  871. data/vendor/rails/actionview/test/fixtures/actionpack/test/render_file_with_locals.erb +0 -1
  872. data/vendor/rails/actionview/test/fixtures/actionpack/test/render_file_with_locals_and_default.erb +0 -1
  873. data/vendor/rails/actionview/test/fixtures/actionpack/test/render_implicit_html_template_from_xhr_request.da.html.erb +0 -1
  874. data/vendor/rails/actionview/test/fixtures/actionpack/test/render_implicit_html_template_from_xhr_request.html.erb +0 -1
  875. data/vendor/rails/actionview/test/fixtures/actionpack/test/render_implicit_js_template_without_layout.js.erb +0 -1
  876. data/vendor/rails/actionview/test/fixtures/actionpack/test/render_partial_inside_directory.html.erb +0 -1
  877. data/vendor/rails/actionview/test/fixtures/actionpack/test/render_to_string_test.erb +0 -1
  878. data/vendor/rails/actionview/test/fixtures/actionpack/test/render_two_partials.html.erb +0 -2
  879. data/vendor/rails/actionview/test/fixtures/actionpack/test/using_layout_around_block.html.erb +0 -1
  880. data/vendor/rails/actionview/test/fixtures/actionpack/test/with_html_partial.html.erb +0 -1
  881. data/vendor/rails/actionview/test/fixtures/actionpack/test/with_partial.html.erb +0 -1
  882. data/vendor/rails/actionview/test/fixtures/actionpack/test/with_partial.text.erb +0 -1
  883. data/vendor/rails/actionview/test/fixtures/actionpack/test/with_xml_template.html.erb +0 -1
  884. data/vendor/rails/actionview/test/fixtures/comments/empty.de.html.erb +0 -1
  885. data/vendor/rails/actionview/test/fixtures/comments/empty.html+grid.erb +0 -1
  886. data/vendor/rails/actionview/test/fixtures/comments/empty.html.builder +0 -1
  887. data/vendor/rails/actionview/test/fixtures/comments/empty.html.erb +0 -1
  888. data/vendor/rails/actionview/test/fixtures/comments/empty.xml.erb +0 -1
  889. data/vendor/rails/actionview/test/fixtures/companies.yml +0 -24
  890. data/vendor/rails/actionview/test/fixtures/company.rb +0 -11
  891. data/vendor/rails/actionview/test/fixtures/custom_pattern/another.html.erb +0 -1
  892. data/vendor/rails/actionview/test/fixtures/custom_pattern/html/another.erb +0 -1
  893. data/vendor/rails/actionview/test/fixtures/custom_pattern/html/path.erb +0 -1
  894. data/vendor/rails/actionview/test/fixtures/customers/_customer.html.erb +0 -1
  895. data/vendor/rails/actionview/test/fixtures/customers/_customer.xml.erb +0 -1
  896. data/vendor/rails/actionview/test/fixtures/db_definitions/sqlite.sql +0 -49
  897. data/vendor/rails/actionview/test/fixtures/developer.rb +0 -8
  898. data/vendor/rails/actionview/test/fixtures/developers.yml +0 -21
  899. data/vendor/rails/actionview/test/fixtures/developers/_developer.erb +0 -1
  900. data/vendor/rails/actionview/test/fixtures/developers_projects.yml +0 -13
  901. data/vendor/rails/actionview/test/fixtures/digestor/api/comments/_comment.json.erb +0 -1
  902. data/vendor/rails/actionview/test/fixtures/digestor/api/comments/_comments.json.erb +0 -1
  903. data/vendor/rails/actionview/test/fixtures/digestor/comments/_comment.html.erb +0 -1
  904. data/vendor/rails/actionview/test/fixtures/digestor/comments/_comments.html.erb +0 -1
  905. data/vendor/rails/actionview/test/fixtures/digestor/comments/show.js.erb +0 -1
  906. data/vendor/rails/actionview/test/fixtures/digestor/events/_completed.html.erb +0 -0
  907. data/vendor/rails/actionview/test/fixtures/digestor/events/_event.html.erb +0 -0
  908. data/vendor/rails/actionview/test/fixtures/digestor/events/index.html.erb +0 -1
  909. data/vendor/rails/actionview/test/fixtures/digestor/level/_recursion.html.erb +0 -1
  910. data/vendor/rails/actionview/test/fixtures/digestor/level/below/_header.html.erb +0 -0
  911. data/vendor/rails/actionview/test/fixtures/digestor/level/below/index.html.erb +0 -1
  912. data/vendor/rails/actionview/test/fixtures/digestor/level/recursion.html.erb +0 -1
  913. data/vendor/rails/actionview/test/fixtures/digestor/messages/_form.html.erb +0 -0
  914. data/vendor/rails/actionview/test/fixtures/digestor/messages/_header.html.erb +0 -0
  915. data/vendor/rails/actionview/test/fixtures/digestor/messages/_message.html.erb +0 -1
  916. data/vendor/rails/actionview/test/fixtures/digestor/messages/actions/_move.html.erb +0 -0
  917. data/vendor/rails/actionview/test/fixtures/digestor/messages/edit.html.erb +0 -5
  918. data/vendor/rails/actionview/test/fixtures/digestor/messages/index.html.erb +0 -2
  919. data/vendor/rails/actionview/test/fixtures/digestor/messages/new.html+iphone.erb +0 -15
  920. data/vendor/rails/actionview/test/fixtures/digestor/messages/peek.html.erb +0 -2
  921. data/vendor/rails/actionview/test/fixtures/digestor/messages/show.html.erb +0 -14
  922. data/vendor/rails/actionview/test/fixtures/digestor/messages/thread.json.erb +0 -1
  923. data/vendor/rails/actionview/test/fixtures/fun/games/_game.erb +0 -1
  924. data/vendor/rails/actionview/test/fixtures/fun/games/hello_world.erb +0 -1
  925. data/vendor/rails/actionview/test/fixtures/fun/serious/games/_game.erb +0 -1
  926. data/vendor/rails/actionview/test/fixtures/games/_game.erb +0 -1
  927. data/vendor/rails/actionview/test/fixtures/good_customers/_good_customer.html.erb +0 -1
  928. data/vendor/rails/actionview/test/fixtures/helpers/abc_helper.rb +0 -5
  929. data/vendor/rails/actionview/test/fixtures/helpers/helpery_test_helper.rb +0 -7
  930. data/vendor/rails/actionview/test/fixtures/helpers_missing/invalid_require_helper.rb +0 -6
  931. data/vendor/rails/actionview/test/fixtures/layout_tests/alt/hello.erb +0 -1
  932. data/vendor/rails/actionview/test/fixtures/layouts/_column.html.erb +0 -2
  933. data/vendor/rails/actionview/test/fixtures/layouts/_customers.erb +0 -1
  934. data/vendor/rails/actionview/test/fixtures/layouts/_partial_and_yield.erb +0 -2
  935. data/vendor/rails/actionview/test/fixtures/layouts/_yield_only.erb +0 -1
  936. data/vendor/rails/actionview/test/fixtures/layouts/_yield_with_params.erb +0 -1
  937. data/vendor/rails/actionview/test/fixtures/layouts/render_partial_html.erb +0 -2
  938. data/vendor/rails/actionview/test/fixtures/layouts/streaming.erb +0 -4
  939. data/vendor/rails/actionview/test/fixtures/layouts/streaming_with_capture.erb +0 -6
  940. data/vendor/rails/actionview/test/fixtures/layouts/streaming_with_locale.erb +0 -2
  941. data/vendor/rails/actionview/test/fixtures/layouts/yield.erb +0 -2
  942. data/vendor/rails/actionview/test/fixtures/layouts/yield_with_render_inline_inside.erb +0 -2
  943. data/vendor/rails/actionview/test/fixtures/layouts/yield_with_render_partial_inside.erb +0 -2
  944. data/vendor/rails/actionview/test/fixtures/mascot.rb +0 -5
  945. data/vendor/rails/actionview/test/fixtures/mascots.yml +0 -4
  946. data/vendor/rails/actionview/test/fixtures/mascots/_mascot.html.erb +0 -1
  947. data/vendor/rails/actionview/test/fixtures/override/test/hello_world.erb +0 -1
  948. data/vendor/rails/actionview/test/fixtures/override2/layouts/test/sub.erb +0 -1
  949. data/vendor/rails/actionview/test/fixtures/plain_text.raw +0 -1
  950. data/vendor/rails/actionview/test/fixtures/plain_text_with_characters.raw +0 -1
  951. data/vendor/rails/actionview/test/fixtures/project.rb +0 -9
  952. data/vendor/rails/actionview/test/fixtures/projects.yml +0 -7
  953. data/vendor/rails/actionview/test/fixtures/projects/_project.erb +0 -1
  954. data/vendor/rails/actionview/test/fixtures/public/elsewhere/cools.js +0 -1
  955. data/vendor/rails/actionview/test/fixtures/public/elsewhere/file.css +0 -1
  956. data/vendor/rails/actionview/test/fixtures/public/foo/baz.css +0 -3
  957. data/vendor/rails/actionview/test/fixtures/public/javascripts/application.js +0 -1
  958. data/vendor/rails/actionview/test/fixtures/public/javascripts/bank.js +0 -1
  959. data/vendor/rails/actionview/test/fixtures/public/javascripts/common.javascript +0 -1
  960. data/vendor/rails/actionview/test/fixtures/public/javascripts/controls.js +0 -1
  961. data/vendor/rails/actionview/test/fixtures/public/javascripts/dragdrop.js +0 -1
  962. data/vendor/rails/actionview/test/fixtures/public/javascripts/effects.js +0 -1
  963. data/vendor/rails/actionview/test/fixtures/public/javascripts/prototype.js +0 -1
  964. data/vendor/rails/actionview/test/fixtures/public/javascripts/robber.js +0 -1
  965. data/vendor/rails/actionview/test/fixtures/public/javascripts/subdir/subdir.js +0 -1
  966. data/vendor/rails/actionview/test/fixtures/public/javascripts/version.1.0.js +0 -1
  967. data/vendor/rails/actionview/test/fixtures/public/stylesheets/bank.css +0 -1
  968. data/vendor/rails/actionview/test/fixtures/public/stylesheets/random.styles +0 -1
  969. data/vendor/rails/actionview/test/fixtures/public/stylesheets/robber.css +0 -1
  970. data/vendor/rails/actionview/test/fixtures/public/stylesheets/subdir/subdir.css +0 -1
  971. data/vendor/rails/actionview/test/fixtures/public/stylesheets/version.1.0.css +0 -1
  972. data/vendor/rails/actionview/test/fixtures/replies.yml +0 -15
  973. data/vendor/rails/actionview/test/fixtures/replies/_reply.erb +0 -1
  974. data/vendor/rails/actionview/test/fixtures/reply.rb +0 -9
  975. data/vendor/rails/actionview/test/fixtures/respond_to/using_defaults_with_all.html.erb +0 -1
  976. data/vendor/rails/actionview/test/fixtures/ruby_template.ruby +0 -2
  977. data/vendor/rails/actionview/test/fixtures/shared.html.erb +0 -1
  978. data/vendor/rails/actionview/test/fixtures/test/_200.html.erb +0 -1
  979. data/vendor/rails/actionview/test/fixtures/test/_FooBar.html.erb +0 -1
  980. data/vendor/rails/actionview/test/fixtures/test/_a-in.html.erb +0 -0
  981. data/vendor/rails/actionview/test/fixtures/test/_b_layout_for_partial.html.erb +0 -1
  982. data/vendor/rails/actionview/test/fixtures/test/_b_layout_for_partial_with_object.html.erb +0 -1
  983. data/vendor/rails/actionview/test/fixtures/test/_b_layout_for_partial_with_object_counter.html.erb +0 -1
  984. data/vendor/rails/actionview/test/fixtures/test/_builder_tag_nested_in_content_tag.erb +0 -3
  985. data/vendor/rails/actionview/test/fixtures/test/_cached_customer.erb +0 -3
  986. data/vendor/rails/actionview/test/fixtures/test/_cached_customer_as.erb +0 -3
  987. data/vendor/rails/actionview/test/fixtures/test/_cached_nested_cached_customer.erb +0 -3
  988. data/vendor/rails/actionview/test/fixtures/test/_changing_priority.html.erb +0 -1
  989. data/vendor/rails/actionview/test/fixtures/test/_changing_priority.json.erb +0 -1
  990. data/vendor/rails/actionview/test/fixtures/test/_content_tag_nested_in_content_tag.erb +0 -3
  991. data/vendor/rails/actionview/test/fixtures/test/_counter.html.erb +0 -1
  992. data/vendor/rails/actionview/test/fixtures/test/_customer.erb +0 -1
  993. data/vendor/rails/actionview/test/fixtures/test/_customer.mobile.erb +0 -1
  994. data/vendor/rails/actionview/test/fixtures/test/_customer_greeting.erb +0 -1
  995. data/vendor/rails/actionview/test/fixtures/test/_customer_with_var.erb +0 -1
  996. data/vendor/rails/actionview/test/fixtures/test/_directory/_partial_with_locales.html.erb +0 -1
  997. data/vendor/rails/actionview/test/fixtures/test/_first_json_partial.json.erb +0 -1
  998. data/vendor/rails/actionview/test/fixtures/test/_from_helper.erb +0 -1
  999. data/vendor/rails/actionview/test/fixtures/test/_json_change_priority.json.erb +0 -0
  1000. data/vendor/rails/actionview/test/fixtures/test/_klass.erb +0 -1
  1001. data/vendor/rails/actionview/test/fixtures/test/_label_with_block.erb +0 -4
  1002. data/vendor/rails/actionview/test/fixtures/test/_layout_for_block_with_args.html.erb +0 -3
  1003. data/vendor/rails/actionview/test/fixtures/test/_layout_for_partial.html.erb +0 -3
  1004. data/vendor/rails/actionview/test/fixtures/test/_layout_with_partial_and_yield.html.erb +0 -4
  1005. data/vendor/rails/actionview/test/fixtures/test/_local_inspector.html.erb +0 -1
  1006. data/vendor/rails/actionview/test/fixtures/test/_nested_cached_customer.erb +0 -1
  1007. data/vendor/rails/actionview/test/fixtures/test/_object_inspector.erb +0 -1
  1008. data/vendor/rails/actionview/test/fixtures/test/_one.html.erb +0 -1
  1009. data/vendor/rails/actionview/test/fixtures/test/_partial.erb +0 -1
  1010. data/vendor/rails/actionview/test/fixtures/test/_partial.html.erb +0 -1
  1011. data/vendor/rails/actionview/test/fixtures/test/_partial.js.erb +0 -1
  1012. data/vendor/rails/actionview/test/fixtures/test/_partial_for_use_in_layout.html.erb +0 -1
  1013. data/vendor/rails/actionview/test/fixtures/test/_partial_iteration_1.erb +0 -1
  1014. data/vendor/rails/actionview/test/fixtures/test/_partial_iteration_2.erb +0 -1
  1015. data/vendor/rails/actionview/test/fixtures/test/_partial_name_in_local_assigns.erb +0 -1
  1016. data/vendor/rails/actionview/test/fixtures/test/_partial_name_local_variable.erb +0 -1
  1017. data/vendor/rails/actionview/test/fixtures/test/_partial_only.erb +0 -1
  1018. data/vendor/rails/actionview/test/fixtures/test/_partial_shortcut_with_block_content.html.erb +0 -3
  1019. data/vendor/rails/actionview/test/fixtures/test/_partial_with_layout.erb +0 -2
  1020. data/vendor/rails/actionview/test/fixtures/test/_partial_with_layout_block_content.erb +0 -4
  1021. data/vendor/rails/actionview/test/fixtures/test/_partial_with_layout_block_partial.erb +0 -4
  1022. data/vendor/rails/actionview/test/fixtures/test/_partial_with_only_html_version.html.erb +0 -1
  1023. data/vendor/rails/actionview/test/fixtures/test/_partial_with_partial.erb +0 -2
  1024. data/vendor/rails/actionview/test/fixtures/test/_partial_with_variants.html+grid.erb +0 -1
  1025. data/vendor/rails/actionview/test/fixtures/test/_partialhtml.html +0 -1
  1026. data/vendor/rails/actionview/test/fixtures/test/_raise.html.erb +0 -1
  1027. data/vendor/rails/actionview/test/fixtures/test/_raise_indentation.html.erb +0 -13
  1028. data/vendor/rails/actionview/test/fixtures/test/_second_json_partial.json.erb +0 -1
  1029. data/vendor/rails/actionview/test/fixtures/test/_two.html.erb +0 -1
  1030. data/vendor/rails/actionview/test/fixtures/test/_utf8_partial.html.erb +0 -1
  1031. data/vendor/rails/actionview/test/fixtures/test/_utf8_partial_magic.html.erb +0 -2
  1032. data/vendor/rails/actionview/test/fixtures/test/_/360/237/215/243.erb +0 -1
  1033. data/vendor/rails/actionview/test/fixtures/test/basic.html.erb +0 -1
  1034. data/vendor/rails/actionview/test/fixtures/test/calling_partial_with_layout.html.erb +0 -1
  1035. data/vendor/rails/actionview/test/fixtures/test/change_priority.html.erb +0 -2
  1036. data/vendor/rails/actionview/test/fixtures/test/dont_pick_me +0 -1
  1037. data/vendor/rails/actionview/test/fixtures/test/dot.directory/render_file_with_ivar.erb +0 -1
  1038. data/vendor/rails/actionview/test/fixtures/test/greeting.xml.erb +0 -1
  1039. data/vendor/rails/actionview/test/fixtures/test/hello.builder +0 -4
  1040. data/vendor/rails/actionview/test/fixtures/test/hello/hello.erb +0 -1
  1041. data/vendor/rails/actionview/test/fixtures/test/hello_world.da.html.erb +0 -1
  1042. data/vendor/rails/actionview/test/fixtures/test/hello_world.erb +0 -1
  1043. data/vendor/rails/actionview/test/fixtures/test/hello_world.erb~ +0 -1
  1044. data/vendor/rails/actionview/test/fixtures/test/hello_world.html+phone.erb +0 -1
  1045. data/vendor/rails/actionview/test/fixtures/test/hello_world.pt-BR.html.erb +0 -1
  1046. data/vendor/rails/actionview/test/fixtures/test/hello_world.text+phone.erb +0 -1
  1047. data/vendor/rails/actionview/test/fixtures/test/hello_world_with_partial.html.erb +0 -2
  1048. data/vendor/rails/actionview/test/fixtures/test/html_template.html.erb +0 -1
  1049. data/vendor/rails/actionview/test/fixtures/test/layout_render_file.erb +0 -2
  1050. data/vendor/rails/actionview/test/fixtures/test/layout_render_object.erb +0 -1
  1051. data/vendor/rails/actionview/test/fixtures/test/list.erb +0 -1
  1052. data/vendor/rails/actionview/test/fixtures/test/malformed/malformed.en.html.erb~ +0 -1
  1053. data/vendor/rails/actionview/test/fixtures/test/malformed/malformed.erb~ +0 -1
  1054. data/vendor/rails/actionview/test/fixtures/test/malformed/malformed.html.erb~ +0 -1
  1055. data/vendor/rails/actionview/test/fixtures/test/malformed/malformed~ +0 -1
  1056. data/vendor/rails/actionview/test/fixtures/test/nested_layout.erb +0 -3
  1057. data/vendor/rails/actionview/test/fixtures/test/nested_streaming.erb +0 -3
  1058. data/vendor/rails/actionview/test/fixtures/test/nil_return.erb +0 -1
  1059. data/vendor/rails/actionview/test/fixtures/test/one.html.erb +0 -1
  1060. data/vendor/rails/actionview/test/fixtures/test/render_file_inspect_local_assigns.erb +0 -1
  1061. data/vendor/rails/actionview/test/fixtures/test/render_file_instance_variable.erb +0 -1
  1062. data/vendor/rails/actionview/test/fixtures/test/render_file_unicode_local.erb +0 -1
  1063. data/vendor/rails/actionview/test/fixtures/test/render_file_with_ivar.erb +0 -1
  1064. data/vendor/rails/actionview/test/fixtures/test/render_file_with_locals.erb +0 -1
  1065. data/vendor/rails/actionview/test/fixtures/test/render_file_with_locals_and_default.erb +0 -1
  1066. data/vendor/rails/actionview/test/fixtures/test/render_file_with_ruby_keyword_locals.erb +0 -1
  1067. data/vendor/rails/actionview/test/fixtures/test/render_partial_inside_directory.html.erb +0 -1
  1068. data/vendor/rails/actionview/test/fixtures/test/render_two_partials.html.erb +0 -2
  1069. data/vendor/rails/actionview/test/fixtures/test/streaming.erb +0 -3
  1070. data/vendor/rails/actionview/test/fixtures/test/streaming_buster.erb +0 -3
  1071. data/vendor/rails/actionview/test/fixtures/test/streaming_with_locale.erb +0 -1
  1072. data/vendor/rails/actionview/test/fixtures/test/sub_template_raise.html.erb +0 -1
  1073. data/vendor/rails/actionview/test/fixtures/test/template.erb +0 -1
  1074. data/vendor/rails/actionview/test/fixtures/test/test_template_with_delegation_reserved_keywords.erb +0 -1
  1075. data/vendor/rails/actionview/test/fixtures/test/update_element_with_capture.erb +0 -9
  1076. data/vendor/rails/actionview/test/fixtures/test/utf8.html.erb +0 -4
  1077. data/vendor/rails/actionview/test/fixtures/test/utf8_magic.html.erb +0 -5
  1078. data/vendor/rails/actionview/test/fixtures/test/utf8_magic_with_bare_partial.html.erb +0 -5
  1079. data/vendor/rails/actionview/test/fixtures/topic.rb +0 -5
  1080. data/vendor/rails/actionview/test/fixtures/topics.yml +0 -22
  1081. data/vendor/rails/actionview/test/fixtures/topics/_topic.html.erb +0 -1
  1082. data/vendor/rails/actionview/test/fixtures/translations/templates/array.erb +0 -1
  1083. data/vendor/rails/actionview/test/fixtures/translations/templates/default.erb +0 -1
  1084. data/vendor/rails/actionview/test/fixtures/translations/templates/found.erb +0 -1
  1085. data/vendor/rails/actionview/test/fixtures/translations/templates/missing.erb +0 -1
  1086. data/vendor/rails/actionview/test/fixtures/with_format.json.erb +0 -1
  1087. data/vendor/rails/actionview/test/lib/controller/fake_models.rb +0 -204
  1088. data/vendor/rails/actionview/test/template/active_model_helper_test.rb +0 -172
  1089. data/vendor/rails/actionview/test/template/asset_tag_helper_test.rb +0 -913
  1090. data/vendor/rails/actionview/test/template/atom_feed_helper_test.rb +0 -375
  1091. data/vendor/rails/actionview/test/template/capture_helper_test.rb +0 -228
  1092. data/vendor/rails/actionview/test/template/compiled_templates_test.rb +0 -94
  1093. data/vendor/rails/actionview/test/template/controller_helper_test.rb +0 -34
  1094. data/vendor/rails/actionview/test/template/date_helper_i18n_test.rb +0 -166
  1095. data/vendor/rails/actionview/test/template/date_helper_test.rb +0 -3642
  1096. data/vendor/rails/actionview/test/template/dependency_tracker_test.rb +0 -195
  1097. data/vendor/rails/actionview/test/template/digestor_test.rb +0 -389
  1098. data/vendor/rails/actionview/test/template/erb/form_for_test.rb +0 -13
  1099. data/vendor/rails/actionview/test/template/erb/helper.rb +0 -26
  1100. data/vendor/rails/actionview/test/template/erb/tag_helper_test.rb +0 -32
  1101. data/vendor/rails/actionview/test/template/erb_util_test.rb +0 -114
  1102. data/vendor/rails/actionview/test/template/form_collections_helper_test.rb +0 -527
  1103. data/vendor/rails/actionview/test/template/form_helper/form_with_test.rb +0 -2293
  1104. data/vendor/rails/actionview/test/template/form_helper_test.rb +0 -3554
  1105. data/vendor/rails/actionview/test/template/form_options_helper_i18n_test.rb +0 -30
  1106. data/vendor/rails/actionview/test/template/form_options_helper_test.rb +0 -1452
  1107. data/vendor/rails/actionview/test/template/form_tag_helper_test.rb +0 -785
  1108. data/vendor/rails/actionview/test/template/html_test.rb +0 -19
  1109. data/vendor/rails/actionview/test/template/javascript_helper_test.rb +0 -68
  1110. data/vendor/rails/actionview/test/template/log_subscriber_test.rb +0 -224
  1111. data/vendor/rails/actionview/test/template/lookup_context_test.rb +0 -289
  1112. data/vendor/rails/actionview/test/template/number_helper_test.rb +0 -204
  1113. data/vendor/rails/actionview/test/template/output_safety_helper_test.rb +0 -119
  1114. data/vendor/rails/actionview/test/template/partial_iteration_test.rb +0 -35
  1115. data/vendor/rails/actionview/test/template/record_identifier_test.rb +0 -93
  1116. data/vendor/rails/actionview/test/template/record_tag_helper_test.rb +0 -33
  1117. data/vendor/rails/actionview/test/template/render_test.rb +0 -725
  1118. data/vendor/rails/actionview/test/template/resolver_cache_test.rb +0 -9
  1119. data/vendor/rails/actionview/test/template/resolver_patterns_test.rb +0 -44
  1120. data/vendor/rails/actionview/test/template/sanitize_helper_test.rb +0 -43
  1121. data/vendor/rails/actionview/test/template/streaming_render_test.rb +0 -132
  1122. data/vendor/rails/actionview/test/template/tag_helper_test.rb +0 -357
  1123. data/vendor/rails/actionview/test/template/template_error_test.rb +0 -37
  1124. data/vendor/rails/actionview/test/template/template_test.rb +0 -207
  1125. data/vendor/rails/actionview/test/template/test_case_test.rb +0 -335
  1126. data/vendor/rails/actionview/test/template/test_test.rb +0 -94
  1127. data/vendor/rails/actionview/test/template/testing/fixture_resolver_test.rb +0 -20
  1128. data/vendor/rails/actionview/test/template/testing/null_resolver_test.rb +0 -14
  1129. data/vendor/rails/actionview/test/template/text_helper_test.rb +0 -535
  1130. data/vendor/rails/actionview/test/template/text_test.rb +0 -25
  1131. data/vendor/rails/actionview/test/template/translation_helper_test.rb +0 -238
  1132. data/vendor/rails/actionview/test/template/url_helper_test.rb +0 -976
  1133. data/vendor/rails/actionview/test/ujs/config.ru +0 -6
  1134. data/vendor/rails/actionview/test/ujs/public/test/call-ajax.js +0 -26
  1135. data/vendor/rails/actionview/test/ujs/public/test/call-remote-callbacks.js +0 -239
  1136. data/vendor/rails/actionview/test/ujs/public/test/call-remote.js +0 -275
  1137. data/vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js +0 -24
  1138. data/vendor/rails/actionview/test/ujs/public/test/csrf-token.js +0 -27
  1139. data/vendor/rails/actionview/test/ujs/public/test/data-confirm.js +0 -316
  1140. data/vendor/rails/actionview/test/ujs/public/test/data-disable-with.js +0 -394
  1141. data/vendor/rails/actionview/test/ujs/public/test/data-disable.js +0 -322
  1142. data/vendor/rails/actionview/test/ujs/public/test/data-method.js +0 -85
  1143. data/vendor/rails/actionview/test/ujs/public/test/data-remote.js +0 -441
  1144. data/vendor/rails/actionview/test/ujs/public/test/override.js +0 -56
  1145. data/vendor/rails/actionview/test/ujs/public/test/settings.js +0 -118
  1146. data/vendor/rails/actionview/test/ujs/public/vendor/jquery-2.2.0.js +0 -9831
  1147. data/vendor/rails/actionview/test/ujs/public/vendor/jquery.metadata.js +0 -122
  1148. data/vendor/rails/actionview/test/ujs/public/vendor/qunit.css +0 -237
  1149. data/vendor/rails/actionview/test/ujs/public/vendor/qunit.js +0 -2288
  1150. data/vendor/rails/actionview/test/ujs/server.rb +0 -86
  1151. data/vendor/rails/actionview/test/ujs/views/layouts/application.html.erb +0 -26
  1152. data/vendor/rails/actionview/test/ujs/views/tests/index.html.erb +0 -11
  1153. data/vendor/rails/ci/qunit-selenium-runner.rb +0 -16
  1154. data/vendor/rails/ci/travis.rb +0 -187
  1155. data/vendor/rails/rails.gemspec +0 -36
  1156. data/vendor/rails/version.rb +0 -17
@@ -1,2108 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "abstract_unit"
4
- require "controller/fake_controllers"
5
- require "active_support/core_ext/object/with_options"
6
- require "active_support/core_ext/object/json"
7
-
8
- class MilestonesController < ActionController::Base
9
- def index() head :ok end
10
- alias_method :show, :index
11
- end
12
-
13
- # See RFC 3986, section 3.3 for allowed path characters.
14
- class UriReservedCharactersRoutingTest < ActiveSupport::TestCase
15
- include RoutingTestHelpers
16
-
17
- def setup
18
- @set = ActionDispatch::Routing::RouteSet.new
19
- @set.draw do
20
- ActiveSupport::Deprecation.silence do
21
- get ":controller/:action/:variable/*additional"
22
- end
23
- end
24
-
25
- safe, unsafe = %w(: @ & = + $ , ;), %w(^ ? # [ ])
26
- hex = unsafe.map { |char| "%" + char.unpack("H2").first.upcase }
27
-
28
- @segment = "#{safe.join}#{unsafe.join}".freeze
29
- @escaped = "#{safe.join}#{hex.join}".freeze
30
- end
31
-
32
- def test_route_generation_escapes_unsafe_path_characters
33
- assert_equal "/content/act#{@escaped}ion/var#{@escaped}iable/add#{@escaped}itional-1/add#{@escaped}itional-2",
34
- url_for(@set,
35
- controller: "content",
36
- action: "act#{@segment}ion",
37
- variable: "var#{@segment}iable",
38
- additional: ["add#{@segment}itional-1", "add#{@segment}itional-2"])
39
- end
40
-
41
- def test_route_recognition_unescapes_path_components
42
- options = { controller: "content",
43
- action: "act#{@segment}ion",
44
- variable: "var#{@segment}iable",
45
- additional: "add#{@segment}itional-1/add#{@segment}itional-2" }
46
- assert_equal options, @set.recognize_path("/content/act#{@escaped}ion/var#{@escaped}iable/add#{@escaped}itional-1/add#{@escaped}itional-2")
47
- end
48
-
49
- def test_route_generation_allows_passing_non_string_values_to_generated_helper
50
- assert_equal "/content/action/variable/1/2",
51
- url_for(@set,
52
- controller: "content",
53
- action: "action",
54
- variable: "variable",
55
- additional: [1, 2])
56
- end
57
- end
58
-
59
- class MockController
60
- def self.build(helpers, additional_options = {})
61
- Class.new do
62
- define_method :url_options do
63
- options = super()
64
- options[:protocol] ||= "http"
65
- options[:host] ||= "test.host"
66
- options.merge(additional_options)
67
- end
68
-
69
- include helpers
70
- end
71
- end
72
- end
73
-
74
- class LegacyRouteSetTests < ActiveSupport::TestCase
75
- include RoutingTestHelpers
76
- include ActionDispatch::RoutingVerbs
77
-
78
- attr_reader :rs
79
- attr_accessor :controller
80
- alias :routes :rs
81
-
82
- def setup
83
- @rs = make_set
84
- @response = nil
85
- end
86
-
87
- def test_symbols_with_dashes
88
- rs.draw do
89
- get "/:artist/:song-omg", to: lambda { |env|
90
- resp = ActiveSupport::JSON.encode ActionDispatch::Request.new(env).path_parameters
91
- [200, {}, [resp]]
92
- }
93
- end
94
-
95
- hash = ActiveSupport::JSON.decode get(URI("http://example.org/journey/faithfully-omg"))
96
- assert_equal({ "artist" => "journey", "song" => "faithfully" }, hash)
97
- end
98
-
99
- def test_id_encoding
100
- rs.draw do
101
- get "/journey/:id", to: lambda { |env|
102
- param = ActionDispatch::Request.new(env).path_parameters
103
- resp = ActiveSupport::JSON.encode param
104
- [200, {}, [resp]]
105
- }
106
- end
107
-
108
- # The encoding of the URL in production is *binary*, so we add a
109
- # .b here.
110
- hash = ActiveSupport::JSON.decode get(URI("http://example.org/journey/%E5%A4%AA%E9%83%8E".b))
111
- assert_equal({ "id" => "太郎" }, hash)
112
- assert_equal ::Encoding::UTF_8, hash["id"].encoding
113
- end
114
-
115
- def test_id_with_dash
116
- rs.draw do
117
- get "/journey/:id", to: lambda { |env|
118
- resp = ActiveSupport::JSON.encode ActionDispatch::Request.new(env).path_parameters
119
- [200, {}, [resp]]
120
- }
121
- end
122
-
123
- hash = ActiveSupport::JSON.decode get(URI("http://example.org/journey/faithfully-omg"))
124
- assert_equal({ "id" => "faithfully-omg" }, hash)
125
- end
126
-
127
- def test_dash_with_custom_regexp
128
- rs.draw do
129
- get "/:artist/:song-omg", constraints: { song: /\d+/ }, to: lambda { |env|
130
- resp = ActiveSupport::JSON.encode ActionDispatch::Request.new(env).path_parameters
131
- [200, {}, [resp]]
132
- }
133
- end
134
-
135
- hash = ActiveSupport::JSON.decode get(URI("http://example.org/journey/123-omg"))
136
- assert_equal({ "artist" => "journey", "song" => "123" }, hash)
137
- assert_equal "Not Found", get(URI("http://example.org/journey/faithfully-omg"))
138
- end
139
-
140
- def test_pre_dash
141
- rs.draw do
142
- get "/:artist/omg-:song", to: lambda { |env|
143
- resp = ActiveSupport::JSON.encode ActionDispatch::Request.new(env).path_parameters
144
- [200, {}, [resp]]
145
- }
146
- end
147
-
148
- hash = ActiveSupport::JSON.decode get(URI("http://example.org/journey/omg-faithfully"))
149
- assert_equal({ "artist" => "journey", "song" => "faithfully" }, hash)
150
- end
151
-
152
- def test_pre_dash_with_custom_regexp
153
- rs.draw do
154
- get "/:artist/omg-:song", constraints: { song: /\d+/ }, to: lambda { |env|
155
- resp = ActiveSupport::JSON.encode ActionDispatch::Request.new(env).path_parameters
156
- [200, {}, [resp]]
157
- }
158
- end
159
-
160
- hash = ActiveSupport::JSON.decode get(URI("http://example.org/journey/omg-123"))
161
- assert_equal({ "artist" => "journey", "song" => "123" }, hash)
162
- assert_equal "Not Found", get(URI("http://example.org/journey/omg-faithfully"))
163
- end
164
-
165
- def test_star_paths_are_greedy
166
- rs.draw do
167
- get "/*path", to: lambda { |env|
168
- x = env["action_dispatch.request.path_parameters"][:path]
169
- [200, {}, [x]]
170
- }, format: false
171
- end
172
-
173
- u = URI("http://example.org/foo/bar.html")
174
- assert_equal u.path.sub(/^\//, ""), get(u)
175
- end
176
-
177
- def test_star_paths_are_greedy_but_not_too_much
178
- rs.draw do
179
- get "/*path", to: lambda { |env|
180
- x = ActiveSupport::JSON.encode env["action_dispatch.request.path_parameters"]
181
- [200, {}, [x]]
182
- }
183
- end
184
-
185
- expected = { "path" => "foo/bar", "format" => "html" }
186
- u = URI("http://example.org/foo/bar.html")
187
- assert_equal expected, ActiveSupport::JSON.decode(get(u))
188
- end
189
-
190
- def test_optional_star_paths_are_greedy
191
- rs.draw do
192
- get "/(*filters)", to: lambda { |env|
193
- x = env["action_dispatch.request.path_parameters"][:filters]
194
- [200, {}, [x]]
195
- }, format: false
196
- end
197
-
198
- u = URI("http://example.org/ne_27.065938,-80.6092/sw_25.489856,-82.542794")
199
- assert_equal u.path.sub(/^\//, ""), get(u)
200
- end
201
-
202
- def test_optional_star_paths_are_greedy_but_not_too_much
203
- rs.draw do
204
- get "/(*filters)", to: lambda { |env|
205
- x = ActiveSupport::JSON.encode env["action_dispatch.request.path_parameters"]
206
- [200, {}, [x]]
207
- }
208
- end
209
-
210
- expected = { "filters" => "ne_27.065938,-80.6092/sw_25.489856,-82",
211
- "format" => "542794" }
212
- u = URI("http://example.org/ne_27.065938,-80.6092/sw_25.489856,-82.542794")
213
- assert_equal expected, ActiveSupport::JSON.decode(get(u))
214
- end
215
-
216
- def test_regexp_precedence
217
- rs.draw do
218
- get "/whois/:domain", constraints: {
219
- domain: /\w+\.[\w\.]+/ },
220
- to: lambda { |env| [200, {}, %w{regexp}] }
221
-
222
- get "/whois/:id", to: lambda { |env| [200, {}, %w{id}] }
223
- end
224
-
225
- assert_equal "regexp", get(URI("http://example.org/whois/example.org"))
226
- assert_equal "id", get(URI("http://example.org/whois/123"))
227
- end
228
-
229
- def test_class_and_lambda_constraints
230
- subdomain = Class.new {
231
- def matches?(request)
232
- request.subdomain.present? && request.subdomain != "clients"
233
- end
234
- }
235
-
236
- rs.draw do
237
- get "/", constraints: subdomain.new,
238
- to: lambda { |env| [200, {}, %w{default}] }
239
- get "/", constraints: { subdomain: "clients" },
240
- to: lambda { |env| [200, {}, %w{clients}] }
241
- end
242
-
243
- assert_equal "default", get(URI("http://www.example.org/"))
244
- assert_equal "clients", get(URI("http://clients.example.org/"))
245
- end
246
-
247
- def test_lambda_constraints
248
- rs.draw do
249
- get "/", constraints: lambda { |req|
250
- req.subdomain.present? && req.subdomain != "clients" },
251
- to: lambda { |env| [200, {}, %w{default}] }
252
-
253
- get "/", constraints: lambda { |req|
254
- req.subdomain.present? && req.subdomain == "clients" },
255
- to: lambda { |env| [200, {}, %w{clients}] }
256
- end
257
-
258
- assert_equal "default", get(URI("http://www.example.org/"))
259
- assert_equal "clients", get(URI("http://clients.example.org/"))
260
- end
261
-
262
- def test_scoped_lambda
263
- scope_called = false
264
- rs.draw do
265
- scope "/foo", constraints: lambda { |req| scope_called = true } do
266
- get "/", to: lambda { |env| [200, {}, %w{default}] }
267
- end
268
- end
269
-
270
- assert_equal "default", get(URI("http://www.example.org/foo/"))
271
- assert scope_called, "scope constraint should be called"
272
- end
273
-
274
- def test_scoped_lambda_with_get_lambda
275
- inner_called = false
276
-
277
- rs.draw do
278
- scope "/foo", constraints: lambda { |req| flunk "should not be called" } do
279
- get "/", constraints: lambda { |req| inner_called = true },
280
- to: lambda { |env| [200, {}, %w{default}] }
281
- end
282
- end
283
-
284
- assert_equal "default", get(URI("http://www.example.org/foo/"))
285
- assert inner_called, "inner constraint should be called"
286
- end
287
-
288
- def test_empty_string_match
289
- rs.draw do
290
- get "/:username", constraints: { username: /[^\/]+/ },
291
- to: lambda { |e| [200, {}, ["foo"]] }
292
- end
293
- assert_equal "Not Found", get(URI("http://example.org/"))
294
- assert_equal "foo", get(URI("http://example.org/hello"))
295
- end
296
-
297
- def test_non_greedy_glob_regexp
298
- params = nil
299
- rs.draw do
300
- get "/posts/:id(/*filters)", constraints: { filters: /.+?/ },
301
- to: lambda { |e|
302
- params = e["action_dispatch.request.path_parameters"]
303
- [200, {}, ["foo"]]
304
- }
305
- end
306
- assert_equal "foo", get(URI("http://example.org/posts/1/foo.js"))
307
- assert_equal({ id: "1", filters: "foo", format: "js" }, params)
308
- end
309
-
310
- def test_specific_controller_action_failure
311
- rs.draw do
312
- mount lambda {} => "/foo"
313
- end
314
-
315
- assert_raises(ActionController::UrlGenerationError) do
316
- url_for(rs, controller: "omg", action: "lol")
317
- end
318
- end
319
-
320
- def test_default_setup
321
- rs.draw { ActiveSupport::Deprecation.silence { get "/:controller(/:action(/:id))" } }
322
- assert_equal({ controller: "content", action: "index" }, rs.recognize_path("/content"))
323
- assert_equal({ controller: "content", action: "list" }, rs.recognize_path("/content/list"))
324
- assert_equal({ controller: "content", action: "show", id: "10" }, rs.recognize_path("/content/show/10"))
325
-
326
- assert_equal({ controller: "admin/user", action: "show", id: "10" }, rs.recognize_path("/admin/user/show/10"))
327
-
328
- assert_equal "/admin/user/show/10", url_for(rs, controller: "admin/user", action: "show", id: 10)
329
-
330
- get URI("http://test.host/admin/user/list/10")
331
-
332
- assert_equal({ controller: "admin/user", action: "list", id: "10" },
333
- controller.request.path_parameters)
334
-
335
- assert_equal "/admin/user/show", controller.url_for(action: "show", only_path: true)
336
- assert_equal "/admin/user/list/10", controller.url_for(only_path: true)
337
-
338
- assert_equal "/admin/stuff", controller.url_for(controller: "stuff", only_path: true)
339
- assert_equal "/stuff", controller.url_for(controller: "/stuff", only_path: true)
340
- end
341
-
342
- def test_route_with_colon_first
343
- rs.draw do
344
- ActiveSupport::Deprecation.silence do
345
- get "/:controller/:action/:id", action: "index", id: nil
346
- end
347
-
348
- get ":url", controller: "content", action: "translate"
349
- end
350
-
351
- assert_equal({ controller: "content", action: "translate", url: "example" }, rs.recognize_path("/example"))
352
- end
353
-
354
- def test_route_with_regexp_for_action
355
- rs.draw { ActiveSupport::Deprecation.silence { get "/:controller/:action", action: /auth[-|_].+/ } }
356
-
357
- assert_equal({ action: "auth_google", controller: "content" }, rs.recognize_path("/content/auth_google"))
358
- assert_equal({ action: "auth-facebook", controller: "content" }, rs.recognize_path("/content/auth-facebook"))
359
-
360
- assert_equal "/content/auth_google", url_for(rs, controller: "content", action: "auth_google")
361
- assert_equal "/content/auth-facebook", url_for(rs, controller: "content", action: "auth-facebook")
362
- end
363
-
364
- def test_route_with_regexp_for_controller
365
- rs.draw do
366
- ActiveSupport::Deprecation.silence do
367
- get ":controller/:admintoken(/:action(/:id))", controller: /admin\/.+/
368
- get "/:controller(/:action(/:id))"
369
- end
370
- end
371
-
372
- assert_equal({ controller: "admin/user", admintoken: "foo", action: "index" },
373
- rs.recognize_path("/admin/user/foo"))
374
- assert_equal({ controller: "content", action: "foo" },
375
- rs.recognize_path("/content/foo"))
376
-
377
- assert_equal "/admin/user/foo", url_for(rs, controller: "admin/user", admintoken: "foo", action: "index")
378
- assert_equal "/content/foo", url_for(rs, controller: "content", action: "foo")
379
- end
380
-
381
- def test_route_with_regexp_and_captures_for_controller
382
- rs.draw do
383
- ActiveSupport::Deprecation.silence do
384
- get "/:controller(/:action(/:id))", controller: /admin\/(accounts|users)/
385
- end
386
- end
387
- assert_equal({ controller: "admin/accounts", action: "index" }, rs.recognize_path("/admin/accounts"))
388
- assert_equal({ controller: "admin/users", action: "index" }, rs.recognize_path("/admin/users"))
389
- assert_raise(ActionController::RoutingError) { rs.recognize_path("/admin/products") }
390
- end
391
-
392
- def test_route_with_regexp_and_dot
393
- rs.draw do
394
- ActiveSupport::Deprecation.silence do
395
- get ":controller/:action/:file",
396
- controller: /admin|user/,
397
- action: /upload|download/,
398
- defaults: { file: nil },
399
- constraints: { file: %r{[^/]+(\.[^/]+)?} }
400
- end
401
- end
402
- # Without a file extension
403
- assert_equal "/user/download/file",
404
- url_for(rs, controller: "user", action: "download", file: "file")
405
-
406
- assert_equal({ controller: "user", action: "download", file: "file" },
407
- rs.recognize_path("/user/download/file"))
408
-
409
- # Now, let's try a file with an extension, really a dot (.)
410
- assert_equal "/user/download/file.jpg",
411
- url_for(rs, controller: "user", action: "download", file: "file.jpg")
412
-
413
- assert_equal({ controller: "user", action: "download", file: "file.jpg" },
414
- rs.recognize_path("/user/download/file.jpg"))
415
- end
416
-
417
- def test_basic_named_route
418
- rs.draw do
419
- root to: "content#list", as: "home"
420
- end
421
- assert_equal("http://test.host/", setup_for_named_route.send(:home_url))
422
- end
423
-
424
- def test_named_route_with_option
425
- rs.draw do
426
- get "page/:title" => "content#show_page", :as => "page"
427
- end
428
-
429
- assert_equal("http://test.host/page/new%20stuff",
430
- setup_for_named_route.send(:page_url, title: "new stuff"))
431
- end
432
-
433
- def test_named_route_with_default
434
- rs.draw do
435
- get "page/:title" => "content#show_page", :title => "AboutPage", :as => "page"
436
- end
437
-
438
- assert_equal("http://test.host/page/AboutRails",
439
- setup_for_named_route.send(:page_url, title: "AboutRails"))
440
- end
441
-
442
- def test_named_route_with_path_prefix
443
- rs.draw do
444
- scope "my" do
445
- get "page" => "content#show_page", :as => "page"
446
- end
447
- end
448
-
449
- assert_equal("http://test.host/my/page",
450
- setup_for_named_route.send(:page_url))
451
- end
452
-
453
- def test_named_route_with_blank_path_prefix
454
- rs.draw do
455
- scope "" do
456
- get "page" => "content#show_page", :as => "page"
457
- end
458
- end
459
-
460
- assert_equal("http://test.host/page",
461
- setup_for_named_route.send(:page_url))
462
- end
463
-
464
- def test_named_route_with_nested_controller
465
- rs.draw do
466
- get "admin/user" => "admin/user#index", :as => "users"
467
- end
468
-
469
- assert_equal("http://test.host/admin/user",
470
- setup_for_named_route.send(:users_url))
471
- end
472
-
473
- def test_optimised_named_route_with_host
474
- rs.draw do
475
- get "page" => "content#show_page", :as => "pages", :host => "foo.com"
476
- end
477
- routes = setup_for_named_route
478
- assert_equal "http://foo.com/page", routes.pages_url
479
- end
480
-
481
- def setup_for_named_route(options = {})
482
- MockController.build(rs.url_helpers, options).new
483
- end
484
-
485
- def test_named_route_without_hash
486
- rs.draw do
487
- ActiveSupport::Deprecation.silence do
488
- get ":controller/:action/:id", as: "normal"
489
- end
490
- end
491
- end
492
-
493
- def test_named_route_root
494
- rs.draw do
495
- root to: "hello#index"
496
- end
497
- routes = setup_for_named_route
498
- assert_equal("http://test.host/", routes.send(:root_url))
499
- assert_equal("/", routes.send(:root_path))
500
- end
501
-
502
- def test_named_route_root_without_hash
503
- rs.draw do
504
- root "hello#index"
505
- end
506
- routes = setup_for_named_route
507
- assert_equal("http://test.host/", routes.send(:root_url))
508
- assert_equal("/", routes.send(:root_path))
509
- end
510
-
511
- def test_named_route_root_with_hash
512
- rs.draw do
513
- root "hello#index", as: :index
514
- end
515
-
516
- routes = setup_for_named_route
517
- assert_equal("http://test.host/", routes.send(:index_url))
518
- assert_equal("/", routes.send(:index_path))
519
- end
520
-
521
- def test_root_without_path_raises_argument_error
522
- assert_raises ArgumentError do
523
- rs.draw { root nil }
524
- end
525
- end
526
-
527
- def test_named_route_root_with_trailing_slash
528
- rs.draw do
529
- root "hello#index"
530
- end
531
-
532
- routes = setup_for_named_route(trailing_slash: true)
533
- assert_equal("http://test.host/", routes.send(:root_url))
534
- assert_equal("http://test.host/?foo=bar", routes.send(:root_url, foo: :bar))
535
- end
536
-
537
- def test_named_route_with_regexps
538
- rs.draw do
539
- get "page/:year/:month/:day/:title" => "page#show", :as => "article",
540
- :year => /\d+/, :month => /\d+/, :day => /\d+/
541
-
542
- ActiveSupport::Deprecation.silence do
543
- get ":controller/:action/:id"
544
- end
545
- end
546
-
547
- routes = setup_for_named_route
548
-
549
- assert_equal "http://test.host/page/2005/6/10/hi",
550
- routes.send(:article_url, title: "hi", day: 10, year: 2005, month: 6)
551
- end
552
-
553
- def test_changing_controller
554
- rs.draw { ActiveSupport::Deprecation.silence { get ":controller/:action/:id" } }
555
-
556
- get URI("http://test.host/admin/user/index/10")
557
-
558
- assert_equal "/admin/stuff/show/10",
559
- controller.url_for(controller: "stuff", action: "show", id: 10, only_path: true)
560
- end
561
-
562
- def test_paths_escaped
563
- rs.draw do
564
- get "file/*path" => "content#show_file", :as => "path"
565
-
566
- ActiveSupport::Deprecation.silence do
567
- get ":controller/:action/:id"
568
- end
569
- end
570
-
571
- # No + to space in URI escaping, only for query params.
572
- results = rs.recognize_path "/file/hello+world/how+are+you%3F"
573
- assert results, "Recognition should have succeeded"
574
- assert_equal "hello+world/how+are+you?", results[:path]
575
-
576
- # Use %20 for space instead.
577
- results = rs.recognize_path "/file/hello%20world/how%20are%20you%3F"
578
- assert results, "Recognition should have succeeded"
579
- assert_equal "hello world/how are you?", results[:path]
580
- end
581
-
582
- def test_paths_slashes_unescaped_with_ordered_parameters
583
- rs.draw do
584
- get "/file/*path" => "content#index", :as => "path"
585
- end
586
-
587
- # No / to %2F in URI, only for query params.
588
- assert_equal("/file/hello/world", setup_for_named_route.send(:path_path, ["hello", "world"]))
589
- end
590
-
591
- def test_non_controllers_cannot_be_matched
592
- rs.draw do
593
- ActiveSupport::Deprecation.silence do
594
- get ":controller/:action/:id"
595
- end
596
- end
597
- assert_raise(ActionController::RoutingError) { rs.recognize_path("/not_a/show/10") }
598
- end
599
-
600
- def test_should_list_options_diff_when_routing_constraints_dont_match
601
- rs.draw do
602
- get "post/:id" => "post#show", :constraints => { id: /\d+/ }, :as => "post"
603
- end
604
- assert_raise(ActionController::UrlGenerationError) do
605
- url_for(rs, controller: "post", action: "show", bad_param: "foo", use_route: "post")
606
- end
607
- end
608
-
609
- def test_dynamic_path_allowed
610
- rs.draw do
611
- get "*path" => "content#show_file"
612
- end
613
-
614
- assert_equal "/pages/boo",
615
- url_for(rs, controller: "content", action: "show_file", path: %w(pages boo))
616
- end
617
-
618
- def test_dynamic_recall_paths_allowed
619
- rs.draw do
620
- get "*path" => "content#show_file"
621
- end
622
-
623
- get URI("http://test.host/pages/boo")
624
- assert_equal({ controller: "content", action: "show_file", path: "pages/boo" },
625
- controller.request.path_parameters)
626
-
627
- assert_equal "/pages/boo",
628
- controller.url_for(only_path: true)
629
- end
630
-
631
- def test_backwards
632
- rs.draw do
633
- ActiveSupport::Deprecation.silence do
634
- get "page/:id(/:action)" => "pages#show"
635
- get ":controller(/:action(/:id))"
636
- end
637
- end
638
-
639
- get URI("http://test.host/pages/show")
640
- assert_equal "/page/20", controller.url_for(id: 20, only_path: true)
641
- assert_equal "/page/20", url_for(rs, controller: "pages", id: 20, action: "show")
642
- assert_equal "/pages/boo", url_for(rs, controller: "pages", action: "boo")
643
- end
644
-
645
- def test_route_with_integer_default
646
- rs.draw do
647
- get "page(/:id)" => "content#show_page", :id => 1
648
-
649
- ActiveSupport::Deprecation.silence do
650
- get ":controller/:action/:id"
651
- end
652
- end
653
-
654
- assert_equal "/page", url_for(rs, controller: "content", action: "show_page")
655
- assert_equal "/page", url_for(rs, controller: "content", action: "show_page", id: 1)
656
- assert_equal "/page", url_for(rs, controller: "content", action: "show_page", id: "1")
657
- assert_equal "/page/10", url_for(rs, controller: "content", action: "show_page", id: 10)
658
-
659
- assert_equal({ controller: "content", action: "show_page", id: 1 }, rs.recognize_path("/page"))
660
- assert_equal({ controller: "content", action: "show_page", id: "1" }, rs.recognize_path("/page/1"))
661
- assert_equal({ controller: "content", action: "show_page", id: "10" }, rs.recognize_path("/page/10"))
662
- end
663
-
664
- # For newer revision
665
- def test_route_with_text_default
666
- rs.draw do
667
- get "page/:id" => "content#show_page", :id => 1
668
-
669
- ActiveSupport::Deprecation.silence do
670
- get ":controller/:action/:id"
671
- end
672
- end
673
-
674
- assert_equal "/page/foo", url_for(rs, controller: "content", action: "show_page", id: "foo")
675
- assert_equal({ controller: "content", action: "show_page", id: "foo" }, rs.recognize_path("/page/foo"))
676
-
677
- token = "\321\202\320\265\320\272\321\201\321\202".dup # 'text' in Russian
678
- token.force_encoding(Encoding::BINARY)
679
- escaped_token = CGI.escape(token)
680
-
681
- assert_equal "/page/" + escaped_token, url_for(rs, controller: "content", action: "show_page", id: token)
682
- assert_equal({ controller: "content", action: "show_page", id: token }, rs.recognize_path("/page/#{escaped_token}"))
683
- end
684
-
685
- def test_action_expiry
686
- rs.draw { ActiveSupport::Deprecation.silence { get ":controller(/:action(/:id))" } }
687
- get URI("http://test.host/content/show")
688
- assert_equal "/content", controller.url_for(controller: "content", only_path: true)
689
- end
690
-
691
- def test_requirement_should_prevent_optional_id
692
- rs.draw do
693
- get "post/:id" => "post#show", :constraints => { id: /\d+/ }, :as => "post"
694
- end
695
-
696
- assert_equal "/post/10", url_for(rs, controller: "post", action: "show", id: 10)
697
-
698
- assert_raise(ActionController::UrlGenerationError) do
699
- url_for(rs, controller: "post", action: "show")
700
- end
701
- end
702
-
703
- def test_both_requirement_and_optional
704
- rs.draw do
705
- get("test(/:year)" => "post#show", :as => "blog",
706
- :defaults => { year: nil },
707
- :constraints => { year: /\d{4}/ }
708
- )
709
-
710
- ActiveSupport::Deprecation.silence do
711
- get ":controller/:action/:id"
712
- end
713
- end
714
-
715
- assert_equal "/test", url_for(rs, controller: "post", action: "show")
716
- assert_equal "/test", url_for(rs, controller: "post", action: "show", year: nil)
717
-
718
- assert_equal("http://test.host/test", setup_for_named_route.send(:blog_url))
719
- end
720
-
721
- def test_set_to_nil_forgets
722
- rs.draw do
723
- get "pages(/:year(/:month(/:day)))" => "content#list_pages", :month => nil, :day => nil
724
-
725
- ActiveSupport::Deprecation.silence do
726
- get ":controller/:action/:id"
727
- end
728
- end
729
-
730
- assert_equal "/pages/2005",
731
- url_for(rs, controller: "content", action: "list_pages", year: 2005)
732
- assert_equal "/pages/2005/6",
733
- url_for(rs, controller: "content", action: "list_pages", year: 2005, month: 6)
734
- assert_equal "/pages/2005/6/12",
735
- url_for(rs, controller: "content", action: "list_pages", year: 2005, month: 6, day: 12)
736
-
737
- get URI("http://test.host/pages/2005/6/12")
738
- assert_equal({ controller: "content", action: "list_pages", year: "2005", month: "6", day: "12" },
739
- controller.request.path_parameters)
740
-
741
- assert_equal "/pages/2005/6/4",
742
- controller.url_for(day: 4, only_path: true)
743
-
744
- assert_equal "/pages/2005/6",
745
- controller.url_for(day: nil, only_path: true)
746
-
747
- assert_equal "/pages/2005",
748
- controller.url_for(day: nil, month: nil, only_path: true)
749
- end
750
-
751
- def test_root_url_generation_with_controller_and_action
752
- rs.draw do
753
- root to: "content#index"
754
- end
755
-
756
- assert_equal "/", url_for(rs, controller: "content", action: "index")
757
- assert_equal "/", url_for(rs, controller: "content")
758
- end
759
-
760
- def test_named_root_url_generation_with_controller_and_action
761
- rs.draw do
762
- root to: "content#index", as: "home"
763
- end
764
-
765
- assert_equal "/", url_for(rs, controller: "content", action: "index")
766
- assert_equal "/", url_for(rs, controller: "content")
767
-
768
- assert_equal("http://test.host/", setup_for_named_route.send(:home_url))
769
- end
770
-
771
- def test_named_route_method
772
- rs.draw do
773
- get "categories" => "content#categories", :as => "categories"
774
-
775
- ActiveSupport::Deprecation.silence do
776
- get ":controller(/:action(/:id))"
777
- end
778
- end
779
-
780
- assert_equal "/categories", url_for(rs, controller: "content", action: "categories")
781
- assert_equal "/content/hi", url_for(rs, controller: "content", action: "hi")
782
- end
783
-
784
- def test_named_routes_array
785
- test_named_route_method
786
- assert_equal [:categories], rs.named_routes.names
787
- end
788
-
789
- def test_nil_defaults
790
- rs.draw do
791
- get "journal" => "content#list_journal",
792
- :date => nil, :user_id => nil
793
-
794
- ActiveSupport::Deprecation.silence do
795
- get ":controller/:action/:id"
796
- end
797
- end
798
-
799
- assert_equal "/journal", url_for(rs,
800
- controller: "content",
801
- action: "list_journal",
802
- date: nil,
803
- user_id: nil)
804
- end
805
-
806
- def setup_request_method_routes_for(method)
807
- rs.draw do
808
- match "/match" => "books##{method}", :via => method.to_sym
809
- end
810
- end
811
-
812
- %w(GET PATCH POST PUT DELETE).each do |request_method|
813
- define_method("test_request_method_recognized_with_#{request_method}") do
814
- setup_request_method_routes_for(request_method.downcase)
815
- params = rs.recognize_path("/match", method: request_method)
816
- assert_equal request_method.downcase, params[:action]
817
- end
818
- end
819
-
820
- def test_recognize_array_of_methods
821
- rs.draw do
822
- match "/match" => "books#get_or_post", :via => [:get, :post]
823
- put "/match" => "books#not_get_or_post"
824
- end
825
-
826
- params = rs.recognize_path("/match", method: :post)
827
- assert_equal "get_or_post", params[:action]
828
-
829
- params = rs.recognize_path("/match", method: :put)
830
- assert_equal "not_get_or_post", params[:action]
831
- end
832
-
833
- def test_subpath_recognized
834
- rs.draw do
835
- ActiveSupport::Deprecation.silence do
836
- get "/books/:id/edit" => "subpath_books#edit"
837
- get "/items/:id/:action" => "subpath_books"
838
- get "/posts/new/:action" => "subpath_books"
839
- get "/posts/:id" => "subpath_books#show"
840
- end
841
- end
842
-
843
- hash = rs.recognize_path "/books/17/edit"
844
- assert_not_nil hash
845
- assert_equal %w(subpath_books 17 edit), [hash[:controller], hash[:id], hash[:action]]
846
-
847
- hash = rs.recognize_path "/items/3/complete"
848
- assert_not_nil hash
849
- assert_equal %w(subpath_books 3 complete), [hash[:controller], hash[:id], hash[:action]]
850
-
851
- hash = rs.recognize_path "/posts/new/preview"
852
- assert_not_nil hash
853
- assert_equal %w(subpath_books preview), [hash[:controller], hash[:action]]
854
-
855
- hash = rs.recognize_path "/posts/7"
856
- assert_not_nil hash
857
- assert_equal %w(subpath_books show 7), [hash[:controller], hash[:action], hash[:id]]
858
- end
859
-
860
- def test_subpath_generated
861
- rs.draw do
862
- ActiveSupport::Deprecation.silence do
863
- get "/books/:id/edit" => "subpath_books#edit"
864
- get "/items/:id/:action" => "subpath_books"
865
- get "/posts/new/:action" => "subpath_books"
866
- end
867
- end
868
-
869
- assert_equal "/books/7/edit", url_for(rs, controller: "subpath_books", id: 7, action: "edit")
870
- assert_equal "/items/15/complete", url_for(rs, controller: "subpath_books", id: 15, action: "complete")
871
- assert_equal "/posts/new/preview", url_for(rs, controller: "subpath_books", action: "preview")
872
- end
873
-
874
- def test_failed_constraints_raises_exception_with_violated_constraints
875
- rs.draw do
876
- get "foos/:id" => "foos#show", :as => "foo_with_requirement", :constraints => { id: /\d+/ }
877
- end
878
-
879
- assert_raise(ActionController::UrlGenerationError) do
880
- setup_for_named_route.send(:foo_with_requirement_url, "I am Against the constraints")
881
- end
882
- end
883
-
884
- def test_routes_changed_correctly_after_clear
885
- rs = ::ActionDispatch::Routing::RouteSet.new
886
- rs.draw do
887
- get "ca" => "ca#aa"
888
- get "cb" => "cb#ab"
889
- get "cc" => "cc#ac"
890
-
891
- ActiveSupport::Deprecation.silence do
892
- get ":controller/:action/:id"
893
- get ":controller/:action/:id.:format"
894
- end
895
- end
896
-
897
- hash = rs.recognize_path "/cc"
898
-
899
- assert_not_nil hash
900
- assert_equal %w(cc ac), [hash[:controller], hash[:action]]
901
-
902
- rs.draw do
903
- get "cb" => "cb#ab"
904
- get "cc" => "cc#ac"
905
-
906
- ActiveSupport::Deprecation.silence do
907
- get ":controller/:action/:id"
908
- get ":controller/:action/:id.:format"
909
- end
910
- end
911
-
912
- hash = rs.recognize_path "/cc"
913
-
914
- assert_not_nil hash
915
- assert_equal %w(cc ac), [hash[:controller], hash[:action]]
916
- end
917
- end
918
-
919
- class RouteSetTest < ActiveSupport::TestCase
920
- include RoutingTestHelpers
921
- include ActionDispatch::RoutingVerbs
922
-
923
- attr_reader :set
924
- alias :routes :set
925
- attr_accessor :controller
926
-
927
- def setup
928
- super
929
- @set = make_set
930
- end
931
-
932
- def request
933
- @request ||= ActionController::TestRequest.new
934
- end
935
-
936
- def default_route_set
937
- @default_route_set ||= begin
938
- set = ActionDispatch::Routing::RouteSet.new
939
- set.draw do
940
-
941
- ActiveSupport::Deprecation.silence do
942
- get "/:controller(/:action(/:id))"
943
- end
944
- end
945
- set
946
- end
947
- end
948
-
949
- def test_generate_extras
950
- set.draw { ActiveSupport::Deprecation.silence { get ":controller/(:action(/:id))" } }
951
- path, extras = set.generate_extras(controller: "foo", action: "bar", id: 15, this: "hello", that: "world")
952
- assert_equal "/foo/bar/15", path
953
- assert_equal %w(that this), extras.map(&:to_s).sort
954
- end
955
-
956
- def test_extra_keys
957
- set.draw { ActiveSupport::Deprecation.silence { get ":controller/:action/:id" } }
958
- extras = set.extra_keys(controller: "foo", action: "bar", id: 15, this: "hello", that: "world")
959
- assert_equal %w(that this), extras.map(&:to_s).sort
960
- end
961
-
962
- def test_generate_extras_not_first
963
- set.draw do
964
- ActiveSupport::Deprecation.silence do
965
- get ":controller/:action/:id.:format"
966
- get ":controller/:action/:id"
967
- end
968
- end
969
- path, extras = set.generate_extras(controller: "foo", action: "bar", id: 15, this: "hello", that: "world")
970
- assert_equal "/foo/bar/15", path
971
- assert_equal %w(that this), extras.map(&:to_s).sort
972
- end
973
-
974
- def test_generate_not_first
975
- set.draw do
976
- ActiveSupport::Deprecation.silence do
977
- get ":controller/:action/:id.:format"
978
- get ":controller/:action/:id"
979
- end
980
- end
981
- assert_equal "/foo/bar/15?this=hello",
982
- url_for(set, controller: "foo", action: "bar", id: 15, this: "hello")
983
- end
984
-
985
- def test_extra_keys_not_first
986
- set.draw do
987
- ActiveSupport::Deprecation.silence do
988
- get ":controller/:action/:id.:format"
989
- get ":controller/:action/:id"
990
- end
991
- end
992
- extras = set.extra_keys(controller: "foo", action: "bar", id: 15, this: "hello", that: "world")
993
- assert_equal %w(that this), extras.map(&:to_s).sort
994
- end
995
-
996
- def test_draw
997
- assert_equal 0, set.routes.size
998
- set.draw do
999
- get "/hello/world" => "a#b"
1000
- end
1001
- assert_equal 1, set.routes.size
1002
- end
1003
-
1004
- def test_draw_symbol_controller_name
1005
- assert_equal 0, set.routes.size
1006
- set.draw do
1007
- get "/users/index" => "users#index"
1008
- end
1009
- set.recognize_path("/users/index", method: :get)
1010
- assert_equal 1, set.routes.size
1011
- end
1012
-
1013
- def test_named_draw
1014
- assert_equal 0, set.routes.size
1015
- set.draw do
1016
- get "/hello/world" => "a#b", :as => "hello"
1017
- end
1018
- assert_equal 1, set.routes.size
1019
- assert_equal set.routes.first, set.named_routes[:hello]
1020
- end
1021
-
1022
- def test_duplicate_named_route_raises_rather_than_pick_precedence
1023
- assert_raise ArgumentError do
1024
- set.draw do
1025
- get "/hello/world" => "a#b", :as => "hello"
1026
- get "/hello" => "a#b", :as => "hello"
1027
- end
1028
- end
1029
- end
1030
-
1031
- def setup_named_route_test
1032
- set.draw do
1033
- get "/people(/:id)" => "people#show", :as => "show"
1034
- get "/people" => "people#index", :as => "index"
1035
- get "/people/go/:foo/:bar/joe(/:id)" => "people#multi", :as => "multi"
1036
- get "/admin/users" => "admin/users#index", :as => "users"
1037
- end
1038
-
1039
- get URI("http://test.host/people")
1040
- controller
1041
- end
1042
-
1043
- def test_named_route_url_method
1044
- controller = setup_named_route_test
1045
-
1046
- assert_equal "http://test.host/people/5", controller.send(:show_url, id: 5)
1047
- assert_equal "/people/5", controller.send(:show_path, id: 5)
1048
-
1049
- assert_equal "http://test.host/people", controller.send(:index_url)
1050
- assert_equal "/people", controller.send(:index_path)
1051
-
1052
- assert_equal "http://test.host/admin/users", controller.send(:users_url)
1053
- assert_equal "/admin/users", controller.send(:users_path)
1054
- end
1055
-
1056
- def test_named_route_url_method_with_anchor
1057
- controller = setup_named_route_test
1058
-
1059
- assert_equal "http://test.host/people/5#location", controller.send(:show_url, id: 5, anchor: "location")
1060
- assert_equal "/people/5#location", controller.send(:show_path, id: 5, anchor: "location")
1061
-
1062
- assert_equal "http://test.host/people#location", controller.send(:index_url, anchor: "location")
1063
- assert_equal "/people#location", controller.send(:index_path, anchor: "location")
1064
-
1065
- assert_equal "http://test.host/admin/users#location", controller.send(:users_url, anchor: "location")
1066
- assert_equal "/admin/users#location", controller.send(:users_path, anchor: "location")
1067
-
1068
- assert_equal "http://test.host/people/go/7/hello/joe/5#location",
1069
- controller.send(:multi_url, 7, "hello", 5, anchor: "location")
1070
-
1071
- assert_equal "http://test.host/people/go/7/hello/joe/5?baz=bar#location",
1072
- controller.send(:multi_url, 7, "hello", 5, baz: "bar", anchor: "location")
1073
-
1074
- assert_equal "http://test.host/people?baz=bar#location",
1075
- controller.send(:index_url, baz: "bar", anchor: "location")
1076
-
1077
- assert_equal "http://test.host/people", controller.send(:index_url, anchor: nil)
1078
- assert_equal "http://test.host/people", controller.send(:index_url, anchor: false)
1079
- end
1080
-
1081
- def test_named_route_url_method_with_port
1082
- controller = setup_named_route_test
1083
- assert_equal "http://test.host:8080/people/5", controller.send(:show_url, 5, port: 8080)
1084
- end
1085
-
1086
- def test_named_route_url_method_with_host
1087
- controller = setup_named_route_test
1088
- assert_equal "http://some.example.com/people/5", controller.send(:show_url, 5, host: "some.example.com")
1089
- end
1090
-
1091
- def test_named_route_url_method_with_protocol
1092
- controller = setup_named_route_test
1093
- assert_equal "https://test.host/people/5", controller.send(:show_url, 5, protocol: "https")
1094
- end
1095
-
1096
- def test_named_route_url_method_with_ordered_parameters
1097
- controller = setup_named_route_test
1098
- assert_equal "http://test.host/people/go/7/hello/joe/5",
1099
- controller.send(:multi_url, 7, "hello", 5)
1100
- end
1101
-
1102
- def test_named_route_url_method_with_ordered_parameters_and_hash
1103
- controller = setup_named_route_test
1104
- assert_equal "http://test.host/people/go/7/hello/joe/5?baz=bar",
1105
- controller.send(:multi_url, 7, "hello", 5, baz: "bar")
1106
- end
1107
-
1108
- def test_named_route_url_method_with_ordered_parameters_and_empty_hash
1109
- controller = setup_named_route_test
1110
- assert_equal "http://test.host/people/go/7/hello/joe/5",
1111
- controller.send(:multi_url, 7, "hello", 5, {})
1112
- end
1113
-
1114
- def test_named_route_url_method_with_no_positional_arguments
1115
- controller = setup_named_route_test
1116
- assert_equal "http://test.host/people?baz=bar",
1117
- controller.send(:index_url, baz: "bar")
1118
- end
1119
-
1120
- def test_draw_default_route
1121
- set.draw do
1122
- ActiveSupport::Deprecation.silence do
1123
- get ":controller/:action/:id"
1124
- end
1125
- end
1126
-
1127
- assert_equal 1, set.routes.size
1128
-
1129
- assert_equal "/users/show/10", url_for(set, controller: "users", action: "show", id: 10)
1130
- assert_equal "/users/index/10", url_for(set, controller: "users", id: 10)
1131
-
1132
- assert_equal({ controller: "users", action: "index", id: "10" }, set.recognize_path("/users/index/10"))
1133
- assert_equal({ controller: "users", action: "index", id: "10" }, set.recognize_path("/users/index/10/"))
1134
- end
1135
-
1136
- def test_route_with_parameter_shell
1137
- set.draw do
1138
- get "page/:id" => "pages#show", :id => /\d+/
1139
-
1140
- ActiveSupport::Deprecation.silence do
1141
- get "/:controller(/:action(/:id))"
1142
- end
1143
- end
1144
-
1145
- assert_equal({ controller: "pages", action: "index" }, request_path_params("/pages"))
1146
- assert_equal({ controller: "pages", action: "index" }, request_path_params("/pages/index"))
1147
- assert_equal({ controller: "pages", action: "list" }, request_path_params("/pages/list"))
1148
-
1149
- assert_equal({ controller: "pages", action: "show", id: "10" }, request_path_params("/pages/show/10"))
1150
- assert_equal({ controller: "pages", action: "show", id: "10" }, request_path_params("/page/10"))
1151
- end
1152
-
1153
- def test_route_constraints_on_request_object_with_anchors_are_valid
1154
- assert_nothing_raised do
1155
- set.draw do
1156
- get "page/:id" => "pages#show", :constraints => { host: /^foo$/ }
1157
- end
1158
- end
1159
- end
1160
-
1161
- def test_route_constraints_with_anchor_chars_are_invalid
1162
- assert_raise ArgumentError do
1163
- set.draw do
1164
- get "page/:id" => "pages#show", :id => /^\d+/
1165
- end
1166
- end
1167
- assert_raise ArgumentError do
1168
- set.draw do
1169
- get "page/:id" => "pages#show", :id => /\A\d+/
1170
- end
1171
- end
1172
- assert_raise ArgumentError do
1173
- set.draw do
1174
- get "page/:id" => "pages#show", :id => /\d+$/
1175
- end
1176
- end
1177
- assert_raise ArgumentError do
1178
- set.draw do
1179
- get "page/:id" => "pages#show", :id => /\d+\Z/
1180
- end
1181
- end
1182
- assert_raise ArgumentError do
1183
- set.draw do
1184
- get "page/:id" => "pages#show", :id => /\d+\z/
1185
- end
1186
- end
1187
- end
1188
-
1189
- def test_route_constraints_with_options_method_condition_is_valid
1190
- assert_nothing_raised do
1191
- set.draw do
1192
- match "valid/route" => "pages#show", :via => :options
1193
- end
1194
- end
1195
- end
1196
-
1197
- def test_route_error_with_missing_controller
1198
- set.draw do
1199
- get "/people" => "missing#index"
1200
- end
1201
-
1202
- assert_raises(ActionController::RoutingError) { request_path_params "/people" }
1203
- end
1204
-
1205
- def test_recognize_with_encoded_id_and_regex
1206
- set.draw do
1207
- get "page/:id" => "pages#show", :id => /[a-zA-Z0-9\+]+/
1208
- end
1209
-
1210
- assert_equal({ controller: "pages", action: "show", id: "10" }, request_path_params("/page/10"))
1211
- assert_equal({ controller: "pages", action: "show", id: "hello+world" }, request_path_params("/page/hello+world"))
1212
- end
1213
-
1214
- def test_recognize_with_http_methods
1215
- set.draw do
1216
- get "/people" => "people#index", :as => "people"
1217
- post "/people" => "people#create"
1218
- get "/people/:id" => "people#show", :as => "person"
1219
- put "/people/:id" => "people#update"
1220
- patch "/people/:id" => "people#update"
1221
- delete "/people/:id" => "people#destroy"
1222
- end
1223
-
1224
- params = request_path_params("/people", method: :get)
1225
- assert_equal("index", params[:action])
1226
-
1227
- params = request_path_params("/people", method: :post)
1228
- assert_equal("create", params[:action])
1229
-
1230
- params = request_path_params("/people/5", method: :put)
1231
- assert_equal("update", params[:action])
1232
-
1233
- params = request_path_params("/people/5", method: :patch)
1234
- assert_equal("update", params[:action])
1235
-
1236
- assert_raise(ActionController::UnknownHttpMethod) {
1237
- request_path_params("/people", method: :bacon)
1238
- }
1239
-
1240
- params = request_path_params("/people/5", method: :get)
1241
- assert_equal("show", params[:action])
1242
- assert_equal("5", params[:id])
1243
-
1244
- params = request_path_params("/people/5", method: :put)
1245
- assert_equal("update", params[:action])
1246
- assert_equal("5", params[:id])
1247
-
1248
- params = request_path_params("/people/5", method: :patch)
1249
- assert_equal("update", params[:action])
1250
- assert_equal("5", params[:id])
1251
-
1252
- params = request_path_params("/people/5", method: :delete)
1253
- assert_equal("destroy", params[:action])
1254
- assert_equal("5", params[:id])
1255
-
1256
- assert_raise(ActionController::RoutingError) {
1257
- request_path_params("/people/5", method: :post)
1258
- }
1259
- end
1260
-
1261
- def test_recognize_with_alias_in_conditions
1262
- set.draw do
1263
- match "/people" => "people#index", :as => "people", :via => :get
1264
- root to: "people#index"
1265
- end
1266
-
1267
- params = request_path_params("/people", method: :get)
1268
- assert_equal("people", params[:controller])
1269
- assert_equal("index", params[:action])
1270
-
1271
- params = request_path_params("/", method: :get)
1272
- assert_equal("people", params[:controller])
1273
- assert_equal("index", params[:action])
1274
- end
1275
-
1276
- def test_typo_recognition
1277
- set.draw do
1278
- get "articles/:year/:month/:day/:title" => "articles#permalink",
1279
- :year => /\d{4}/, :day => /\d{1,2}/, :month => /\d{1,2}/
1280
- end
1281
-
1282
- params = request_path_params("/articles/2005/11/05/a-very-interesting-article", method: :get)
1283
- assert_equal("permalink", params[:action])
1284
- assert_equal("2005", params[:year])
1285
- assert_equal("11", params[:month])
1286
- assert_equal("05", params[:day])
1287
- assert_equal("a-very-interesting-article", params[:title])
1288
- end
1289
-
1290
- def test_routing_traversal_does_not_load_extra_classes
1291
- assert !Object.const_defined?("Profiler__"), "Profiler should not be loaded"
1292
- set.draw do
1293
- get "/profile" => "profile#index"
1294
- end
1295
-
1296
- request_path_params("/profile") rescue nil
1297
-
1298
- assert !Object.const_defined?("Profiler__"), "Profiler should not be loaded"
1299
- end
1300
-
1301
- def test_recognize_with_conditions_and_format
1302
- set.draw do
1303
- get "people/:id" => "people#show", :as => "person"
1304
- put "people/:id" => "people#update"
1305
- patch "people/:id" => "people#update"
1306
- get "people/:id(.:format)" => "people#show"
1307
- end
1308
-
1309
- params = request_path_params("/people/5", method: :get)
1310
- assert_equal("show", params[:action])
1311
- assert_equal("5", params[:id])
1312
-
1313
- params = request_path_params("/people/5", method: :put)
1314
- assert_equal("update", params[:action])
1315
-
1316
- params = request_path_params("/people/5", method: :patch)
1317
- assert_equal("update", params[:action])
1318
-
1319
- params = request_path_params("/people/5.png", method: :get)
1320
- assert_equal("show", params[:action])
1321
- assert_equal("5", params[:id])
1322
- assert_equal("png", params[:format])
1323
- end
1324
-
1325
- def test_generate_with_default_action
1326
- set.draw do
1327
- get "/people", controller: "people", action: "index"
1328
- get "/people/list", controller: "people", action: "list"
1329
- end
1330
-
1331
- url = url_for(set, controller: "people", action: "list")
1332
- assert_equal "/people/list", url
1333
- end
1334
-
1335
- def test_root_map
1336
- set.draw { root to: "people#index" }
1337
-
1338
- params = request_path_params("", method: :get)
1339
- assert_equal("people", params[:controller])
1340
- assert_equal("index", params[:action])
1341
- end
1342
-
1343
- def test_namespace
1344
- set.draw do
1345
-
1346
- namespace "api" do
1347
- get "inventory" => "products#inventory"
1348
- end
1349
-
1350
- end
1351
-
1352
- params = request_path_params("/api/inventory", method: :get)
1353
- assert_equal("api/products", params[:controller])
1354
- assert_equal("inventory", params[:action])
1355
- end
1356
-
1357
- def test_namespaced_root_map
1358
- set.draw do
1359
- namespace "api" do
1360
- root to: "products#index"
1361
- end
1362
- end
1363
-
1364
- params = request_path_params("/api", method: :get)
1365
- assert_equal("api/products", params[:controller])
1366
- assert_equal("index", params[:action])
1367
- end
1368
-
1369
- def test_namespace_with_path_prefix
1370
- set.draw do
1371
- scope module: "api", path: "prefix" do
1372
- get "inventory" => "products#inventory"
1373
- end
1374
- end
1375
-
1376
- params = request_path_params("/prefix/inventory", method: :get)
1377
- assert_equal("api/products", params[:controller])
1378
- assert_equal("inventory", params[:action])
1379
- end
1380
-
1381
- def test_namespace_with_blank_path_prefix
1382
- set.draw do
1383
- scope module: "api", path: "" do
1384
- get "inventory" => "products#inventory"
1385
- end
1386
- end
1387
-
1388
- params = request_path_params("/inventory", method: :get)
1389
- assert_equal("api/products", params[:controller])
1390
- assert_equal("inventory", params[:action])
1391
- end
1392
-
1393
- def test_id_is_sticky_when_it_ought_to_be
1394
- @set = make_set false
1395
-
1396
- set.draw do
1397
- ActiveSupport::Deprecation.silence do
1398
- get ":controller/:id/:action"
1399
- end
1400
- end
1401
-
1402
- get URI("http://test.host/people/7/show")
1403
-
1404
- assert_equal "/people/7/destroy", controller.url_for(action: "destroy", only_path: true)
1405
- end
1406
-
1407
- def test_use_static_path_when_possible
1408
- @set = make_set false
1409
-
1410
- set.draw do
1411
- get "about" => "welcome#about"
1412
-
1413
- ActiveSupport::Deprecation.silence do
1414
- get ":controller/:id/:action"
1415
- end
1416
- end
1417
-
1418
- get URI("http://test.host/welcom/get/7")
1419
-
1420
- assert_equal "/about", controller.url_for(controller: "welcome",
1421
- action: "about",
1422
- only_path: true)
1423
- end
1424
-
1425
- def test_generate
1426
- set.draw { ActiveSupport::Deprecation.silence { get ":controller/:action/:id" } }
1427
-
1428
- args = { controller: "foo", action: "bar", id: "7", x: "y" }
1429
- assert_equal "/foo/bar/7?x=y", url_for(set, args)
1430
- assert_equal ["/foo/bar/7", [:x]], set.generate_extras(args)
1431
- assert_equal [:x], set.extra_keys(args)
1432
- end
1433
-
1434
- def test_generate_with_path_prefix
1435
- set.draw do
1436
- scope "my" do
1437
- ActiveSupport::Deprecation.silence do
1438
- get ":controller(/:action(/:id))"
1439
- end
1440
- end
1441
- end
1442
-
1443
- args = { controller: "foo", action: "bar", id: "7", x: "y" }
1444
- assert_equal "/my/foo/bar/7?x=y", url_for(set, args)
1445
- end
1446
-
1447
- def test_generate_with_blank_path_prefix
1448
- set.draw do
1449
- scope "" do
1450
- ActiveSupport::Deprecation.silence do
1451
- get ":controller(/:action(/:id))"
1452
- end
1453
- end
1454
- end
1455
-
1456
- args = { controller: "foo", action: "bar", id: "7", x: "y" }
1457
- assert_equal "/foo/bar/7?x=y", url_for(set, args)
1458
- end
1459
-
1460
- def test_named_routes_are_never_relative_to_modules
1461
- @set = make_set false
1462
-
1463
- set.draw do
1464
- ActiveSupport::Deprecation.silence do
1465
- get "/connection/manage(/:action)" => "connection/manage#index"
1466
- get "/connection/connection" => "connection/connection#index"
1467
- get "/connection" => "connection#index", :as => "family_connection"
1468
- end
1469
- end
1470
-
1471
- assert_equal({ controller: "connection/manage",
1472
- action: "index", }, request_path_params("/connection/manage"))
1473
-
1474
- url = controller.url_for(controller: "connection", only_path: true)
1475
- assert_equal "/connection/connection", url
1476
-
1477
- url = controller.url_for(use_route: "family_connection",
1478
- controller: "connection", only_path: true)
1479
- assert_equal "/connection", url
1480
- end
1481
-
1482
- def test_action_left_off_when_id_is_recalled
1483
- @set = make_set false
1484
-
1485
- set.draw do
1486
- ActiveSupport::Deprecation.silence do
1487
- get ":controller(/:action(/:id))"
1488
- end
1489
- end
1490
-
1491
- get URI("http://test.host/books/show/10")
1492
-
1493
- assert_equal "/books", controller.url_for(controller: "books",
1494
- only_path: true,
1495
- action: "index")
1496
- end
1497
-
1498
- def test_query_params_will_be_shown_when_recalled
1499
- @set = make_set false
1500
-
1501
- set.draw do
1502
- get "show_weblog/:parameter" => "weblog#show"
1503
-
1504
- ActiveSupport::Deprecation.silence do
1505
- get ":controller(/:action(/:id))"
1506
- end
1507
- end
1508
-
1509
- get URI("http://test.host/weblog/show/1")
1510
-
1511
- assert_equal "/weblog/edit?parameter=1", controller.url_for(
1512
- action: "edit", parameter: 1, only_path: true)
1513
- end
1514
-
1515
- def test_format_is_not_inherit
1516
- set.draw do
1517
- get "/posts(.:format)" => "posts#index"
1518
- end
1519
-
1520
- get URI("http://test.host/posts.xml")
1521
- assert_equal({ controller: "posts", action: "index", format: "xml" },
1522
- controller.request.path_parameters)
1523
-
1524
- assert_equal "/posts", controller.url_for(
1525
- controller: "posts", only_path: true)
1526
-
1527
- assert_equal "/posts.xml", controller.url_for(
1528
- controller: "posts", format: "xml", only_path: true)
1529
- end
1530
-
1531
- def test_expiry_determination_should_consider_values_with_to_param
1532
- @set = make_set false
1533
-
1534
- set.draw { ActiveSupport::Deprecation.silence { get "projects/:project_id/:controller/:action" } }
1535
-
1536
- get URI("http://test.host/projects/1/weblog/show")
1537
-
1538
- assert_equal(
1539
- { controller: "weblog", action: "show", project_id: "1" },
1540
- controller.request.path_parameters)
1541
-
1542
- assert_equal "/projects/1/weblog/show",
1543
- controller.url_for(action: "show", project_id: 1, only_path: true)
1544
- end
1545
-
1546
- def test_named_route_in_nested_resource
1547
- set.draw do
1548
- resources :projects do
1549
- member do
1550
- get "milestones" => "milestones#index", :as => "milestones"
1551
- end
1552
- end
1553
- end
1554
-
1555
- params = set.recognize_path("/projects/1/milestones", method: :get)
1556
- assert_equal("milestones", params[:controller])
1557
- assert_equal("index", params[:action])
1558
- end
1559
-
1560
- def test_setting_root_in_namespace_using_symbol
1561
- assert_nothing_raised do
1562
- set.draw do
1563
- namespace :admin do
1564
- root to: "home#index"
1565
- end
1566
- end
1567
- end
1568
- end
1569
-
1570
- def test_setting_root_in_namespace_using_string
1571
- assert_nothing_raised do
1572
- set.draw do
1573
- namespace "admin" do
1574
- root to: "home#index"
1575
- end
1576
- end
1577
- end
1578
- end
1579
-
1580
- def test_route_constraints_with_unsupported_regexp_options_must_error
1581
- assert_raise ArgumentError do
1582
- set.draw do
1583
- get "page/:name" => "pages#show",
1584
- :constraints => { name: /(david|jamis)/m }
1585
- end
1586
- end
1587
- end
1588
-
1589
- def test_route_constraints_with_supported_options_must_not_error
1590
- assert_nothing_raised do
1591
- set.draw do
1592
- get "page/:name" => "pages#show",
1593
- :constraints => { name: /(david|jamis)/i }
1594
- end
1595
- end
1596
- assert_nothing_raised do
1597
- set.draw do
1598
- get "page/:name" => "pages#show",
1599
- :constraints => { name: / # Desperately overcommented regexp
1600
- ( #Either
1601
- david #The Creator
1602
- | #Or
1603
- jamis #The Deployer
1604
- )/x }
1605
- end
1606
- end
1607
- end
1608
-
1609
- def test_route_with_subdomain_and_constraints_must_receive_params
1610
- name_param = nil
1611
- set.draw do
1612
- get "page/:name" => "pages#show", :constraints => lambda { |request|
1613
- name_param = request.params[:name]
1614
- return true
1615
- }
1616
- end
1617
- assert_equal({ controller: "pages", action: "show", name: "mypage" },
1618
- set.recognize_path("http://subdomain.example.org/page/mypage"))
1619
- assert_equal(name_param, "mypage")
1620
- end
1621
-
1622
- def test_route_requirement_recognize_with_ignore_case
1623
- set.draw do
1624
- get "page/:name" => "pages#show",
1625
- :constraints => { name: /(david|jamis)/i }
1626
- end
1627
- assert_equal({ controller: "pages", action: "show", name: "jamis" }, set.recognize_path("/page/jamis"))
1628
- assert_raise ActionController::RoutingError do
1629
- set.recognize_path("/page/davidjamis")
1630
- end
1631
- assert_equal({ controller: "pages", action: "show", name: "DAVID" }, set.recognize_path("/page/DAVID"))
1632
- end
1633
-
1634
- def test_route_requirement_generate_with_ignore_case
1635
- set.draw do
1636
- get "page/:name" => "pages#show",
1637
- :constraints => { name: /(david|jamis)/i }
1638
- end
1639
-
1640
- url = url_for(set, controller: "pages", action: "show", name: "david")
1641
- assert_equal "/page/david", url
1642
- assert_raise(ActionController::UrlGenerationError) do
1643
- url_for(set, controller: "pages", action: "show", name: "davidjamis")
1644
- end
1645
- url = url_for(set, controller: "pages", action: "show", name: "JAMIS")
1646
- assert_equal "/page/JAMIS", url
1647
- end
1648
-
1649
- def test_route_requirement_recognize_with_extended_syntax
1650
- set.draw do
1651
- get "page/:name" => "pages#show",
1652
- :constraints => { name: / # Desperately overcommented regexp
1653
- ( #Either
1654
- david #The Creator
1655
- | #Or
1656
- jamis #The Deployer
1657
- )/x }
1658
- end
1659
- assert_equal({ controller: "pages", action: "show", name: "jamis" }, set.recognize_path("/page/jamis"))
1660
- assert_equal({ controller: "pages", action: "show", name: "david" }, set.recognize_path("/page/david"))
1661
- assert_raise ActionController::RoutingError do
1662
- set.recognize_path("/page/david #The Creator")
1663
- end
1664
- assert_raise ActionController::RoutingError do
1665
- set.recognize_path("/page/David")
1666
- end
1667
- end
1668
-
1669
- def test_route_requirement_with_xi_modifiers
1670
- set.draw do
1671
- get "page/:name" => "pages#show",
1672
- :constraints => { name: / # Desperately overcommented regexp
1673
- ( #Either
1674
- david #The Creator
1675
- | #Or
1676
- jamis #The Deployer
1677
- )/xi }
1678
- end
1679
-
1680
- assert_equal({ controller: "pages", action: "show", name: "JAMIS" },
1681
- set.recognize_path("/page/JAMIS"))
1682
-
1683
- assert_equal "/page/JAMIS",
1684
- url_for(set, controller: "pages", action: "show", name: "JAMIS")
1685
- end
1686
-
1687
- def test_routes_with_symbols
1688
- set.draw do
1689
- get "unnamed", controller: :pages, action: :show, name: :as_symbol
1690
- get "named", controller: :pages, action: :show, name: :as_symbol, as: :named
1691
- end
1692
- assert_equal({ controller: "pages", action: "show", name: :as_symbol }, set.recognize_path("/unnamed"))
1693
- assert_equal({ controller: "pages", action: "show", name: :as_symbol }, set.recognize_path("/named"))
1694
- end
1695
-
1696
- def test_regexp_chunk_should_add_question_mark_for_optionals
1697
- set.draw do
1698
- get "/" => "foo#index"
1699
- get "/hello" => "bar#index"
1700
- end
1701
-
1702
- assert_equal "/", url_for(set, controller: "foo")
1703
- assert_equal "/hello", url_for(set, controller: "bar")
1704
-
1705
- assert_equal({ controller: "foo", action: "index" }, set.recognize_path("/"))
1706
- assert_equal({ controller: "bar", action: "index" }, set.recognize_path("/hello"))
1707
- end
1708
-
1709
- def test_assign_route_options_with_anchor_chars
1710
- set.draw do
1711
- ActiveSupport::Deprecation.silence do
1712
- get "/cars/:action/:person/:car/", controller: "cars"
1713
- end
1714
- end
1715
-
1716
- assert_equal "/cars/buy/1/2", url_for(set, controller: "cars", action: "buy", person: "1", car: "2")
1717
-
1718
- assert_equal({ controller: "cars", action: "buy", person: "1", car: "2" }, set.recognize_path("/cars/buy/1/2"))
1719
- end
1720
-
1721
- def test_segmentation_of_dot_path
1722
- set.draw do
1723
- ActiveSupport::Deprecation.silence do
1724
- get "/books/:action.rss", controller: "books"
1725
- end
1726
- end
1727
-
1728
- assert_equal "/books/list.rss", url_for(set, controller: "books", action: "list")
1729
-
1730
- assert_equal({ controller: "books", action: "list" }, set.recognize_path("/books/list.rss"))
1731
- end
1732
-
1733
- def test_segmentation_of_dynamic_dot_path
1734
- set.draw do
1735
- ActiveSupport::Deprecation.silence do
1736
- get "/books(/:action(.:format))", controller: "books"
1737
- end
1738
- end
1739
-
1740
- assert_equal "/books/list.rss", url_for(set, controller: "books", action: "list", format: "rss")
1741
- assert_equal "/books/list.xml", url_for(set, controller: "books", action: "list", format: "xml")
1742
- assert_equal "/books/list", url_for(set, controller: "books", action: "list")
1743
- assert_equal "/books", url_for(set, controller: "books", action: "index")
1744
-
1745
- assert_equal({ controller: "books", action: "list", format: "rss" }, set.recognize_path("/books/list.rss"))
1746
- assert_equal({ controller: "books", action: "list", format: "xml" }, set.recognize_path("/books/list.xml"))
1747
- assert_equal({ controller: "books", action: "list" }, set.recognize_path("/books/list"))
1748
- assert_equal({ controller: "books", action: "index" }, set.recognize_path("/books"))
1749
- end
1750
-
1751
- def test_slashes_are_implied
1752
- set.draw { ActiveSupport::Deprecation.silence { get("/:controller(/:action(/:id))") } }
1753
-
1754
- assert_equal "/content", url_for(set, controller: "content", action: "index")
1755
- assert_equal "/content/list", url_for(set, controller: "content", action: "list")
1756
- assert_equal "/content/show/1", url_for(set, controller: "content", action: "show", id: "1")
1757
-
1758
- assert_equal({ controller: "content", action: "index" }, set.recognize_path("/content"))
1759
- assert_equal({ controller: "content", action: "index" }, set.recognize_path("/content/index"))
1760
- assert_equal({ controller: "content", action: "list" }, set.recognize_path("/content/list"))
1761
- assert_equal({ controller: "content", action: "show", id: "1" }, set.recognize_path("/content/show/1"))
1762
- end
1763
-
1764
- def test_default_route_recognition
1765
- expected = { controller: "pages", action: "show", id: "10" }
1766
- assert_equal expected, default_route_set.recognize_path("/pages/show/10")
1767
- assert_equal expected, default_route_set.recognize_path("/pages/show/10/")
1768
-
1769
- expected[:id] = "jamis"
1770
- assert_equal expected, default_route_set.recognize_path("/pages/show/jamis/")
1771
-
1772
- expected.delete :id
1773
- assert_equal expected, default_route_set.recognize_path("/pages/show")
1774
- assert_equal expected, default_route_set.recognize_path("/pages/show/")
1775
-
1776
- expected[:action] = "index"
1777
- assert_equal expected, default_route_set.recognize_path("/pages/")
1778
- assert_equal expected, default_route_set.recognize_path("/pages")
1779
-
1780
- assert_raise(ActionController::RoutingError) { default_route_set.recognize_path("/") }
1781
- assert_raise(ActionController::RoutingError) { default_route_set.recognize_path("/pages/how/goood/it/is/to/be/free") }
1782
- end
1783
-
1784
- def test_default_route_should_omit_default_action
1785
- assert_equal "/accounts", url_for(default_route_set, controller: "accounts", action: "index")
1786
- end
1787
-
1788
- def test_default_route_should_include_default_action_when_id_present
1789
- assert_equal "/accounts/index/20", url_for(default_route_set, controller: "accounts", action: "index", id: "20")
1790
- end
1791
-
1792
- def test_default_route_should_work_with_action_but_no_id
1793
- assert_equal "/accounts/list_all", url_for(default_route_set, controller: "accounts", action: "list_all")
1794
- end
1795
-
1796
- def test_default_route_should_uri_escape_pluses
1797
- expected = { controller: "pages", action: "show", id: "hello world" }
1798
- assert_equal expected, default_route_set.recognize_path("/pages/show/hello%20world")
1799
- assert_equal "/pages/show/hello%20world", url_for(default_route_set, expected)
1800
-
1801
- expected[:id] = "hello+world"
1802
- assert_equal expected, default_route_set.recognize_path("/pages/show/hello+world")
1803
- assert_equal expected, default_route_set.recognize_path("/pages/show/hello%2Bworld")
1804
- assert_equal "/pages/show/hello+world", url_for(default_route_set, expected)
1805
- end
1806
-
1807
- def test_build_empty_query_string
1808
- assert_uri_equal "/foo", url_for(default_route_set, controller: "foo")
1809
- end
1810
-
1811
- def test_build_query_string_with_nil_value
1812
- assert_uri_equal "/foo", url_for(default_route_set, controller: "foo", x: nil)
1813
- end
1814
-
1815
- def test_simple_build_query_string
1816
- assert_uri_equal "/foo?x=1&y=2", url_for(default_route_set, controller: "foo", x: "1", y: "2")
1817
- end
1818
-
1819
- def test_convert_ints_build_query_string
1820
- assert_uri_equal "/foo?x=1&y=2", url_for(default_route_set, controller: "foo", x: 1, y: 2)
1821
- end
1822
-
1823
- def test_escape_spaces_build_query_string
1824
- assert_uri_equal "/foo?x=hello+world&y=goodbye+world", url_for(default_route_set, controller: "foo", x: "hello world", y: "goodbye world")
1825
- end
1826
-
1827
- def test_expand_array_build_query_string
1828
- assert_uri_equal "/foo?x%5B%5D=1&x%5B%5D=2", url_for(default_route_set, controller: "foo", x: [1, 2])
1829
- end
1830
-
1831
- def test_escape_spaces_build_query_string_selected_keys
1832
- assert_uri_equal "/foo?x=hello+world", url_for(default_route_set, controller: "foo", x: "hello world")
1833
- end
1834
-
1835
- def test_generate_with_default_params
1836
- set.draw do
1837
- get "dummy/page/:page" => "dummy#show"
1838
- get "dummy/dots/page.:page" => "dummy#dots"
1839
- get "ibocorp(/:page)" => "ibocorp#show",
1840
- :constraints => { page: /\d+/ },
1841
- :defaults => { page: 1 }
1842
-
1843
- ActiveSupport::Deprecation.silence do
1844
- get ":controller/:action/:id"
1845
- end
1846
- end
1847
-
1848
- assert_equal "/ibocorp", url_for(set, controller: "ibocorp", action: "show", page: 1)
1849
- end
1850
-
1851
- include ActionDispatch::RoutingVerbs
1852
-
1853
- alias :routes :set
1854
-
1855
- def test_generate_with_optional_params_recalls_last_request
1856
- @set = make_set false
1857
-
1858
- set.draw do
1859
- get "blog/", controller: "blog", action: "index"
1860
-
1861
- get "blog(/:year(/:month(/:day)))",
1862
- controller: "blog",
1863
- action: "show_date",
1864
- constraints: { year: /(19|20)\d\d/, month: /[01]?\d/, day: /[0-3]?\d/ },
1865
- day: nil, month: nil
1866
-
1867
- get "blog/show/:id", controller: "blog", action: "show", id: /\d+/
1868
-
1869
- ActiveSupport::Deprecation.silence do
1870
- get "blog/:controller/:action(/:id)"
1871
- end
1872
-
1873
- get "*anything", controller: "blog", action: "unknown_request"
1874
- end
1875
-
1876
- recognize_path = ->(path) {
1877
- get(URI("http://example.org" + path))
1878
- controller.request.path_parameters
1879
- }
1880
-
1881
- assert_equal({ controller: "blog", action: "index" }, recognize_path.("/blog"))
1882
- assert_equal({ controller: "blog", action: "show", id: "123" }, recognize_path.("/blog/show/123"))
1883
- assert_equal({ controller: "blog", action: "show_date", year: "2004", day: nil, month: nil }, recognize_path.("/blog/2004"))
1884
- assert_equal({ controller: "blog", action: "show_date", year: "2004", month: "12", day: nil }, recognize_path.("/blog/2004/12"))
1885
- assert_equal({ controller: "blog", action: "show_date", year: "2004", month: "12", day: "25" }, recognize_path.("/blog/2004/12/25"))
1886
- assert_equal({ controller: "articles", action: "edit", id: "123" }, recognize_path.("/blog/articles/edit/123"))
1887
- assert_equal({ controller: "articles", action: "show_stats" }, recognize_path.("/blog/articles/show_stats"))
1888
- assert_equal({ controller: "blog", action: "unknown_request", anything: "blog/wibble" }, recognize_path.("/blog/wibble"))
1889
- assert_equal({ controller: "blog", action: "unknown_request", anything: "junk" }, recognize_path.("/junk"))
1890
-
1891
- get URI("http://example.org/blog/2006/07/28")
1892
-
1893
- assert_equal({ controller: "blog", action: "show_date", year: "2006", month: "07", day: "28" }, controller.request.path_parameters)
1894
- assert_equal("/blog/2006/07/25", controller.url_for(day: 25, only_path: true))
1895
- assert_equal("/blog/2005", controller.url_for(year: 2005, only_path: true))
1896
- assert_equal("/blog/show/123", controller.url_for(action: "show", id: 123, only_path: true))
1897
- assert_equal("/blog/2006", controller.url_for(year: 2006, only_path: true))
1898
- assert_equal("/blog/2006", controller.url_for(year: 2006, month: nil, only_path: true))
1899
- end
1900
-
1901
- private
1902
- def assert_uri_equal(expected, actual)
1903
- assert_equal(sort_query_string_params(expected), sort_query_string_params(actual))
1904
- end
1905
-
1906
- def sort_query_string_params(uri)
1907
- path, qs = uri.split("?")
1908
- qs = qs.split("&").sort.join("&") if qs
1909
- qs ? "#{path}?#{qs}" : path
1910
- end
1911
- end
1912
-
1913
- class RackMountIntegrationTests < ActiveSupport::TestCase
1914
- include RoutingTestHelpers
1915
-
1916
- Model = Struct.new(:to_param)
1917
-
1918
- Mapping = lambda {
1919
- namespace :admin do
1920
- resources :users, :posts
1921
- end
1922
-
1923
- namespace "api" do
1924
- root to: "users#index"
1925
- end
1926
-
1927
- get "/blog(/:year(/:month(/:day)))" => "posts#show_date",
1928
- :constraints => {
1929
- year: /(19|20)\d\d/,
1930
- month: /[01]?\d/,
1931
- day: /[0-3]?\d/
1932
- },
1933
- :day => nil,
1934
- :month => nil
1935
-
1936
- get "archive/:year", controller: "archive", action: "index",
1937
- defaults: { year: nil },
1938
- constraints: { year: /\d{4}/ },
1939
- as: "blog"
1940
-
1941
- resources :people
1942
- get "legacy/people" => "people#index", :legacy => "true"
1943
-
1944
- get "symbols", controller: :symbols, action: :show, name: :as_symbol
1945
- get "id_default(/:id)" => "foo#id_default", :id => 1
1946
- match "get_or_post" => "foo#get_or_post", :via => [:get, :post]
1947
- get "optional/:optional" => "posts#index"
1948
- get "projects/:project_id" => "project#index", :as => "project"
1949
- get "clients" => "projects#index"
1950
-
1951
- get "ignorecase/geocode/:postalcode" => "geocode#show", :postalcode => /hx\d\d-\d[a-z]{2}/i
1952
- get "extended/geocode/:postalcode" => "geocode#show", :constraints => {
1953
- postalcode: /# Postcode format
1954
- \d{5} #Prefix
1955
- (-\d{4})? #Suffix
1956
- /x
1957
- }, :as => "geocode"
1958
-
1959
- get "news(.:format)" => "news#index"
1960
-
1961
- ActiveSupport::Deprecation.silence do
1962
- get "comment/:id(/:action)" => "comments#show"
1963
- get "ws/:controller(/:action(/:id))", ws: true
1964
- get "account(/:action)" => "account#subscription"
1965
- get "pages/:page_id/:controller(/:action(/:id))"
1966
- get ":controller/ping", action: "ping"
1967
- end
1968
-
1969
- get "こんにちは/世界", controller: "news", action: "index"
1970
-
1971
- ActiveSupport::Deprecation.silence do
1972
- match ":controller(/:action(/:id))(.:format)", via: :all
1973
- end
1974
-
1975
- root to: "news#index"
1976
- }
1977
-
1978
- attr_reader :routes
1979
- attr_reader :controller
1980
-
1981
- def setup
1982
- @routes = ActionDispatch::Routing::RouteSet.new
1983
- @routes.draw(&Mapping)
1984
- end
1985
-
1986
- def test_recognize_path
1987
- assert_equal({ controller: "admin/users", action: "index" }, @routes.recognize_path("/admin/users", method: :get))
1988
- assert_equal({ controller: "admin/users", action: "create" }, @routes.recognize_path("/admin/users", method: :post))
1989
- assert_equal({ controller: "admin/users", action: "new" }, @routes.recognize_path("/admin/users/new", method: :get))
1990
- assert_equal({ controller: "admin/users", action: "show", id: "1" }, @routes.recognize_path("/admin/users/1", method: :get))
1991
- assert_equal({ controller: "admin/users", action: "update", id: "1" }, @routes.recognize_path("/admin/users/1", method: :put))
1992
- assert_equal({ controller: "admin/users", action: "destroy", id: "1" }, @routes.recognize_path("/admin/users/1", method: :delete))
1993
- assert_equal({ controller: "admin/users", action: "edit", id: "1" }, @routes.recognize_path("/admin/users/1/edit", method: :get))
1994
-
1995
- assert_equal({ controller: "admin/posts", action: "index" }, @routes.recognize_path("/admin/posts", method: :get))
1996
- assert_equal({ controller: "admin/posts", action: "new" }, @routes.recognize_path("/admin/posts/new", method: :get))
1997
-
1998
- assert_equal({ controller: "api/users", action: "index" }, @routes.recognize_path("/api", method: :get))
1999
- assert_equal({ controller: "api/users", action: "index" }, @routes.recognize_path("/api/", method: :get))
2000
-
2001
- assert_equal({ controller: "posts", action: "show_date", year: "2009", month: nil, day: nil }, @routes.recognize_path("/blog/2009", method: :get))
2002
- assert_equal({ controller: "posts", action: "show_date", year: "2009", month: "01", day: nil }, @routes.recognize_path("/blog/2009/01", method: :get))
2003
- assert_equal({ controller: "posts", action: "show_date", year: "2009", month: "01", day: "01" }, @routes.recognize_path("/blog/2009/01/01", method: :get))
2004
-
2005
- assert_equal({ controller: "archive", action: "index", year: "2010" }, @routes.recognize_path("/archive/2010"))
2006
- assert_equal({ controller: "archive", action: "index" }, @routes.recognize_path("/archive"))
2007
-
2008
- assert_equal({ controller: "people", action: "index" }, @routes.recognize_path("/people", method: :get))
2009
- assert_equal({ controller: "people", action: "index", format: "xml" }, @routes.recognize_path("/people.xml", method: :get))
2010
- assert_equal({ controller: "people", action: "create" }, @routes.recognize_path("/people", method: :post))
2011
- assert_equal({ controller: "people", action: "new" }, @routes.recognize_path("/people/new", method: :get))
2012
- assert_equal({ controller: "people", action: "show", id: "1" }, @routes.recognize_path("/people/1", method: :get))
2013
- assert_equal({ controller: "people", action: "show", id: "1", format: "xml" }, @routes.recognize_path("/people/1.xml", method: :get))
2014
- assert_equal({ controller: "people", action: "update", id: "1" }, @routes.recognize_path("/people/1", method: :put))
2015
- assert_equal({ controller: "people", action: "destroy", id: "1" }, @routes.recognize_path("/people/1", method: :delete))
2016
- assert_equal({ controller: "people", action: "edit", id: "1" }, @routes.recognize_path("/people/1/edit", method: :get))
2017
- assert_equal({ controller: "people", action: "edit", id: "1", format: "xml" }, @routes.recognize_path("/people/1/edit.xml", method: :get))
2018
-
2019
- assert_equal({ controller: "symbols", action: "show", name: :as_symbol }, @routes.recognize_path("/symbols"))
2020
- assert_equal({ controller: "foo", action: "id_default", id: "1" }, @routes.recognize_path("/id_default/1"))
2021
- assert_equal({ controller: "foo", action: "id_default", id: "2" }, @routes.recognize_path("/id_default/2"))
2022
- assert_equal({ controller: "foo", action: "id_default", id: 1 }, @routes.recognize_path("/id_default"))
2023
- assert_equal({ controller: "foo", action: "get_or_post" }, @routes.recognize_path("/get_or_post", method: :get))
2024
- assert_equal({ controller: "foo", action: "get_or_post" }, @routes.recognize_path("/get_or_post", method: :post))
2025
- assert_raise(ActionController::RoutingError) { @routes.recognize_path("/get_or_post", method: :put) }
2026
- assert_raise(ActionController::RoutingError) { @routes.recognize_path("/get_or_post", method: :delete) }
2027
-
2028
- assert_equal({ controller: "posts", action: "index", optional: "bar" }, @routes.recognize_path("/optional/bar"))
2029
- assert_raise(ActionController::RoutingError) { @routes.recognize_path("/optional") }
2030
-
2031
- assert_equal({ controller: "posts", action: "show", id: "1", ws: true }, @routes.recognize_path("/ws/posts/show/1", method: :get))
2032
- assert_equal({ controller: "posts", action: "list", ws: true }, @routes.recognize_path("/ws/posts/list", method: :get))
2033
- assert_equal({ controller: "posts", action: "index", ws: true }, @routes.recognize_path("/ws/posts", method: :get))
2034
-
2035
- assert_equal({ controller: "account", action: "subscription" }, @routes.recognize_path("/account", method: :get))
2036
- assert_equal({ controller: "account", action: "subscription" }, @routes.recognize_path("/account/subscription", method: :get))
2037
- assert_equal({ controller: "account", action: "billing" }, @routes.recognize_path("/account/billing", method: :get))
2038
-
2039
- assert_equal({ page_id: "1", controller: "notes", action: "index" }, @routes.recognize_path("/pages/1/notes", method: :get))
2040
- assert_equal({ page_id: "1", controller: "notes", action: "list" }, @routes.recognize_path("/pages/1/notes/list", method: :get))
2041
- assert_equal({ page_id: "1", controller: "notes", action: "show", id: "2" }, @routes.recognize_path("/pages/1/notes/show/2", method: :get))
2042
-
2043
- assert_equal({ controller: "posts", action: "ping" }, @routes.recognize_path("/posts/ping", method: :get))
2044
- assert_equal({ controller: "posts", action: "index" }, @routes.recognize_path("/posts", method: :get))
2045
- assert_equal({ controller: "posts", action: "index" }, @routes.recognize_path("/posts/index", method: :get))
2046
- assert_equal({ controller: "posts", action: "show" }, @routes.recognize_path("/posts/show", method: :get))
2047
- assert_equal({ controller: "posts", action: "show", id: "1" }, @routes.recognize_path("/posts/show/1", method: :get))
2048
- assert_equal({ controller: "posts", action: "create" }, @routes.recognize_path("/posts/create", method: :post))
2049
-
2050
- assert_equal({ controller: "geocode", action: "show", postalcode: "hx12-1az" }, @routes.recognize_path("/ignorecase/geocode/hx12-1az"))
2051
- assert_equal({ controller: "geocode", action: "show", postalcode: "hx12-1AZ" }, @routes.recognize_path("/ignorecase/geocode/hx12-1AZ"))
2052
- assert_equal({ controller: "geocode", action: "show", postalcode: "12345-1234" }, @routes.recognize_path("/extended/geocode/12345-1234"))
2053
- assert_equal({ controller: "geocode", action: "show", postalcode: "12345" }, @routes.recognize_path("/extended/geocode/12345"))
2054
-
2055
- assert_equal({ controller: "news", action: "index" }, @routes.recognize_path("/", method: :get))
2056
- assert_equal({ controller: "news", action: "index", format: "rss" }, @routes.recognize_path("/news.rss", method: :get))
2057
-
2058
- assert_raise(ActionController::RoutingError) { @routes.recognize_path("/none", method: :get) }
2059
- end
2060
-
2061
- def test_generate_extras
2062
- assert_equal ["/people", []], @routes.generate_extras(controller: "people")
2063
- assert_equal ["/people", [:foo]], @routes.generate_extras(controller: "people", foo: "bar")
2064
- assert_equal ["/people", []], @routes.generate_extras(controller: "people", action: "index")
2065
- assert_equal ["/people", [:foo]], @routes.generate_extras(controller: "people", action: "index", foo: "bar")
2066
- assert_equal ["/people/new", []], @routes.generate_extras(controller: "people", action: "new")
2067
- assert_equal ["/people/new", [:foo]], @routes.generate_extras(controller: "people", action: "new", foo: "bar")
2068
- assert_equal ["/people/1", []], @routes.generate_extras(controller: "people", action: "show", id: "1")
2069
- assert_equal ["/people/1", [:bar, :foo]], sort_extras!(@routes.generate_extras(controller: "people", action: "show", id: "1", foo: "2", bar: "3"))
2070
- assert_equal ["/people", [:person]], @routes.generate_extras(controller: "people", action: "create", person: { first_name: "Josh", last_name: "Peek" })
2071
- assert_equal ["/people", [:people]], @routes.generate_extras(controller: "people", action: "create", people: ["Josh", "Dave"])
2072
-
2073
- assert_equal ["/posts/show/1", []], @routes.generate_extras(controller: "posts", action: "show", id: "1")
2074
- assert_equal ["/posts/show/1", [:bar, :foo]], sort_extras!(@routes.generate_extras(controller: "posts", action: "show", id: "1", foo: "2", bar: "3"))
2075
- assert_equal ["/posts", []], @routes.generate_extras(controller: "posts", action: "index")
2076
- assert_equal ["/posts", [:foo]], @routes.generate_extras(controller: "posts", action: "index", foo: "bar")
2077
- end
2078
-
2079
- def test_extras
2080
- params = { controller: "people" }
2081
- assert_equal [], @routes.extra_keys(params)
2082
- assert_equal({ controller: "people", action: "index" }, params)
2083
-
2084
- params = { controller: "people", foo: "bar" }
2085
- assert_equal [:foo], @routes.extra_keys(params)
2086
- assert_equal({ controller: "people", action: "index", foo: "bar" }, params)
2087
-
2088
- params = { controller: "people", action: "create", person: { name: "Josh" } }
2089
- assert_equal [:person], @routes.extra_keys(params)
2090
- assert_equal({ controller: "people", action: "create", person: { name: "Josh" } }, params)
2091
- end
2092
-
2093
- def test_unicode_path
2094
- assert_equal({ controller: "news", action: "index" }, @routes.recognize_path(URI.parser.escape("こんにちは/世界"), method: :get))
2095
- end
2096
-
2097
- def test_downcased_unicode_path
2098
- assert_equal({ controller: "news", action: "index" }, @routes.recognize_path(URI.parser.escape("こんにちは/世界").downcase, method: :get))
2099
- end
2100
-
2101
- private
2102
- def sort_extras!(extras)
2103
- if extras.length == 2
2104
- extras[1].sort! { |a, b| a.to_s <=> b.to_s }
2105
- end
2106
- extras
2107
- end
2108
- end