view_component 2.17.0 → 2.19.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.

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63cae604f99ce706878da0fb00ddfdde223bbb1431e33e3096448e4e65b569af
4
- data.tar.gz: 2017fe3d3b8b2979fb5854fbb40cecc5b4c760953377a8e45ceccfbcc1eb01c3
3
+ metadata.gz: 365d7ffb66f4ec6321b0d736bf032d5fe2d9911e1aae9081f23fe09f53d2becc
4
+ data.tar.gz: c547db15e07b7e69d2422cacdf1d450ceeab79f6b9fdb2efcdd93867da68e5d8
5
5
  SHA512:
6
- metadata.gz: ce31c6c2f4668c683ce037c9dc1e2de1e462e3ac5301176a70bf5ab4d7d10cafe33d611f00fd55e13f707b6c19e1731c1c18978ba5e0bc05c35c5986159ac5ef
7
- data.tar.gz: 0fde2e678e6d671e77812f197180bcef3e90ac1e87615dede2890359bb9a594a490edbe43eee43ed60e568826e616cf16e59392427f952c35497dc3516e16bc3
6
+ metadata.gz: 5e73a2c8950e10c09f01231c8ba40906086f943cbcd670b79e807238047f4250ab9e214c8642ff464909913010a58cbc8dd8d7e006655092f565c34420690247
7
+ data.tar.gz: efb52c65561bf10cf345ddde5ecbfffec4543d568f32a8c4d61ea1152d8200c9fa0564152012414a48739054f568a4b20d5185431f7a84782152166e84a93a60
@@ -1,24 +1,76 @@
1
- # master
1
+ # CHANGELOG
2
2
 
3
- # 2.17.0
3
+ ## master
4
+
5
+ ## 2.19.0
6
+
7
+ * Extend documentation for using Stimulus within sidecar directories.
8
+
9
+ *Ciprian Redinciuc*
10
+
11
+ * Subclassed components inherit templates from parent.
12
+
13
+ *Blake Williams*
14
+
15
+ * Fix uninitialized constant error from `with_collection` when `eager_load` is disabled.
16
+
17
+ *Josh Gross*
18
+
19
+ ## 2.18.2
20
+
21
+ * Raise an error if controller or view context is accessed during initialize as they are only available in render.
22
+
23
+ *Julian Nadeau*
24
+
25
+ * Collate test coverage across CI builds, ensuring 100% test coverage.
26
+
27
+ *Joel Hawksley*
28
+
29
+ ## 2.18.1
30
+
31
+ * Fix bug where previews didn't work when monkey patch was disabled.
32
+
33
+ *Mixer Gutierrez*
34
+
35
+ ## 2.18.0
36
+
37
+ * Fix auto-loading of previews (changes no longer require a server restart)
38
+
39
+ *Matt Brictson*
40
+
41
+ * Add `default_preview_layout` configuration option to load custom app/views/layouts.
42
+
43
+ *Jared White, Juan Manuel Ramallo*
44
+
45
+ * Calculate virtual_path once for all instances of a component class to improve performance.
46
+
47
+ *Brad Parker*
48
+
49
+ ## 2.17.1
50
+
51
+ * Fix bug where rendering Slot with empty block resulted in error.
52
+
53
+ *Joel Hawksley*
54
+
55
+ ## 2.17.0
4
56
 
5
57
  * Slots return stripped HTML, removing leading and trailing whitespace.
6
58
 
7
59
  *Jason Long, Joel Hawksley*
8
60
 
9
- # 2.16.0
61
+ ## 2.16.0
10
62
 
11
63
  * Add `--sidecar` option to the erb, haml and slim generators. Places the generated template in the sidecar directory.
12
64
 
13
65
  *Michael van Rooijen*
14
66
 
15
- # 2.15.0
67
+ ## 2.15.0
16
68
 
17
69
  * Add support for templates as ViewComponent::Preview examples.
18
70
 
19
71
  *Juan Manuel Ramallo
20
72
 
