view_component 2.14.0 → 2.14.1
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/CHANGELOG.md +17 -0
- data/README.md +4 -4
- data/lib/view_component/slotable.rb +1 -1
- data/lib/view_component/test_helpers.rb +6 -1
- data/lib/view_component/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '084152c558b71f87f41d620f9cdce42e689e0b4159cdfa68f3cb041a7bbea3ba'
|
|
4
|
+
data.tar.gz: 45324159a07873ce92562650fe7c2ad6e8a279c3db216b3460a6075f71033180
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 58f994aac7efdf81146972a351a12726131658e4ccbd8bf0661eb135d7935ff396c64752d9f9edd6dda50b90a4829aeb506f24edee712279aa1cf4bf4f15886d
|
|
7
|
+
data.tar.gz: 430b55482aaafaea6a27e73593861f897620cb635c2a2f14f14b5a772846a8f5a7b42bd973f637cd587816762891bcc432ced92dbac04fe1d391bf7734873a6a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# master
|
|
2
2
|
|
|
3
|
+
# 2.14.1
|
|
4
|
+
|
|
5
|
+
* 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.
|
|
6
|
+
|
|
7
|
+
*Clément Joubert*
|
|
8
|
+
|
|
9
|
+
* Fix kwargs warnings in slotable.
|
|
10
|
+
|
|
11
|
+
Fixes:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
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
|
|
15
|
+
view_component/test/app/components/slots_component.rb:18: warning: The called method `initialize' is defined here
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
*Eileen M. Uchitelle*
|
|
19
|
+
|
|
3
20
|
# 2.14.0
|
|
4
21
|
|
|
5
22
|
* Add `config.preview_paths` to support multiple locations of component preview files. Deprecate `config.preview_path`.
|
data/README.md
CHANGED
|
@@ -929,10 +929,10 @@ ViewComponent is built by:
|
|
|
929
929
|
|@maxbeizer|@franco|@tbroad-ramsey|@jensljungblad|@bbugh|
|
|
930
930
|
|Nashville, TN|Switzerland|Spring Hill, TN|New York, NY|Austin, TX|
|
|
931
931
|
|
|
932
|
-
|<img src="https://avatars.githubusercontent.com/johannesengl?s=256" alt="johannesengl" width="128" />|
|
|
933
|
-
|
|
934
|
-
|@johannesengl|
|
|
935
|
-
|Berlin, Germany|
|
|
932
|
+
|<img src="https://avatars.githubusercontent.com/johannesengl?s=256" alt="johannesengl" width="128" />|<img src="https://avatars.githubusercontent.com/czj?s=256" alt="czj" width="128" />|
|
|
933
|
+
|:---:|:---:|
|
|
934
|
+
|@johannesengl|@czj|
|
|
935
|
+
|Berlin, Germany|Paris, France|
|
|
936
936
|
|
|
937
937
|
## License
|
|
938
938
|
|
|
@@ -95,7 +95,7 @@ module ViewComponent
|
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
# Instantiate Slot class, accommodating Slots that don't accept arguments
|
|
98
|
-
slot_instance = args.present? ? slot_class.new(args) : slot_class.new
|
|
98
|
+
slot_instance = args.present? ? slot_class.new(**args) : slot_class.new
|
|
99
99
|
|
|
100
100
|
# Capture block and assign to slot_instance#content
|
|
101
101
|
slot_instance.content = view_context.capture(&block) if block_given?
|
|
@@ -20,7 +20,12 @@ module ViewComponent
|
|
|
20
20
|
attr_reader :rendered_component
|
|
21
21
|
|
|
22
22
|
def render_inline(component, **args, &block)
|
|
23
|
-
@rendered_component =
|
|
23
|
+
@rendered_component =
|
|
24
|
+
if Rails.version.to_f >= 6.1
|
|
25
|
+
controller.view_context.render(component, args, &block)
|
|
26
|
+
else
|
|
27
|
+
controller.view_context.render_component(component, &block)
|
|
28
|
+
end
|
|
24
29
|
|
|
25
30
|
Nokogiri::HTML.fragment(@rendered_component)
|
|
26
31
|
end
|
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.14.
|
|
4
|
+
version: 2.14.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitHub Open Source
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-07-
|
|
11
|
+
date: 2020-07-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|