actionpack 4.2.10 → 5.0.0

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 (131) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +553 -401
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +2 -3
  5. data/lib/abstract_controller/base.rb +28 -38
  6. data/lib/{action_controller → abstract_controller}/caching/fragments.rb +51 -11
  7. data/lib/abstract_controller/caching.rb +62 -0
  8. data/lib/abstract_controller/callbacks.rb +52 -19
  9. data/lib/abstract_controller/collector.rb +4 -9
  10. data/lib/abstract_controller/error.rb +4 -0
  11. data/lib/abstract_controller/helpers.rb +4 -3
  12. data/lib/abstract_controller/railties/routes_helpers.rb +2 -2
  13. data/lib/abstract_controller/rendering.rb +28 -18
  14. data/lib/abstract_controller/translation.rb +8 -7
  15. data/lib/abstract_controller.rb +6 -2
  16. data/lib/action_controller/api/api_rendering.rb +14 -0
  17. data/lib/action_controller/api.rb +147 -0
  18. data/lib/action_controller/base.rb +10 -13
  19. data/lib/action_controller/caching.rb +13 -58
  20. data/lib/action_controller/form_builder.rb +48 -0
  21. data/lib/action_controller/log_subscriber.rb +3 -10
  22. data/lib/action_controller/metal/basic_implicit_render.rb +11 -0
  23. data/lib/action_controller/metal/conditional_get.rb +106 -34
  24. data/lib/action_controller/metal/cookies.rb +1 -3
  25. data/lib/action_controller/metal/data_streaming.rb +11 -32
  26. data/lib/action_controller/metal/etag_with_template_digest.rb +1 -1
  27. data/lib/action_controller/metal/exceptions.rb +11 -6
  28. data/lib/action_controller/metal/force_ssl.rb +10 -10
  29. data/lib/action_controller/metal/head.rb +14 -8
  30. data/lib/action_controller/metal/helpers.rb +15 -6
  31. data/lib/action_controller/metal/http_authentication.rb +44 -35
  32. data/lib/action_controller/metal/implicit_render.rb +61 -6
  33. data/lib/action_controller/metal/instrumentation.rb +5 -5
  34. data/lib/action_controller/metal/live.rb +66 -88
  35. data/lib/action_controller/metal/mime_responds.rb +27 -42
  36. data/lib/action_controller/metal/params_wrapper.rb +8 -8
  37. data/lib/action_controller/metal/redirecting.rb +32 -9
  38. data/lib/action_controller/metal/renderers.rb +85 -40
  39. data/lib/action_controller/metal/rendering.rb +38 -6
  40. data/lib/action_controller/metal/request_forgery_protection.rb +126 -48
  41. data/lib/action_controller/metal/rescue.rb +3 -12
  42. data/lib/action_controller/metal/streaming.rb +4 -4
  43. data/lib/action_controller/metal/strong_parameters.rb +293 -90
  44. data/lib/action_controller/metal/testing.rb +1 -12
  45. data/lib/action_controller/metal/url_for.rb +12 -5
  46. data/lib/action_controller/metal.rb +88 -63
  47. data/lib/action_controller/renderer.rb +111 -0
  48. data/lib/action_controller/template_assertions.rb +9 -0
  49. data/lib/action_controller/test_case.rb +288 -368
  50. data/lib/action_controller.rb +12 -9
  51. data/lib/action_dispatch/http/cache.rb +73 -34
  52. data/lib/action_dispatch/http/filter_parameters.rb +15 -11
  53. data/lib/action_dispatch/http/filter_redirect.rb +7 -8
  54. data/lib/action_dispatch/http/headers.rb +44 -13
  55. data/lib/action_dispatch/http/mime_negotiation.rb +41 -23
  56. data/lib/action_dispatch/http/mime_type.rb +126 -90
  57. data/lib/action_dispatch/http/mime_types.rb +3 -4
  58. data/lib/action_dispatch/http/parameter_filter.rb +18 -8
  59. data/lib/action_dispatch/http/parameters.rb +54 -41
  60. data/lib/action_dispatch/http/request.rb +149 -82
  61. data/lib/action_dispatch/http/response.rb +206 -102
  62. data/lib/action_dispatch/http/url.rb +117 -8
  63. data/lib/action_dispatch/journey/formatter.rb +39 -28
  64. data/lib/action_dispatch/journey/gtg/transition_table.rb +1 -1
  65. data/lib/action_dispatch/journey/nfa/dot.rb +0 -2
  66. data/lib/action_dispatch/journey/nfa/transition_table.rb +1 -46
  67. data/lib/action_dispatch/journey/nodes/node.rb +14 -4
  68. data/lib/action_dispatch/journey/parser_extras.rb +4 -0
  69. data/lib/action_dispatch/journey/path/pattern.rb +38 -42
  70. data/lib/action_dispatch/journey/route.rb +74 -19
  71. data/lib/action_dispatch/journey/router/utils.rb +5 -5
  72. data/lib/action_dispatch/journey/router.rb +5 -9
  73. data/lib/action_dispatch/journey/routes.rb +14 -15
  74. data/lib/action_dispatch/journey/visitors.rb +86 -43
  75. data/lib/action_dispatch/middleware/callbacks.rb +10 -1
  76. data/lib/action_dispatch/middleware/cookies.rb +189 -135
  77. data/lib/action_dispatch/middleware/debug_exceptions.rb +124 -49
  78. data/lib/action_dispatch/middleware/exception_wrapper.rb +21 -21
  79. data/lib/action_dispatch/middleware/executor.rb +19 -0
  80. data/lib/action_dispatch/middleware/flash.rb +66 -45
  81. data/lib/action_dispatch/middleware/params_parser.rb +32 -46
  82. data/lib/action_dispatch/middleware/public_exceptions.rb +2 -2
  83. data/lib/action_dispatch/middleware/reloader.rb +14 -58
  84. data/lib/action_dispatch/middleware/remote_ip.rb +29 -19
  85. data/lib/action_dispatch/middleware/request_id.rb +11 -6
  86. data/lib/action_dispatch/middleware/session/abstract_store.rb +23 -11
  87. data/lib/action_dispatch/middleware/session/cache_store.rb +9 -6
  88. data/lib/action_dispatch/middleware/session/cookie_store.rb +30 -24
  89. data/lib/action_dispatch/middleware/session/mem_cache_store.rb +4 -0
  90. data/lib/action_dispatch/middleware/show_exceptions.rb +11 -9
  91. data/lib/action_dispatch/middleware/ssl.rb +115 -36
  92. data/lib/action_dispatch/middleware/stack.rb +44 -40
  93. data/lib/action_dispatch/middleware/static.rb +51 -35
  94. data/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb +2 -14
  95. data/lib/action_dispatch/middleware/templates/rescues/_source.text.erb +8 -0
  96. data/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb +1 -1
  97. data/lib/action_dispatch/middleware/templates/rescues/template_error.text.erb +1 -1
  98. data/lib/action_dispatch/middleware/templates/routes/_route.html.erb +4 -4
  99. data/lib/action_dispatch/middleware/templates/routes/_table.html.erb +59 -63
  100. data/lib/action_dispatch/railtie.rb +2 -2
  101. data/lib/action_dispatch/request/session.rb +69 -33
  102. data/lib/action_dispatch/request/utils.rb +51 -19
  103. data/lib/action_dispatch/routing/inspector.rb +32 -43
  104. data/lib/action_dispatch/routing/mapper.rb +491 -338
  105. data/lib/action_dispatch/routing/polymorphic_routes.rb +8 -14
  106. data/lib/action_dispatch/routing/redirection.rb +3 -3
  107. data/lib/action_dispatch/routing/route_set.rb +145 -238
  108. data/lib/action_dispatch/routing/url_for.rb +27 -10
  109. data/lib/action_dispatch/routing.rb +17 -13
  110. data/lib/action_dispatch/testing/assertion_response.rb +45 -0
  111. data/lib/action_dispatch/testing/assertions/response.rb +38 -20
  112. data/lib/action_dispatch/testing/assertions/routing.rb +11 -10
  113. data/lib/action_dispatch/testing/assertions.rb +1 -1
  114. data/lib/action_dispatch/testing/integration.rb +368 -97
  115. data/lib/action_dispatch/testing/test_process.rb +5 -6
  116. data/lib/action_dispatch/testing/test_request.rb +22 -31
  117. data/lib/action_dispatch/testing/test_response.rb +7 -4
  118. data/lib/action_dispatch.rb +3 -1
  119. data/lib/action_pack/gem_version.rb +3 -3
  120. data/lib/action_pack.rb +1 -1
  121. metadata +30 -34
  122. data/lib/action_controller/metal/hide_actions.rb +0 -40
  123. data/lib/action_controller/metal/rack_delegation.rb +0 -32
  124. data/lib/action_controller/middleware.rb +0 -39
  125. data/lib/action_controller/model_naming.rb +0 -12
  126. data/lib/action_dispatch/journey/backwards.rb +0 -5
  127. data/lib/action_dispatch/journey/router/strexp.rb +0 -27
  128. data/lib/action_dispatch/testing/assertions/dom.rb +0 -3
  129. data/lib/action_dispatch/testing/assertions/selector.rb +0 -3
  130. data/lib/action_dispatch/testing/assertions/tag.rb +0 -3
  131. /data/lib/action_dispatch/middleware/templates/rescues/{_source.erb → _source.html.erb} +0 -0