21
- # 2.14.1
73
+ ## 2.14.1
22
74
 
23
75
  * Allow using `render_inline` in test when the render monkey patch is disabled with `config.view_component.render_monkey_patch_enabled = false` in versions of Rails < 6.1.
24
76
 
@@ -28,14 +80,14 @@
28
80
 
29
81
  Fixes:
30
82
 
31
- ```
83
+ ```console
32
84
  view_component/lib/view_component/slotable.rb:98: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
33
85
  view_component/test/app/components/slots_component.rb:18: warning: The called method `initialize' is defined here
34
86
  ```
35
87
 
36
88
  *Eileen M. Uchitelle*
37
89
 
38
- # 2.14.0
90
+ ## 2.14.0
39
91
 
40
92
  * Add `config.preview_paths` to support multiple locations of component preview files. Deprecate `config.preview_path`.
41
93
 
@@ -45,25 +97,25 @@
45
97
 
46
98
  *Richard Macklin*
47
99
 
48
- # 2.13.0
100
+ ## 2.13.0
49
101
 
50
102
  * Add the ability to disable the render monkey patch with `config.view_component.render_monkey_patch_enabled`. In versions of Rails < 6.1, add `render_component` and `render_component_to_string` methods which can be used for rendering components instead of `render`.
51
103
 
52
104
  *Johannes Engl*
53
105
 
54
- # 2.12.0
106
+ ## 2.12.0
55
107
 
56
108
  * Implement Slots as potential successor to Content Areas.
57
109
 
58
110
  *Jens Ljungblad, Brian Bugh, Jon Palmer, Joel Hawksley*
59
111
 
60
- # 2.11.1
112
+ ## 2.11.1
61
113
 
62
114
  * Fix kwarg warnings in Ruby 2.7.
63
115
 
64
116
  *Joel Hawksley*
65
117
 
66
- # 2.11.0
118
+ ## 2.11.0
67
119
 
68
120
  * Ensure Rails configuration is available within components.
69
121
 
@@ -73,25 +125,25 @@
73
125
 
74
126
  *Franco Sebregondi*
75
127
 
76
- # 2.10.0
128
+ ## 2.10.0
77
129
 
78
130
  * Raise an `ArgumentError` with a helpful message when Ruby cannot parse a component class.
79
131
 
80
132
  *Max Beizer*
81
133
 
82
- # 2.9.0
134
+ ## 2.9.0
83
135
 
84
136
  * Cache components per-request in development, preventing unnecessary recompilation during a single request.
85
137
 
86
138
  *Felipe Sateler*
87
139
 
88
- # 2.8.0
140
+ ## 2.8.0
89
141
 
90
142
  * Add `before_render`, deprecating `before_render_check`.
91
143
 
92
144
  *Joel Hawksley*
93
145
 
94
- # 2.7.0
146
+ ## 2.7.0
95
147
 
96
148
  * Add `rendered_component` method to `ViewComponent::TestHelpers` which exposes the raw output of the rendered component.
97
149
 
@@ -101,7 +153,7 @@
101
153
 
102
154
  *Jon Palmer*
103
155
 
104
- # 2.6.0
156
+ ## 2.6.0
105
157
 
106
158
  * Add `config.view_component.preview_route` to set the endpoint for component previews. By default `/rails/view_components` is used.
107
159
 
@@ -111,13 +163,13 @@
111
163
 
112
164
  *Joel Hawksley*
113
165
 
114
- # 2.5.1
166
+ ## 2.5.1
115
167
 
116
168
  * Compile component before rendering collection.
117
169
 
118
170
  *Rainer Borene*
119
171
 
120
- # v2.5.0
172
+ ## v2.5.0
121
173
 
122
174
  * Add counter variables when rendering collections.
123
175
 
@@ -127,7 +179,7 @@
127
179
 
128
180
  *Fabio Cantoni*
129
181
 
130
- # v2.4.0
182
+ ## v2.4.0
131
183
 
132
184
  * Add `#render_to_string` support.
133
185
 
@@ -145,7 +197,7 @@
145
197
 
