actionview 6.0.3.1 → 6.1.0.rc2

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

Potentially problematic release.


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

Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +160 -209
  3. data/MIT-LICENSE +1 -1
  4. data/lib/action_view.rb +4 -1
  5. data/lib/action_view/base.rb +21 -52
  6. data/lib/action_view/cache_expiry.rb +1 -2
  7. data/lib/action_view/context.rb +0 -1
  8. data/lib/action_view/dependency_tracker.rb +10 -4
  9. data/lib/action_view/digestor.rb +3 -2
  10. data/lib/action_view/gem_version.rb +3 -3
  11. data/lib/action_view/helpers/asset_tag_helper.rb +40 -15
  12. data/lib/action_view/helpers/asset_url_helper.rb +6 -4
  13. data/lib/action_view/helpers/atom_feed_helper.rb +2 -1
  14. data/lib/action_view/helpers/cache_helper.rb +10 -16
  15. data/lib/action_view/helpers/date_helper.rb +4 -4
  16. data/lib/action_view/helpers/form_helper.rb +59 -17
  17. data/lib/action_view/helpers/form_options_helper.rb +7 -16
  18. data/lib/action_view/helpers/form_tag_helper.rb +2 -1
  19. data/lib/action_view/helpers/javascript_helper.rb +3 -3
  20. data/lib/action_view/helpers/number_helper.rb +6 -6
  21. data/lib/action_view/helpers/rendering_helper.rb +11 -3
  22. data/lib/action_view/helpers/tag_helper.rb +92 -17
  23. data/lib/action_view/helpers/tags/base.rb +9 -5
  24. data/lib/action_view/helpers/tags/date_field.rb +1 -1
  25. data/lib/action_view/helpers/tags/date_select.rb +2 -2
  26. data/lib/action_view/helpers/tags/datetime_local_field.rb +1 -1
  27. data/lib/action_view/helpers/tags/label.rb +4 -0
  28. data/lib/action_view/helpers/tags/month_field.rb +1 -1
  29. data/lib/action_view/helpers/tags/select.rb +1 -1
  30. data/lib/action_view/helpers/tags/time_field.rb +1 -1
  31. data/lib/action_view/helpers/tags/week_field.rb +1 -1
  32. data/lib/action_view/helpers/text_helper.rb +1 -1
  33. data/lib/action_view/helpers/translation_helper.rb +94 -49
  34. data/lib/action_view/helpers/url_helper.rb +107 -13
  35. data/lib/action_view/layouts.rb +3 -2
  36. data/lib/action_view/log_subscriber.rb +26 -10
  37. data/lib/action_view/lookup_context.rb +3 -18
  38. data/lib/action_view/path_set.rb +0 -3
  39. data/lib/action_view/railtie.rb +35 -46
  40. data/lib/action_view/renderer/abstract_renderer.rb +93 -14
  41. data/lib/action_view/renderer/collection_renderer.rb +192 -0
  42. data/lib/action_view/renderer/object_renderer.rb +34 -0
  43. data/lib/action_view/renderer/partial_renderer.rb +20 -282
  44. data/lib/action_view/renderer/partial_renderer/collection_caching.rb +25 -26
  45. data/lib/action_view/renderer/renderer.rb +44 -1
  46. data/lib/action_view/renderer/streaming_template_renderer.rb +5 -1
  47. data/lib/action_view/renderer/template_renderer.rb +15 -12
  48. data/lib/action_view/rendering.rb +3 -1
  49. data/lib/action_view/routing_url_for.rb +1 -1
  50. data/lib/action_view/template.rb +9 -49
  51. data/lib/action_view/template/handlers.rb +0 -26
  52. data/lib/action_view/template/handlers/erb.rb +10 -14
  53. data/lib/action_view/template/handlers/erb/erubi.rb +9 -7
  54. data/lib/action_view/template/html.rb +1 -11
  55. data/lib/action_view/template/raw_file.rb +0 -3
  56. data/lib/action_view/template/renderable.rb +24 -0
  57. data/lib/action_view/template/resolver.rb +82 -40
  58. data/lib/action_view/template/text.rb +0 -3
  59. data/lib/action_view/test_case.rb +18 -25
  60. data/lib/action_view/testing/resolvers.rb +10 -31
  61. data/lib/action_view/unbound_template.rb +3 -3
  62. data/lib/action_view/view_paths.rb +34 -36
  63. metadata +17 -14
@@ -28,6 +28,40 @@ module ActionView
28
28
  end
29
29
  end
30
30
 
31
+ # Append a path to the list of view paths for this controller.
32
+ #
33
+ # ==== Parameters
34
+ # * <tt>path</tt> - If a String is provided, it gets converted into
35
+ # the default view path. You may also provide a custom view path
36
+ # (see ActionView::PathSet for more information)
37
+ def append_view_path(path)
38
+ self._view_paths = view_paths + Array(path)
39
+ end
40
+
41
+ # Prepend a path to the list of view paths for this controller.
42
+ #
43
+ # ==== Parameters
44
+ # * <tt>path</tt> - If a String is provided, it gets converted into
45
+ # the default view path. You may also provide a custom view path
46
+ # (see ActionView::PathSet for more information)
47
+ def prepend_view_path(path)
48
+ self._view_paths = ActionView::PathSet.new(Array(path) + view_paths)
49
+ end
50
+
51
+ # A list of all of the default view paths for this controller.
52
+ def view_paths
53
+ _view_paths
54
+ end
55
+
56
+ # Set the view paths.
57
+ #
58
+ # ==== Parameters
59
+ # * <tt>paths</tt> - If a PathSet is provided, use that;
60
+ # otherwise, process the parameter into a PathSet.
61
+ def view_paths=(paths)
62
+ self._view_paths = ActionView::PathSet.new(Array(paths))
63
+ end
64
+
31
65
  private