@@ -1,13 +1,12 @@
1
1
  require 'action_dispatch/middleware/cookies'
2
2
  require 'action_dispatch/middleware/flash'
3
- require 'active_support/core_ext/hash/indifferent_access'
4
3
 
5
4
  module ActionDispatch
6
5
  module TestProcess
7
6
  def assigns(key = nil)
8
- assigns = {}.with_indifferent_access
9
- @controller.view_assigns.each { |k, v| assigns.regular_writer(k, v) }
10
- key.nil? ? assigns : assigns[key]
7
+ raise NoMethodError,
8
+ "assigns has been extracted to a gem. To continue using it,
9
+ add `gem 'rails-controller-testing'` to your Gemfile."
11
10
  end
12
11
 
13
12
  def session
@@ -19,14 +18,14 @@ module ActionDispatch
19
18
  end
20
19
 
21
20
  def cookies
22
- @request.cookie_jar
21
+ @cookie_jar ||= Cookies::CookieJar.build(@request, @request.cookies)
23
22
  end
24
23
 
25
24
  def redirect_to_url
26
25
  @response.redirect_url
27
26
  end
28
27
 
29
- # Shortcut for <tt>Rack::Test::UploadedFile.new(File.join(ActionController::TestCase.fixture_path, path), type)</tt>:
28
+ # Shortcut for <tt>Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.fixture_path, path), type)</tt>:
30
29
  #
