actionview 7.2.3.1 → 8.0.5
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +74 -109
- data/lib/action_view/dependency_tracker/erb_tracker.rb +36 -27
- data/lib/action_view/dependency_tracker/ruby_tracker.rb +2 -19
- data/lib/action_view/dependency_tracker/wildcard_resolver.rb +32 -0
- data/lib/action_view/dependency_tracker.rb +1 -0
- data/lib/action_view/gem_version.rb +4 -4
- data/lib/action_view/helpers/atom_feed_helper.rb +0 -2
- data/lib/action_view/helpers/cache_helper.rb +8 -0
- data/lib/action_view/helpers/date_helper.rb +3 -3
- data/lib/action_view/helpers/form_helper.rb +76 -75
- data/lib/action_view/helpers/form_options_helper.rb +25 -22
- data/lib/action_view/helpers/form_tag_helper.rb +20 -17
- data/lib/action_view/helpers/rendering_helper.rb +160 -50
- data/lib/action_view/helpers/sanitize_helper.rb +6 -0
- data/lib/action_view/helpers/tag_helper.rb +26 -39
- data/lib/action_view/helpers/tags/base.rb +11 -9
- data/lib/action_view/helpers/tags/check_box.rb +2 -2
- data/lib/action_view/helpers/tags/collection_check_boxes.rb +4 -3
- data/lib/action_view/helpers/tags/file_field.rb +4 -1
- data/lib/action_view/helpers/tags/label.rb +3 -10
- data/lib/action_view/helpers/tags/radio_button.rb +1 -1
- data/lib/action_view/helpers/tags/select_renderer.rb +1 -1
- data/lib/action_view/helpers/tags/text_area.rb +1 -1
- data/lib/action_view/helpers/tags/text_field.rb +1 -1
- data/lib/action_view/helpers/url_helper.rb +2 -4
- data/lib/action_view/layouts.rb +1 -1
- data/lib/action_view/record_identifier.rb +1 -1
- data/lib/action_view/render_parser/prism_render_parser.rb +13 -1
- data/lib/action_view/render_parser/ripper_render_parser.rb +10 -1
- data/lib/action_view/renderer/partial_renderer/collection_caching.rb +5 -1
- data/lib/action_view/renderer/streaming_template_renderer.rb +8 -2
- data/lib/action_view/rendering.rb +2 -3
- data/lib/action_view/template/handlers/erb/erubi.rb +1 -1
- data/lib/action_view/template/raw_file.rb +4 -0
- data/lib/action_view/template/resolver.rb +0 -1
- data/lib/action_view/template.rb +9 -4
- metadata +12 -25
|
@@ -118,6 +118,7 @@ module ActionView
|
|
|
118
118
|
|
|
119
119
|
def render_to_body(options = {})
|
|
120
120
|
_process_options(options)
|
|
121
|
+
_process_render_template_options(options)
|
|
121
122
|
_render_template(options)
|
|
122
123
|
end
|
|
123
124
|
|
|
@@ -173,8 +174,7 @@ module ActionView
|
|
|
173
174
|
end
|
|
174
175
|
|
|
175
176
|
# Normalize options.
|
|
176
|
-
def
|
|
177
|
-
options = super(options)
|
|
177
|
+
def _process_render_template_options(options)
|
|
178
178
|
if options[:partial] == true
|
|
179
179
|
options[:partial] = action_name
|
|
180
180
|
end
|
|
@@ -184,7 +184,6 @@ module ActionView
|
|
|
184
184
|
end
|
|
185
185
|
|
|
186
186
|
options[:template] ||= (options[:action] || action_name).to_s
|
|
187
|
-
options
|
|
188
187
|
end
|
|
189
188
|
end
|
|
190
189
|
end
|
|
@@ -18,7 +18,7 @@ module ActionView
|
|
|
18
18
|
properties[:preamble] ||= ""
|
|
19
19
|
properties[:postamble] ||= "#{properties[:bufvar]}"
|
|
20
20
|
|
|
21
|
-
# Tell
|
|
21
|
+
# Tell Erubi whether the template will be compiled with `frozen_string_literal: true`
|
|
22
22
|
properties[:freeze_template_literals] = !Template.frozen_string_literal
|
|
23
23
|
|
|
24
24
|
properties[:escapefunc] = ""
|
data/lib/action_view/template.rb
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "thread"
|
|
4
3
|
require "delegate"
|
|
5
4
|
|
|
6
5
|
module ActionView
|
|
@@ -8,7 +7,7 @@ module ActionView
|
|
|
8
7
|
class Template
|
|
9
8
|
extend ActiveSupport::Autoload
|
|
10
9
|
|
|
11
|
-
STRICT_LOCALS_REGEX = /\#\s+locals:\s+\((
|
|
10
|
+
STRICT_LOCALS_REGEX = /\#\s+locals:\s+\((.*?)\)(?=\s*-?%>|\s*$)/m
|
|
12
11
|
|
|
13
12
|
# === Encodings in ActionView::Template
|
|
14
13
|
#
|
|
@@ -357,7 +356,7 @@ module ActionView
|
|
|
357
356
|
|
|
358
357
|
# This method is responsible for marking a template as having strict locals
|
|
359
358
|
# which means the template can only accept the locals defined in a magic
|
|
360
|
-
# comment. For example, if your template
|
|
359
|
+
# comment. For example, if your template accepts the locals +title+ and
|
|
361
360
|
# +comment_count+, add the following to your template file:
|
|
362
361
|
#
|
|
363
362
|
# <%# locals: (title: "Default title", comment_count: 0) %>
|
|
@@ -367,10 +366,16 @@ module ActionView
|
|
|
367
366
|
def strict_locals!
|
|
368
367
|
if @strict_locals == NONE
|
|
369
368
|
self.source.sub!(STRICT_LOCALS_REGEX, "")
|
|
370
|
-
@strict_locals = $1
|
|
369
|
+
@strict_locals = $1&.rstrip
|
|
371
370
|
|
|
372
371
|
return if @strict_locals.nil? # Magic comment not found
|
|
373
372
|
|
|
373
|
+
# Tag with the assumed encoding before encode! runs, same as
|
|
374
|
+
# encode! does for the source itself (see above).
|
|
375
|
+
if @strict_locals.encoding == Encoding::BINARY
|
|
376
|
+
@strict_locals.force_encoding(Encoding.default_external)
|
|
377
|
+
end
|
|
378
|
+
|
|
374
379
|
@strict_locals = "**nil" if @strict_locals.blank?
|
|
375
380
|
end
|
|
376
381
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: actionview
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 8.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
@@ -15,28 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
18
|
+
version: 8.0.5
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version:
|
|
26
|
-
- !ruby/object:Gem::Dependency
|
|
27
|
-
name: cgi
|
|
28
|
-
requirement: !ruby/object:Gem::Requirement
|
|
29
|
-
requirements:
|
|
30
|
-
- - ">="
|
|
31
|
-
- !ruby/object:Gem::Version
|
|
32
|
-
version: '0'
|
|
33
|
-
type: :runtime
|
|
34
|
-
prerelease: false
|
|
35
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
-
requirements:
|
|
37
|
-
- - ">="
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: '0'
|
|
25
|
+
version: 8.0.5
|
|
40
26
|
- !ruby/object:Gem::Dependency
|
|
41
27
|
name: builder
|
|
42
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -99,28 +85,28 @@ dependencies:
|
|
|
99
85
|
requirements:
|
|
100
86
|
- - '='
|
|
101
87
|
- !ruby/object:Gem::Version
|
|
102
|
-
version:
|
|
88
|
+
version: 8.0.5
|
|
103
89
|
type: :development
|
|
104
90
|
prerelease: false
|
|
105
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
92
|
requirements:
|
|
107
93
|
- - '='
|
|
108
94
|
- !ruby/object:Gem::Version
|
|
109
|
-
version:
|
|
95
|
+
version: 8.0.5
|
|
110
96
|
- !ruby/object:Gem::Dependency
|
|
111
97
|
name: activemodel
|
|
112
98
|
requirement: !ruby/object:Gem::Requirement
|
|
113
99
|
requirements:
|
|
114
100
|
- - '='
|
|
115
101
|
- !ruby/object:Gem::Version
|
|
116
|
-
version:
|
|
102
|
+
version: 8.0.5
|
|
117
103
|
type: :development
|
|
118
104
|
prerelease: false
|
|
119
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
120
106
|
requirements:
|
|
121
107
|
- - '='
|
|
122
108
|
- !ruby/object:Gem::Version
|
|
123
|
-
version:
|
|
109
|
+
version: 8.0.5
|
|
124
110
|
description: Simple, battle-tested conventions and helpers for building web pages.
|
|
125
111
|
email: david@loudthinking.com
|
|
126
112
|
executables: []
|
|
@@ -140,6 +126,7 @@ files:
|
|
|
140
126
|
- lib/action_view/dependency_tracker.rb
|
|
141
127
|
- lib/action_view/dependency_tracker/erb_tracker.rb
|
|
142
128
|
- lib/action_view/dependency_tracker/ruby_tracker.rb
|
|
129
|
+
- lib/action_view/dependency_tracker/wildcard_resolver.rb
|
|
143
130
|
- lib/action_view/deprecator.rb
|
|
144
131
|
- lib/action_view/digestor.rb
|
|
145
132
|
- lib/action_view/flows.rb
|
|
@@ -259,10 +246,10 @@ licenses:
|
|
|
259
246
|
- MIT
|
|
260
247
|
metadata:
|
|
261
248
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
|
262
|
-
changelog_uri: https://github.com/rails/rails/blob/
|
|
263
|
-
documentation_uri: https://api.rubyonrails.org/
|
|
249
|
+
changelog_uri: https://github.com/rails/rails/blob/v8.0.5/actionview/CHANGELOG.md
|
|
250
|
+
documentation_uri: https://api.rubyonrails.org/v8.0.5/
|
|
264
251
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
|
265
|
-
source_code_uri: https://github.com/rails/rails/tree/
|
|
252
|
+
source_code_uri: https://github.com/rails/rails/tree/v8.0.5/actionview
|
|
266
253
|
rubygems_mfa_required: 'true'
|
|
267
254
|
rdoc_options: []
|
|
268
255
|
require_paths:
|
|
@@ -271,7 +258,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
271
258
|
requirements:
|
|
272
259
|
- - ">="
|
|
273
260
|
- !ruby/object:Gem::Version
|
|
274
|
-
version: 3.
|
|
261
|
+
version: 3.2.0
|
|
275
262
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
276
263
|
requirements:
|
|
277
264
|
- - ">="
|