146
198
  *Richard Macklin*
147
199
 
148
- # v2.3.0
200
+ ## v2.3.0
149
201
 
150
202
  * Allow using inline render method(s) defined on a parent.
151
203
 
@@ -159,19 +211,19 @@
159
211
 
160
212
  *Juan Manuel Ramallo*
161
213
 
162
- # v2.2.2
214
+ ## v2.2.2
163
215
 
164
216
  * Add `Base.format` for better compatibility with `ActionView::Template`.
165
217
 
166
218
  *Joel Hawksley*
167
219
 
168
- # v2.2.1
220
+ ## v2.2.1
169
221
 
170
222
  * Fix bug where template could not be found if `inherited` was redefined.
171
223
 
172
224
  *Joel Hawksley*
173
225
 
174
- # v2.2.0
226
+ ## v2.2.0
175
227
 
176
228
  * Add support for `config.action_view.annotate_template_file_names` (coming in Rails 6.1).
177
229
 
@@ -181,25 +233,25 @@
181
233
 
182
234
  *Vasiliy Ermolovich*
183
235
 
184
- # v2.1.0
236
+ ## v2.1.0
185
237
 
186
238
  * Support rendering collections (e.g., `render(MyComponent.with_collection(@items))`).
187
239
 
188
240
  *Tim Clem*
189
241
 
190
- # v2.0.0
242
+ ## v2.0.0
191
243
 
192
244
  * Move to `ViewComponent` namespace, removing all references to `ActionView`.
193
245
 
194
- * The gem name is now `view_component`.
195
- * ViewComponent previews are now accessed at `/rails/view_components`.
196
- * ViewComponents can _only_ be rendered with the instance syntax: `render(MyComponent.new)`. Support for all other syntaxes has been removed.
197
- * ActiveModel::Validations have been removed. ViewComponent generators no longer include validations.
198
- * In Rails 6.1, no monkey patching is used.
199
- * `to_component_class` has been removed.
200
- * All gem configuration is now in `config.view_component`.
246
+ * The gem name is now `view_component`.
247
+ * ViewComponent previews are now accessed at `/rails/view_components`.
248
+ * ViewComponents can _only_ be rendered with the instance syntax: `render(MyComponent.new)`. Support for all other syntaxes has been removed.
249
+ * ActiveModel::Validations have been removed. ViewComponent generators no longer include validations.
250
+ * In Rails 6.1, no monkey patching is used.
251
+ * `to_component_class` has been removed.
252
+ * All gem configuration is now in `config.view_component`.
201
253
 
202
- # v1.17.0
254
+ ## v1.17.0
203
255
 
204
256
  * Support Ruby 2.4 in CI.
205
257
 
@@ -213,7 +265,7 @@
213
265
 
214
266
  *Joel Hawksley*
215
267
 
216
- # v1.16.0
268
+ ## v1.16.0
217
269
 
218
270
  * Add `refute_component_rendered` test helper.
219
271
 
@@ -227,7 +279,7 @@
227
279
 
228
280
  *Rainer Borene*
229
281
 
230
- # v1.15.0
282
+ ## v1.15.0
231
283
 
232
284
  * Re-introduce ActionView::Component::TestHelpers.
233
285
 
@@ -251,19 +303,19 @@
251
303
 
252
304
  *Sean Doyle*
253
305
 
254
- # v1.14.1
306
+ ## v1.14.1
255
307
 
256
308
  * Fix bug where generator created invalid test code.
257
309
 
258
310
  *Joel Hawksley*
259
311
 
260
- # v1.14.0
312
+ ## v1.14.0
261
313
 
262
314
  * Rename ActionView::Component::Base to ViewComponent::Base
263
315
 
264
316
  *Joel Hawksley*
265
317
 
266
- # v1.13.0
318
+ ## v1.13.0
267
319
 
268
320
  * Allow components to be rendered inside controllers.
269
321
 
@@ -273,7 +325,7 @@
273
325
 
274
326
  *Blake Williams*