31
30
  # post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png')
32
31
  #
@@ -4,38 +4,41 @@ require 'rack/utils'
4
4
  module ActionDispatch
5
5
  class TestRequest < Request
6
6
  DEFAULT_ENV = Rack::MockRequest.env_for('/',
7
- 'HTTP_HOST' => 'test.host',
8
- 'REMOTE_ADDR' => '0.0.0.0',
9
- 'HTTP_USER_AGENT' => 'Rails Testing'
7
+ 'HTTP_HOST' => 'test.host',
8
+ 'REMOTE_ADDR' => '0.0.0.0',
9
+ 'HTTP_USER_AGENT' => 'Rails Testing',
10
10
  )
11
11
 
12
- def self.new(env = {})
13
- super
12
+ # Create a new test request with default `env` values
13
+ def self.create(env = {})
14
+ env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
15
+ env["rack.request.cookie_hash"] ||= {}.with_indifferent_access
16
+ new(default_env.merge(env))
14
17
  end
15
18
 
16
- def initialize(env = {})
17
- env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
18
- super(default_env.merge(env))
19
+ def self.default_env
20
+ DEFAULT_ENV
19
21
  end
22
+ private_class_method :default_env
20
23
 
21
24
  def request_method=(method)
22
- @env['REQUEST_METHOD'] = method.to_s.upcase
25
+ set_header('REQUEST_METHOD', method.to_s.upcase)
23
26
  end
24
27
 
25
28
  def host=(host)
26
- @env['HTTP_HOST'] = host
29
+ set_header('HTTP_HOST', host)
27
30
  end
28
31
 
29
32
  def port=(number)
30
- @env['SERVER_PORT'] = number.to_i
33
+ set_header('SERVER_PORT', number.to_i)
31
34
  end
32
35
 
33
36
  def request_uri=(uri)
34
- @env['REQUEST_URI'] = uri
37
+ set_header('REQUEST_URI', uri)
35
38
  end
36
39
 
37
40
  def path=(path)
38
- @env['PATH_INFO'] = path
41
+ set_header('PATH_INFO', path)
39
42
  end
40
43
 
41
44
  def action=(action_name)
@@ -43,36 +46,24 @@ module ActionDispatch
43
46
  end
44
47
 
45
48
  def if_modified_since=(last_modified)
46
- @env['HTTP_IF_MODIFIED_SINCE'] = last_modified
49
+ set_header('HTTP_IF_MODIFIED_SINCE', last_modified)
47
50
  end
48
51
 
49
52
  def if_none_match=(etag)
50
- @env['HTTP_IF_NONE_MATCH'] = etag
53
+ set_header('HTTP_IF_NONE_MATCH', etag)
51
54
  end
52
55
 
53
56
  def remote_addr=(addr)
54
- @env['REMOTE_ADDR'] = addr
57
+ set_header('REMOTE_ADDR', addr)
55
58
  end
56
59
 
57
60
  def user_agent=(user_agent)
58
- @env['HTTP_USER_AGENT'] = user_agent
61
+ set_header('HTTP_USER_AGENT', user_agent)
59
62
  end
60
63
 
61
64
  def accept=(mime_types)
62
- @env.delete('action_dispatch.request.accepts')
63
- @env['HTTP_ACCEPT'] = Array(mime_types).collect { |mime_type| mime_type.to_s }.join(",")
64
- end
65
-
66
- alias :rack_cookies :cookies
67
-
68
- def cookies
69
- @cookies ||= {}.with_indifferent_access
70
- end
71
-
72
- private
73
-
74
- def default_env
75
- DEFAULT_ENV
65
+ delete_header('action_dispatch.request.accepts')
66
+ set_header('HTTP_ACCEPT', Array(mime_types).collect(&:to_s).join(","))
76
67
  end
77
68
  end
78
69
  end
@@ -7,7 +7,7 @@ module ActionDispatch
7
7
  # See Response for more information on controller response objects.
8
8
  class TestResponse < Response
9
9
  def self.from_response(response)
10
- new response.status, response.headers, response.body, default_headers: nil
10
+ new response.status, response.headers, response.body
11
11
  end
12
12
 
13
13
  # Was the response successful?
@@ -16,10 +16,13 @@ module ActionDispatch
16
16
  # Was the URL not found?
17
17
  alias_method :missing?, :not_found?
18
18
 
19
- # Were we redirected?
20
- alias_method :redirect?, :redirection?
21
-
22
19
  # Was there a server-side error?
23
20
  alias_method :error?, :server_error?
21
+
22
+ attr_writer :response_parser # :nodoc:
23
+
24
+ def parsed_body
25
+ @parsed_body ||= @response_parser.call(body)
26
+ end
24
27
  end
25
28
  end
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2004-2014 David Heinemeier Hansson
2
+ # Copyright (c) 2004-2016 David Heinemeier Hansson
3
3
  #
4
4
  # Permission is hereby granted, free of charge, to any person obtaining
5
5
  # a copy of this software and associated documentation files (the
