actionview 7.2.1.2 → 7.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e1079486c50bd737c807442a7bda621c96fd1cf69a764d37d48c57a01d99bce
4
- data.tar.gz: 359d1ccdea4bd4d3744c4ea67a1a32e69865eeb3372068fedc45e21d9548a9a2
3
+ metadata.gz: d36a936637e81dec2dbe6b3b1d682f1ff3aa288f61fbb599b2252a6751ddcf39
4
+ data.tar.gz: fe72769422f0081cce1d19c7541c3e65d9af340638ef9e6ad19498cfb177cff9
5
5
  SHA512:
6
- metadata.gz: 5dc5c324f59a4822f651b57715c433355fe2ea6b0b497bafe3921a61bda484c16f661f3b28a46898e69c0821f3632f4b9a5f2808d2a577919728f1b26e0be2b7
7
- data.tar.gz: 3141111aa645662be5d0000e052e8dc7222c11c90a836689ae74d2e8c330d8a8d006e5641936ac02b18910df52933f51b19fd7727681d576ffbcde83485ea9b9
6
+ metadata.gz: f736b28b5615007f33f519c8f89e380d82f0a85fdbfcdcaaa12791eb24edd18ac105e61e147f78c261d8d7d710e6ebe9ee3556b74a43991473531206256283d3
7
+ data.tar.gz: 61e9ef65307525860ea8914e207138195e19bc804053503d8ee4e8897ed7cbe6e8e016a05e02fba25696ef4ed48cd65644b9421c86f10adaae458fcbc6e88788
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## Rails 7.2.2 (October 30, 2024) ##
2
+
3
+ * No changes.
4
+
5
+
1
6
  ## Rails 7.2.1.2 (October 23, 2024) ##
2
7
 
3
8
  * No changes.
@@ -9,8 +9,8 @@ module ActionView
9
9
  module VERSION
10
10
  MAJOR = 7
11
11
  MINOR = 2
12
- TINY = 1
13
- PRE = "2"
12
+ TINY = 2
13
+ PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -166,7 +166,7 @@ module ActionView
166
166
  # highlight('You searched for: rails', 'rails', highlighter: '<a href="search?q=\1">\1</a>')
167
167
  # # => "You searched for: <a href=\"search?q=rails\">rails</a>"
168
168
  #
169
- # highlight('You searched for: rails', 'rails') { |match| link_to(search_path(q: match, match)) }
169
+ # highlight('You searched for: rails', 'rails') { |match| link_to(search_path(q: match)) }
170
170
  # # => "You searched for: <a href=\"search?q=rails\">rails</a>"
171
171
  #
172
172
  # highlight('<a href="javascript:alert(\'no!\')">ruby</a> on rails', 'rails', sanitize: false)
@@ -500,6 +500,8 @@ module ActionView
500
500
  content_tag("a", name || email_address, html_options, &block)
501
501
  end
502
502
 
503
+ RFC2396_PARSER = defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::RFC2396_Parser.new
504
+
503
505
  # True if the current request URI was generated by the given +options+.
504
506
  #
505
507
  # ==== Examples
@@ -556,14 +558,14 @@ module ActionView
556
558
 
557
559
  options ||= options_as_kwargs
558
560
  check_parameters ||= options.is_a?(Hash) && options.delete(:check_parameters)
559
- url_string = URI::DEFAULT_PARSER.unescape(url_for(options)).force_encoding(Encoding::BINARY)
561
+ url_string = RFC2396_PARSER.unescape(url_for(options)).force_encoding(Encoding::BINARY)
560
562
 
561
563
  # We ignore any extra parameters in the request_uri if the
562
564
  # submitted URL doesn't have any either. This lets the function
563
565
  # work with things like ?order=asc
564
566
  # the behavior can be disabled with check_parameters: true
565
567
  request_uri = url_string.index("?") || check_parameters ? request.fullpath : request.path
566
- request_uri = URI::DEFAULT_PARSER.unescape(request_uri).force_encoding(Encoding::BINARY)
568
+ request_uri = RFC2396_PARSER.unescape(request_uri).force_encoding(Encoding::BINARY)
567
569
 
568
570
  if %r{^\w+://}.match?(url_string)
569
571
  request_uri = +"#{request.protocol}#{request.host_with_port}#{request_uri}"
@@ -710,7 +712,7 @@ module ActionView
710
712
  end
711
713
 
712
714
  def add_method_to_attributes!(html_options, method)
713
- if method_not_get_method?(method) && !html_options["rel"]&.include?("nofollow")
715
+ if method_not_get_method?(method) && !html_options["rel"].to_s.include?("nofollow")
714
716
  if html_options["rel"].blank?
715
717
  html_options["rel"] = "nofollow"
716
718
  else
@@ -230,11 +230,21 @@ module ActionView
230
230
  end
231
231
 
232
232
  def spot(location) # :nodoc:
233
- ast = RubyVM::AbstractSyntaxTree.parse(compiled_source, keep_script_lines: true)
234
233
  node_id = RubyVM::AbstractSyntaxTree.node_id_for_backtrace_location(location)
235
- node = find_node_by_id(ast, node_id)
234
+ found =
235
+ if RubyVM::InstructionSequence.compile("").to_a[4][:parser] == :prism
236
+ require "prism"
236
237
 
237
- ErrorHighlight.spot(node)
238
+ if Prism::VERSION >= "1.0.0"
239
+ result = Prism.parse(compiled_source).value
240
+ result.breadth_first_search { |node| node.node_id == node_id }
241
+ end
242
+ else
243
+ node = RubyVM::AbstractSyntaxTree.parse(compiled_source, keep_script_lines: true)
244
+ find_node_by_id(node, node_id)
245
+ end
246
+
247
+ ErrorHighlight.spot(found) if found
238
248
  end
239
249
 
240
250
  # Translate an error location returned by ErrorHighlight to the correct
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionview
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.1.2
4
+ version: 7.2.2
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: 2024-10-23 00:00:00.000000000 Z
11
+ date: 2024-10-31 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: 7.2.1.2
19
+ version: 7.2.2
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: 7.2.1.2
26
+ version: 7.2.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: builder
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -86,28 +86,28 @@ dependencies:
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 7.2.1.2
89
+ version: 7.2.2
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 7.2.1.2
96
+ version: 7.2.2
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: activemodel
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 7.2.1.2
103
+ version: 7.2.2
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 7.2.1.2
110
+ version: 7.2.2
111
111
  description: Simple, battle-tested conventions and helpers for building web pages.
112
112
  email: david@loudthinking.com
113
113
  executables: []
@@ -246,10 +246,10 @@ licenses:
246
246
  - MIT
247
247
  metadata:
248
248
  bug_tracker_uri: https://github.com/rails/rails/issues
249
- changelog_uri: https://github.com/rails/rails/blob/v7.2.1.2/actionview/CHANGELOG.md
250
- documentation_uri: https://api.rubyonrails.org/v7.2.1.2/
249
+ changelog_uri: https://github.com/rails/rails/blob/v7.2.2/actionview/CHANGELOG.md
250
+ documentation_uri: https://api.rubyonrails.org/v7.2.2/
251
251
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
252
- source_code_uri: https://github.com/rails/rails/tree/v7.2.1.2/actionview
252
+ source_code_uri: https://github.com/rails/rails/tree/v7.2.2/actionview
253
253
  rubygems_mfa_required: 'true'
254
254
  post_install_message:
255
255
  rdoc_options: []