275
327
 
276
- # v1.12.0
328
+ ## v1.12.0
277
329
 
278
330
  * Revert: Remove initializer requirement for Ruby 2.7+
279
331
 
@@ -287,13 +339,13 @@
287
339
 
288
340
  *Joel Hawksley*
289
341
 
290
- # v1.11.1
342
+ ## v1.11.1
291
343
 
292
344
  * Relax Capybara requirement.
293
345
 
294
346
  *Joel Hawksley*
295
347
 
296
- # v1.11.0
348
+ ## v1.11.0
297
349
 
298
350
  * Add support for Capybara matchers.
299
351
 
@@ -303,25 +355,25 @@
303
355
 
304
356
  *Asger Behncke Jacobsen*
305
357
 
306
- # v1.10.0
358
+ ## v1.10.0
307
359
 
308
360
  * Deprecate all `render` syntaxes except for `render(MyComponent.new(foo: :bar))`
309
361
 
310
362
  *Joel Hawksley*
311
363
 
312
- # v1.9.0
364
+ ## v1.9.0
313
365
 
314
366
  * Remove initializer requirement for Ruby 2.7+
315
367
 
316
368
  *Dylan Clark*
317
369
 
318
- # v1.8.1
370
+ ## v1.8.1
319
371
 
320
372
  * Run validation checks before calling `#render?`.
321
373
 
322
374
  *Ash Wilson*
323
375
 
324
- # v1.8.0
376
+ ## v1.8.0
325
377
 
326
378
  * Remove the unneeded ComponentExamplesController and simplify preview rendering.
327
379
 
@@ -347,7 +399,7 @@
347
399
 
348
400
  *Sergey Malykh*
349
401
 
350
- # v1.7.0
402
+ ## v1.7.0
351
403
 
352
404
  * Simplify validation of templates and compilation.
353
405
 
@@ -357,7 +409,7 @@
357
409
 
358
410
  *Jon Palmer*
359
411
 
360
- # v1.6.2
412
+ ## v1.6.2
361
413
 
362
414
  * Fix Uninitialized Constant error.
363
415
 
@@ -371,7 +423,7 @@
371
423
 
372
424
  *Justin Coyne*
373
425
 
374
- # v1.6.1
426
+ ## v1.6.1
375
427
 
376
428
  * Allow Previews to have no layout.
377
429
 
@@ -397,7 +449,7 @@
397
449
 
398
450
  *Ryan Workman*
399
451
 
400
- # v1.6.0
452
+ ## v1.6.0
401
453
 
402
454
  * Avoid dropping elements in the render_inline test helper.
403
455
 
@@ -427,7 +479,7 @@
427
479
 
428
480
  *Vinicius Stock*
429
481
 
430
- # v1.5.3
482
+ ## v1.5.3
431
483
 
432
484
  * Add support for RSpec to generators.
433
485
 
@@ -437,19 +489,19 @@
437
489
 
438
490
  *Joel Hawksley*
439
491
 
440
- # v1.5.2
492
+ ## v1.5.2
441
493
 
442
494
  * Disable eager loading initializer.
443
495
 
444
496
  *Kasper Meyer*
445
497
 
446
- # v1.5.1
498
+ ## v1.5.1
447
499
 
448
500
  * Update railties class to work with Rails 6.
449
501
 
450
502
  *Juan Manuel Ramallo*
451
503
 
452
- # v1.5.0
504
+ ## v1.5.0
453
505
 
454
506
  Note: `actionview-component` is now loaded by requiring `actionview/component`, not `actionview/component/base`.
455
507
 
@@ -469,7 +521,7 @@ Note: `actionview-component` is now loaded by requiring `actionview/component`,
469
521
 
470
522
  *Juan Manuel Ramallo*
471
523
 
472
- # v1.4.0
524
+ ## v1.4.0
473
525
 
474
526
  * Fix bug where components broke in application paths with periods.
475
527
 
@@ -491,7 +543,7 @@ Note: `actionview-component` is now loaded by requiring `actionview/component`,
491
543
 