@@ -51,6 +51,7 @@ module ActionDispatch
51
51
  autoload :Cookies
52
52
  autoload :DebugExceptions
53
53
  autoload :ExceptionWrapper
54
+ autoload :Executor
54
55
  autoload :Flash
55
56
  autoload :ParamsParser
56
57
  autoload :PublicExceptions
@@ -94,6 +95,7 @@ module ActionDispatch
94
95
  autoload :TestProcess
95
96
  autoload :TestRequest
96
97
  autoload :TestResponse
98
+ autoload :AssertionResponse
97
99
  end
98
100
  end
99
101
 
@@ -5,9 +5,9 @@ module ActionPack
5
5
  end
6
6
 
7
7
  module VERSION
8
- MAJOR = 4
9
- MINOR = 2
10
- TINY = 10
8
+ MAJOR = 5
9
+ MINOR = 0
10
+ TINY = 0
11
11
  PRE = nil
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
data/lib/action_pack.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2004-2014 David Heinemeier Hansson
2
+ # Copyright (c) 2004-2016 David Heinemeier Hansson
3
3
  #
4
4
  # Permission is hereby granted, free of charge, to any person obtaining
5
5
  # a copy of this software and associated documentation files (the
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.10
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-27 00:00:00.000000000 Z
11
+ date: 2016-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.10
19
+ version: 5.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.2.10
26
+ version: 5.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.6'
33
+ version: '2.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.6'
40
+ version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rack-test
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.6.2
47
+ version: 0.6.3
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.6.2
54
+ version: 0.6.3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rails-html-sanitizer
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -78,48 +78,42 @@ dependencies:
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '1.0'
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: 1.0.5
81
+ version: '2.0'
85
82
  type: :runtime
86
83
  prerelease: false
87
84
  version_requirements: !ruby/object:Gem::Requirement
88
85
  requirements:
89
86
  - - "~>"
90
87
  - !ruby/object:Gem::Version
91
- version: '1.0'
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- version: 1.0.5
88
+ version: '2.0'
95
89
  - !ruby/object:Gem::Dependency
96
90
  name: actionview
97
91
  requirement: !ruby/object:Gem::Requirement
98
92
  requirements:
99
93
  - - '='
100
94
  - !ruby/object:Gem::Version
101
- version: 4.2.10
95
+ version: 5.0.0
102
96
  type: :runtime
103
97
  prerelease: false
104
98
  version_requirements: !ruby/object:Gem::Requirement
105
99
  requirements:
106
100
  - - '='
107
101
  - !ruby/object:Gem::Version
108
- version: 4.2.10
102
+ version: 5.0.0
109
103
  - !ruby/object:Gem::Dependency
110
104
  name: activemodel
111
105
  requirement: !ruby/object:Gem::Requirement
112
106
  requirements:
113
107
  - - '='
114
108
  - !ruby/object:Gem::Version
115
- version: 4.2.10
109
+ version: 5.0.0
116
110
  type: :development
117
111
  prerelease: false
118
112
  version_requirements: !ruby/object:Gem::Requirement
119
113
  requirements:
120
114
  - - '='
121
115
  - !ruby/object:Gem::Version
122
- version: 4.2.10
116
+ version: 5.0.0
123
117
  description: Web apps on Rails. Simple, battle-tested conventions for building and
124
118
  testing MVC web applications. Works with any Rack-compatible server.
125
119
  email: david@loudthinking.com
@@ -133,8 +127,11 @@ files:
133
127
  - lib/abstract_controller.rb
134
128
  - lib/abstract_controller/asset_paths.rb
135
129
  - lib/abstract_controller/base.rb
130
+ - lib/abstract_controller/caching.rb
131
+ - lib/abstract_controller/caching/fragments.rb
136
132
  - lib/abstract_controller/callbacks.rb
137
133
  - lib/abstract_controller/collector.rb
134
+ - lib/abstract_controller/error.rb
138
135
  - lib/abstract_controller/helpers.rb