32
66
  # Override this method in your controller if you want to change paths prefixes for finding views.
33
67
  # Prefixes defined here will still be added to parents' <tt>._prefixes</tt>.
@@ -88,41 +122,5 @@ module ActionView
88
122
  def prepend_view_path(path)
89
123
  lookup_context.view_paths.unshift(*path)
90
124
  end
91
-
92
- module ClassMethods
93
- # Append a path to the list of view paths for this controller.
94
- #
95
- # ==== Parameters
96
- # * <tt>path</tt> - If a String is provided, it gets converted into
97
- # the default view path. You may also provide a custom view path
98
- # (see ActionView::PathSet for more information)
99
- def append_view_path(path)
100
- self._view_paths = view_paths + Array(path)
101
- end
102
-
103
- # Prepend a path to the list of view paths for this controller.
104
- #
105
- # ==== Parameters
106
- # * <tt>path</tt> - If a String is provided, it gets converted into
107
- # the default view path. You may also provide a custom view path
108
- # (see ActionView::PathSet for more information)
109
- def prepend_view_path(path)
110
- self._view_paths = ActionView::PathSet.new(Array(path) + view_paths)
111
- end
112
-
113
- # A list of all of the default view paths for this controller.
114
- def view_paths
115
- _view_paths
116
- end
117
-
118
- # Set the view paths.
119
- #
120
- # ==== Parameters
121
- # * <tt>paths</tt> - If a PathSet is provided, use that;
122
- # otherwise, process the parameter into a PathSet.
123
- def view_paths=(paths)
124
- self._view_paths = ActionView::PathSet.new(Array(paths))
125
- end
126
- end
127
125
  end
128
126
  end
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: 6.0.3.1
4
+ version: 6.1.0.rc2
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: 2020-05-18 00:00:00.000000000 Z
11
+ date: 2020-12-01 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.0.3.1
19
+ version: 6.1.0.rc2
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.0.3.1
26
+ version: 6.1.0.rc2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: builder
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -92,28 +92,28 @@ dependencies:
92
92
  requirements:
93
93
  - - '='
94
94
  - !ruby/object:Gem::Version
95
- version: 6.0.3.1
95
+ version: 6.1.0.rc2
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - '='
101
101
  - !ruby/object:Gem::Version
102
- version: 6.0.3.1
102
+ version: 6.1.0.rc2
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: activemodel
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - '='
108
108
  - !ruby/object:Gem::Version
109
- version: 6.0.3.1
109
+ version: 6.1.0.rc2
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - '='
115
115
  - !ruby/object:Gem::Version
116
- version: 6.0.3.1
116
+ version: 6.1.0.rc2
117
117
  description: Simple, battle-tested conventions and helpers for building web pages.
118
118
  email: david@loudthinking.com
119
119
  executables: []
@@ -201,6 +201,8 @@ files:
201
201
  - lib/action_view/railtie.rb
202
202
  - lib/action_view/record_identifier.rb
203
203
  - lib/action_view/renderer/abstract_renderer.rb
204
+ - lib/action_view/renderer/collection_renderer.rb
205
+ - lib/action_view/renderer/object_renderer.rb
204
206
  - lib/action_view/renderer/partial_renderer.rb
205
207
  - lib/action_view/renderer/partial_renderer/collection_caching.rb
206
208
  - lib/action_view/renderer/renderer.rb
@@ -220,6 +222,7 @@ files:
220
222
  - lib/action_view/template/html.rb
221
223
  - lib/action_view/template/inline.rb
222
224
  - lib/action_view/template/raw_file.rb
225
+ - lib/action_view/template/renderable.rb
223
226
  - lib/action_view/template/resolver.rb
224
227
  - lib/action_view/template/sources.rb
225
228
  - lib/action_view/template/sources/file.rb
@@ -236,10 +239,10 @@ licenses:
236
239
  - MIT
237
240
  metadata:
238
241
  bug_tracker_uri: https://github.com/rails/rails/issues
239
- changelog_uri: https://github.com/rails/rails/blob/v6.0.3.1/actionview/CHANGELOG.md
240
- documentation_uri: https://api.rubyonrails.org/v6.0.3.1/
242
+ changelog_uri: https://github.com/rails/rails/blob/v6.1.0.rc2/actionview/CHANGELOG.md
243
+ documentation_uri: https://api.rubyonrails.org/v6.1.0.rc2/
241
244
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
242
- source_code_uri: https://github.com/rails/rails/tree/v6.0.3.1/actionview
245
+ source_code_uri: https://github.com/rails/rails/tree/v6.1.0.rc2/actionview
243
246
  post_install_message:
244
247
  rdoc_options: []
245
248
  require_paths:
@@ -251,12 +254,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
251
254
  version: 2.5.0
252
255
  required_rubygems_version: !ruby/object:Gem::Requirement
253
256
  requirements:
254
- - - ">="
257
+ - - ">"
255
258
  - !ruby/object:Gem::Version
256
- version: '0'
259
+ version: 1.3.1
257
260
  requirements:
258
261
  - none
259
- rubygems_version: 3.1.2
262
+ rubygems_version: 3.1.4
260
263
  signing_key:
261
264
  specification_version: 4
262
265
  summary: Rendering framework putting the V in MVC (part of Rails).