492
544
  *Elia Schito*
493
545
 
494
- # v1.3.6
546
+ ## v1.3.6
495
547
 
496
548
  * Allow template file names without format.
497
549
 
@@ -501,7 +553,7 @@ Note: `actionview-component` is now loaded by requiring `actionview/component`,
501
553
 
502
554
  *Juan Manuel Ramallo*
503
555
 
504
- # v1.3.5
556
+ ## v1.3.5
505
557
 
506
558
  * Re-expose `controller` method.
507
559
 
@@ -515,7 +567,7 @@ Note: `actionview-component` is now loaded by requiring `actionview/component`,
515
567
 
516
568
  *ars moriendi*
517
569
 
518
- # v1.3.4
570
+ ## v1.3.4
519
571
 
520
572
  * Template errors surface correct file and line number.
521
573
 
@@ -525,57 +577,57 @@ Note: `actionview-component` is now loaded by requiring `actionview/component`,
525
577
 
526
578
  *Joel Hawksley*
527
579
 
528
- # v1.3.3
580
+ ## v1.3.3
529
581
 
530
- * Do not raise error when sidecar files that are not templates exist.
582
+ * Do not raise error when sidecar files that are not templates exist.
531
583
 
532
584
  *Joel Hawksley*
533
585
 
534
- # v1.3.2
586
+ ## v1.3.2
535
587
 
536
- * Support rendering views from inside component templates.
588
+ * Support rendering views from inside component templates.
537
589
 
538
590
  *Patrick Sinclair*
539
591
 
540
- # v1.3.1
592
+ ## v1.3.1
541
593
 
542
- * Fix bug where rendering nested content caused an error.
594
+ * Fix bug where rendering nested content caused an error.
543
595
 
544
596
  *Joel Hawksley, Aaron Patterson*
545
597
 
546
- # v1.3.0
598
+ ## v1.3.0
547
599
 
548
- * Components are rendered with enough controller context to support rendering of partials and forms.
600
+ * Components are rendered with enough controller context to support rendering of partials and forms.
549
601
 
550
602
  *Patrick Sinclair, Joel Hawksley, Aaron Patterson*
551
603
 
552
- # v1.2.1
604
+ ## v1.2.1
553
605
 
554
- * `actionview-component` is now tested against Ruby 2.3/2.4 and Rails 5.0.0.
606
+ * `actionview-component` is now tested against Ruby 2.3/2.4 and Rails 5.0.0.
555
607
 
556
- # v1.2.0
608
+ ## v1.2.0
557
609
 
558
- * The `render_component` test helper has been renamed to `render_inline`. `render_component` has been deprecated and will be removed in v2.0.0.
610
+ * The `render_component` test helper has been renamed to `render_inline`. `render_component` has been deprecated and will be removed in v2.0.0.
559
611
 
560
612
  *Joel Hawksley*
561
613
 
562
- * Components are now rendered with `render MyComponent, foo: :bar` syntax. The existing `render MyComponent.new(foo: :bar)` syntax has been deprecated and will be removed in v2.0.0.
614
+ * Components are now rendered with `render MyComponent, foo: :bar` syntax. The existing `render MyComponent.new(foo: :bar)` syntax has been deprecated and will be removed in v2.0.0.
563
615
 
564
616
  *Joel Hawksley*
565
617
 
566
- # v1.1.0
618
+ ## v1.1.0
567
619
 
568
- * Components now inherit from ActionView::Component::Base
620
+ * Components now inherit from ActionView::Component::Base
569
621
 
570
622
  *Joel Hawksley*
571
623
 
572
- # v1.0.1
624
+ ## v1.0.1
573
625
 
574
- * Always recompile component templates outside production.
626
+ * Always recompile component templates outside production.
575
627
 
576
628
  *Joel Hawksley, John Hawthorn*
577
629
 
578
- # v1.0.0
630
+ ## v1.0.0
579
631
 
580
632
  This release extracts the `ActionView::Component` library from the GitHub application.
581
633