139
136
  - lib/abstract_controller/logger.rb
140
137
  - lib/abstract_controller/railties/routes_helpers.rb
@@ -142,11 +139,14 @@ files:
142
139
  - lib/abstract_controller/translation.rb
143
140
  - lib/abstract_controller/url_for.rb
144
141
  - lib/action_controller.rb
142
+ - lib/action_controller/api.rb
143
+ - lib/action_controller/api/api_rendering.rb
145
144
  - lib/action_controller/base.rb
146
145
  - lib/action_controller/caching.rb
147
- - lib/action_controller/caching/fragments.rb
146
+ - lib/action_controller/form_builder.rb
148
147
  - lib/action_controller/log_subscriber.rb
149
148
  - lib/action_controller/metal.rb
149
+ - lib/action_controller/metal/basic_implicit_render.rb
150
150
  - lib/action_controller/metal/conditional_get.rb
151
151
  - lib/action_controller/metal/cookies.rb
152
152
  - lib/action_controller/metal/data_streaming.rb
@@ -156,14 +156,12 @@ files:
156
156
  - lib/action_controller/metal/force_ssl.rb
157
157
  - lib/action_controller/metal/head.rb
158
158
  - lib/action_controller/metal/helpers.rb
159
- - lib/action_controller/metal/hide_actions.rb
160
159
  - lib/action_controller/metal/http_authentication.rb
161
160
  - lib/action_controller/metal/implicit_render.rb
162
161
  - lib/action_controller/metal/instrumentation.rb
163
162
  - lib/action_controller/metal/live.rb
164
163
  - lib/action_controller/metal/mime_responds.rb
165
164
  - lib/action_controller/metal/params_wrapper.rb
166
- - lib/action_controller/metal/rack_delegation.rb
167
165
  - lib/action_controller/metal/redirecting.rb
168
166
  - lib/action_controller/metal/renderers.rb
169
167
  - lib/action_controller/metal/rendering.rb
@@ -173,10 +171,10 @@ files:
173
171
  - lib/action_controller/metal/strong_parameters.rb
174
172
  - lib/action_controller/metal/testing.rb
175
173
  - lib/action_controller/metal/url_for.rb
176
- - lib/action_controller/middleware.rb
177
- - lib/action_controller/model_naming.rb
178
174
  - lib/action_controller/railtie.rb
179
175
  - lib/action_controller/railties/helpers.rb
176
+ - lib/action_controller/renderer.rb
177
+ - lib/action_controller/template_assertions.rb
180
178
  - lib/action_controller/test_case.rb
181
179
  - lib/action_dispatch.rb
182
180
  - lib/action_dispatch/http/cache.rb
@@ -194,7 +192,6 @@ files:
194
192
  - lib/action_dispatch/http/upload.rb
195
193
  - lib/action_dispatch/http/url.rb
196
194
  - lib/action_dispatch/journey.rb
197
- - lib/action_dispatch/journey/backwards.rb
198
195
  - lib/action_dispatch/journey/formatter.rb
199
196
  - lib/action_dispatch/journey/gtg/builder.rb
200
197
  - lib/action_dispatch/journey/gtg/simulator.rb
@@ -210,7 +207,6 @@ files:
210
207
  - lib/action_dispatch/journey/path/pattern.rb
211
208
  - lib/action_dispatch/journey/route.rb
212
209
  - lib/action_dispatch/journey/router.rb
213
- - lib/action_dispatch/journey/router/strexp.rb
214
210
  - lib/action_dispatch/journey/router/utils.rb
215
211
  - lib/action_dispatch/journey/routes.rb
216
212
  - lib/action_dispatch/journey/scanner.rb
@@ -222,6 +218,7 @@ files:
222
218
  - lib/action_dispatch/middleware/cookies.rb
223
219
  - lib/action_dispatch/middleware/debug_exceptions.rb
224
220
  - lib/action_dispatch/middleware/exception_wrapper.rb
221
+ - lib/action_dispatch/middleware/executor.rb
225
222
  - lib/action_dispatch/middleware/flash.rb
