view_component 2.79.0 → 2.80.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 +4 -4
- data/app/controllers/concerns/view_component/preview_actions.rb +0 -6
- data/app/controllers/view_components_system_test_controller.rb +9 -0
- data/docs/CHANGELOG.md +18 -0
- data/lib/view_component/compiler.rb +0 -4
- data/lib/view_component/engine.rb +10 -4
- data/lib/view_component/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35801e5fcaab65f2242b92370229ab3b1bb687db3b36c92b74f0e515cfe258b1
|
4
|
+
data.tar.gz: 4f4d7adfcbe6ec3e4af0b3cfed05d80976a9fb31dd47fa77f5a48d8def5cb489
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21367aa3c40f5004a2479842db12460ea7939a189921f97dfe3ffbfba12acc327bc828a1d96be9b96816ecfc6952ce07ddf3549a858775934d83da3111bf09c4
|
7
|
+
data.tar.gz: 215cc4ef718e34ce4753bbfef12aee750f73193643af09b05699dff36711f46f0f2821fc6410c639bde87576d911a019d011677bf97620eb103bac4550130439
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails/application_controller"
|
4
|
+
|
5
|
+
class ViewComponentsSystemTestController < Rails::ApplicationController # :nodoc:
|
6
|
+
def system_test_entrypoint
|
7
|
+
render file: "./tmp/view_components/#{params.permit(:file)[:file]}"
|
8
|
+
end
|
9
|
+
end
|
data/docs/CHANGELOG.md
CHANGED
@@ -10,6 +10,24 @@ nav_order: 5
|
|
10
10
|
|
11
11
|
## main
|
12
12
|
|
13
|
+
## 2.80.0
|
14
|
+
|
15
|
+
* Move system test endpoint out of the unrelated previews controller.
|
16
|
+
|
17
|
+
*Edwin Mak*
|
18
|
+
|
19
|
+
* Display Ruby 2.7 deprecation notice only once, when starting the application.
|
20
|
+
|
21
|
+
*Henrik Hauge Bjørnskov*
|
22
|
+
|
23
|
+
* Require Rails 5.2+ in gemspec and update documentation.
|
24
|
+
|
25
|
+
*Drew Bragg*
|
26
|
+
|
27
|
+
* Add documentation for using `with_rendered_component_path` with RSpec.
|
28
|
+
|
29
|
+
*Edwin Mak*
|
30
|
+
|
13
31
|
## 2.79.0
|
14
32
|
|
15
33
|
* Add ability to pass explicit `preview_path` to preview generator.
|
@@ -30,10 +30,6 @@ module ViewComponent
|
|
30
30
|
return if compiled? && !force
|
31
31
|
return if component_class == ViewComponent::Base
|
32
32
|
|
33
|
-
if RUBY_VERSION < "2.7.0"
|
34
|
-
ViewComponent::Deprecation.deprecation_warning("Support for Ruby versions < 2.7.0")
|
35
|
-
end
|
36
|
-
|
37
33
|
component_class.superclass.compile(raise_errors: raise_errors) if should_compile_superclass?
|
38
34
|
subclass_instance_methods = component_class.instance_methods(false)
|
39
35
|
|
@@ -121,10 +121,6 @@ module ViewComponent
|
|
121
121
|
internal: true
|
122
122
|
)
|
123
123
|
|
124
|
-
if Rails.env.test?
|
125
|
-
get("_system_test_entrypoint", to: "#{preview_controller}#system_test_entrypoint")
|
126
|
-
end
|
127
|
-
|
128
124
|
get(
|
129
125
|
"#{options.preview_route}/*path",
|
130
126
|
to: "#{preview_controller}#previews",
|
@@ -134,6 +130,12 @@ module ViewComponent
|
|
134
130
|
end
|
135
131
|
end
|
136
132
|
|
133
|
+
if Rails.env.test?
|
134
|
+
app.routes.prepend do
|
135
|
+
get("_system_test_entrypoint", to: "view_components_system_test#system_test_entrypoint")
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
137
139
|
app.executor.to_run :before do
|
138
140
|
CompileCache.invalidate! unless ActionView::Base.cache_template_loading
|
139
141
|
end
|
@@ -141,6 +143,10 @@ module ViewComponent
|
|
141
143
|
end
|
142
144
|
end
|
143
145
|
|
146
|
+
if RUBY_VERSION < "2.7.0"
|
147
|
+
ViewComponent::Deprecation.deprecation_warning("Support for Ruby versions < 2.7.0")
|
148
|
+
end
|
149
|
+
|
144
150
|
# :nocov:
|
145
151
|
unless defined?(ViewComponent::Base)
|
146
152
|
require "view_component/deprecation"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: view_component
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.80.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ViewComponent Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.
|
19
|
+
version: 5.2.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '8.0'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 5.
|
29
|
+
version: 5.2.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '8.0'
|
@@ -322,6 +322,7 @@ files:
|
|
322
322
|
- app/assets/vendor/prism.min.js
|
323
323
|
- app/controllers/concerns/view_component/preview_actions.rb
|
324
324
|
- app/controllers/view_components_controller.rb
|
325
|
+
- app/controllers/view_components_system_test_controller.rb
|
325
326
|
- app/helpers/preview_helper.rb
|
326
327
|
- app/views/test_mailer/test_email.html.erb
|
327
328
|
- app/views/view_components/_preview_source.html.erb
|