view_component 4.0.0 → 4.12.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.
- checksums.yaml +4 -4
- data/app/controllers/view_components_system_test_controller.rb +12 -1
- data/docs/CHANGELOG.md +214 -114
- data/lib/generators/view_component/component/component_generator.rb +1 -1
- data/lib/view_component/base.rb +117 -25
- data/lib/view_component/collection.rb +24 -12
- data/lib/view_component/compiler.rb +12 -10
- data/lib/view_component/config.rb +5 -1
- data/lib/view_component/configurable.rb +18 -2
- data/lib/view_component/engine.rb +12 -2
- data/lib/view_component/inline_template.rb +1 -0
- data/lib/view_component/instrumentation.rb +19 -6
- data/lib/view_component/preview.rb +3 -1
- data/lib/view_component/slot.rb +3 -4
- data/lib/view_component/slotable.rb +12 -3
- data/lib/view_component/system_test_helpers.rb +1 -0
- data/lib/view_component/template.rb +55 -2
- data/lib/view_component/test_helpers.rb +37 -13
- data/lib/view_component/version.rb +1 -1
- data/lib/view_component.rb +2 -1
- metadata +15 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b2f1a7d34956fc9ae629c0f0e710f4a7335b33ebc99f1c3eccafc41d19713524
|
|
4
|
+
data.tar.gz: efd4bec7d2425da171f89f28fbc1bfaf9f2cba94fd0f2a9cbce674830281938e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5d0f5024d419a56b5e178f0cce3d77ac4a1ae2d4d3efc0ac5334e7b55a4dcb6cc7460aa4d60a47bce63918b0a452b53c5425297ef03da2ce074793407acef570
|
|
7
|
+
data.tar.gz: be1d649efec64995de234eb70998001d42cd9b0197bdce00ec5011d68cb2a2784925abf283b3f51c3986a55a446db3ba0c17cedf406c919e31b178ece2be6b51
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "view_component/errors"
|
|
4
|
+
|
|
3
5
|
class ViewComponentsSystemTestController < ActionController::Base # :nodoc:
|
|
4
6
|
if Rails.env.test?
|
|
5
7
|
before_action :validate_file_path
|
|
@@ -8,18 +10,27 @@ class ViewComponentsSystemTestController < ActionController::Base # :nodoc:
|
|
|
8
10
|
@_tmpdir ||= FileUtils.mkdir_p("./tmp/view_components/").first
|
|
9
11
|
end
|
|
10
12
|
|
|
13
|
+
rescue_from ViewComponent::SystemTestControllerNefariousPathError, with: :render_not_found
|
|
14
|
+
|
|
11
15
|
def system_test_entrypoint
|
|
12
16
|
render file: @path
|
|
13
17
|
end
|
|
14
18
|
|
|
15
19
|
private
|
|
16
20
|
|
|
21
|
+
def render_not_found
|
|
22
|
+
head :not_found
|
|
23
|
+
end
|
|
24
|
+
|
|
17
25
|
# Ensure that the file path is valid and doesn't target files outside
|
|
18
26
|
# the expected directory (e.g. via a path traversal or symlink attack)
|
|
19
27
|
def validate_file_path
|
|
20
28
|
base_path = ::File.realpath(self.class.temp_dir)
|
|
21
29
|
@path = ::File.realpath(params.permit(:file)[:file], base_path)
|
|
22
|
-
|
|
30
|
+
allowed_prefix = "#{base_path}#{::File::SEPARATOR}"
|
|
31
|
+
unless @path == base_path || @path.start_with?(allowed_prefix)
|
|
32
|
+
raise ViewComponent::SystemTestControllerNefariousPathError
|
|
33
|
+
end
|
|
23
34
|
end
|
|
24
35
|
end
|
|
25
36
|
end
|
data/docs/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,215 @@ nav_order: 6
|
|
|
10
10
|
|
|
11
11
|
## main
|
|
12
12
|
|
|
13
|
+
## 4.12.0
|
|
14
|
+
|
|
15
|
+
* Fix stale render context on reused component instances. A `ViewComponent::Base` instance memoized its controller, helpers, request, view context, lookup context, view flow, and requested format details on first render via `||=`. Rendering the same instance a second time (intentionally or via aliasing) reused that stale context, which could leak data across requests, sessions, or users. `#render_in` now resets these ivars on every call so each render derives its context from the current view.
|
|
16
|
+
|
|
17
|
+
*Joel Hawksley*
|
|
18
|
+
|
|
19
|
+
* Fix HTML-safety bypass in `around_render`. `ViewComponent::Base#around_render` could return HTML-unsafe strings that bypassed the escaping applied to normal `#call` return values, creating an XSS risk. The vulnerability was amplified in `ViewComponent::Collection#render_in`, which joined per-item results and unconditionally marked the output `html_safe`. HTML-unsafe strings returned from `around_render` are now escaped (with a warning) and `Collection#render_in` now uses `safe_join` so unsafe per-item output is escaped instead of laundered into a `SafeBuffer`.
|
|
20
|
+
|
|
21
|
+
*Joel Hawksley*
|
|
22
|
+
|
|
23
|
+
## 4.11.0
|
|
24
|
+
|
|
25
|
+
* Update `render_in` signature to accept `**_` for compatibility with Rails [#50623](https://github.com/rails/rails/pull/50623).
|
|
26
|
+
|
|
27
|
+
*Joel Hawksley*
|
|
28
|
+
|
|
29
|
+
* Fix translation scope resolution in nested lambda-backed slots. Relative `t(".key")` calls inside lambda-backed slots were resolving against an intermediate component's scope instead of the original partial's scope where the block was defined.
|
|
30
|
+
|
|
31
|
+
*Artin Boghosian*
|
|
32
|
+
|
|
33
|
+
## 4.10.0
|
|
34
|
+
|
|
35
|
+
* Fix `NameError: uninitialized constant ViewComponent::SystemTestControllerNefariousPathError` when booting in the test environment with `eager_load = true`.
|
|
36
|
+
|
|
37
|
+
*Joel Hawksley*
|
|
38
|
+
|
|
39
|
+
* Fix yielded content rendered at wrong location when using form helpers.
|
|
40
|
+
|
|
41
|
+
*Joel Hawksley*, *Markus*
|
|
42
|
+
|
|
43
|
+
## 4.9.0
|
|
44
|
+
|
|
45
|
+
* Fix path traversal vulnerability in `ViewComponentsSystemTestController` where sibling directories sharing a string prefix with the allowed temp directory could bypass the path containment check. The `start_with?` check has been replaced with a separator-aware prefix check, and nefarious path errors now return a 404 instead of an unhandled exception.
|
|
46
|
+
|
|
47
|
+
*Joel Hawksley*
|
|
48
|
+
|
|
49
|
+
* Fix preview route vulnerability where inherited methods on `ViewComponent::Preview` (such as `render_with_template`) could be invoked via the preview URL, allowing arbitrary internal Rails templates to be rendered with attacker-controlled locals and request parameters. `render_args` now raises `AbstractController::ActionNotFound` for any example not explicitly declared on the preview subclass.
|
|
50
|
+
|
|
51
|
+
*Joel Hawksley*
|
|
52
|
+
|
|
53
|
+
* Add `yard-lint` to CI.
|
|
54
|
+
|
|
55
|
+
*Joel Hawksley*
|
|
56
|
+
|
|
57
|
+
## 4.8.0
|
|
58
|
+
|
|
59
|
+
* Add `compile.view_component` ActiveSupport::Notifications event for eager compilation at boot time.
|
|
60
|
+
|
|
61
|
+
*Joel Hawksley*, *GitHub Copilot*
|
|
62
|
+
|
|
63
|
+
## 4.7.0
|
|
64
|
+
|
|
65
|
+
* Fix stale content cache when slots are accessed before `render_in`.
|
|
66
|
+
|
|
67
|
+
*Jared Armstrong*
|
|
68
|
+
|
|
69
|
+
* Add rubocop-view_component to resources.
|
|
70
|
+
|
|
71
|
+
*Andy Waite*
|
|
72
|
+
|
|
73
|
+
* Fix bug where inheritance of components with formatless templates improperly raised a NoMethodError.
|
|
74
|
+
|
|
75
|
+
*GitHub Copilot*, *Joel Hawksley*, *Cameron Dutro*
|
|
76
|
+
|
|
77
|
+
## 4.6.0
|
|
78
|
+
|
|
79
|
+
* Add `view_identifier` to the `render.view_component` instrumentation event payload, containing the path to the component's template file (e.g. `app/components/my_component.html.erb`). For components using inline render methods, `view_identifier` will be `nil`.
|
|
80
|
+
|
|
81
|
+
*GitHub Copilot*
|
|
82
|
+
|
|
83
|
+
* Replace deprecated `require_dependency` with `require` in preview loading.
|
|
84
|
+
|
|
85
|
+
*GitHub Copilot*
|
|
86
|
+
|
|
87
|
+
* Return `html_safe` empty string from `render_in` when `render?` is false.
|
|
88
|
+
|
|
89
|
+
*GitHub Copilot*
|
|
90
|
+
|
|
91
|
+
## 4.5.0
|
|
92
|
+
|
|
93
|
+
* Fix initialization ordering issue causing missing asset errors in Sprockets.
|
|
94
|
+
|
|
95
|
+
*Cameron Dutro*
|
|
96
|
+
|
|
97
|
+
## 4.4.0
|
|
98
|
+
|
|
99
|
+
* Fix segfaults when Ruby coverage is enabled.
|
|
100
|
+
|
|
101
|
+
*George Holborn*, *Joel Hawksley*
|
|
102
|
+
|
|
103
|
+
* Add `protocol` parameter to `with_request_url` test helper to enable testing with HTTPS protocol.
|
|
104
|
+
|
|
105
|
+
*Joel Hawksley*
|
|
106
|
+
|
|
107
|
+
## 4.3.0
|
|
108
|
+
|
|
109
|
+
* Fix load order issues for 3rd-party template handlers.
|
|
110
|
+
|
|
111
|
+
*Cameron Dutro*
|
|
112
|
+
|
|
113
|
+
* Fix segfault when Ruby coverage is enabled with Rails 8.1 ERB templates.
|
|
114
|
+
|
|
115
|
+
*George Holborn*
|
|
116
|
+
|
|
117
|
+
* Automatically merge dependabot PRs.
|
|
118
|
+
|
|
119
|
+
*Joel Hawksley*
|
|
120
|
+
|
|
121
|
+
* Use Ruby 4.0.0 in CI and dev.
|
|
122
|
+
|
|
123
|
+
*Joel Hawksley*
|
|
124
|
+
|
|
125
|
+
## 4.2.0
|
|
126
|
+
|
|
127
|
+
* Fix translation scope resolution in deeply nested component blocks (3+ levels). Translations called inside deeply nested slot blocks using `renders_many`/`renders_one` were incorrectly resolving to an intermediate component's scope instead of the partial's scope where the block was defined. The fix captures the virtual path at block definition time and restores it during block execution, ensuring translations always resolve relative to where the block was created regardless of nesting depth.
|
|
128
|
+
|
|
129
|
+
*Nathaniel Watts*
|
|
130
|
+
|
|
131
|
+
* Allow `render_inline` with Nokogiri::HTML5 to parse more arbitrary content including bare table content otherwise illegal fragments like `<td>`.
|
|
132
|
+
|
|
133
|
+
*Jonathan Rochkind*
|
|
134
|
+
|
|
135
|
+
* Remove known issue from docs as ActiveScaffold is [now compatible](https://github.com/activescaffold/active_scaffold/pull/743) with ViewComponent.
|
|
136
|
+
|
|
137
|
+
*David Löwenfels*
|
|
138
|
+
|
|
139
|
+
* Add test to document the current behavior for resolving relative translation keys within partial blocks. When rendering a partial, relative translation keys are resolved relative to the partial's own path rather than the caller’s path. This test ensures that this behavior remains consistent.
|
|
140
|
+
|
|
141
|
+
*Oussama Hilal*
|
|
142
|
+
|
|
143
|
+
* Allow I18n calls in `render?`.
|
|
144
|
+
|
|
145
|
+
*23tux*
|
|
146
|
+
|
|
147
|
+
* ViewComponent now works without `rails` and `railties` gems loaded, enabling compatibility with Bridgetown 2.0.
|
|
148
|
+
|
|
149
|
+
*Tom Lord*
|
|
150
|
+
|
|
151
|
+
* Capture partial block in the component's context, allowing access to the component instance inside the block.
|
|
152
|
+
|
|
153
|
+
*23tux*
|
|
154
|
+
|
|
155
|
+
* Add `after_compile` class method hook to enable extensions to run logic after component compilation.
|
|
156
|
+
|
|
157
|
+
*Jose Solás*
|
|
158
|
+
|
|
159
|
+
* Fix outdated reference to preview layout configuration in docs.
|
|
160
|
+
|
|
161
|
+
*Lucas Geron*
|
|
162
|
+
|
|
163
|
+
* Allow ruby-head CI job to fail without failing workflow.
|
|
164
|
+
|
|
165
|
+
*Hakan Ensari*
|
|
166
|
+
|
|
167
|
+
* Fix bug where error line numbers were incorrect in Rails 8.1.
|
|
168
|
+
|
|
169
|
+
*Joel Hawksley*
|
|
170
|
+
|
|
171
|
+
* Remove `< 8.2` upper bound for `activesupport` and `actionview` dependencies.
|
|
172
|
+
|
|
173
|
+
*Hans Lemuet*
|
|
174
|
+
|
|
175
|
+
* Test compatibility with Herb/ReActionView.
|
|
176
|
+
|
|
177
|
+
*Joel Hawksley*
|
|
178
|
+
|
|
179
|
+
* Remove Who Uses ViewComponent section from docs.
|
|
180
|
+
|
|
181
|
+
*Joel Hawksley*
|
|
182
|
+
|
|
183
|
+
## 4.1.1
|
|
184
|
+
|
|
185
|
+
* Resolve deprecation warning for `ActiveSupport::Configurable`.
|
|
186
|
+
|
|
187
|
+
*Simon Fish*
|
|
188
|
+
|
|
189
|
+
* Make `ViewComponent::VERSION` accessible to other gems by default.
|
|
190
|
+
|
|
191
|
+
*Hans Lemuet*
|
|
192
|
+
|
|
193
|
+
## 4.1.0
|
|
194
|
+
|
|
195
|
+
* Add Rails 8.1 support.
|
|
196
|
+
|
|
197
|
+
*Hans Lemuet*
|
|
198
|
+
|
|
199
|
+
* Declare `actionview` as a `view_component` gem dependency.
|
|
200
|
+
|
|
201
|
+
*Michal Cichra*
|
|
202
|
+
|
|
203
|
+
## 4.0.2
|
|
204
|
+
|
|
205
|
+
* Share the view context in tests to prevent out-of-order rendering issues for certain advanced use-cases, eg. testing instances of Rails' `FormBuilder`.
|
|
206
|
+
* Fix double rendering issue for partials that yield.
|
|
207
|
+
|
|
208
|
+
*Cameron Dutro*
|
|
209
|
+
|
|
210
|
+
## 4.0.1
|
|
211
|
+
|
|
212
|
+
* Setup Trusted Publishing to RubyGems to improve software supply chain safety.
|
|
213
|
+
|
|
214
|
+
*Hans Lemuet*
|
|
215
|
+
|
|
216
|
+
* Conditionally add the `ViewComponent::Base#format` method back for Rails 7.1 only.
|
|
217
|
+
* Compute and check lockfiles into source control.
|
|
218
|
+
* Constrain Rails versions in gemfiles to only allow the patch version to vary, eg. `~> 7.1.0` instead of `~> 7.1`.
|
|
219
|
+
|
|
220
|
+
*Cameron Dutro*
|
|
221
|
+
|
|
13
222
|
## 4.0.0
|
|
14
223
|
|
|
15
224
|
Two years after releasing [3.0.0](https://github.com/ViewComponent/view_component/releases/tag/v3.0.0) and almost six years since [1.0.0](https://github.com/ViewComponent/view_component/releases/tag/v1.0.0), we're proud to ship ViewComponent 4. This release marks a shift towards a Long Term Support model for the project, having reached significant feature maturity. While contributions are always welcome, we're unlikely to accept further breaking changes or major feature additions.
|
|
@@ -37,11 +246,10 @@ Please report any issues at [https://github.com/ViewComponent/view_component/iss
|
|
|
37
246
|
|
|
38
247
|
### Breaking changes (dev/test)
|
|
39
248
|
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* `config.
|
|
249
|
+
* Remove `config.view_component.test_controller` in favor of `vc_test_controller_class` test helper method.
|
|
250
|
+
* `config.view_component.component_parent_class` is now `config.view_component.generate.parent_class`, moving the generator-specific option to the generator configuration namespace.
|
|
251
|
+
* `config.view_component.view_component_path` is now `config.view_component.generate.path`, as components have long since been able to exist in any directory.
|
|
43
252
|
* Move previews-related configuration (`enabled`, `route`, `paths`, `default_layout`, `controller`) to under `previews` namespace.
|
|
44
|
-
* `config.view_component_path` is now `config.generate.path`, as components have long since been able to exist in any directory.
|
|
45
253
|
* `--inline` generator option now generates inline template. Use `--call` to generate `#call` method.
|
|
46
254
|
* Remove broken integration with `rails stats` that ignored components outside of `app/components`.
|
|
47
255
|
* Remove `preview_source` functionality. Consider using [Lookbook](https://lookbook.build/) instead.
|
|
@@ -66,7 +274,7 @@ Please report any issues at [https://github.com/ViewComponent/view_component/iss
|
|
|
66
274
|
### Bug fixes
|
|
67
275
|
|
|
68
276
|
* Fix bug where virtual path wasn't reset, breaking translations outside of components.
|
|
69
|
-
* Fix bug where `config.previews.enabled` didn't function properly in production environments.
|
|
277
|
+
* Fix bug where `config.view_component.previews.enabled` didn't function properly in production environments.
|
|
70
278
|
* Fix bug in `SlotableDefault` where default couldn't be overridden when content was passed as a block.
|
|
71
279
|
* Fix bug where request-aware helpers didn't work outside of the request context.
|
|
72
280
|
* `ViewComponentsSystemTestController` shouldn't be useable outside of test environment
|
|
@@ -81,7 +289,7 @@ Please report any issues at [https://github.com/ViewComponent/view_component/iss
|
|
|
81
289
|
* Update documentation on performance to reflect more representative benchmark showing 2-3x speed increase over partials.
|
|
82
290
|
* Add documentation note about instrumentation negatively affecting performance.
|
|
83
291
|
* Remove unnecessary ENABLE_RELOADING test suite flag.
|
|
84
|
-
* `config.previews.default_layout` should default to nil.
|
|
292
|
+
* `config.view_component.previews.default_layout` should default to nil.
|
|
85
293
|
* Add test coverage for uncovered code.
|
|
86
294
|
* Test against `turbo-rails` `v2` and `rspec-rails` `v7`.
|
|
87
295
|
|
|
@@ -470,10 +678,6 @@ This release makes the following breaking changes:
|
|
|
470
678
|
|
|
471
679
|
*Martin Meyerhoff*, *Joel Hawksley*
|
|
472
680
|
|
|
473
|
-
* Add Content Harmony & Learn To Be to list of companies using ViewComponent.
|
|
474
|
-
|
|
475
|
-
*Kane Jamison*
|
|
476
|
-
|
|
477
681
|
* Clarify error message about render-dependent logic.
|
|
478
682
|
|
|
479
683
|
Error messages about render-dependent logic were sometimes inaccurate, saying `during initialization` despite also being raised after a component had been initialized but before it was rendered.
|
|
@@ -492,10 +696,6 @@ This release makes the following breaking changes:
|
|
|
492
696
|
|
|
493
697
|
*Reegan Viljoen*
|
|
494
698
|
|
|
495
|
-
* Add HomeStyler AI to list of companies using ViewComponent.
|
|
496
|
-
|
|
497
|
-
*JP Balarini*
|
|
498
|
-
|
|
499
699
|
## 3.21.0
|
|
500
700
|
|
|
501
701
|
* Updates testing docs to include an example of how to use with RSpec.
|
|
@@ -506,10 +706,6 @@ This release makes the following breaking changes:
|
|
|
506
706
|
|
|
507
707
|
*KAWAKAMI Moeki*
|
|
508
708
|
|
|
509
|
-
* Add FreeATS to list of companies using ViewComponent.
|
|
510
|
-
|
|
511
|
-
*Ilia Liamshin*
|
|
512
|
-
|
|
513
709
|
* Ensure HTML output safety wrapper is used for all inline templates.
|
|
514
710
|
|
|
515
711
|
*Joel Hawksley*
|
|
@@ -560,10 +756,6 @@ This release makes the following breaking changes:
|
|
|
560
756
|
|
|
561
757
|
*Blake Williams*
|
|
562
758
|
|
|
563
|
-
* Add [Niva]([niva.co](https://www.niva.co/)) to companies who use `ViewComponent`.
|
|
564
|
-
|
|
565
|
-
*Daniel Vu Dao*
|
|
566
|
-
|
|
567
759
|
* Fix `preview_paths` in docs.
|
|
568
760
|
|
|
569
761
|
*Javier Aranda*
|
|
@@ -628,10 +820,6 @@ This release makes the following breaking changes:
|
|
|
628
820
|
|
|
629
821
|
*Joel Hawksley*
|
|
630
822
|
|
|
631
|
-
* Add Kicksite to list of companies using ViewComponent.
|
|
632
|
-
|
|
633
|
-
*Adil Lari*
|
|
634
|
-
|
|
635
823
|
* Allow overridden slot methods to use `super`.
|
|
636
824
|
|
|
637
825
|
*Andrew Schwartz*
|
|
@@ -871,10 +1059,6 @@ This release makes the following breaking changes:
|
|
|
871
1059
|
|
|
872
1060
|
*Simon Fish*
|
|
873
1061
|
|
|
874
|
-
* Add Simundia to list of companies using ViewComponent.
|
|
875
|
-
|
|
876
|
-
*Alexandre Ignjatovic*
|
|
877
|
-
|
|
878
1062
|
* Reduce UnboundMethod objects by memoizing initialize_parameters.
|
|
879
1063
|
|
|
880
1064
|
*Rainer Borene*
|
|
@@ -925,10 +1109,6 @@ This release makes the following breaking changes:
|
|
|
925
1109
|
|
|
926
1110
|
*milk1000cc*
|
|
927
1111
|
|
|
928
|
-
* Add PeopleForce to list of companies using ViewComponent.
|
|
929
|
-
|
|
930
|
-
*Volodymyr Khandiuk*
|
|
931
|
-
|
|
932
1112
|
## 3.5.0
|
|
933
1113
|
|
|
934
1114
|
* Add Skroutz to users list.
|
|
@@ -1003,14 +1183,6 @@ This release makes the following breaking changes:
|
|
|
1003
1183
|
|
|
1004
1184
|
*Joel Hawksley*
|
|
1005
1185
|
|
|
1006
|
-
* Add Ophelos to list of companies using ViewComponent.
|
|
1007
|
-
|
|
1008
|
-
*Graham Rogers*
|
|
1009
|
-
|
|
1010
|
-
* Add FlightLogger to list of companies using ViewComponent.
|
|
1011
|
-
|
|
1012
|
-
*Joseph Carpenter*
|
|
1013
|
-
|
|
1014
1186
|
* Fix coverage reports overwriting each other when running locally.
|
|
1015
1187
|
|
|
1016
1188
|
*Jonathan del Strother*
|
|
@@ -1250,14 +1422,6 @@ Run into an issue with this release? [Let us know](https://github.com/ViewCompon
|
|
|
1250
1422
|
|
|
1251
1423
|
*Graham Rogers*
|
|
1252
1424
|
|
|
1253
|
-
* Add Krystal to list of companies using ViewComponent.
|
|
1254
|
-
|
|
1255
|
-
*Matt Bearman*
|
|
1256
|
-
|
|
1257
|
-
* Add Mon Ami to list of companies using ViewComponent.
|
|
1258
|
-
|
|
1259
|
-
*Ethan Lee-Tyson*
|
|
1260
|
-
|
|
1261
1425
|
## 3.0.0.rc1
|
|
1262
1426
|
|
|
1263
1427
|
1,000+ days and 100+ releases later, the 200+ contributors to ViewComponent are proud to ship v3.0.0!
|
|
@@ -1406,10 +1570,6 @@ Run into an issue with this release? [Let us know](https://github.com/ViewCompon
|
|
|
1406
1570
|
|
|
1407
1571
|
*Hans Lemuet*
|
|
1408
1572
|
|
|
1409
|
-
* Add Startup Jobs to list of companies using ViewComponent.
|
|
1410
|
-
|
|
1411
|
-
*Marc Köhlbrugge*
|
|
1412
|
-
|
|
1413
1573
|
* Run PVC's accessibility tests in a single process to avoid resource contention in CI.
|
|
1414
1574
|
|
|
1415
1575
|
*Cameron Dutro*
|
|
@@ -1450,10 +1610,6 @@ Run into an issue with this release? [Let us know](https://github.com/ViewCompon
|
|
|
1450
1610
|
|
|
1451
1611
|
## 2.74.0
|
|
1452
1612
|
|
|
1453
|
-
* Add Avo to list of companies using ViewComponent.
|
|
1454
|
-
|
|
1455
|
-
*Adrian Marin*
|
|
1456
|
-
|
|
1457
1613
|
* Promote experimental `_output_postamble` method to public API as `output_postamble`.
|
|
1458
1614
|
|
|
1459
1615
|
*Joel Hawksley*
|
|
@@ -1480,10 +1636,6 @@ Run into an issue with this release? [Let us know](https://github.com/ViewCompon
|
|
|
1480
1636
|
|
|
1481
1637
|
*Erinna Chen*
|
|
1482
1638
|
|
|
1483
|
-
* Add PrintReleaf to list of companies using ViewComponent.
|
|
1484
|
-
|
|
1485
|
-
*Ry Kulp*
|
|
1486
|
-
|
|
1487
1639
|
* Simplify CI configuration to a single build per Ruby/Rails version.
|
|
1488
1640
|
|
|
1489
1641
|
*Joel Hawksley*
|
|
@@ -1492,10 +1644,6 @@ Run into an issue with this release? [Let us know](https://github.com/ViewCompon
|
|
|
1492
1644
|
|
|
1493
1645
|
*Ruben Smit*
|
|
1494
1646
|
|
|
1495
|
-
* Add Yobbers to list of companies using ViewComponent.
|
|
1496
|
-
|
|
1497
|
-
*Anton Prins*
|
|
1498
|
-
|
|
1499
1647
|
## 2.72.0
|
|
1500
1648
|
|
|
1501
1649
|
* Deprecate support for Ruby < 2.7 for removal in v3.0.0.
|
|
@@ -1510,10 +1658,6 @@ Run into an issue with this release? [Let us know](https://github.com/ViewCompon
|
|
|
1510
1658
|
|
|
1511
1659
|
*Joel Hawksley.
|
|
1512
1660
|
|
|
1513
|
-
* Add Aluuno to list of companies using ViewComponent.
|
|
1514
|
-
|
|
1515
|
-
*Daniel Naves de Carvalho*
|
|
1516
|
-
|
|
1517
1661
|
* Add `source_code_uri` to gemspec.
|
|
1518
1662
|
|
|
1519
1663
|
*Yoshiyuki Hirano*
|
|
@@ -1548,22 +1692,10 @@ Run into an issue with this release? [Let us know](https://github.com/ViewCompon
|
|
|
1548
1692
|
|
|
1549
1693
|
*Joel Hawksley*
|
|
1550
1694
|
|
|
1551
|
-
* Add Arrows to list of companies using ViewComponent.
|
|
1552
|
-
|
|
1553
|
-
*Matt Swanson*
|
|
1554
|
-
|
|
1555
|
-
* Add WIP to list of companies using ViewComponent.
|
|
1556
|
-
|
|
1557
|
-
*Marc Köhlbrugge*
|
|
1558
|
-
|
|
1559
1695
|
* Update slots documentation to include how to reference slots.
|
|
1560
1696
|
|
|
1561
1697
|
*Brittany Ellich*
|
|
1562
1698
|
|
|
1563
|
-
* Add Clio to list of companies using ViewComponent.
|
|
1564
|
-
|
|
1565
|
-
*Mike Buckley*
|
|
1566
|
-
|
|
1567
1699
|
## 2.69.0
|
|
1568
1700
|
|
|
1569
1701
|
* Add missing `require` to fix `pvc` build.
|
|
@@ -1681,10 +1813,6 @@ Run into an issue with this release? [Let us know](https://github.com/ViewCompon
|
|
|
1681
1813
|
|
|
1682
1814
|
*Vikram Dighe*
|
|
1683
1815
|
|
|
1684
|
-
* Add HappyCo to list of companies using ViewComponent.
|
|
1685
|
-
|
|
1686
|
-
*Josh Clayton*
|
|
1687
|
-
|
|
1688
1816
|
* Add predicate method support to polymorphic slots.
|
|
1689
1817
|
|
|
1690
1818
|
*Graham Rogers*
|
|
@@ -1795,10 +1923,6 @@ Run into an issue with this release? [Let us know](https://github.com/ViewCompon
|
|
|
1795
1923
|
|
|
1796
1924
|
*Thomas Hutterer*
|
|
1797
1925
|
|
|
1798
|
-
* Add FreeAgent to list of companies using ViewComponent.
|
|
1799
|
-
|
|
1800
|
-
*Simon Fish*
|
|
1801
|
-
|
|
1802
1926
|
* Include polymorphic slots in `ViewComponent::Base` by default.
|
|
1803
1927
|
|
|
1804
1928
|
*Cameron Dutro*
|
|
@@ -1854,18 +1978,6 @@ Run into an issue with this release? [Let us know](https://github.com/ViewCompon
|
|
|
1854
1978
|
|
|
1855
1979
|
*Joel Hawksley*
|
|
1856
1980
|
|
|
1857
|
-
* Add G2 to list of companies that use ViewComponent.
|
|
1858
|
-
|
|
1859
|
-
*Jack Shuff*
|
|
1860
|
-
|
|
1861
|
-
* Add Within3 to list of companies that use ViewComponent.
|
|
1862
|
-
|
|
1863
|
-
*Drew Bragg*
|
|
1864
|
-
|
|
1865
|
-
* Add Mission Met to list of companies that use ViewComponent.
|
|
1866
|
-
|
|
1867
|
-
*Nick Smith*
|
|
1868
|
-
|
|
1869
1981
|
* Fix `#with_request_url` test helper not parsing nested query parameters into nested hashes.
|
|
1870
1982
|
|
|
1871
1983
|
*Richard Marbach*
|
|
@@ -1905,10 +2017,6 @@ Run into an issue with this release? [Let us know](https://github.com/ViewCompon
|
|
|
1905
2017
|
|
|
1906
2018
|
*Blake Williams*
|
|
1907
2019
|
|
|
1908
|
-
* Add QuickNode to list of companies that use ViewComponent.
|
|
1909
|
-
|
|
1910
|
-
*Luc Castera*
|
|
1911
|
-
|
|
1912
2020
|
* Include the `Translatable` module by default.
|
|
1913
2021
|
|
|
1914
2022
|
*Elia Schito*
|
|
@@ -1939,10 +2047,6 @@ Run into an issue with this release? [Let us know](https://github.com/ViewCompon
|
|
|
1939
2047
|
|
|
1940
2048
|
*Jason Swett*
|
|
1941
2049
|
|
|
1942
|
-
* Add Bearer to list of companies that use ViewComponent.
|
|
1943
|
-
|
|
1944
|
-
*Yaroslav Shmarov*
|
|
1945
|
-
|
|
1946
2050
|
* Add articles to resources page.
|
|
1947
2051
|
|
|
1948
2052
|
*Joel Hawksley*
|
|
@@ -1972,10 +2076,6 @@ Run into an issue with this release? [Let us know](https://github.com/ViewCompon
|
|
|
1972
2076
|
|
|
1973
2077
|
*Hans Lemuet*
|
|
1974
2078
|
|
|
1975
|
-
* Alphabetize companies using ViewComponent and add Brightline to the list.
|
|
1976
|
-
|
|
1977
|
-
*Jack Schuss*
|
|
1978
|
-
|
|
1979
2079
|
* Add CMYK value for ViewComponent Red color on logo page.
|
|
1980
2080
|
|
|
1981
2081
|
*Dylan Smith*
|
|
@@ -23,7 +23,7 @@ module ViewComponent
|
|
|
23
23
|
class_option :skip_suffix, type: :boolean, default: false
|
|
24
24
|
|
|
25
25
|
def create_component_file
|
|
26
|
-
template "component.rb", File.join(component_path, class_path, "#{file_name}#{options[:skip_suffix]
|
|
26
|
+
template "component.rb", File.join(component_path, class_path, "#{file_name}#{"_component" unless options[:skip_suffix]}.rb")
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
hook_for :test_framework
|