226
223
  - lib/action_dispatch/middleware/params_parser.rb
227
224
  - lib/action_dispatch/middleware/public_exceptions.rb
@@ -238,7 +235,8 @@ files:
238
235
  - lib/action_dispatch/middleware/static.rb
239
236
  - lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
240
237
  - lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb
241
- - lib/action_dispatch/middleware/templates/rescues/_source.erb
238
+ - lib/action_dispatch/middleware/templates/rescues/_source.html.erb
239
+ - lib/action_dispatch/middleware/templates/rescues/_source.text.erb
242
240
  - lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
243
241
  - lib/action_dispatch/middleware/templates/rescues/_trace.text.erb
244
242
  - lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb
@@ -266,12 +264,10 @@ files:
266
264
  - lib/action_dispatch/routing/route_set.rb
267
265
  - lib/action_dispatch/routing/routes_proxy.rb
268
266
  - lib/action_dispatch/routing/url_for.rb
267
+ - lib/action_dispatch/testing/assertion_response.rb
269
268
  - lib/action_dispatch/testing/assertions.rb
270
- - lib/action_dispatch/testing/assertions/dom.rb
271
269
  - lib/action_dispatch/testing/assertions/response.rb
272
270
  - lib/action_dispatch/testing/assertions/routing.rb
273
- - lib/action_dispatch/testing/assertions/selector.rb
274
- - lib/action_dispatch/testing/assertions/tag.rb
275
271
  - lib/action_dispatch/testing/integration.rb
276
272
  - lib/action_dispatch/testing/test_process.rb
277
273
  - lib/action_dispatch/testing/test_request.rb
@@ -279,7 +275,7 @@ files:
279
275
  - lib/action_pack.rb
280
276
  - lib/action_pack/gem_version.rb
281
277
  - lib/action_pack/version.rb
282
- homepage: http://www.rubyonrails.org
278
+ homepage: http://rubyonrails.org
283
279
  licenses:
284
280
  - MIT
285
281
  metadata: {}
@@ -291,7 +287,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
291
287
  requirements:
292
288
  - - ">="
293
289
  - !ruby/object:Gem::Version
294
- version: 1.9.3
290
+ version: 2.2.2
295
291
  required_rubygems_version: !ruby/object:Gem::Requirement
296
292
  requirements:
297
293
  - - ">="
@@ -300,7 +296,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
300
296
  requirements:
301
297
  - none
302
298
  rubyforge_project:
303
- rubygems_version: 2.5.2
299
+ rubygems_version: 2.6.4
304
300
  signing_key:
305
301
  specification_version: 4
306
302
  summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
