view_component 2.14.0 → 2.14.1

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

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: d886f5b071663d4c5cd6bf96d94c02541d4fe86e470e79cc4ec51f1cfcc6c35b
4
- data.tar.gz: 01f24da54ab8ebd5a701be24b019e7cbbd97e38cffc74b380d9af4fc006558e5
3
+ metadata.gz: '084152c558b71f87f41d620f9cdce42e689e0b4159cdfa68f3cb041a7bbea3ba'
4
+ data.tar.gz: 45324159a07873ce92562650fe7c2ad6e8a279c3db216b3460a6075f71033180
5
5
  SHA512:
6
- metadata.gz: f45dab99819a3b0cd15a812ebe4f678173212b3eaf7d33e76a1c5523462a144a8f8a47cf7466581a629614706a3e9176de0dac7dbda4f63fc7a0a96658a5e55e
7
- data.tar.gz: ca67804e62bc095cd0a08373b1a5e415702173c770e9695b2242808546077211d571ccfda4c722031ad08c9d079d41eeaa627e0f206784648b3183debde71bd0
6
+ metadata.gz: 58f994aac7efdf81146972a351a12726131658e4ccbd8bf0661eb135d7935ff396c64752d9f9edd6dda50b90a4829aeb506f24edee712279aa1cf4bf4f15886d
7
+ data.tar.gz: 430b55482aaafaea6a27e73593861f897620cb635c2a2f14f14b5a772846a8f5a7b42bd973f637cd587816762891bcc432ced92dbac04fe1d391bf7734873a6a
@@ -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 = controller.view_context.render(component, args, &block)
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
@@ -4,7 +4,7 @@ module ViewComponent
4
4
  module VERSION
5
5
  MAJOR = 2
6
6
  MINOR = 14
7
- PATCH = 0
7
+ PATCH = 1
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH].join(".")
10
10
  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.0
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-07 00:00:00.000000000 Z
11
+ date: 2020-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport