actionpack 6.1.0 → 6.1.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of actionpack might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5c07812b199dbd709dd68cf20c6fc356ba02969718d9f943e8f568615563592
4
- data.tar.gz: ecd71be0281fdc31cafb3ab68a0dadf5eeee2bacd5ea4a88251b96823e18a866
3
+ metadata.gz: 3813bd7e46eeb386962cafd48601aace5759055c9311cc47e79706458e4d8723
4
+ data.tar.gz: 9b1c73e829be328eff697fb0472c2917516a7956db547e6f364c1fa194a49cd1
5
5
  SHA512:
6
- metadata.gz: e2d28b6ede8bab6b1b59aedc9224a1a33d12c9a1c4f8b6a37acbe9ea1918a531801735483767df679c32dee43410d43d6e1128a35c863171b4c2ab228ddda9f1
7
- data.tar.gz: 5a4e97d5960a4529644ff60a2c30a87f9ff40135da46f22950ee5e7d58ac7d1d62936be19155e05a07e81914464581c35bf6e1810dc60721e12f12f2d834292a
6
+ metadata.gz: 271e0b7f7ce9cb659ffe7684f03677ea6699f065e1b2c1e8ce20cf992f3525c6ea2947702308b764fd21407498ac0e916dbd3390934615bf0c5d73450a938927
7
+ data.tar.gz: 9344404abd36b7fcc6bdf73a5186bc6bfc6665565b0fce4bf143aea6d149b61eefed5ec56787bebcbf0a9307bf464bbe4d822f726965f834fc3afaa13dde786d
@@ -1,3 +1,18 @@
1
+ ## Rails 6.1.1 (January 07, 2021) ##
2
+
3
+ * Fix nil translation key lookup in controllers/
4
+
5
+ *Jan Klimo*
6
+
7
+ * Quietly handle unknown HTTP methods in Action Dispatch SSL middleware.
8
+
9
+ *Alex Robbin*
10
+
11
+ * Change the request method to a `GET` when passing failed requests down to `config.exceptions_app`.
12
+
13
+ *Alex Robbin*
14
+
15
+
1
16
  ## Rails 6.1.0 (December 09, 2020) ##
2
17
 
3
18
  * Support for the HTTP header `Feature-Policy` has been revised to reflect
@@ -15,7 +15,7 @@ module AbstractController
15
15
  # to translate many keys within the same controller / action and gives you a
16
16
  # simple framework for scoping them consistently.
17
17
  def translate(key, **options)
18
- if key.start_with?(".")
18
+ if key&.start_with?(".")
19
19
  path = controller_path.tr("/", ".")
20
20
  defaults = [:"#{path}#{key}"]
21
21
  defaults << options[:default] if options[:default]
@@ -182,7 +182,7 @@ module ActionController
182
182
  #
183
183
  # You can also pass an object that responds to +maximum+, such as a
184
184
  # collection of active records. In this case +last_modified+ will be set by
185
- # calling +maximum(:updated_at)+ on the collection (the timestamp of the
185
+ # calling <tt>maximum(:updated_at)</tt> on the collection (the timestamp of the
186
186
  # most recently updated record) and the +etag+ by passing the object itself.
187
187
  #
188
188
  # def index
@@ -46,7 +46,9 @@ module ActionDispatch
46
46
  status = wrapper.status_code
47
47
  request.set_header "action_dispatch.exception", wrapper.unwrapped_exception
48
48
  request.set_header "action_dispatch.original_path", request.path_info
49
+ request.set_header "action_dispatch.original_request_method", request.raw_request_method
49
50
  request.path_info = "/#{status}"
51
+ request.request_method = "GET"
50
52
  response = @exceptions_app.call(request.env)
51
53
  response[1]["X-Cascade"] == "pass" ? pass_response(status) : response
52
54
  rescue Exception => failsafe_error
@@ -52,6 +52,8 @@ module ActionDispatch
52
52
  # Default to 2 years as recommended on hstspreload.org.
53
53
  HSTS_EXPIRES_IN = 63072000
54
54
 
55
+ PERMANENT_REDIRECT_REQUEST_METHODS = %w[GET HEAD] # :nodoc:
56
+
55
57
  def self.default_hsts_options
56
58
  { expires: HSTS_EXPIRES_IN, subdomains: true, preload: false }
57
59
  end
@@ -131,7 +133,7 @@ module ActionDispatch
131
133
  end
132
134
 
133
135
  def redirection_status(request)
134
- if request.get? || request.head?
136
+ if PERMANENT_REDIRECT_REQUEST_METHODS.include?(request.raw_request_method)
135
137
  301 # Issue a permanent redirect via a GET request.
136
138
  elsif @ssl_default_redirect_status
137
139
  @ssl_default_redirect_status
@@ -51,10 +51,19 @@
51
51
  }
52
52
 
53
53
  @media (prefers-color-scheme: dark) {
54
+ body {
55
+ background-color: #222;
56
+ color: #ECECEC;
57
+ }
58
+
54
59
  #route_table tbody tr:nth-child(odd) {
55
60
  background: #333;
56
61
  }
57
62
 
63
+ #route_table tbody tr:nth-child(even) {
64
+ background: #444;
65
+ }
66
+
58
67
  #route_table tbody.exact_matches,
59
68
  #route_table tbody.fuzzy_matches {
60
69
  color: #333;
@@ -71,14 +71,14 @@ module ActionDispatch
71
71
 
72
72
  def set_headless_chrome_browser_options
73
73
  configure do |capabilities|
74
- capabilities.args << "--headless"
75
- capabilities.args << "--disable-gpu" if Gem.win_platform?
74
+ capabilities.add_argument("--headless")
75
+ capabilities.add_argument("--disable-gpu") if Gem.win_platform?
76
76
  end
77
77
  end
78
78
 
79
79
  def set_headless_firefox_browser_options
80
80
  configure do |capabilities|
81
- capabilities.args << "-headless"
81
+ capabilities.add_argument("-headless")
82
82
  end
83
83
  end
84
84
  end
@@ -9,7 +9,7 @@ module ActionPack
9
9
  module VERSION
10
10
  MAJOR = 6
11
11
  MINOR = 1
12
- TINY = 0
12
+ TINY = 1
13
13
  PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
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: 6.1.0
4
+ version: 6.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-09 00:00:00.000000000 Z
11
+ date: 2021-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 6.1.0
19
+ version: 6.1.1
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: 6.1.0
26
+ version: 6.1.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -98,28 +98,28 @@ dependencies:
98
98
  requirements:
99
99
  - - '='
100
100
  - !ruby/object:Gem::Version
101
- version: 6.1.0
101
+ version: 6.1.1
102
102
  type: :runtime
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - '='
107
107
  - !ruby/object:Gem::Version
108
- version: 6.1.0
108
+ version: 6.1.1
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: activemodel
111
111
  requirement: !ruby/object:Gem::Requirement
112
112
  requirements:
113
113
  - - '='
114
114
  - !ruby/object:Gem::Version
115
- version: 6.1.0
115
+ version: 6.1.1
116
116
  type: :development
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - '='
121
121
  - !ruby/object:Gem::Version
122
- version: 6.1.0
122
+ version: 6.1.1
123
123
  description: Web apps on Rails. Simple, battle-tested conventions for building and
124
124
  testing MVC web applications. Works with any Rack-compatible server.
125
125
  email: david@loudthinking.com
@@ -309,11 +309,11 @@ licenses:
309
309
  - MIT
310
310
  metadata:
311
311
  bug_tracker_uri: https://github.com/rails/rails/issues
312
- changelog_uri: https://github.com/rails/rails/blob/v6.1.0/actionpack/CHANGELOG.md
313
- documentation_uri: https://api.rubyonrails.org/v6.1.0/
312
+ changelog_uri: https://github.com/rails/rails/blob/v6.1.1/actionpack/CHANGELOG.md
313
+ documentation_uri: https://api.rubyonrails.org/v6.1.1/
314
314
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
315
- source_code_uri: https://github.com/rails/rails/tree/v6.1.0/actionpack
316
- post_install_message:
315
+ source_code_uri: https://github.com/rails/rails/tree/v6.1.1/actionpack
316
+ post_install_message:
317
317
  rdoc_options: []
318
318
  require_paths:
319
319
  - lib
@@ -329,8 +329,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
329
  version: '0'
330
330
  requirements:
331
331
  - none
332
- rubygems_version: 3.1.4
333
- signing_key:
332
+ rubygems_version: 3.2.3
333
+ signing_key:
334
334
  specification_version: 4
335
335
  summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
336
336
  test_files: []