@@ -1,40 +0,0 @@
1
-
2
- module ActionController
3
- # Adds the ability to prevent public methods on a controller to be called as actions.
4
- module HideActions
5
- extend ActiveSupport::Concern
6
-
7
- included do
8
- class_attribute :hidden_actions
9
- self.hidden_actions = Set.new.freeze
10
- end
11
-
12
- private
13
-
14
- # Overrides AbstractController::Base#action_method? to return false if the
15
- # action name is in the list of hidden actions.
16
- def method_for_action(action_name)
17
- self.class.visible_action?(action_name) && super
18
- end
19
-
20
- module ClassMethods
21
- # Sets all of the actions passed in as hidden actions.
22
- #
23
- # ==== Parameters
24
- # * <tt>args</tt> - A list of actions
25
- def hide_action(*args)
26
- self.hidden_actions = hidden_actions.dup.merge(args.map(&:to_s)).freeze
27
- end
28
-
29
- def visible_action?(action_name)
30
- not hidden_actions.include?(action_name)
31
- end
32
-
33
- # Overrides AbstractController::Base#action_methods to remove any methods
34
- # that are listed as hidden methods.
35
- def action_methods
36
- @action_methods ||= Set.new(super.reject { |name| hidden_actions.include?(name) }).freeze
37
- end
38
- end
39
- end
40
- end
@@ -1,32 +0,0 @@
1
- require 'action_dispatch/http/request'
2
- require 'action_dispatch/http/response'
3
-
4
- module ActionController
5
- module RackDelegation
6
- extend ActiveSupport::Concern
7
-
8
- delegate :headers, :status=, :location=, :content_type=,
9
- :status, :location, :content_type, :response_code, :to => "@_response"
10
-
11
- def dispatch(action, request)
12
- set_response!(request)
13
- super(action, request)
14
- end
15
-
16
- def response_body=(body)
17
- response.body = body if response
18
- super
19
- end
20
-
21
- def reset_session
22
- @_request.reset_session
23
- end
24
-
25
- private
26
-
27
- def set_response!(request)
28
- @_response = ActionDispatch::Response.new
29
- @_response.request = request
30
- end
31
- end
32
- end
@@ -1,39 +0,0 @@
1
- module ActionController
2
- class Middleware < Metal
3
- class ActionMiddleware
4
- def initialize(controller, app)
5
- @controller, @app = controller, app
6
- end
7
-
8
- def call(env)
9
- request = ActionDispatch::Request.new(env)
10
- @controller.build(@app).dispatch(:index, request)
11
- end
12
- end
13
-
14
- class << self
15
- alias build new
16
-
17
- def new(app)
18
- ActionMiddleware.new(self, app)
19
- end
20
- end
21
-
22
- attr_internal :app
23
-
24
- def process(action)
25
- response = super
26
- self.status, self.headers, self.response_body = response if response.is_a?(Array)
27
- response
28
- end
29
-
30
- def initialize(app)
31
- super()
32
- @_app = app
33
- end
34
-
35
- def index
36
- call(env)
37
- end
38
- end
39
- end
@@ -1,12 +0,0 @@
1
- module ActionController
2
- module ModelNaming
3
- # Converts the given object to an ActiveModel compliant one.
4
- def convert_to_model(object)
5
- object.respond_to?(:to_model) ? object.to_model : object
6
- end
7
-
8
- def model_name_from_record_or_class(record_or_class)
9
- convert_to_model(record_or_class).model_name
10
- end
11
- end
12
- end
@@ -1,5 +0,0 @@
1
- module Rack # :nodoc:
2
- Mount = ActionDispatch::Journey::Router
3
- Mount::RouteSet = ActionDispatch::Journey::Router
4
- Mount::RegexpWithNamedGroups = ActionDispatch::Journey::Path::Pattern
5
- end
@@ -1,27 +0,0 @@
1
- module ActionDispatch
2
- module Journey # :nodoc:
3
- class Router # :nodoc:
4
- class Strexp # :nodoc:
5
- class << self
6
- alias :compile :new
7
- end
8
-
9
- attr_reader :path, :requirements, :separators, :anchor, :ast
10
-
11
- def self.build(path, requirements, separators, anchor = true)
12
- parser = Journey::Parser.new
13
- ast = parser.parse path
14
- new ast, path, requirements, separators, anchor
15
- end
16
-
17
- def initialize(ast, path, requirements, separators, anchor = true)
18
- @ast = ast
19
- @path = path
20
- @requirements = requirements
21
- @separators = separators
22
- @anchor = anchor
23
- end
24
- end
25
- end
26
- end
27
- end
@@ -1,3 +0,0 @@
1
- require 'active_support/deprecation'
2
-
3
- ActiveSupport::Deprecation.warn("ActionDispatch::Assertions::DomAssertions has been extracted to the rails-dom-testing gem.")
@@ -1,3 +0,0 @@
1
- require 'active_support/deprecation'
2
-
3
- ActiveSupport::Deprecation.warn("ActionDispatch::Assertions::SelectorAssertions has been extracted to the rails-dom-testing gem.")
@@ -1,3 +0,0 @@
1
- require 'active_support/deprecation'
2
-
3
- ActiveSupport::Deprecation.warn('`ActionDispatch::Assertions::TagAssertions` has been extracted to the rails-dom-testing gem.')